wood burning stoves*
The moose likes Web Services and the fly likes Axis2-Redploying faulty service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2-Redploying faulty service" Watch "Axis2-Redploying faulty service" New topic
Author

Axis2-Redploying faulty service

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I deleted a service from

<TOMCAT_HOME>\webapps\axis2\WEB-INF\services folder and now it is listed under faulty service. I redeploy it again and it exists in the same location but then admin console still lists it under faulty services. Restarting Tomcat doesnt seem to work as well. Any suggestions?


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
Why is it listed as faulty? There should be an error message in the log files.


Ping & DNS - my free Android networking tools app
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I click the link for the faulty service, and instead of taking me to wsdl it takes me to another page that says,

This Web axisService has deployment faults

Error: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.apache.axis2.deployment.DeploymentClassLoader.findClass(DeploymentClassLoader.java:72) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.(DefaultSchemaGenerator.java:157) at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:523) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:386) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:102) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:144) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81) 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)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
I think stopping Tomcat, removing all remnants of the old service, starting up Tomcat, and then recompiling and redeploying the service should take care of it.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I just did that, and infact i redeployed axis2.war itself and renamed the class name and service-name accordingly.

Here is the source



Created a .aar and uploaded it via

http://localhost:9001/axis2/axis2-admin/upload

it got listed as faulty. Can axis2 play around with tomcat's classloader?
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Ulf, i guess its different versions of JVM here.

My class is on JDK6 and tomcat's is version5. Let me mess with it, will update back. Thanks.
[ September 12, 2008: Message edited by: Akhilesh Trivedi ]
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Had two JVMs, no JDK6 now. (

[INFO] The MyService.aar service, which is not valid, caused java.lang.Unsupport
edClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.apache.axis2.deployment.DeploymentClassLoader.findClass(Deploymen
tClassLoader.java:72)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.<init>(
DefaultSchemaGenerator.java:157)
at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:523
)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBui
lder.java:386)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServic
eGroup(ArchiveReader.java:102)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServ
iceGroup(ArchiveReader.java:144)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.ja
va:81)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy
(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngin
e.java:597)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoL
ist.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListe
ner.java:330)
at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
ryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
ryListener.java:324)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
chedulerTask.java:64)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
.java:71)
at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
n(Scheduler.java:83)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

[INFO] org.apache.axis2.deployment.DeploymentException: java.lang.UnsupportedCla
ssVersionError: Bad version number in .class file
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Fooh! UP and running.




MyService
Service EPR : http://localhost:9001/axis2/services/MyService
Service Description : No description available for this service
Service Status : Active
Engaged modules for the service

* addressing :: Disengage


Available operations

* echo

Engaged Modules for the Operation
o addressing :: Disengage
Huan Niu
Greenhorn

Joined: Sep 21, 2007
Posts: 11
How did you make it working?

I have the same problem.

At beginning I thought it is the problem with JVM. So I un-installed all the JVM on my machine and installed one jdk 1.5.0_16.

However, I am still having this error.
Huan Niu
Greenhorn

Joined: Sep 21, 2007
Posts: 11
Hi, I have solved the problem.

Thanks
Lakshman Khadali
Greenhorn

Joined: Feb 08, 2007
Posts: 4
Huan

Can you please help me to solve this issue
I have same problem.

Thanks[/QB]
Vineeta Bhatia
Greenhorn

Joined: Oct 15, 2008
Posts: 1
Originally posted by Lakshman Khadali:
Huan

Can you please help me to solve this issue
I have same problem.

Thanks
[/QB]

Hi Lakshaman
can you tell me what is your understanding, what have you done so far and what and where is the trouble you are having?
Lakshman Khadali
Greenhorn

Joined: Feb 08, 2007
Posts: 4
Hello Vineeta,

Thanks for reply.

I am developing a web service using Axis2 in Eclipse 3.3.
I just created the simple java project and created a class as :
package com.example;

public class Hello
{
public String sayHello(String name)
{
return "Hello "+name;
}

}

... and using 'Axis2 Service archiver' try to create web service.
But when i start tomcat (5.5) it gives me error like this :

Error: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.apache.axis2.deployment.DeploymentClassLoader.findClass(DeploymentClassLoader.java:72) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.(DefaultSchemaGenerator.java:157) at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:523) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:386) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:102) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:144) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81) 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)

---------------------

...and when i run http://localhost:8080/axis2
It shoes me this service having fault rather than WSDL.

and I could not trace whats going wrong.
Same problem as 'Akhilesh Trivedi' explained.


Please reply.

Thanks again!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
Looks like you're using an older Java version for running Axis than you used for compiling your service classes. Either run Axis with the same version you use to compile the classes, or compile them for the older version (by using the -source and -target switches).
Lakshman Khadali
Greenhorn

Joined: Feb 08, 2007
Posts: 4
Hello Ulf Dittmer:
I tried for for another version but doesn't work.
I am using Eclipse 3.3 , Axis2 and JDK 1.5
Please suggest if i am wrong.

Thanks for reply
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Originally posted by Vineeta Bhatia:


Hi Lakshaman
can you tell me what is your understanding, what have you done so far and what and where is the trouble you are having?
Damon Shairwart
Greenhorn

Joined: Jan 03, 2014
Posts: 2
help,I have the similar question
Faulty Services
D:\Users\Ghost_emperor\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\HelloDB\WEB-INF\services\ContinueFTP

This Web axisService has deployment faults
Error: java.lang.NoClassDefFoundError: org/apache/commons/net/ProtocolCommandListener at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:266) at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.(DefaultSchemaGenerator.java:140) at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:453) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:388) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101) 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:813) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:142) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454) at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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:601) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.ClassNotFoundException: org.apache.commons.net.ProtocolCommandListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) ... 36 more
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Axis2-Redploying faulty service
 
Similar Threads
Faulty Services
Faulty Web Services
Single WSDL, Multiple Services?
Axis2 class cast exception in tomcat
New article: Web Services Authentication with Axis 2