<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Call a jBossWS results in  java.lang.NoClassDefFoundError: Could not initialize class $Proxy2341
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/stdaparks">Steven Parks</a> in <i>JBoss Web Services Development</i> - <a href="https://community.jboss.org/message/717608#717608">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I used wsconsume to generate a proxy class to web-service enabled beans.&#160; </p><p>In trying to test that it works, using a test-cradle JSP I get the following error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>13:52:15,039 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception</p><p>&#160;&#160;&#160;&#160; [exec] java.lang.NoClassDefFoundError: Could not initialize class $Proxy2341</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.lang.reflect.Constructor.newInstance(Constructor.java:513)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:451)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:304)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:225)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at javax.xml.ws.Service.getPort(Service.java:92)</p><p>&#160;&#160;&#160;&#160; [exec]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService.getVaultTransactionManagementServicePort(VaultTransactionManagementWebService.java:56)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>which results from the JSP code</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>[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</p><p>&#160;&#160;&#160;&#160; [exec] 331:&#160; //com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService wsService = service.getPort(com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService.class);</p><p>&#160;&#160;&#160;&#160; [exec] 332:&#160; com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService bb = new com.bcaa.ccprocessing.service.ws.VaultTransactionManagementWebService(url, qname);</p><p>&#160;&#160;&#160;&#160; [exec] 333:&#160; System.out.println("WebService endpoint loaded..." + bb.toString());</p><p>&#160;&#160;&#160;&#160; [exec] 334:&#160; com.bcaa.ccprocessing.service.ws.VaultTransactionManagementService wsService = bb.getVaultTransactionManagementServicePort();</p><p>&#160;&#160;&#160;&#160; [exec] 335:&#160; System.out.println("WebService class loaded " + wsService.toString());</p><p>&#160;&#160;&#160;&#160; [exec] 336:&#160; </p><p>&#160;&#160;&#160;&#160; [exec] 337:&#160; com.bcaa.ccprocessing.service.ws.Creditcard creditCard = wsService.fetchVaultCardDetails(11);</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>jBossWS/services lists my service and the WSDL is available.&#160; The line which fails is the Service.getPort call (javax,xml.ws.Service and its implementation).</p><p>&#160;&#160;&#160; public &lt;T&gt; T getPort(QName portName,</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Class&lt;T&gt; serviceEndpointInterface) {</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return delegate.getPort(portName, serviceEndpointInterface);</p><p>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>What am I missing.&#160; I am stuck as I don't have a lot of information to go on.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks in advance...</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/717608#717608">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>