• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ClassNotFoundException: org.apache.axis2.transport.SimpleAxis2Server

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All:

I download Axis 2 versin 1.5.1.
I unzipped to the following directory:C:\axis2-1.5.1
I set AXIS2_HOME -->C:\axis2-1.5.1
I am using windows 2000 server, with jdk 16_17.
I setted JAVA_HOME -->C:\Java\jdk16_17
I ran C:\axis2-1.5.1\bin>axis2.bat
Than I ran
C:\axis2-1.5.1\bin>axis2server.bat
Using JAVA_HOME C:\Java\jdk16_17
Using AXIS2_HOME C:\axis2-1.5.1
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis2/transport/SimpleAxis2Server
Caused by: java.lang.ClassNotFoundException: org.apache.axis2.transport.SimpleAxis2Server
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:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: org.apache.axis2.transport.SimpleAxis2Server. Program will exit.
C:\axis2-1.5.1\bin>

Can anyone please give me a hint why I am getting the above error.

Any help or hint or an url would be greatly appreciated.

Yours,

Frustrated.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,

Not sure why you're getting that, but mine seems to work ok - have a look at my settings and compare?

Using JAVA_HOME D:\jdk1.6
Using AXIS2_HOME D:\Axis 2 Tutorial\axis2-1.5.1-bin\axis2-1.5.1
[INFO] [SimpleAxisServer] Starting
[INFO] [SimpleAxisServer] Using the Axis2 RepositoryD:\Axis 2 Tutorial\axis2-1.5
.1-bin\axis2-1.5.1\repository
[SimpleAxisServer] Using the Axis2 RepositoryD:\Axis 2 Tutorial\axis2-1.5.1-bin\
axis2-1.5.1\repository
[SimpleAxisServer] Using the Axis2 Configuration FileD:\Axis 2 Tutorial\axis2-1.
5.1-bin\axis2-1.5.1\conf\axis2.xml
[INFO] Clustering has been disabled
[INFO] Deploying module: addressing-1.5.1 - file:/D:/Axis 2 Tutorial/axis2-1.5.1
-bin/axis2-1.5.1/repository/modules/addressing-1.5.1.mar
[INFO] Deploying module: metadataExchange-1.5.1 - file:/D:/Axis 2 Tutorial/axis2
-1.5.1-bin/axis2-1.5.1/repository/modules/mex-1.5.1.mar
[INFO] Deploying module: mtompolicy-1.5.1 - file:/D:/Axis 2 Tutorial/axis2-1.5.1
-bin/axis2-1.5.1/repository/modules/mtompolicy-1.5.1.mar
[INFO] Deploying module: ping-1.5.1 - file:/D:/Axis 2 Tutorial/axis2-1.5.1-bin/a
xis2-1.5.1/repository/modules/ping-1.5.1.mar
[INFO] Deploying module: script-1.5.1 - file:/D:/Axis 2 Tutorial/axis2-1.5.1-bin
/axis2-1.5.1/repository/modules/scripting-1.5.1.mar
[INFO] Deploying module: soapmonitor-1.5.1 - file:/D:/Axis 2 Tutorial/axis2-1.5.
1-bin/axis2-1.5.1/repository/modules/soapmonitor-1.5.1.mar
[INFO] Deploying module: metadataExchange-1.5.1 - file:/D:/Axis 2 Tutorial/axis2
-1.5.1-bin/axis2-1.5.1/lib/mex-1.5.1.jar
[INFO] Deploying Web service: version.aar - file:/D:/Axis 2 Tutorial/axis2-1.5.1
-bin/axis2-1.5.1/repository/services/version.aar
[INFO] [SimpleAxisServer] Started
[SimpleAxisServer] Started
[INFO] Listening on port 8080
 
Ben Linus
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh sorry, i'm using Windows XP
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I came accross the same issue as you have mentioned but in my scenario i have mistakenly set up the AXIS2_HOME variable to upto the bin directory (AXIS2_HOME=/home/dev/axis2-1.6.2-bin/bin).once i have removed the /bin segment it worked for me.for any other people might be help full so thats why i am replying to this much old post.


Thanks
Madhawa Chaminda
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i found the solution for this issue:

Inside the start file $AXIS2_HOME/bin/axis2server.sh exists an issue at last of the file

just replace:

org.apache.axis2.transport.SimpleAxis2Server
for
org.apache.axis2.kernel.SimpleAxis2Server


This occurs because in the last versions of Axis2 package the class "SimpleAxis2Server" was move from transport to kernel

you can see this using a grep -r SimpleAxis2Server inside $AXIS2_HOME/lib
I hope this would be uselful for anyone.

Regards.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm also facing the same issue.
And I tried replacing org.apache.axis2.transport.SimpleAxis2Server with
org.apache.axis2.kernel.SimpleAxis2Server
at the last of axis2.server shell file but it's still showing the same error.

Can someone please help.
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

Please tell us what Axis2 version you're using, and show us your stack trace.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic