[
https://wso2.org/jira/browse/WSAS-802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sameera Jayasoma resolved WSAS-802.
-----------------------------------
Resolution: Fixed
> Class loading issue when deploying Axis1 services
> -------------------------------------------------
>
> Key: WSAS-802
> URL: https://wso2.org/jira/browse/WSAS-802
> Project: WSO2 WSAS
> Issue Type: Bug
> Components: axis1-deployer
> Affects Versions: 2.3
> Environment: winxp, jdk5
> Reporter: Charitha Kankanamge
> Assignee: Sameera Jayasoma
> Priority: Highest
> Attachments: SimpleMath.jar, SimpleMath.wsdd, SimpleMathResource.jar
>
>
> I encountered the following class loading issue when deploying an Axis1
> service with dependencies.
> I have a class called com.test.SimpleMath and it has a dependent class in the
> package org.charitha.
> i.e:-
> package com.test;
> import org.charitha.Area;
> public class SimpleMath {
> ----
> ----
> }
> Then I used the SimpleMath class as service implemetation class in my wsdd as
> follows.
> <parameter name="className" value="com.test.SimpleMath"/>
> Then I uploaded these 3 artifacts (*.wsdd, SimpleMath.jar and dependancy jar)
> through WSAS management console.
> Service deployed as faulty with the following exception.
> INFO [2008-09-30 11:44:30,453] Deploying - SimpleMath.wsdd
> ERROR [2008-09-30 11:44:30,453] Exception:
> java.lang.ClassNotFoundException: com.test.SimpleMath
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
> at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142)
> at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
> at
> org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428)
> at
> org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461)
> at
> org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:286)
> at
> org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500)
> at
> org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:503)
> at
> org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:296)
> at a1deployer.Axis1Deployer.deploy(Axis1Deployer.java:142)
> at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:330)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:227)
> at
> org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:324)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
> at
> org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> INFO [2008-09-30 11:44:30,656]
> org.apache.axis2.deployment.DeploymentException: Could not find class for the
> service named: com.test.SimpleMath
> Hint: you may need to copy your class files/tree into the right location
> (which depends on the servlet system you are using).; nested exception is:
> java.lang.ClassNotFoundException: com.test.SimpleMath
> AxisFault
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> faultSubcode:
> faultString: Could not find class for the service named: com.test.SimpleMath
> Hint: you may need to copy your class files/tree into the right location
> (which depends on the servlet system you are using).; nested exception is:
> java.lang.ClassNotFoundException: com.test.SimpleMath
> faultActor:
> faultNode:
> faultDetail:
> {http://xml.apache.org/axis/}hostname:bugs
> Could not find class for the service named: com.test.SimpleMath
> Hint: you may need to copy your class files/tree into the right location
> (which depends on the servlet system you are using).; nested exception is:
> java.lang.ClassNotFoundException: com.test.SimpleMath
> at
> org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:432)
> at
> org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461)
> at
> org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:286)
> at
> org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500)
> at
> org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:503)
> at
> org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:296)
> at a1deployer.Axis1Deployer.deploy(Axis1Deployer.java:142)
> at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:330)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:227)
> at
> org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:324)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
> at
> org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> Caused by: java.lang.ClassNotFoundException: com.test.SimpleMath
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
> at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142)
> at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
> at
> org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428)
> ... 17 more
> I noticed that the service implementation class was replaced by the dependent
> class after uploading the artifacts from WSAS management console. In other
> words, org.charitha.Area (which was my dependency in this example) class has
> been added to SimpleMath.jar instead of com.test.SimpleMath class.
> This issue did not occur when I copied the dependency jar to WSAS_HOME/lib
> directory. Therefore, something is wrong with the Axis1 service uploading
> mechanism.
> The relevant artifacts are attached here with.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Wsas-java-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev