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

    JBoss 4.2.3.GA Could not instantiate Seam component

    caffeineborg

      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

        • 1. Re: JBoss 4.2.3.GA Could not instantiate Seam component
          caffeineborg

          People looking at this topic, any thoughts anybody?

          • 2. Re: JBoss 4.2.3.GA Could not instantiate Seam component
            caffeineborg

            Hello All,

              This could  be something pretty straightforward -- it escapes me at this point and am not sure what detail I need to resolve.  I have provided details above and these have yet to lead me to a soluion.

             

            I would greatly appreciate comments/feedback/pointers towards a solution.  

             

            Let me know what I can do to provide more information if needed.

            • 3. Re: JBoss 4.2.3.GA Could not instantiate Seam component
              jaikiran

              Are you sure the RegisterAction bean is being bound to JNDI when the lookup happens. Can you attach the server.log file?

              • 4. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                caffeineborg

                Jaikiran -- I am not sure.   Nor at this point clear enough that I can get you that specific confirmation or detail to answer.  I will jump on the server and clear the logs and restart.  Then capture the log and attach the result.

                 

                Thanks -- I appreciate your feedback

                • 5. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                  caffeineborg

                  Jaikiran

                     Attached is the server.log ( I can put the boot.log if that would add value).  Really my sense is this is simple fix as dev/QA work for me and I am missing something in integration and production -- starting to feel a bit low about this.

                  • 6. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                    jaikiran

                    I don't see any NameNotFoundException in those logs. Instead, I see this:

                     

                    2011-09-23 09:02:45,605 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/opt/jboss/jboss-4.2.3.GA/server/default/deploy/plo-prod-ds.xml

                    org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=bocDatasource

                    Looks like the datasource is being deployed twice (maybe via different -ds.xml files?)

                    • 7. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                      caffeineborg

                      I can get the error in there.  That was just a start up of jboss.  The " Could not create deployment ..." comes and goes.  there are (shrapenal from me trying different things) times where I do have a -dev and a -prod ds.xml. 

                       

                      Let me do this (if this works):  I will stop / clear logs / get just the prod-ds.xml file in place / restart / make a request (should gen the error) / re-upload a server.log.

                       

                      thanks

                      • 8. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                        caffeineborg

                        server.log attached with =>  Those steps completed and jboss restarted and browser acess that generated :

                         

                        Could not instantiate Seam component: Register

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

                        • 9. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                          jaikiran

                          The reason you see the exception on accessing the page is because your application has failed to deploy correctly. Fixing that should fix the runtime access issues. It looks like main issue is:

                           

                          --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---

                          ObjectName: persistence.units:ear=boc.ear,jar=boc.jar,unitName=boc

                            State: FAILED

                            Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: instructions, expected: text

                          some issue with the DB column type. Once you fix that, see if there are any other errors when the application is deployed. Once you have a clean deployment without any issues, access the application.

                          • 10. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                            caffeineborg

                            I am thankful for your attention and questions.  It was in fact an issue the the production environment and the code base where out of sync.   Specifically, there was a change in the database structure (two column changes of note (longtext changed to varchars) that were not documented.

                             

                            Your notice helped me look at an area (database structure) that I was not treating as part of the variables.  I had made code changes that worked in dev and QA (extrapolation should work in production) and I was working on the premise that the code base was what was in production.

                             

                            That is my fault for not digging into the database.

                             

                            I thank you again and hope your weekend is great.

                            • 11. Re: JBoss 4.2.3.GA Could not instantiate Seam component
                              caffeineborg

                              I may note be totally out of the woods but the integration environment (post the db changes (alter table ...)) will run the applicaiton wth the code changes --> the .ear file deploys.

                               

                              Based on the discovery that prodcution code and database structure are different I have a LOT of QA to do.

                               

                              A quick summary:

                               

                              new .ear file deployed against differnet datbase strutures created the error that the component could not instantiate (ear file not deployed).