13 Replies Latest reply on Oct 22, 2010 2:36 AM by jaikiran

    Problems getting started with JBOSS

      Hi folks,

       

      I'm jumping into this pretty cold, have some limited experience with Tomcat years ago, but this project uses JBoss, so JBoss is what I have to learn.  I got jboss-5.1.0.GA installed and running initially.  Next I started running through the getting started document that tries to sets up Sun's J2EE tutorial so it runs on JBoss.  This started running into problems.

       

      First off, the examples wounldn't compile.  A bit of digging found that the jar files needed to support the J2EE stuff are located in the common/lib directory, where the build script expects them to be in server/default/lib.  I fixed this by replacing server/default/lib with a symlink pointing to common/lib.  That got everything to compile and package successfully.

       

      Next step was to configure JBoss to run the Hypesonic database in client/server mode.  This didn't work so well.  Logs dumped a lot of exception traces that mean absolutely nothing to me.  I did check to make sure the TCP port being requested (1701) hasn't been opened by some other application.

       

      Anyone have any idea what this all means and how I can fix it?

       

      Thanks,

      -Ken

       

       

      2009-12-17 21:00:28,690 INFO  [org.quartz.impl.StdSchedulerFactory] (main) Quartz scheduler version: 1.5.2
      2009-12-17 21:00:28,691 INFO  [org.quartz.core.QuartzScheduler] (main) Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
      2009-12-17 21:00:28,780 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Configured: name=jboss:service=Hypersonic state=Instantiated mode=
      Manual requiredState=Configured
      org.jboss.deployment.DeploymentException: Error configuring attribute Port
              at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
              at org.jboss.system.metadata.ServiceAttributeMetaData.getValue(ServiceAttributeMetaData.java:155)
              at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:151)
              at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:114)
              at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.java:58)
              at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.java:4.

      ....

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
              at org.jboss.Main.boot(Main.java:221)
              at org.jboss.Main$1.run(Main.java:556)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.services.binding.NoSuchBindingException: No binding null found for service jboss:service=Hypersonic in set ports-default
              at org.jboss.services.binding.impl.PojoServiceBindingStore.getServiceBinding(PojoServiceBindingStore.java:98)
              at org.jboss.services.binding.ServiceBindingManager.getIntBinding(ServiceBindingManager.java:217)
              at org.jboss.services.binding.ServiceBindingManager.getIntBinding(ServiceBindingManager.java:193)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      ...

              at org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext.invoke(AbstractKernelControllerContext.java:286)
              at org.jboss.system.metadata.ServiceValueFactoryValueMetaData.getValue(ServiceValueFactoryValueMetaData.java:154)
              at org.jboss.system.metadata.ServiceAttributeMetaData.getValue(ServiceAttributeMetaData.java:151)
              ... 52 more
      2009-12-17 21:00:28,837 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfsfile:/home/ken/jboss-5.1.0.GA/server/default/deploy/
      hsqldb-ds.xml state=PreReal mode=Manual requiredState=Real
      org.jboss.deployment.DeploymentException: Error configuring attribute Port
              at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
              at org.jboss.system.metadata.ServiceAttributeMetaData.getValue(ServiceAttributeMetaData.java:155)
              at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:151)
              at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:114)

        • 1. Re: Problems getting started with JBOSS
          jaikiran

          kencorbin wrote:

           


          Next step was to configure JBoss to run the Hypesonic database in client/server mode.


          Any specific reason why you want to do that?

          • 2. Re: Problems getting started with JBOSS
            erasmomarciano
            have you changed this file bindings.xml?
            • 3. Re: Problems getting started with JBOSS

              Hi there,

               

              I'm doing this because I haven't the foggiest idea what I am doing beyond following the cookbook instructions at http://docs.jboss.org/jbossas/getting_started/v4/html/ section 4.1.7.1.  I believe the goal is to enable client/server database access so I can run some SQL scripts to build database tables needed to complete the tutorial.

               

              Thanks,

              -Ken

              • 4. Re: Problems getting started with JBOSS
                jaikiran

                I must say that those examples are outdated and won't work with AS-5. What kind of applications are you interested in running on JBoss AS-5? If you are looking for EJB3 applications, then the tutorials are here http://www.jboss.org/jbossejb3/docs/ Would that be good enough? Or are you looking for any other kind of applications?

                1 of 1 people found this helpful
                • 5. Re: Problems getting started with JBOSS

                  I haven't changed bindings.xml because the (obviously obsolete) instructions didn't ask me to


                  After a bit of searching, I found a bindings-jboss-beans.xml file in server/default/conf/bindingservice.beans/META-INF, and it had an entry that obviously needed to be uncommened for hypersonic client/server access to work.  Uncommented it and restarted JBoss, and now my SQL scripts run

                   

                  On to the next problem, or maybe not.  Sounds like switching to another set of tutorials will be the way to go.

                  • 6. Re: Problems getting started with JBOSS

                    I'm just trying to find something to get me back up to speed in a JBoss environment.  I'll try swiching to your set of tutorials.

                     

                    Thanks for all of your help!!

                    -Ken

                    • 7. Re: Problems getting started with JBOSS
                      jaikiran

                      kencorbin wrote:

                       

                      On to the next problem, or maybe not.  Sounds like switching to another set of tutorials will be the way to go.

                      By the way, a FYI - one of the reasons i suggested to move to these new tutorials is because they are the latest and are being maintained. So any issues/questions can be answered related to these However, the earlier Duke's application isn't in a great shape for JBoss AS-5. There have been users who have complained about running into various issues trying to get it to work with AS-5.

                      • 8. Re: Problems getting started with JBOSS
                        matt-b

                        I also am trying to work through this tutorial for EAP 5, because I am migrating existing EJB 2.1 applications to JBoss.  Are you saying that the 5.x AS support for EJB2 is not really  up to snuff?

                        • 9. Re: Problems getting started with JBOSS
                          jaikiran

                          matt-b wrote:

                           

                          Are you saying that the 5.x AS support for EJB2 is not really  up to snuff?

                          Neither I nor anyone else say that EJB2 is not really up to snuff in AS 5.x. We were discussing about the Duke bank tutorial application which would need application server specific configurations. Those configurations have not been documented for AS5.

                           

                          EJB2.x, EJB3.0 work fine on AS5.

                          • 10. Re: Problems getting started with JBOSS
                            matt-b

                            Thanks for your response, jaikiran,

                             

                             

                            I just wanted to make sure I wasn't going to run into trouble.

                             

                            Actually, it looks to me like the Duke's Bank example does deploy successfully with relatively minor changes.

                             

                            - change the classpath entries for the servlet, jsp, and web service jars in the jboss build files.

                            - update the schema definitions referenced in application.xml and application-client.xml (I had to delete the description element of application.xml also as a result)

                             

                            If it is true that there are no EJB2 tutorials for AS 5.x -- and I wasn't able to find any -- this one still seems to be a workable alternative.

                            • 11. Re: Problems getting started with JBOSS
                              jaikiran

                              matt-b wrote:

                               


                               

                              Actually, it looks to me like the Duke's Bank example does deploy successfully with relatively minor changes.

                               

                              - change the classpath entries for the servlet, jsp, and web service jars in the jboss build files.

                              - update the schema definitions referenced in application.xml and application-client.xml (I had to delete the description element of application.xml also as a result)

                               

                              If it is true that there are no EJB2 tutorials for AS 5.x -- and I wasn't able to find any -- this one still seems to be a workable alternative.

                              Matt, if possible, could you just document the changes/configurations that you had to do to get it working against AS5? You can create a wiki and link it to our JBoss AS5 FAQ here http://community.jboss.org/wiki/JBossAS5FAQ

                               

                              I would have done it myself, but I haven't ever tried running that example.

                              • 12. Re: Problems getting started with JBOSS
                                matt-b

                                I should qualify my earlier statement to say that I have only, so far, gone as far in the tutorial as deploying ear and testing it successfully through the web application. Beyond that my work moved over to EAP from community, and involved converting the app to use SQL Server instead of hypersonic.

                                 

                                An article covering the changes necessary for initial deployment of the application can be found here: http://community.jboss.org/wiki/DukesBanksampleEJB2applicationonAS51

                                • 13. Re: Problems getting started with JBOSS
                                  jaikiran

                                  matt-b wrote:

                                   

                                   

                                   

                                  An article covering the changes necessary for initial deployment of the application can be found here: http://community.jboss.org/wiki/DukesBanksampleEJB2applicationonAS51

                                  Thank you!