1 Reply Latest reply on Dec 14, 2008 7:34 AM by Tibor Budai

    Failed to build METRO runtime model when using @WebFault ann

    Tibor Budai Newbie

      Hi,

      I'm using JBoss 4.2.3 with JBossWS-METRO 3.0.4

      20:32:10,903 INFO [Server] Starting JBoss (MX MicroKernel)...
      20:32:10,903 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)
      20:32:10,903 INFO [Server] Home Dir: D:\tools\jboss\jboss 4.2.3
      20:32:10,913 INFO [Server] Home URL: file:/D:/tools/jboss/jboss 4.2.3/
      20:32:10,913 INFO [Server] Patch URL: null
      20:32:10,913 INFO [Server] Server Name: default
      20:32:10,913 INFO [Server] Server Home Dir: D:\tools\jboss\jboss 4.2.3\server\default
      20:32:10,913 INFO [Server] Server Home URL: file:/D:/tools/jboss/jboss 4.2.3/server/default/
      20:32:10,923 INFO [Server] Server Log Dir: D:\tools\jboss\jboss 4.2.3\server\default\log
      20:32:10,923 INFO [Server] Server Temp Dir: D:\tools\jboss\jboss 4.2.3\server\default\tmp
      20:32:10,923 INFO [Server] Root Deployment Filename: jboss-service.xml
      20:32:11,233 INFO [ServerInfo] Java version: 1.6.0_07,Sun Microsystems Inc.
      20:32:11,233 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 10.0-b23,Sun Microsystems Inc.
      20:32:11,233 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
      20:32:11,594 INFO [Server] Core system initialized
      20:32:13,677 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
      20:32:13,677 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
      20:32:14,147 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
      20:32:14,147 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
      20:32:14,418 INFO [TransactionManagerService] Starting recovery manager
      20:32:14,508 INFO [TransactionManagerService] Recovery manager started
      20:32:14,508 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
      20:32:16,841 INFO [EJB3Deployer] Starting java:comp multiplexer
      20:32:21,448 INFO [MetroServerConfig] JBoss Web Services - Stack Metro Runtime Server
      20:32:21,448 INFO [MetroServerConfig] 3.0.4.GA
      


      Deploying WebServices is working well.
      Now I wrote a WebService which is throwing a custom exception using the @WebFault annotation

      While deploying such a web service I receive following error:

      javax.xml.ws.WebServiceException: Failed to build METRO runtime model
       at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:134)
       at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.start(DeploymentAspectManagerImpl.java:144)
       at org.jboss.wsf.container.jboss42.LazyAssemblyWSFRuntime.start(LazyAssemblyWSFRuntime.java:66)
       at org.jboss.wsf.container.jboss42.JAXWSDeployerHookPostJSE.deploy(JAXWSDeployerHookPostJSE.java:49)
       at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:88)
       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 $Proxy45.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       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 $Proxy9.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.NoClassDefFoundError: com/sun/tools/ws/wscompile/WsgenTool
       at org.jboss.wsf.stack.metro.WsgenWrapperGenerator.generate(WsgenWrapperGenerator.java:76)
       at org.jboss.wsf.stack.metro.DeploymentDescriptorParserJBWS.generateWrappers(DeploymentDescriptorParserJBWS.java:90)
       at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parseAdapters(DeploymentDescriptorParserExt.java:302)
       at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parse(DeploymentDescriptorParserExt.java:179)
       at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:110)
       ... 33 more
      


      When I remove the throws statmenet in the WebService the service is deployed succesfully.

      I tried instead to throw the MetroTestFault from
      https://jira.jboss.org/jira/browse/JBWS-2087
      but the same error occures.

      Can someone help?

        • 1. Re: Failed to build METRO runtime model when using @WebFault
          Tibor Budai Newbie

          If try to deploy during server startup the error differs and is the following:

          javax.xml.ws.WebServiceException: Failed to build METRO runtime model
           at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:134)
           at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.start(DeploymentAspectManagerImpl.java:144)
           at org.jboss.wsf.container.jboss42.LazyAssemblyWSFRuntime.start(LazyAssemblyWSFRuntime.java:66)
           at org.jboss.wsf.container.jboss42.JAXWSDeployerHookPostJSE.deploy(JAXWSDeployerHookPostJSE.java:49)
           at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:88)
           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 $Proxy45.start(Unknown Source)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
           at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           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 $Proxy9.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
           at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
           at $Proxy0.start(Unknown Source)
           at org.jboss.system.ServiceController.start(ServiceController.java:417)
           at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           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.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy4.start(Unknown Source)
           at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
           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:597)
           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 $Proxy5.deploy(Unknown Source)
           at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
           at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
           at org.jboss.Main.boot(Main.java:200)
           at org.jboss.Main$1.run(Main.java:508)
           at java.lang.Thread.run(Thread.java:619)
          Caused by: java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
           at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
           at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
           at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
           at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:690)
           at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:670)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:200)
           at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
           at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:527)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
           at org.jboss.wsf.stack.metro.WsgenWrapperGenerator.generate(WsgenWrapperGenerator.java:76)
           at org.jboss.wsf.stack.metro.DeploymentDescriptorParserJBWS.generateWrappers(DeploymentDescriptorParserJBWS.java:90)
           at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parseAdapters(DeploymentDescriptorParserExt.java:302)
           at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parse(DeploymentDescriptorParserExt.java:179)
           at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:110)
           ... 79 more
          Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.sun.mirror.apt.AnnotationProcessorFactory
           at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
           ... 102 more