1 2 Previous Next 18 Replies Latest reply on Apr 11, 2007 9:17 AM by lindsayh Go to original post
      • 15. Re: looking for non-EJB SEAM example...
        sammy8306

        I see. Well, I guess this is not my lucky day... after changing the connection url to:

        jdbc:hsqldb:hsql://localhost/blogjpa

        I get the following exception:

        (and yes, the DB is up and running, when it's not I get an error for not being able to open the socket. And, it's not empty, but the create-drop should take care of that)

        12:11:15,328 WARN [LocalTxDataSource] Throwable while attempting to get a new connection: null
        org.jboss.resource.JBossResourceException: Could not create connection; - nested
         throwable: (java.sql.SQLException: Connection is broken: Transfer corrupted)
         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
        reateManagedConnection(LocalManagedConnectionFactory.java:164)
         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.cr
        eateConnectionEventListener(InternalManagedConnectionPool.java:519)
         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.ge
        tConnection(InternalManagedConnectionPool.java:208)
         at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BaseP
        ool.getConnection(JBossManagedConnectionPool.java:529)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
        dConnection(BaseConnectionManager2.java:412)
         at org.jboss.resource.connectionmanager.TxConnectionManager.
        
        ... et cetera
        
        


        Could this be due to an incompatability between the hsqldb jars used by the microcontainer and the ones I use to start the database? Where do I find the jars used by Seam?

        • 16. Re: looking for non-EJB SEAM example...
          christian.bauer

          I have no idea what hsqldb.jar(s) you deploy, so I can't help you with that. Maybe just a file search would help...

          • 17. Re: looking for non-EJB SEAM example...
            sammy8306

            I found the hsqldb.jar in the lib/mc directory, missed it the first time around. Replaced it with 'my' hsqldb.jar and now it finally works. I'm still getting a nullpointer on the injected EntityManager, but I'll debug a bit more before asking about it :-)

            Once again, thanks for your kind and patient answers. You guys are the best!

            • 18. Re: looking for non-EJB SEAM example...
              lindsayh

              Ok, so back to my original post. I guess this doesn't have anything to do with EJBs. So here's what I i'd like to know now...

              I have two Hibernate3 cfg.xml files (two dbs) and lots of hbm.xml mapping files. I'd like to use these with Seam in the 'best' way possible.

              Can anyone advise what configuration I should use? i.e. do I need the microcontainer and a jboss-beans.xml? If so, do I also need the -ds.xml datasource file? And where do these go in Jboss? Both in the deploy dir? OK enough questions!

              I fiddled with the seam-gen-erated project to get it working with Hibernate, and having read the reference guide (Chapter 21), I decided not to use the microcontainer (since I'll be using Jboss 4 anyway). Is this the right decision to make?

              Lindsay

              1 2 Previous Next