By: MH Ramon user 18 Mar 2021 at 1:19 a.m. CDT

2 Responses
MH Ramon gravatar
Hello, I want to create a new authentication script to the GLUU server To make it works, I need to put a .jar file somewhere in the GLUU server It runs well in my pc (because I can add the jar file as I type the correct directory location in PYTHONPATH correctly) According to the [documentation]( > If preferred, pure Python libraries can also be added to /opt/gluu/python/libs, and jar files can be added to /opt/gluu/jetty/oxauth/lib/ext. I put my jar file there, but I get this error inside my jar file, there is "fnsv" class that I want to call ``` org.gluu.exception.PythonException: Failed to load python file '' at org.gluu.service.PythonService.loadPythonScript( at org.gluu.service.PythonService$Proxy$_$$_WeldClientProxy.loadPythonScript(Unknown Source) at org.gluu.service.custom.script.CustomScriptManager.createExternalTypeFromStringWithPythonException( at org.gluu.service.custom.script.CustomScriptManager$Proxy$_$$_WeldSubclass.createExternalTypeFromStringWithPythonException(Unknown Source) at org.gluu.service.custom.script.CustomScriptManager.createExternalType( at org.gluu.service.custom.script.CustomScriptManager.reloadCustomScriptConfigurations( at org.gluu.service.custom.script.CustomScriptManager.reloadImpl( at org.gluu.service.custom.script.CustomScriptManager.reload( at org.gluu.service.custom.script.CustomScriptManager.initTimer( at org.gluu.service.custom.script.CustomScriptManager$Proxy$_$$_WeldSubclass.initTimer$$super(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke( at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke( at java.base/java.lang.reflect.Method.invoke( at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal( at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed( at org.gluu.service.cdi.async.AsynchronousInterceptor$1.get( at java.base/java.util.concurrent.CompletableFuture$ at java.base/ Caused by: Traceback (most recent call last): File "", line 9, in <module> ImportError: No module named fnsv at org.python.core.Py.ImportError( at org.python.core.imp.import_logic( at org.python.core.imp.import_module_level( at org.python.core.imp.importName( at org.python.core.ImportFunction.__call__( at org.python.core.PyObject.__call__( at org.python.core.__builtin__.__import__( at org.python.core.imp.importOneAs( at org.python.pycode._pyx4.f$0( at org.python.pycode._pyx4.call_function( at at at org.python.core.Py.runCode( at org.python.util.PythonInterpreter.execfile( at org.gluu.service.PythonService.loadPythonScript( ... 18 more ==================Further details============================ Failed to load python file '' ``` According to [another ticket]( > Customized libs for oxAuth to use should be placed in the following directories: /opt/gluu/jetty/identity/custom/libs /opt/gluu/jetty/oxauth/custom/libs I did that too But the error is exactly same Is there any step that I miss? Thank you

By Mohib Zico staff 18 Mar 2021 at 7:03 a.m. CDT

Mohib Zico gravatar
Check permission of your jar file. See if it's accessible properly by oxTrust or not.

By MH Ramon user 18 Mar 2021 at 8:58 p.m. CDT

MH Ramon gravatar
I already make it 777. Anyway, i solved it by making a little modification on my jython custom script at the beginning of the script like this: ``` import sys sys.path.append("/opt/gluu/jetty/oxauth/lib/ext/testing_lib.jar") # -> Because it is located at /opt/gluu/jetty/oxauth/lib/ext . . . import com.fnsv.testing as TestLib; ``` Now I am facing another error, but not related to this ticket Thanks for your response