Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B60EC6F64 for ; Mon, 20 Jun 2011 03:59:23 +0000 (UTC) Received: (qmail 92748 invoked by uid 500); 20 Jun 2011 03:59:23 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 92333 invoked by uid 500); 20 Jun 2011 03:59:16 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 92324 invoked by uid 99); 20 Jun 2011 03:59:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 03:59:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 03:59:10 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9D4DA423396 for ; Mon, 20 Jun 2011 03:58:48 +0000 (UTC) Date: Mon, 20 Jun 2011 03:58:48 +0000 (UTC) From: "Deepak Pant (JIRA)" To: java-dev@axis.apache.org Message-ID: <312889762.19702.1308542328640.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AXIS2-2972) Vague error produced for ServiceClient invocation within a service where class pathing is a problem MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051787#comment-13051787 ] Deepak Pant commented on AXIS2-2972: ------------------------------------ Using WebSphere 7.0.0.17 and Apache Axis2 1.5.5, I tested following without any success. 1. With EnableChildFirstClassLoading=true in axis2.xml and no change in class-loading policy of application in WebSphere, I see following exception in the log file at the server startup time. Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:402) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:619) 2. With EnableChildFirstClassLoading=true in axis2.xml and and with PARENT_LAST in class-loading policy of application in WebSphere, I see following exception in the log file at the server startup time. [6/20/11 9:03:32:656 GMT+05:30] 00000008 SystemOut O [INFO] The XYZ service, which is not valid, caused java.lang.ClassCastException: org.apache.axis2.classloader.JarFileClassLoader incompatible with org.apache.axis2.deployment.DeploymentClassLoader at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:131) at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:178) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:82) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:661) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:337) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:241) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:131) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:284) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:567) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:452) at org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.java:55) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358) 3. With EnableChildFirstClassLoading=false in axis2.xml and and with PARENT_LAST in class-loading policy of application in WebSphere, I see following exception in the log file at the server startup time. [6/20/11 9:22:51:571 GMT+05:30] 0000000a SystemOut O [INFO] The XYZ service, which is not valid, caused java.lang.ClassCastException: org.apache.axis2.classloader.JarFileClassLoader incompatible with org.apache.axis2.deployment.DeploymentClassLoader at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:131) at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:178) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:82) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:661) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:337) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:241) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:131) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:284) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:567) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:452) at org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.java:55) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:169) > Vague error produced for ServiceClient invocation within a service where class pathing is a problem > --------------------------------------------------------------------------------------------------- > > Key: AXIS2-2972 > URL: https://issues.apache.org/jira/browse/AXIS2-2972 > Project: Axis2 > Issue Type: Bug > Components: databinding, deployment > Affects Versions: 1.2 > Environment: Running in windows XP under eclipse and with axis2 1.2 embedded under Jetty. > Reporter: Jason Kania > Assignee: Deepal Jayasinghe > > The problem I have seen occurs when a component is not in the deployment directory, but is being referenced externally. Instead of encountering a ClassNotFoundException or similar, a vague error is produced when attempting to: > 1) create a ServiceClient within a service > 2) load a configuration context within a service > The client was external to the jar because it will be used both remotely and as a part of the service. The text of the exception is misleading because the receivers in use as per the services.xml have nothing to do with those seen in the error. > To create the error, simply attempt to create a new ServiceClient() in a class that is not contained within the deployment directory, but is referenced by a class in the deployment directory. > The error seen is the following: > java.lang.ClassCastException: org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver cannot be cast to org.apache.axis2.engine.MessageReceiver > at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:190) > at org.apache.axis2.deployment.DescriptionBuilder$1.run(DescriptionBuilder.java:142) > at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:130) > at org.apache.axis2.deployment.DescriptionBuilder.processMessageReceivers(DescriptionBuilder.java:138) > at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:92) > at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:640) > at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:105) > at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:60) > at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:174) > at org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:211) > at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:138) > at org.apache.axis2.client.ServiceClient.(ServiceClient.java:133) > at org.apache.axis2.client.ServiceClient.(ServiceClient.java:229) > at com.test.client.BasicClient.(BasicClient.java:76) > at com.test.client.TestClient.(TestClient.java:31) > at com.test.client.servlet.TestServer.(TestServer.java:452) > at com.test.client.TestServer.getInstance(TestServer.java:65) > 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:597) > at com.test.client.ClientMessageHandler.init(ClientMessageHandler.java:51) > 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:597) > at org.apache.axis2.engine.DependencyManager.initServiceClass(DependencyManager.java:56) > at org.apache.axis2.engine.DependencyManager.initService(DependencyManager.java:94) > at org.apache.axis2.context.ConfigurationContextFactory.initApplicationScopeServices(ConfigurationContextFactory.java:91) > at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:76) > at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:486) > at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:406) > at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433) > at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256) > at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:617) > at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) > at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) > at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) > at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) > at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) > at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) > at org.mortbay.jetty.Server.doStart(Server.java:210) > at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at com.test.TestServer.(TestServer.java:52) > at com.test.TestServer.main(TestServer.java:83) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org