9 Replies Latest reply on Jan 17, 2007 1:10 PM by myozzo

    JBoss version versus JRE

    myozzo

      I am attempting to use Jboss 4.0.5.GA
      I have JRE - Jre1.5.0_02

      Will this work it seems to be running here are the last 3 lines of the server window

      ch_4_0 date=200610162339)] Started in 1m:57s:672ms
      14:33:21,363 INFO [STDOUT] Processing DataSource...
      14:33:21,660 INFO [STDOUT] Attempting to fetch template [/setuppage.html]


      However when I scroll up the window I see many errors like this

      14:31:44,535 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(
      RawDynamicInvoker.java:164)

        • 1. Re: JBoss version versus JRE
          peterj

          Yes, that JVM version will work with that JBoss AS version.

          The "Started" message means the server has started. The two messages after came from a program that you deployed to the application server, they did not come from JBoss AS.

          For the error line you posted, you need to post the start of the stack trace. There should be a whole series of then, you need to post the first 10 or 20 lines that look like that plus the 5 or so lines before those lines. For an example of a posted stack trace, see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=99225. Yours will, of course, look slightly different because it is being generated by one of your deployed application s=which is writing to STDOUT instead of to the log file.

          • 2. Re: JBoss version versus JRE
            myozzo

            Here are the lines prior to the first instance of those erros:

            org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy5.deploy(Unknown Source)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
            at org.jboss.Main.boot(Main.java:200)
            at org.jboss.Main$1.run(Main.java:490)
            at java.lang.Thread.run(Thread.java:595)
            2007-01-16 15:22:17,972 ERROR [STDERR] jVantage Startup Error: Unable to determine jVantage Configuration Directory : javax.ejb.EJBException: Naming lookup failure on dataSource [jdbc/jVantageDS]: jdbc not bound
            2007-01-16 15:22:17,972 ERROR [STDERR] javax.ejb.EJBException: Naming lookup failure on dataSource [jdbc/jVantageDS]: jdbc not bound
            2007-01-16 15:22:17,988 ERROR [STDERR] at com.jvantage.persistence.DataSourceHelper.getDataSource(DataSourceHelper.java:107)

            • 3. Re: JBoss version versus JRE
              myozzo

              OK I think I see the problem but I am not sure where to fix it

              Here is the contents of my DS file named: JvantageDS.xml

              <?xml version="1.0" encoding="UTF-8"?>

              <local-tx-datasource>
              <jndi-name>jdbc/JvantageDS</jndi-name>
              <use-java-context>false</use-java-context>
              <connection-url>jdbc:mysql://mysqlserver/jvantage</connection-url>
              <driver-class>com.mysql.jdbc.Driver</driver-class>
              <user-name>myozzo</user-name>
              tiger55
              </local-tx-datasource>


              notice that is spelled correctly in both places
              So where is this paremeter lookup failure on dataSource [jdbc/jVantageDS]: jdbc not bound being passed from the setup webpage.

              Thanks for all the help

              • 4. Re: JBoss version versus JRE
                peterj

                You need a WEB-INF/jboss-web.xml file wit the following contents:

                <?xml version='1.0' encoding='UTF-8' ?>
                <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
                <jboss-web>
                 <resource-ref>
                 <res-ref-name>jdbc/JVantageDS</res-ref-name>
                 <jndi-name>java:jdbc/JVantageDS</jndi-name>
                 </resource-ref>
                </jboss-web>


                This maps the JNDI name your code uses to the JNDI name in JBoss.


                • 5. Re: JBoss version versus JRE
                  myozzo

                  Is this the proper location for the file

                  C:\Program Files\jboss-4.0.5.GA\server\default\deploy\
                  http-invoker.sar\invoker.war\WEB-INF

                  • 6. Re: JBoss version versus JRE
                    peterj

                    No, it goes in your war file.

                    • 7. Re: JBoss version versus JRE
                      myozzo

                      OK it seems to have the correct file name now but I have this error
                      I feel I'm getting close here thanks for the help

                      2007-01-16 17:06:52,581 ERROR [STDERR] jVantage Startup Error: Unable to determine jVantage Configuration Directory : javax.ejb.EJBException: Naming lookup failure on dataSource [jdbc/jVantageDS]: jdbc not bound

                      • 8. Re: JBoss version versus JRE
                        peterj

                        First, I am looking through your posts and see various different capitalization schemes for 'jvantage'. Are you sure that the capitalization matches everywhere?

                        Second, do you have the following entry in your web.xml file:

                        <resource-ref>
                         <res-ref-name>jdbc/jVantageDS</res-ref-name>
                         <res-type>javax.sql.DataSource</res-type>
                         <res-auth>Container</res-auth>
                         <res-sharing-scope>Shareable</res-sharing-scope>
                         </resource-ref>


                        Third, in your Java code, are you accessing the data source as follows:

                        DataSource ds = new InitialContext().lookup("java:comp/env/jdbc/jVantageDS");


                        The following is also acceptable:

                        DataSource ds = new InitialContext().lookup("java:jdbc/jVantageDS");


                        I use the first pattern within servlets, and the second within EJBs.


                        • 9. Re: JBoss version versus JRE
                          myozzo

                          Yes I am positive about the Spelling of Jvantage I checked many times.

                          jVantage is a visual web development tool. I have posted on their forum also hopefuly I will get some answers from them as well

                          Thanks for your help