13 Replies Latest reply on Apr 1, 2004 5:13 PM by jae

    Datasource setup

    lords_diakonos Newbie

      Can someone pleae help me. I am trying to setup mukes. I have it all built and went to http://localhost:8080/nukes-installer/install to set it up. I am trying to setup the ds info. I am trying to connect to a postgres database on a different server.

      What do I enter for the database driver?

        • 1. Re: Datasource setup
          jae Master

          did you compile from source, or did you d/l the zip already setup to run mysql?

          if you want to edit the datasource by hand, change the driver-class element to this:

          org.postgresql.Driver

          and update the connection-url element to point to the db installed on the seperate server.

          • 2. Re: Datasource setup
            lords_diakonos Newbie

            from source

            I tried that but it tells me that it "Can't load database Driver "org.postgresql.Driver"

            What am I missing?

            • 3. Re: Datasource setup
              jae Master

              do you have the necessary postgres jar file in the "lib" directory?

              • 4. Re: Datasource setup
                lords_diakonos Newbie

                uhh don't know. :-p

                Where do I get that and how do I install it. Does it just deploy?

                • 5. Re: Datasource setup
                  jae Master

                  you can find all the drivers here:

                  http://jdbc.postgresql.org/download.html

                  once you d/l it, just drop it into the "default/server/lib" directory and restart jboss.

                  • 6. Re: Datasource setup
                    lords_diakonos Newbie

                    ok that worked. Thank you but I ran into 2 more problems

                    1. It appears that the initial data tries to insert a 0 into a booleon which which is set to default to false. I solved this by not inserting initial data.

                    Real problem!!!
                    2. I went to the nukes directory and ran build deploy and then build deploy-components. I am getting all kinds of error. It looks like it is still looking for mysql. I had changed the localdb file to postgresql before I built it. Here are my logs

                    2004-04-01 14:35:29,990 ERROR [org.jboss.ejb.EntityContainer] Starting failed
                    org.jboss.deployment.DeploymentException: Could not load driver class: com.mysql.jdbc.PreparedStatement; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.PreparedStatement)
                    at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.init(JDBCMySQLCreateCommand.java:45)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:150)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:466)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388)
                    at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152)
                    at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy14.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy30.start(Unknown Source)
                    at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy14.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy12.start(Unknown Source)
                    at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy6.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                    Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.PreparedStatement
                    at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:161)
                    at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:169)
                    at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:123)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                    at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:77)
                    at org.jboss.mx.loading.LoaderRepositoryClassLoader.loadClass(LoaderRepositoryClassLoader.java:78)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                    at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:77)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                    at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.init(JDBCMySQLCreateCommand.java:42)
                    ... 57 more
                    2004-04-01 14:35:29,990 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=nukes/User,service=EJB
                    org.jboss.deployment.DeploymentException: Could not load driver class: com.mysql.jdbc.PreparedStatement; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.PreparedStatement)
                    at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.init(JDBCMySQLCreateCommand.java:45)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:150)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:466)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388)
                    at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152)
                    at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy14.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy30.start(Unknown Source)
                    at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                    at $Proxy14.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:394)
                    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy12.start(Unknown Source)
                    at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                    at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                    at $Proxy6.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                    Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.PreparedStatement
                    at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:161)
                    at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:169)
                    at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:123)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                    at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:77)
                    at org.jboss.mx.loading.LoaderRepositoryClassLoader.loadClass(LoaderRepositoryClassLoader.java:78)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                    at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:77)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                    at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.init(JDBCMySQLCreateCommand.java:42)
                    ... 57 more
                    2004-04-01 14:35:30,006 INFO [org.jboss.ejb.EjbModule] Started jboss.j2ee:module=nukes-ejb.jar,service=EjbModule
                    2004-04-01 14:35:30,006 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/C:/jboss-3.2.3/server/default/tmp/deploy/tmp141nukes.ear-contents/nukes-ejb.jar
                    2004-04-01 14:35:30,131 INFO [org.jboss.web.tomcat.tc4.EmbeddedTomcatService] deploy, ctxPath=/nukes, warUrl=file:/C:/jboss-3.2.3/server/default/tmp/deploy/tmp141nukes.ear-contents/nukes.war/
                    2004-04-01 14:35:30,303 INFO [org.jboss.web.localhost.Engine] SingleSignOnContextConfig[/nukes]: Added certificates -> request attribute Valve
                    2004-04-01 14:35:30,318 WARN [org.jboss.web.tomcat.tc4.EmbeddedTomcatService] Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@5b701a
                    2004-04-01 14:35:30,318 INFO [org.jboss.web.localhost.Engine] StandardManager[/nukes]: Seeding random number generator class java.security.SecureRandom
                    2004-04-01 14:35:30,318 INFO [org.jboss.web.localhost.Engine] StandardManager[/nukes]: Seeding of random number generator has been completed
                    2004-04-01 14:35:30,334 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/nukes:default]: Loading container servlet default
                    2004-04-01 14:35:30,334 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/nukes:invoker]: Loading container servlet invoker
                    2004-04-01 14:35:30,646 INFO [org.jboss.deployment.EARDeployer] Started J2EE application: file:/C:/jboss-3.2.3/server/default/deploy/nukes.ear
                    2004-04-01 14:35:30,646 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/default/deploy/nukes.ear
                    2004-04-01 14:35:35,646 ERROR [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Scanning failed; continuing
                    java.io.FileNotFoundException: C:\jboss-3.2.3\server\default\nukes
                    at org.jboss.net.protocol.file.FileURLLister.listMembers(FileURLLister.java:38)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:374)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                    2004-04-01 14:35:40,646 ERROR [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Scanning failed; continuing
                    java.io.FileNotFoundException: C:\jboss-3.2.3\server\default\nukes

                    • 7. Re: Datasource setup
                      jae Master

                      you need the mysql driver installed as well. i'm not sure why this is the case (somewhere this is something mysql specific going on) - but it should be addressed at some point.

                      for now just d/l the mysql driver and drop it into the lib directory as well.

                      • 8. Re: Datasource setup
                        lords_diakonos Newbie

                        i sthat the jdbc driver on mysql's website??

                        • 9. Re: Datasource setup
                          Viet Master

                          yep that's it

                          • 10. Re: Datasource setup
                            lords_diakonos Newbie

                            it is still not working though the errors are different :-) it gave me these errors
                            2004-04-01 15:21:37,379 ERROR [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Scanning failed; continuing
                            java.io.FileNotFoundException: C:\jboss-3.2.3\server\default\nukes
                            at org.jboss.net.protocol.file.FileURLLister.listMembers(FileURLLister.java:38)
                            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:374)
                            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                            2004-04-01 15:21:37,566 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (1800)
                            2004-04-01 15:21:38,658 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (2100)
                            2004-04-01 15:21:40,094 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (2400)
                            2004-04-01 15:21:41,155 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (2700)
                            2004-04-01 15:21:42,482 ERROR [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Scanning failed; continuing
                            java.io.FileNotFoundException: C:\jboss-3.2.3\server\default\nukes
                            at org.jboss.net.protocol.file.FileURLLister.listMembers(FileURLLister.java:38)
                            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:374)
                            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
                            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
                            2004-04-01 15:21:42,778 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (3000)
                            2004-04-01 15:21:43,730 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (3300)
                            2004-04-01 15:21:44,807 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (3600)
                            2004-04-01 15:21:46,243 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (3900)
                            2004-04-01 15:21:47,335 INFO [org.jboss.nukes.core.modules.index.Index.index] Optimize during indexing (4200)
                            2004-04-01 15:21:47,554 ERROR [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Scanning failed; continuing
                            ...

                            • 11. Re: Datasource setup
                              jae Master

                              do you have a "nukes" directory created here:

                              c:\jboss-3.2.3\server\default\nukes?

                              if not, create one.

                              • 12. Re: Datasource setup
                                lords_diakonos Newbie

                                i did not have one but I did just create it and got the same errors :-(

                                • 13. Re: Datasource setup
                                  jae Master

                                  did you restart the server? if yes, then i'm not really sure what the problem is now.

                                  i'd recommend deleting the tmp directory (default/tmp), make sure "default/nukes" does exist, and remove anything in the "deploy" directory and try executing the build and deployment again.