• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Could not initialize class java.net.ProxySelector

 
yingxin wu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 java.net.ProxySelector. Please help!


Here is the stack trace:

Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: Could not initialize class java.net.ProxySelector
at java.net.SocksSocketImpl$3.run(SocksSocketImpl.java:355)
at java.net.SocksSocketImpl$3.run(SocksSocketImpl.java:353)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:352)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:280)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic