2 Replies Latest reply on Jul 8, 2006 6:00 AM by andrea

    Problem deploying "document-style" Web Service to JBoss 4.0.

    andrea Newbie

      Hi,

      For sake of simplicity I'll refer to the sample Teller Service introduced in chapter 5 of AS Getting Started Guide, but I'm experiencing the same kind of problem when I try to deploy my own web services...

      I'm currently using JBoss AS 4.0.4. and when I try to deploy a "document-style" web service (JSR-109 EJB Endpoint), I get the following error:

      22:42:03,927 INFO [EjbModule] Deploying TellerBean
      22:42:04,188 INFO [TomcatDeployer] deploy, ctxPath=/bankws-ejb, warUrl=.../tmp/deploy/bankws-ejb.jar-ws39474.war/
      22:42:04,368 INFO [EJBDeployer] Deployed: file:/D:/Software/jboss-4.0.4-bis/server/default/deploy/bankws-ejb.jar
      22:42:04,398 INFO [WSDLFilePublisher] WSDL published to: file:/D:/Software/jboss-4.0.4-bis/server/default/data/wsdl/bankws-ejb.jar/TellerService.wsdl
      22:42:04,458 WARN [ServiceMetaData] Cannot load class for type: {http://ebank.jboss.com/teller/types}getAccountsOfCustomer,com.jboss.ebank.TellerEndpoint_getAccountsOfCustomer_RequestStruct
      22:42:04,458 WARN [ServiceMetaData] Cannot load class for type: {http://ebank.jboss.com/teller/types}getAccountsOfCustomerResponse,com.jboss.ebank.TellerEndpoint_getAccountsOfCustomer_ResponseStruct
      22:42:04,458 WARN [ServiceMetaData] Cannot load class for type: {http://ebank.jboss.com/teller/types}getAccountBalance,com.jboss.ebank.TellerEndpoint_getAccountBalance_RequestStruct
      22:42:04,458 WARN [ServiceMetaData] Cannot load class for type: {http://ebank.jboss.com/teller/types}getAccountBalanceResponse,com.jboss.ebank.TellerEndpoint_getAccountBalance_ResponseStruct
      22:42:04,468 ERROR [MainDeployer] Could not start deployment: file:/D:/Software/jboss-4.0.4-bis/server/default/deploy/bankws-ejb.jar
      org.jboss.ws.WSException: Cannot load java type: com.jboss.ebank.TellerEndpoint_getAccountBalance_RequestStruct
      at org.jboss.ws.metadata.ParameterMetaData.getJavaType(ParameterMetaData.java:141)
      at org.jboss.ws.metadata.ParameterMetaData.eagerInitialize(ParameterMetaData.java:291)
      at org.jboss.ws.metadata.OperationMetaData.eagerInitialize(OperationMetaData.java:474)
      at org.jboss.ws.metadata.EndpointMetaData.eagerInitialize(EndpointMetaData.java:353)
      at org.jboss.ws.metadata.ServiceMetaData.eagerInitialize(ServiceMetaData.java:397)
      at org.jboss.ws.metadata.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:143)
      at org.jboss.ws.server.ServiceEndpoint.start(ServiceEndpoint.java:131)
      at org.jboss.ws.server.ServiceEndpointManager$DefaultServiceLifecycle.startServiceEndpoint(ServiceEndpointManager.java:513)
      at org.jboss.ws.server.ServiceEndpointManager$ServiceLifecycleChain.startServiceEndpoint(ServiceEndpointManager.java:458)
      at org.jboss.ws.server.ServiceEndpointManager.startServiceEndpoint(ServiceEndpointManager.java:427)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:287)
      at $Proxy35.startServiceEndpoint(Unknown Source)
      at org.jboss.ws.server.WebServiceDeployer.startServiceEndpoints(WebServiceDeployer.java:203)
      at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:126)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy26.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.jboss.ebank.TellerEndpoint_getAccountBalance_RequestStruct
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.jboss.ws.utils.JavaUtils.loadJavaType(JavaUtils.java:81)
      at org.jboss.ws.metadata.ParameterMetaData.getJavaType(ParameterMetaData.java:137)
      ... 50 more

      To generate the deployment artifacts I use a modified version of the wstools-config.xml provided with the tutorial, where I've replaced the attribute style='rpc' with style='document'. After executing the following ANT tasks:

      ant -f jboss-build.xml wstool
      ant -f jboss-build.xml ws-package
      ant -f jboss-build.xml ws-deploy

      the XML and WDSL files seems to be correct and so the EJB module, but at deployment-time I get the above mentioned error.

      Here is the wstools-config.xml I'm using:

      <configuration xmlns="http://www.jboss.org/jbossws-tools">
       <java-wsdl>
       <service name="TellerService" style="document"
       endpoint="com.jboss.ebank.TellerEndpoint"/>
       <namespaces target-namespace="http://ebank.jboss.com/teller"
       type-namespace="http://ebank.jboss.com/teller/types"/>
       <mapping file="jaxrpc-mapping.xml"/>
       <webservices ejb-link="TellerBean"/>
       </java-wsdl>
      </configuration>



      Anyone can help me?

      Thanks in advance

        • 1. Re: Problem deploying
          Heiko Braun Master

          Are you sure this isn't a plain "ClassNotFoundException" ? Is the com.jboss.ebank.TellerEndpoint_getAccountBalance_RequestStruct class really included in your deployment artifact?

          • 2. Re: Problem deploying
            andrea Newbie

            No, it's not included... I was wondering about how and where JBoss could found that class. Nothing is mentioned about that in the Getting Started Guide nor in the JBossWS User Guide (Wiki), so I eventually tought the class would be automatically generated by JBoss at deployment time. However, after reading your message, it seems I'm missing something or I'm doing it the wrong way.

            I think now the point is: how are the getAccountOfCustomer_RequestStruct and getAccountOfCustomer_ResponseStruct generated? Is it necessary to write them by hand or there exists some tool to do that? (Wstools, maybe?)

            Could you address me about some material describing the steps needed to write a "document-style" web service with JBoss?

            Thanks again for your valuable help