2 Replies Latest reply on Dec 3, 2006 3:56 PM by Jörg Gottschlich

    RuntimeException when deploying

    Jörg Gottschlich Newbie

      Hi Folks!

      I'm new to Seam/EJB/JBoss, but pretty enthuasiastic for what I've seen so far. Please forgive if this might be an easy question, but I've searched around and found nothing on the web or in the forums. Additionally, I'm not sure that I understood everything (components and their dependencies) correctly.

      I'm getting this error message on the console while I'm trying to deploy my project:

      12:53:33,015 INFO [EARDeployer] Init J2EE application: file:/home/joerg/jboss-4.0.4.GA/server/default/deploy/easyCV.ear
      12:53:34,590 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.logic.InterviewAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@a594e1
      12:53:34,705 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.logic.WelcomeAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@7a6c34
      12:53:34,718 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.logic.profile.KurzprofilAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@5292e6
      12:53:34,731 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.model.profile.CVProfile org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@75d65c
      12:53:34,841 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to de.codest.easyCV.model.profile.categories.KurzprofilItem org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@14174f9
      12:53:34,968 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=easyCV.jar
      java.lang.RuntimeException: bean class has no local, webservice, or remote interfaces defined and does not implement at least one business interface
       at org.jboss.ejb3.ProxyFactoryHelper.getLocalInterfaces(ProxyFactoryHelper.java:105)
       at org.jboss.ejb3.ProxyDeployer.initializeLocalBindingMetadata(ProxyDeployer.java:117)
       at org.jboss.ejb3.SessionContainer.instantiated(SessionContainer.java:71)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:573)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:555)
       at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:536)
       at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:508)
       at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:463)
       at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:125)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
       at sun.reflect.GeneratedMethodAccessor3.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.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.create(Unknown Source)
      ...
      


      My question: Is there a way to find out to which bean class the message is refering to? This would make it a lot easier to dig deeper.

      The last thing I did (as far as I remember) was introducing a SFSB:

      @Stateful
      @Name("CVProfile")
      public class CVProfile implements Serializable, CVProfileInterface {
      


      with the following interface:

      @Local
      public interface CVProfileInterface {
      
       public abstract int getCurrentRevision();
       public abstract void addCategory(Category cat);
       public abstract Category getCategory(String name);
       public abstract void destroy();
      
      }
      


      But I'm not sure if this is somehow connected to the error. Fact is: The application gets deployed, but it cannot build the first view. Trying to access it from a browser brings:
      13:11:12,323 ERROR [STDERR] 03.12.2006 13:11:12 com.sun.facelets.FaceletViewHandler handleRenderException
      SCHWERWIEGEND: Error Rendering View[/home.xhtml]
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: interview
       at org.jboss.seam.Component.newInstance(Component.java:735)
       at org.jboss.seam.Component.newInstance(Component.java:1308)
       at org.jboss.seam.Component.getInstance(Component.java:1263)
       at org.jboss.seam.Component.getInstance(Component.java:1246)
       at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
       at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
       at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
       at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
       at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
       at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
       at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
       at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
       at org.apache.myfaces.renderkit.RendererUtils.getObjectValue(RendererUtils.java:195)
       at org.apache.myfaces.renderkit.RendererUtils.getBooleanValue(RendererUtils.java:152)
       at org.apache.myfaces.renderkit.html.HtmlCheckboxRendererBase.encodeEnd(HtmlCheckboxRendererBase.java:60)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
       at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
       at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
       at org.apache.myfaces.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:62)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
       at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
       at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderHeaderOrFooter(HtmlGridRendererBase.java:127)
       at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:83)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:554)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.naming.NameNotFoundException: easyCV not bound
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
       at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
       at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jboss.seam.Component.instantiate(Component.java:774)
       at org.jboss.seam.Component.newInstance(Component.java:731)
       ... 54 more
      

      But I didn't change the interview component since it ran fine, so I think this is a consequence from the first error...

      Another question that arose: When I'm using own classes (let's say MyClass) as type for attributes in CVProfile (the implementation), does MyClass have to be a component (having a @Name tag, interface...)? This is where I'm a bit confused about which things need to have Seam tags or interfaces.

      Thanks a lot in advance for you help!
      Regards,
      Jörg

      PS: If you need further information, please tell me. Thanks.

        • 1. Re: RuntimeException when deploying
          Ben Catherall Newbie

          Have you checked your JNDI pattern in the seam configuration?

          in WEB-INF/components.xml you should have something like this:

           <component name="org.jboss.seam.core.init">
           <property name="debug">true</property>
           <property name="myFacesLifecycleBug">true</property>
           <property name="jndiPattern">easyCV/#{ejbName}/local</property>
           </component>
          


          make sure the prefix is the name of your .EAR file.

          Alternatively you might have set these parameters in web.xml or seam.properties

          To your second question, as I understand it - you only need to annotate components with @Name when you need to reference them - if you only ever access that class via your component, there's no need to. As for interfaces, if your components are EJBs then yes, otherwise not necessarily.


          Hope that helps

          Ben

          • 2. Re: RuntimeException when deploying [solved]
            Jörg Gottschlich Newbie

            Hi Ben,

            thanks a lot for your answer.
            My components.xml had the lines you mentioned, the problem was something else (fortunately it is solved now!):

            The exploded-archives dir contained old files which weren't in the src branch anymore; they caused the trouble. An

            ant clean


            helped. Everything is fine so far now. Nevertheless it would help if the error message would contain the name of the bean that causes the trouble.

            Thanks for your clarifying comments and your help. :-)

            See you,
            Jörg