AnsweredAssumed Answered

AuthenticationUtils.startSession expception

Question asked by chicco0386 on Sep 15, 2010
Latest reply on Jan 4, 2011 by jeyaa
Hi all,
I've this piece of code that authentica the user admin via WS:

try {

            boolean isLogged = RepositoryUtils.isLoggedIn();

            if (!isLogged) {
                if (log.isDebugEnabled()) {
                    log.debug("process, procedo con l'autenticazione");
                }
                AuthenticationUtils.startSession("admin", "admin");
            }

            …Execute some operation…

        } finally {
            // End session
            AuthenticationUtils.endSession();
        }

When I call this code for the first time alla works perfectly, but when I execute it for the second and other time I've this exception:
2010-09-15 10:27:28,326 DEBUG [it.mytria.soa.esb.alfresco.action.InsertContentAction] process, procedo con l'autenticazione
2010-09-15 10:27:28,326 INFO  [STDOUT] [WARN ] DiscoverResources - -getNextResources: Ignoring Exception <java.io.IOException: Invalid use of destroyed classloader, UCL destroyed at:>
2010-09-15 10:27:28,326 ERROR [STDERR] java.io.IOException: Invalid use of destroyed classloader, UCL destroyed at:
2010-09-15 10:27:28,326 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.findResources(RepositoryClassLoader.java:588)
2010-09-15 10:27:28,326 ERROR [STDERR]     at java.lang.ClassLoader.getResources(ClassLoader.java:1016)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
2010-09-15 10:27:28,342 ERROR [STDERR]     at org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
2010-09-15 10:27:28,373 ERROR [STDERR]     at java.security.AccessController.doPrivileged(Native Method)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.axis.client.Service.getAxisClient(Service.java:104)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.apache.axis.client.Service.<init>(Service.java:113)
2010-09-15 10:27:28,373 ERROR [STDERR]     at org.alfresco.webservice.authentication.AuthenticationServiceLocator.<init>(AuthenticationServiceLocator.java:16)
2010-09-15 10:27:28,388 ERROR [STDERR]     at org.alfresco.webservice.util.WebServiceFactory.getAuthenticationService(WebServiceFactory.java:153)
2010-09-15 10:27:28,388 ERROR [STDERR]     at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:73)
2010-09-15 10:27:28,388 ERROR [STDERR]     at it.mytria.soa.esb.alfresco.action.InsertContentAction.process(InsertContentAction.java:47)
2010-09-15 10:27:28,388 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2010-09-15 10:27:28,388 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2010-09-15 10:27:28,388 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2010-09-15 10:27:28,388 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
2010-09-15 10:27:28,388 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102)
2010-09-15 10:27:28,388 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.process(OverriddenActionLifecycleProcessor.java:74)
2010-09-15 10:27:28,388 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:520)
2010-09-15 10:27:28,388 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:392)
2010-09-15 10:27:28,388 ERROR [STDERR]     at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:538)
2010-09-15 10:27:28,388 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
2010-09-15 10:27:28,388 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
2010-09-15 10:27:28,404 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)
2010-09-15 10:27:28,404 ERROR [STDERR] Caused by: java.lang.Exception
2010-09-15 10:27:28,404 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.unregister(RepositoryClassLoader.java:265)
2010-09-15 10:27:28,404 ERROR [STDERR]     at org.jboss.mx.loading.UnifiedClassLoader.unregister(UnifiedClassLoader.java:196)
2010-09-15 10:27:28,404 ERROR [STDERR]     at org.jboss.deployment.DeploymentInfo.cleanup(DeploymentInfo.java:402)
2010-09-15 10:27:28,404 ERROR [STDERR]     at org.jboss.deployment.MainDeployer.destroy(MainDeployer.java:731)
2010-09-15 10:27:28,404 ERROR [STDERR]     at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:639)
2010-09-15 10:27:28,404 ERROR [STDERR]     at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
2010-09-15 10:27:28,404 ERROR [STDERR]     at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
2010-09-15 10:27:28,404 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2010-09-15 10:27:28,404 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2010-09-15 10:27:28,420 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2010-09-15 10:27:28,420 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
2010-09-15 10:27:28,420 ERROR [STDERR]     at $Proxy9.undeploy(Unknown Source)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:604)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
2010-09-15 10:27:28,420 ERROR [STDERR]     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
2010-09-15 10:27:28,435 ERROR [STDERR]     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

Can you help me?
Thank you

Outcomes