1 2 Previous Next 15 Replies Latest reply on Feb 17, 2009 7:51 AM by Oliver Libutzki

    DVD Store Example on JBoss 5.0.0 doesn't work

    Oliver Libutzki Newbie

      Hi everyone,


      I just tried to deploy the dvd store example on my JBoss 5.0.0.
      I use Eclipse Ganymede, WebTools 3.0.0 and Seam 2.0.2-SP1.


      I always get this exception:


      00:08:08,328 INFO  [Contexts] starting up: org.jboss.seam.navigation.pages
      00:08:08,343 INFO  [Contexts] starting up: indexer
      00:08:08,343 ERROR [[/dvdstore]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: indexer
           at org.jboss.seam.Component.newInstance(Component.java:1986)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
           at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
           at org.jboss.seam.init.Initialization.init(Initialization.java:596)
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
           at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:367)
           at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
           at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:460)
           at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
           at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           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.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
           at $Proxy36.start(Unknown Source)
           at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
           at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
           at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
           at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
           at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
           at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
           at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
           at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
           at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
           at org.jboss.system.ServiceController.start(ServiceController.java:460)
           at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
           at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
           at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
           at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
           at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
           at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
           at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
           at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
           at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
           at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
           at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
           at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
           at org.jboss.Main.boot(Main.java:209)
           at org.jboss.Main$1.run(Main.java:547)
           at java.lang.Thread.run(Unknown Source)
      Caused by: javax.naming.NameNotFoundException: IndexerAction not bound
           at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
           at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
           at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
           at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
           at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
           at javax.naming.InitialContext.lookup(Unknown Source)
           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)
           ... 64 more



      Can anyone help me? If you ne any further information, feel free to ask me.


      Thanks and kind regards
      Oliver

        • 1. Re: DVD Store Example on JBoss 5.0.0 doesn't work
          Oliver Libutzki Newbie

          One more fact:
          I've imported the project by selecting 'New / Other... / JBoss Tools / Project Examples / Seam / Seam DVD Store Example - EAR'


          Maybe this helps...

          • 2. Re: DVD Store Example on JBoss 5.0.0 doesn't work
            Roel V Newbie

            Hi,


            I tried to do the same (getting the dvdstore example deployed with Eclipse). I only used MySQL5 for database.


            This is exactly the error I get.
            The only remark I see concerning the indexer/IndexerAction is a warning on the application context, but that doesn't look harmful to me.


            10:41:13,905 WARN  [Component] Stateful session beans was bound to the APPLICATION context - note that it is not safe to make concurrent calls to the bean: indexer
            10:41:13,907 INFO  [Component] Component: indexer, scope: APPLICATION, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.dvdstore.session.IndexerAction, JNDI: IndexerAction/local

            I solved the exception by changing the component's scope to SESSION. I can deploy the application, it's not running without errors. Still working on that.

            • 3. Re: DVD Store Example on JBoss 5.0.0 doesn't work
              Roel V Newbie

              Hmm..
              Changing the scope didn't really solve it. Now I get the same error on my JBoss console when I start the application. I can see the application home page however.


              There seems to be a general problem with bounding components: When I try to login I get the same exception on the authenticator/AuthenticatorAction component.



              • 4. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                Roel V Newbie

                I solved it!!!
                The application name should be added to the component name. I changed the line in components.xml:



                <core:init debug="true" jndi-pattern="@jndiPattern@"/>



                to



                <core:init debug="true" jndi-pattern="DVDmysql/#{ejbName}/local"/>




                It might probably be nicer to set this in components.properties.
                I'm too noob to understand what the real problem i

                • 5. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                  Oliver Libutzki Newbie

                  Hmm, this is my line in the components.xml:


                  <core:init debug="true" jndi-pattern="dvdstore-ear/#{ejbName}/local"/>
                  



                  Don't know how to change this as I don't want to use a mysql database.

                  • 6. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                    Roel V Newbie

                    I don't think this involves the database.
                    From your first post I asume your application name is dvdstore.
                    I think you should remove the -ear from your components.xml line, so:


                    <core:init debug="true" jndi-pattern="dvdstore/#{ejbName}/local"/>




                    • 7. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                      Oliver Libutzki Newbie

                      Roel Verbunt wrote on Feb 08, 2009 14:54:


                      I don't think this involves the database.
                      From your first post I asume your application name is dvdstore.
                      I think you should remove the -ear from your components.xml line, so:

                      <core:init debug="true" jndi-pattern="dvdstore/#{ejbName}/local"/>







                      Hmm, doesn't work as well... now dvdstore is not bound. I wonder why there are only two people who have this problem. It's a standard Seam example... so I think there should be a lot of people having these errors. Maybe someone can explain how to solve this issue?

                      • 8. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                        Jozef Hartinger Master

                        Probably because majority of users uses Seam 2.1.x with JBoss AS 5 - where dvdstore example works flawlessly.

                        • 9. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                          Oliver Libutzki Newbie

                          Jozef Hartinger wrote on Feb 10, 2009 14:36:


                          Probably because majority of users uses Seam 2.1.x with JBoss AS 5 - where dvdstore example works flawlessly.


                          If I download the dvdstore exampole using the eclipse project wizard in the way I said earlier int his thread the project is bound to Seam 2.0.


                          Project propertes / Seam Settings / Seam Runtime Add.. only offers Version 2.0. I can't assign a 2.1 runtime. So I wonder how to run the dvdstore example wirth Seam 2.1.

                          • 10. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                            Norman Richards Expert

                            I've never used the examples in Eclipse, but I the dvdstore does run fine in JBoss 5 when built with Ant.

                            • 11. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                              Oliver Libutzki Newbie

                              Norman Richards wrote on Feb 10, 2009 23:26:


                              I've never used the examples in Eclipse, but I the dvdstore does run fine in JBoss 5 when built with Ant.


                              You are right... the example included in Seam 2.1.1.GA runs fine...


                              But the whole structure of the source is not similar to a Seam project created by JBoss WebTools... I would like to use the Seam project wizard to initialize my projects and that's the reason why it would be very helpful to have the dvdstore exampel in the same structure...


                              and it should be deployed by WebTools without using ant...


                              Maybe someone who got this working would like to send me his eclipse project?

                              • 12. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                                Jari Kujansuu Newbie
                                I am studying Seam and I converted dvdstore example for JBoss 5 after having similar problems as you did. You can download my eclipse projects from http://koti.kapsi.fi/kuitsu/files/dvdstore_jboss5.zip

                                I am using JBoss Developer Studio 2.0 Beta which is basically Eclipse 3.4 and JBoss Tools packages together by RedHat. You can download it for free after registration from http://www.jboss.org/community/docs/DOC-10044. You might want to try out it if you experience problems with my converted projects in your own Eclipse installation but I believe example should work fine in your existing Eclipse & JBoss Tools installation too.

                                First of all reason for your original problem related to indexer is that you did not deploy (install) datasource configuration to JBoss server. Datasource configuration can be found from file dvdstore-ear/resources/dvdstore-ds.xml. This file is not included to ear package installed to JBoss server even though it is included to ear project. It must be deployed separately to JBoss server. You can deploy it by following steps:
                                - select the dvdstore-ear/resources/dvdstore-ds.xml from Package Explorer and right-click it.
                                  Or if you use my converted example select jboss5-dvdstore-ear/resources/jboss5-dvdstore-ds.xml.
                                  I renamed example projects so that I could keep original unchanged versions in same workspace too.
                                - select Make Deployable from context menu
                                - choose correct JBoss server from appearing dialog
                                This seem to be known issue. You can read more about it from
                                https://jira.jboss.org/jira/browse/JBIDE-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

                                After deploying datasource configuration to JBoss server it starts without errors but running the original dvdstore example gives error "Missing Built-in Tag Libraries! Make sure they are included within the META-INF directory of Facelets’ Jar.". This problem can be solved by updating dvdstore/WebContent/WEB-INF/lib/jsf-facelets.jar to newer version as explained here http://blog.javarnd.com/?p=31. After this change dvdstore example should work in JBoss 5.0. There is no need to update whole Seam to 2.1.

                                Updating dvdstore example in Eclipse to use Seam 2.1 would require more work. You would need to update all the jar packages to newer ones and update some configuration files too. You can get correct jar packages from dvdstore example provided with Seam 2.1 release.

                                If you want an example for JBoss 5.0 and Seam 2.1 combination you can follow Getting Started with JBoss Developer Studio guide from http://docs.jboss.org/tools/3.0.0.CR2/en/GettingStartedGuide/html_single/. It is quite good guide containing step-by-step instructions to build few example projects. Guide is written for JBoss 4.2 and Seam 1.2 but it works fine with JBoss 5.0 and Seam 2.1 too if you just use correct JBoss and Seam version instead of the versions mentioned in guide.
                                • 13. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                                  Oliver Libutzki Newbie

                                  Thank you very much, Jari!


                                  I will try it this evenening and give to some feedback.

                                  • 14. Re: DVD Store Example on JBoss 5.0.0 doesn't work
                                    Jari Kujansuu Newbie

                                    One more thing.


                                    I forget to mention in my previous message that updating jsf-facelets.jar was not only change to original example.
                                    In addition to that you also have to change all JBoss 4.2 dependencies with JBoss 5.0 in project properties but I guess you have done these already since you have got project compiling ok. Anyway if someone else is trying to get dvdstore or one of
                                    the other examples working with JBoss 5.0 you have to change following properties too:
                                    - Select project, right-click it, select Properties from context menu
                                      - Select Project Facets - Runtimes and select JBoss 5.0 runtime (if you do this for ear project eclipse updates other projects automatically)
                                      - For dvdstore (war) project select also Java Build Path and remove JBoss 4.2 Runtime dependency

                                    1 2 Previous Next