1

While running the application I was getting the following errors.

java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService

AxisService class is in axis2-kernel-1.6.2.jar file. Some of the classes from this jar are working fine without any issues, but some classes are throwing NoClassDefFoundError from this jar file at runtime. AxisService class is present in axis2-kernel-1.6.2.jar, even it throws error.

This is working fine in local machine. But error getting in Oracle r12 server.I have already set the class path for the jar file.

I am Using Java version is 1.6 and Apache axis2.1.6.2.

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
Nidheesh
  • 4,390
  • 29
  • 87
  • 150
  • it means that your class is present but method that you are using is not present. – Gabriele Mariotti Feb 05 '13 at 12:21
  • I have also this issue..but not got a solution for this issue... – Rahul Feb 05 '13 at 12:22
  • 1
    Does you server container have any axis version under lib folder? Are you sure that your application is packaged with axis2-kernel? – jspboix Feb 05 '13 at 12:23
  • @GabrieleMariotti:- yes ,the methods are there in the package.While at run time the class files are not loading.We have tried with eclipse,it works fine... – Rahul Feb 05 '13 at 12:26
  • @jspboix: Yes. Application is packaged with axis2-kernel. – Nidheesh Feb 05 '13 at 12:38
  • @log_in Can you answer the first question? As it could cause a conflict if the container is loading axis2-kernel jar to the classpath from a lib folder while your application tries to do the same. – jspboix Feb 05 '13 at 12:42
  • @jspboix: No, For this oracle application ,we used to put the jar file in JAVA_TOP and and putting the path for the same. – Nidheesh Feb 05 '13 at 12:46
  • For me it smells like some build procedure not behaving as expected but I can't really tell without looking into the ant script or the pom. – jspboix Feb 05 '13 at 14:27

2 Answers2

2

Had the same issue. I had included only jars that I needed to compile the application. When I included everything from \axis2-1.6.2\lib\ folder, this exception were gone.

athabaska
  • 455
  • 3
  • 22
1

I had a similar problem using Tomcat and Axis2 and after a week finding out the error I realized there was a axis configuration problem. especifically my aplication can't instantiate the class which accedded to persistence layer. I include this parameter line:

<parameter name="ServiceTCCL">composite</parameter>                  

in services.xml file which is used by axis2 to work.

For more information see the comments in http://wso2.com/node/1131

Edwardo Afundoh
  • 626
  • 2
  • 7
  • 19
asfds
  • 11
  • 1