By: Prabhu R user 26 Jun 2015 at 4:11 a.m. CDT

5 Responses
Prabhu R gravatar
I done Custom authentication script and added it in "Person Authentication" tab of "Manage Custom Scripts". On accessing gluu GUI after restarting tomcat, it fails to reach login page with following error in parsing Python file, 2015-06-26 09:03:31,213 INFO [org.xdi.oxauth.model.util.JwtUtil] Adding Bouncy Castle Provider 2015-06-26 09:03:31,247 DEBUG [org.xdi.oxauth.util.FileConfiguration] Loading '/opt/tomcat/conf/oxauth-ldap.properties' configuration file from config folder 2015-06-26 09:03:31,391 DEBUG [org.xdi.oxauth.util.FileConfiguration] Loading '/opt/tomcat/conf/salt' configuration file from config folder 2015-06-26 09:03:31,888 INFO [org.xdi.oxauth.model.config.ConfigurationFactory] Loading configuration from LDAP... 2015-06-26 09:03:32,358 DEBUG [org.xdi.oxauth.service.AppInitializer] Created ldapEntryManager: org.gluu.site.ldap.persistence.LdapEntryManager@615899fc 2015-06-26 09:03:33,042 INFO [org.xdi.oxauth.model.config.ConfigurationFactory] Configuration loaded successfully. 2015-06-26 09:03:37,700 ERROR [org.xdi.service.custom.script.CustomScriptManager] Failed to prepare external type '@!EEC7.2AB9.A031.93F7!0001!D39C.D02F!A5F1.350D' org.xdi.exception.PythonException: Failed to load python file 'java.io.ByteArrayInputStream@7fc3768a' at org.xdi.service.PythonService.loadPythonScript(PythonService.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) at org.xdi.service.PythonService_$$_javassist_seam_5.loadPythonScript(PythonService_$$_javassist_seam_5.java) at org.xdi.service.custom.script.CustomScriptManager.createExternalTypeFromStringWithPythonException(CustomScriptManager.java:302) at org.xdi.service.custom.script.CustomScriptManager.createExternalType(CustomScriptManager.java:276) at org.xdi.service.custom.script.CustomScriptManager.reloadCustomScriptConfigurations(CustomScriptManager.java:214) at org.xdi.service.custom.script.CustomScriptManager.reloadImpl(CustomScriptManager.java:140) at org.xdi.service.custom.script.CustomScriptManager.reload(CustomScriptManager.java:128) at org.xdi.service.custom.script.CustomScriptManager.init(CustomScriptManager.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:52) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) at org.xdi.service.custom.script.CustomScriptManager_$$_javassist_seam_6.init(CustomScriptManager_$$_javassist_seam_6.java) at org.xdi.oxauth.service.AppInitializer.createApplicationComponents(AppInitializer.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:52) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) at org.xdi.oxauth.service.AppInitializer_$$_javassist_seam_1.createApplicationComponents(AppInitializer_$$_javassist_seam_1.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) at org.jboss.seam.Component.callComponentMethod(Component.java:2275) at org.jboss.seam.Component.callCreateMethod(Component.java:2198) at org.jboss.seam.Component.newInstance(Component.java:2158) at org.jboss.seam.Component.getInstance(Component.java:2024) at org.jboss.seam.Component.getInstance(Component.java:1986) at org.jboss.seam.Component.getInstance(Component.java:1980) at org.jboss.seam.Component.getInstanceFromFactory(Component.java:2081) at org.jboss.seam.Component.getInstance(Component.java:2014) at org.jboss.seam.Component.getInstance(Component.java:1986) at org.jboss.seam.Component.getInstance(Component.java:1980) at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2375) at org.jboss.seam.Component.getValueToInject(Component.java:2327) at org.jboss.seam.Component.injectAttributes(Component.java:1739) at org.jboss.seam.Component.inject(Component.java:1557) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) at org.xdi.oxauth.service.AuthenticationFilterService_$$_javassist_seam_0.init(AuthenticationFilterService_$$_javassist_seam_0.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) at org.jboss.seam.Component.callComponentMethod(Component.java:2275) at org.jboss.seam.Component.callCreateMethod(Component.java:2198) at org.jboss.seam.Component.newInstance(Component.java:2158) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143) at org.jboss.seam.init.Initialization.init(Initialization.java:744) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: Traceback (most recent call last): File "<iostream>", line 14, in <module> ImportError: No module named json at org.python.core.Py.ImportError(Py.java:304) at org.python.core.imp.import_first(imp.java:755) at org.python.core.imp.import_module_level(imp.java:837) at org.python.core.imp.importName(imp.java:917) at org.python.core.ImportFunction.__call__(__builtin__.java:1220) at org.python.core.PyObject.__call__(PyObject.java:357) at org.python.core.__builtin__.__import__(__builtin__.java:1173) at org.python.core.imp.importOneAs(imp.java:954) at org.python.pycode._pyx0.f$0(<iostream>:16) at org.python.pycode._pyx0.call_function(<iostream>) at org.python.core.PyTableCode.call(PyTableCode.java:165) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1275) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:235) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:230) at org.xdi.service.PythonService.loadPythonScript(PythonService.java:116) ... 115 more

By Mohib Zico Account Admin 26 Jun 2015 at 5:37 a.m. CDT

Mohib Zico gravatar
>> ImportError: No module named json The error is related to script you are using.

By Prabhu R user 26 Jun 2015 at 5:48 a.m. CDT

Prabhu R gravatar
Yes, i took the script from - https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/basic.multi_auth_conf/BasicMultiAuthConfExternalAuthenticator.py

By Mohib Zico Account Admin 26 Jun 2015 at 5:53 a.m. CDT

Mohib Zico gravatar
Ok.. then I think you might have missed some steps. Please read the doc carefully and follow every steps.

By Prabhu R user 26 Jun 2015 at 5:55 a.m. CDT

Prabhu R gravatar
I followed as it is in - https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/basic.multi_auth_conf/INSTALLATION.txt

By Mohib Zico Account Admin 26 Jun 2015 at 6:03 a.m. CDT

Mohib Zico gravatar
Alright.. then you must have missed some steps. :) Because I just tried this doc for my test Gluu Server and it's working pretty well for me.