classloader problem
No ideas? :( I must solve this problem quickly. Thanks people.. --- Bruno Vg BVG wrote: Hi Jeff, The stub call is done in the JAAS module (file: SampleLoginModule.java), this module is configured on Tomcat application, and when I press the authentication form the JAAS module runs. When it runs, call the VerificaAutenticacao WebService, which returns some values to check if this user is authenticate. It's in this call that I got a CastClassException on the file WSDDTargetedChain.java:157(Axis code), and in there I see different ids for the same Handler: ClassUtils.forName(pivotQName.getLocalPart()).newInstance().getClass().getSuperclass().getInterfaces() = java.lang.Class[1] (id=85) Class.forName(org.apache.axis.Handler) = java.lang.Class (org.apache.axis.Handler) (id=91) But, if I call the same webservice but outside that JAAS module, everything works, and the ids are the same for the same handler: ClassUtils.forName(pivotQName.getLocalPart()).newInstance().getClass().getSuperclass().getInterfaces() = java.lang.Class[1] (id=85) Class.forName(org.apache.axis.Handler) = java.lang.Class (org.apache.axis.Handler) (id=85) Any ideas? humm.. :( Thanks one more time Jeff Jeff wrote: In a discussion about error handling a while back, I mentioned to James Taylor how insane it is to report a ClassCastException without citing the offending class. Presumably you know which class your handler is or can look it up in the handler element of your deployment descriptor. You need to ensure that it implements org.apache.axis.Handler, one way or another. If that doesn't help, make sure your log4j.properties file of configured to dump in DEBUG mode and check out the log for clues. (I wonder if anyone has every estimated how much Java development time is wasted globally on class path issues.) Jeff - Original Message - From: BVG [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, June 14, 2005 8:06 AM Subject: classloader problem I've a problem with classloader. I got all the time CastClassException when I invoke directly a stub (Axis 1.2) on a JAAS module (Java authentication). It seems the problem is on this line (WSDDTargetedChain.java:157): pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance(); the cast Handler is not from the same instance of result and throw a CastClass Exception. What can I do to prevent this frustrating problem? I really need your help! Thank you all! - ERROR --- AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException at org.apache.axis.deployment.wsdd.WSDDTargetedChain.makeNewInstance(WSDDTarget edChain.java:157) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy ableItem.java:274) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl eItem.java:260) at org.apache.axis.deployment.wsdd.WSDDDeployment.getTransport(WSDDDeployment.j ava:394) at org.apache.axis.configuration.FileProvider.getTransport(FileProvider.java:25 7) at org.apache.axis.AxisEngine.getTransport(AxisEngine.java:332) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:163) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.jcms.Axis.WSPortal.WS_AcessoPortalSoapStub.verificaAutenticacao(WS_Acess oPortalSoapStub.java:321) at com.jcms.Axis.Webservices.VerificaAutenticacao(Webservices.java:263) at jaas.module.SampleLoginModule.login(SampleLoginModule.java:214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607) at javax.security.auth.login.LoginContext.login(LoginContext.java:534) at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:316) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent icator.java:229) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:446
Re: classloader problem
Hi Jeff, The stub call is done in the JAAS module (file: SampleLoginModule.java), this module is configured on Tomcat application, and when I press the authentication form the JAAS module runs. When it runs, call the VerificaAutenticacao WebService, which returns some values to check if this user is authenticate. It's in this call that I got a CastClassException on the file WSDDTargetedChain.java:157(Axis code), and in there I see different ids for the same Handler: ClassUtils.forName(pivotQName.getLocalPart()).newInstance().getClass().getSuperclass().getInterfaces() = java.lang.Class[1] (id=85) Class.forName(org.apache.axis.Handler) = java.lang.Class (org.apache.axis.Handler) (id=91) But, if I call the same webservice but outside that JAAS module, everything works, and the ids are the same for the same handler: ClassUtils.forName(pivotQName.getLocalPart()).newInstance().getClass().getSuperclass().getInterfaces() = java.lang.Class[1] (id=85) Class.forName(org.apache.axis.Handler) = java.lang.Class (org.apache.axis.Handler) (id=85) Any ideas? humm.. :( Thanks one more time Jeff Jeff wrote: In a discussion about error handling a while back, I mentioned to James Taylor how insane it is to report a ClassCastException without citing the offending class. Presumably you know which class your handler is or can look it up in the handler element of your deployment descriptor. You need to ensure that it implements org.apache.axis.Handler, one way or another. If that doesn't help, make sure your log4j.properties file of configured to dump in DEBUG mode and check out the log for clues. (I wonder if anyone has every estimated how much Java development time is wasted globally on class path issues.) Jeff - Original Message - From: BVG [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, June 14, 2005 8:06 AM Subject: classloader problem I've a problem with classloader. I got all the time CastClassException when I invoke directly a stub (Axis 1.2) on a JAAS module (Java authentication). It seems the problem is on this line (WSDDTargetedChain.java:157): pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance(); the cast Handler is not from the same instance of result and throw a CastClass Exception. What can I do to prevent this frustrating problem? I really need your help! Thank you all! - ERROR --- AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException at org.apache.axis.deployment.wsdd.WSDDTargetedChain.makeNewInstance(WSDDTarget edChain.java:157) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeploy ableItem.java:274) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployabl eItem.java:260) at org.apache.axis.deployment.wsdd.WSDDDeployment.getTransport(WSDDDeployment.j ava:394) at org.apache.axis.configuration.FileProvider.getTransport(FileProvider.java:25 7) at org.apache.axis.AxisEngine.getTransport(AxisEngine.java:332) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:163) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.jcms.Axis.WSPortal.WS_AcessoPortalSoapStub.verificaAutenticacao(WS_Acess oPortalSoapStub.java:321) at com.jcms.Axis.Webservices.VerificaAutenticacao(Webservices.java:263) at jaas.module.SampleLoginModule.login(SampleLoginModule.java:214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607) at javax.security.auth.login.LoginContext.login(LoginContext.java:534) at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:316) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent icator.java:229) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:446) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102
classloader problem
I've a problem with classloader. I got all the time CastClassException when I invoke directly a stub (Axis 1.2) on a JAAS module (Java authentication). It seems the problem is on this line (WSDDTargetedChain.java:157): pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance(); the cast Handler is not from the same instance of result and throw a CastClass Exception. What can I do to prevent this frustrating problem? I really need your help! Thank you all! - ERROR --- AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException at org.apache.axis.deployment.wsdd.WSDDTargetedChain.makeNewInstance(WSDDTargetedChain.java:157) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274) at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260) at org.apache.axis.deployment.wsdd.WSDDDeployment.getTransport(WSDDDeployment.java:394) at org.apache.axis.configuration.FileProvider.getTransport(FileProvider.java:257) at org.apache.axis.AxisEngine.getTransport(AxisEngine.java:332) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:163) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.jcms.Axis.WSPortal.WS_AcessoPortalSoapStub.verificaAutenticacao(WS_AcessoPortalSoapStub.java:321) at com.jcms.Axis.Webservices.VerificaAutenticacao(Webservices.java:263) at jaas.module.SampleLoginModule.login(SampleLoginModule.java:214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607) at javax.security.auth.login.LoginContext.login(LoginContext.java:534) at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:316) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:229) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) {http://xml.apache.org/axis/}hostname:bvg java.lang.ClassCastException at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at
axis and JAAS
Hi there, I have a problem with Axis when I'm in a JAAS module. When I invoke a Web Service call I get a CastClassException. If I call a Web Service out of the JAAS module, everything works fine. Now, I must call the Authentication Web Service in the JAAS module, how it can be done? :( When I call: VerificaAutenticacaoResponse resp = (VerificaAutenticacaoResponse) stub.verificaAutenticacao(verificaAutenticacao); Exception: ; nested exception is: java.lang.ClassCastException - VerificaAutenticacao: error calling the webservice - END: Webservice SampleLoginModule abort() - BEGIN SampleLoginModule abort() - END - Login exception authenticating username xpto javax.security.auth.login.LoginException: java.lang.NullPointerException at jaas.module.SampleLoginModule.login(SampleLoginModule.java:217) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607) at javax.security.auth.login.LoginContext.login(LoginContext.java:534) at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:316) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:229) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:730) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607) at javax.security.auth.login.LoginContext.login(LoginContext.java:534) at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:316) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:229) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at
web service call on JAAS
Hi there! Anyone already tried to call a webservice (with a axis stub) on a JAAS module? It seems that when the webservice is invoked I get a ClassCastException. Anyone had the same problem? I'm using Tomcat 5.0.28, with JAAS for authentication and Axis 1.2 RC3. Thanks.. --- Bruno Vg