11 Replies Latest reply on Sep 23, 2011 2:18 PM by Caffeine Borg

    JBoss 4.2.3.GA Could not instantiate Seam component

    Caffeine Borg Newbie

      JBoss 4.2.3.GA Could not instantiate Seam component

        I am running on Jboss 4.2.3.GA and have working in my dev and QA environments an application .ear file. When I move

      this to a production environment I get an error:

       

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: Register

      ...

      .

      .

       

      Caused by: javax.naming.NameNotFoundException: RegisterAction not bound

      ...

      .

      .

       

      [ ] I do not like to suppose, at this point though:

       

         I think it is related to running 64-bi java on the production machine as I replicated the environment and can reproduce the error in the integration environment.

       

       

      So, in that environment I tried running the same 32-bit java as is in dev and QA but get the same error.

       

      [ ] I am digging in many different areas

      - components.properties/.xml and the jndiPatter
      - in the RegisterAction.java file where I see (as a starter):

       

      @Stateful

      @Scope( ScopeType.CONVERSATION )

      @Name( "Register" )

      // @TransactionAttribute

      public class RegisterAction implements RegisterLocal

      {

       

       

      I would appreciate your feedback as to your solution / any questions that your have for me to better define this / or pointers for solutions.

       

      Items of note include:

       

      - I can compile on the 32-bit systems and have it work when move the resultant .ear to production (or the integration environment) I get

      the noted error.

       

      - I can compile on the 64-bit system (successfully) and that resultant .ear gives the noted error

       

      there are so many details I could provide. I would like to know if I have given enough information above to start? What details would be most

      helpful if you would please provide guidance? Is there enough information to send me in direction where I can solve this? I have done a lot of reading

      searching and attempts to isolate to no avail at this time.

       

      Thanks in advance for your time

       

       

       

      So, I also pulled the tree from the dev machine to my integration (the 64-bit test i set up) machine and tested the .ear in that with the java 64 it and a scp'd copy of the java from the dev server. The hope was that if there was a configuration difference that would show up. No joy.

       

      Here is a post what I have from the stack trace (sorry to make this busy / lots of content).

      <stack trace>

       

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: Register

      at org.jboss.seam.Component.newInstance(Component.java:1986)

      at org.jboss.seam.Component.getInstance(Component.java:1876)

      at org.jboss.seam.Component.getInstance(Component.java:1843)

      at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)

      at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)

      at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)

      at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)

      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)

      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)

      at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)

      at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)

      at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

      at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)

      at org.jboss.seam.navigation.Param.getStringValueFromModel(Param.java:133)

      at org.jboss.seam.navigation.Pages.getStringValuesFromModel(Pages.java:697)

      at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:63)

      at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)

      at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)

      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)

      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:232)

      at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:178)

      at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:126)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)

      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)

      at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:178)

      at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:126)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)

      at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)

      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)

      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)

      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)

      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)

      at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)

      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)

      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)

      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)

      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)

      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)

      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)

      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)

      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)

      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)

      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)

      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: javax.naming.NameNotFoundException: RegisterAction 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.server.NamingServer.lookup(NamingServer.java:270)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)

      at javax.naming.InitialContext.lookup(InitialContext.java:392)

      at org.jboss.seam.Component.instantiateSessionBean(Component.java:1290)

      at org.jboss.seam.Component.instantiate(Component.java:1276)

      at org.jboss.seam.Component.newInstance(Component.java:1970)

      ... 104 more

       

      </stack trace>

       

      For the annotation, I have the snippet below. I did include a @Local as a test as well (see note below)

       

      @Stateful

      @Scope( ScopeType.CONVERSATION )

      @Name( "Register" )

      // @TransactionAttribute

      public class RegisterAction implements RegisterLocal

      {

       

      ### NOTE: with a @Local addtion

      I added:

       

      import javax.ejb.Local;

       

      did a new `ant` and have a newly built .ear that I am testing.

       

      bleech -- same error

       

      ### /NOTE

       

      So, I can provide more details and will keep digging but also appreciate feedback/thoughts/updates/pointers/suggestions/assistance

       

       

        Also, it would be good to know why the difference in the dev system to the integration system

       

       

      The same code built in integration AND/OR the .ear file that works in dev moved to the the integration server fails.

       

       

      As another NOTE:

       

        One read I have done => "The @Local annotation is optional and is used only for clarification that this is really local interface; for all intents and purposes, it will default to being local." (1)

       

       

                        (1) Beginning JBoss Seam ; Author Joseph Faisal Nusairat

       

       

         Still digging, think am headed to look at the .xml configuration files, the jndi resources / hibernate configuration ...

       

       

      I am chasing my tail in trying to find a difference (between the dev and integration environments). The big items I can identify now are:

       

        32-bit vs. 64-bit (NOTE: I tried the java and jboss from the dev environment on the integration machine ...> no joy)

      AND

        java versions:

         in dev=

      java version "1.6.0_23"

      Java(TM) SE Runtime Environment (build 1.6.0_23-b05)

      Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)

       

         in integration=

      java version "1.6.0_20"

      Java(TM) SE Runtime Environment (build 1.6.0_20-b02)

      Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

       

        Here again I did try a copy (scp) of the dev java and have used the .ear built on dev or rebuilt on integration without success.

       

      Not sure where to look at this point or if the above matters.

       

      Any ideas? Anybody else looking at this want to comment or pass back feedback?

       

      ### more detail

       

      in production java is:

      java version "1.6.0_23"

      Java(TM) SE Runtime Environment (build 1.6.0_23-b05)

      Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

       

      the dev and/or QA .ear fails in integration and production

       

      that is via the browser I get the error:

       

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: Register

      ...

      .

      .

       

      Caused by: javax.naming.NameNotFoundException: RegisterAction not bound

      ...

      .

      .

       

      ### 20110921 - notes

       

      I am digging into the jmx-console (more stare/compare ...) and find that the

       

      org.jboss.ejb3.ServiceDelegateWrapper StateString value is: Failed in the integration environment

       

      I am looking into that, how to debug and get more output.

       

      I continue to use this thread to document a few details and to hopefully get feedback/comments etc.

       

      thanks