1 Reply Latest reply on Mar 16, 2015 10:33 AM by Ramesh Reddy

    On Server restart, getting java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl

    Rajni Kumari Newbie

      Hi All,

         

          I am using EAP 6.1 alpha with Teiid 8.7, I have applied the rest easy patch on the Application Server.

       

          I have created a resource adapter configuration, to consume Odata northwind service.

          Following are the configuration:

          1) standalone-teiid.xml configuration

              <resource-adapter id="odata">

                          <module slot="main" id="org.jboss.teiid.resource-adapter.webservice"/>

                          <connection-definitions>

                              <connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory" jndi-name="java:/northwindDS" enabled="true" use-java-context="true" pool-name="northwindDS">

                                  <config-property name="EndPoint">

                                      http://services.odata.org/Northwind/Northwind.svc

                                  </config-property>

                              </connection-definition>

                          </connection-definitions>

                      </resource-adapter>

        2) Created northwind-vdb.xml file with following data:

           <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 

              <vdb name="nw" version="1"> 

                       <model name="Nothwind" type="PHYSICAL" > 

                            <source name="nw" translator-name="odata" connection-jndi-name="java:/Northwind"/> 

                       </model> 

             </vdb> 

       

           

          I was able to deploy the VDB and access the data, through Squirrel Client.

         But when server is restarted, I am getting following exception:

              java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl from [Module "javax.ws.rs.api:main" from local module loader @9fc5c47 (finder: local module finder @170e3e70 (roots: C:\ApplicationServer\modules,C:\ApplicationServer\modules\system\layers\base))]

        at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:217)

        at org.apache.cxf.jaxrs.client.WebClient.create(WebClient.java:92)

        at org.teiid.resource.adapter.ws.WSConnectionImpl$HttpDispatch.<init>(WSConnectionImpl.java:125)

        at org.teiid.resource.adapter.ws.WSConnectionImpl.createDispatch(WSConnectionImpl.java:287)

        at org.teiid.translator.ws.BinaryWSProcedureExecution.execute(BinaryWSProcedureExecution.java:119)

        at org.teiid.translator.odata.BaseQueryExecution.executeDirect(BaseQueryExecution.java:228)

        at org.teiid.translator.odata.ODataMetadataProcessor.getEds(ODataMetadataProcessor.java:76)

        at org.teiid.translator.odata.ODataMetadataProcessor.process(ODataMetadataProcessor.java:91)

        at org.teiid.translator.odata.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:112)

        at org.teiid.translator.odata.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:53)

        at org.teiid.translator.BaseDelegatingExecutionFactory.getMetadata(BaseDelegatingExecutionFactory.java:127) [teiid-api-8.7.0.Final.jar:8.7.0.Final]

        at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:73) [teiid-engine-8.7.0.Final.jar:8.7.0.Final]

        at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.7.0.Final.jar:8.7.0.Final]

        at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.7.0.Final.jar:8.7.0.Final]

        at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.7.1.Final.jar:8.7.1]

        at org.teiid.jboss.VDBService$7.run(VDBService.java:442) [teiid-jboss-integration-8.7.1.Final.jar:8.7.1]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_60]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_60]

        at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_60]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl from [Module "javax.ws.rs.api:main" from local module loader @9fc5c47 (finder: local module finder @170e3e70 (roots: C:\ApplicationServer\modules,C:\ApplicationServer\modules\system\layers\base))]

        at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:134)

        at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:96)

        at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:74)

        at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:87)

        at org.apache.cxf.jaxrs.client.LocalClientState.<init>(LocalClientState.java:50)

        at org.apache.cxf.jaxrs.client.AbstractClient.<init>(AbstractClient.java:100)

        at org.apache.cxf.jaxrs.client.WebClient.<init>(WebClient.java:78)

        at org.apache.cxf.jaxrs.client.WebClient.<init>(WebClient.java:74)

        at org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:208)

        ... 19 more

      Caused by: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl from [Module "javax.ws.rs.api:main" from local module loader @9fc5c47 (finder: local module finder @170e3e70 (roots: C:\ApplicationServer\modules,C:\ApplicationServer\modules\system\layers\base))]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1]

        at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_60]

        at java.lang.Class.forName(Unknown Source) [rt.jar:1.7.0_60]

        at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:77)

        at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:201)

        at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:113)

        ... 27 more

       

        If I undeploy and deploy the VDB, it works properly.

       

        There seems to be a class loading issue when Jboss is being started, but I am not sure how to get around with it?

        Can anyone provide insight about this issue ?

       

      Thanks

      Rajni