2 Replies Latest reply on Nov 15, 2007 11:47 AM by Carlo de Wolf

    Error messages should have context

    Adrian Brock Master

      Sometimes the ejb3 error message are incomprehensible.
      You've got no idea which ejb or even deployment it is referring to.

      For now I've added a couple of DeploymentException wrappings
      which at least narrows down where you need to look.

      But this should not be necessary. The error message should always include
      some context on what it is working with. Doing so will avoid this horrible
      exception wrapping, e.g.

      17:13:54,239 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/home/ejort/jboss-head/ejb3/output/test-lib/globalReference-ejb3.jar state=PostClassLoader mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying globalReference-ejb3.jar: Error creating ejb container GlobalSession30: sun.reflect.annotation.TypeNotPresentExceptionProxy
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:151)
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:83)
       at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.deploy(AbstractVFSRealDeployer.java:45)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:729)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:670)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:496)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:355)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:813)
       at org.jboss.deployment.MainDeployer.redeploy(MainDeployer.java:588)
       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:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       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:668)
       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.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:270)
       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:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
       at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
       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:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       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:668)
       at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:815)
       at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:416)
       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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
       at sun.rmi.transport.Transport$1.run(Transport.java:153)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.deployers.spi.DeploymentException: Error creating ejb container GlobalSession30: sun.reflect.annotation.TypeNotPresentExceptionProxy
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:514)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:460)
       at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:442)
       at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:408)
       at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:350)
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:138)
       ... 66 more
      Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
       at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
       at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
       at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
       at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
       at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
       at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
       at java.lang.Class.initAnnotationsIfNecessary(Class.java:3031)
       at java.lang.Class.getAnnotation(Class.java:2989)
       at org.jboss.aop.annotation.AnnotationElement$AnnotationElementAction$1.getVisibleAnnotation(AnnotationElement.java:264)
       at org.jboss.aop.annotation.AnnotationElement.getVisibleAnnotation(AnnotationElement.java:114)
       at org.jboss.aop.Advisor.resolveAnnotation(Advisor.java:356)
       at org.jboss.ejb3.EJBContainer.getAnnotation(EJBContainer.java:1110)
       at org.jboss.ejb3.ProxyFactoryHelper.getLocalAndBusinessLocalInterfaces(ProxyFactoryHelper.java:81)
       at org.jboss.ejb3.ProxyFactoryHelper.getLocalBusinessInterfaces(ProxyFactoryHelper.java:497)
       at org.jboss.ejb3.session.SessionContainer.resolveBusinessInterfaces(SessionContainer.java:200)
       at org.jboss.ejb3.EJBContainer.instantiated(EJBContainer.java:1256)
       at org.jboss.ejb3.session.SessionContainer.instantiated(SessionContainer.java:191)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:508)
       ... 71 more