File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Could not initialize class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Could not initialize class" Watch "Could not initialize class" New topic

Could not initialize class

yingxin wu

Joined: Apr 17, 2013
Posts: 1
I am developing an tomcat web application, the application will call another axis2 Soap web service. I generated a axis2 web service client using the axis2 code generator. If I run the the client from command line, it can invoke the web service and return results correctly.
Once I placed the client in Tomcat, error occurs and complaining that it cannot initialize the Please help!

Here is the stack trace:

Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: Could not initialize class
at Method)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(
at org.apache.commons.httpclient.HttpClient.executeMethod(
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
at org.apache.axis2.transport.http.HTTPSender.send(
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
at org.apache.axis2.engine.AxisEngine.send(
at org.apache.axis2.description.OutInAxisOperationClient.send(
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
at org.apache.axis2.client.OperationClient.execute(
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

The ProxySelector class was added to Java in the Java 5 release. So that suggests to me that you're running Tomcat under Java 1.4.
I agree. Here's the link:
subject: Could not initialize class
It's not a secret anymore!