1 2 Previous Next 19 Replies Latest reply on Sep 23, 2011 2:26 PM by Caffeine Borg

    JBoss 4.2.3.GA Could not instantiate Seam component

    Caffeine Borg Newbie

        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 arr:

      - 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



        • 1. Re: JBoss 4.2.3.GA Could not instantiate Seam component
          Aldo Bonzi Novice

          I do not know the answer to your problem but just to clarify, let me tell you that we also develop in 32-bit whereas our production environment is in 64-bit and we have never experienced the behavior you are describing.


          For that reason I must think that maybe your Jboss configuration is different. Do you have other seam apps running in your production environment?


          Also, is the javax.naming.NameNotFoundException: RegisterAction not bound the only error message you are seeing? Can you post the entire stack trace?


          And last but not least, is your RegisterLocal class annotated with @Local, isn't?

          • 2. Re: JBoss 4.2.3.GA Could not instantiate Seam component
            Caffeine Borg Newbie

            Aldo my thanks.


            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.


            I will post what I have from the stack trace in another posting as I can get busy / lots of content. 


            I did try a @Local in the class file and on an ant build got an error.  I Will reproduce that and make another update to this thread with that detail.


            Thanks,

            • 3. Re: JBoss 4.2.3.GA Could not instantiate Seam component
              Caffeine Borg Newbie

              The stack trace from the browser window follows:


              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.htmlbasic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:232)
                   at com.sun.faces.renderkit.html
              basic.GridRenderer.renderRow(GridRenderer.java:178)
                   at com.sun.faces.renderkit.htmlbasic.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.htmlbasic.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

              • 4. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                Caffeine Borg Newbie
                For the annotation, I have the snippet below.  When I include a @Local I get the output/error from the ant that follows the snippet.

                @Stateful
                @Scope( ScopeType.CONVERSATION )
                @Name( "Register" )
                // @TransactionAttribute
                public class RegisterAction implements RegisterLocal
                {


                ###
                #
                ###
                  with @Local included -- looks like I do not have it down correct / or incorrect :

                RegisterAction.java:48: cannot find symbol
                    [javac] symbol: class Local
                    [javac] @Local
                    [javac]  ^
                • 5. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                  Caffeine Borg Newbie

                  I added:


                  import javax.ejb.Local;


                  did a new

                  ant

                  and have a newly built .ear that I am testing.
                  I will update this a I have details


                  • 6. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                    Caffeine Borg Newbie

                    bleech -- same error


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


                    thanks

                    • 7. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                      Caffeine Borg Newbie

                        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.


                      I will work to capture those details and post here.

                      • 8. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                        Caffeine Borg Newbie

                        As a 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)


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


                             I continue to appreciate feedback/thoughts/updates/pointers/suggestions/assistance

                        Thanks,







                        (1) Beginning JBoss Seam ; Author Joseph Faisal Nusairat
                        • 9. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                          Caffeine Borg Newbie

                          NOTE:


                          As another detail ... I find that in the QA and dev environment that there are seam bin data and index files (like


                          ${thing}-seam-relay-bin.000001
                          ${thing}-seam-relay-bin.index


                            In integration there is not, nor in production.  I am sorry to say I am not sure how these got created nor how the configuration would create them nor how to create them nor if they are part of the issue.


                          Any thoughts on this?  If needed can you detail out why, how to create/or configure for creation.


                          I know there is a lot in this trail.  Thanks for the attention.


                          • 10. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                            Aldo Bonzi Novice

                            Do you use the same JRE in both environments?


                            Are EJBs the problem? I mean, what does it happen if you remove RegisterAction and RegisterLocal and try to run it?


                            A quick google glympse on -relay-bin.000001 gives me MySQL related hits. Although MySQL is fully supported by Seam, maybe something is missing in your prod enviroment (database, datasource or jdbc driver for instance)

                            • 11. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                              Caffeine Borg Newbie

                              On the JRE I pulled the one from the working dev environment to the integration environment and got the same result I was getting in integration with the initial JRE.  So, there was no positive change.


                                 On that, I was going to test (in dev then QA first) the latest from Sun(oracle) later.  My hope/wish/want is first to resolve the issue in a reproducible way -- no mystery.


                                My thought at this time is that there is an issue with persistence.  That seam is using the mysql database in dev and there is a missing conf or db set up for the integration (and production).  Might be configuration or lack of access to resources for seam (that wording is a bit vague as I am working to get a handle on this).  The access to the mysql for the data works (not with the built .ear).


                              Does that makes sense and seem like a correct tack to take?


                              Thanks

                              • 12. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                                Caffeine Borg Newbie
                                UPDATE:

                                The details about the mysql data files


                                ${thing}-seam-relay-bin.000001
                                ${thing}-seam-relay-bin.index

                                Was a residual from a server name and should not be a factor here. 

                                However, I still wonder if the issues are related to some database access. 

                                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?


                                • 13. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                                  Caffeine Borg Newbie

                                  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
                                  ...
                                  .
                                  .
                                  • 14. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                                    Caffeine Borg Newbie

                                    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

                                    1 2 Previous Next