This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 19869

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!