1 Reply Latest reply: Apr 5, 2012 10:35 AM by appien RSS

Call a jBossWS results in  java.lang.NoClassDefFoundError: Could not initialize class $Proxy2341

Steven Parks Newbie

I used wsconsume to generate a proxy class to web-service enabled beans. 

In trying to test that it works, using a test-cradle JSP I get the following error:

 

13:52:15,039 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception

     [exec] java.lang.NoClassDefFoundError: Could not initialize class $Proxy2341

     [exec]           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

     [exec]           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

     [exec]           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

     [exec]           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

     [exec]           at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)

     [exec]           at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:451)

     [exec]           at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:304)

     [exec]           at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:225)

     [exec]           at javax.xml.ws.Service.getPort(Service.java:92)

     [exec]           at com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService.getVaultTransactionManagementServicePort(VaultTransactionManagementWebService.java:56)

 

which results from the JSP code

 

[exec] 13:52:15,057 ERROR [STDERR] org.apache.jasper.JasperException: An exception occurred processing JSP page /html/portlet/insurance/find_policy.jsp at line 334

     [exec] 331:  //com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService wsService = service.getPort(com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService.class);

     [exec] 332:  com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService bb = new com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService(url, qname);

     [exec] 333:  System.out.println("WebService endpoint loaded..." + bb.toString());

     [exec] 334:  com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService wsService = bb.getVaultTransactionManagementServicePort();

     [exec] 335:  System.out.println("WebService class loaded " + wsService.toString());

     [exec] 336: 

     [exec] 337:  com.bcaa.ccprocessing.service.ws.Creditcard creditCard = wsService.fetchVaultCardDetails(11);

 

jBossWS/services lists my service and the WSDL is available.  The line which fails is the Service.getPort call (javax,xml.ws.Service and its implementation).

    public <T> T getPort(QName portName,

            Class<T> serviceEndpointInterface) {

        return delegate.getPort(portName, serviceEndpointInterface);

    }

 

What am I missing.  I am stuck as I don't have a lot of information to go on.

 

Thanks in advance...