9 Replies Latest reply on Nov 17, 2005 8:08 AM by Michael Barker

    JBMS and Hibernate

    John Doe Newbie

      Whenever I try to start the JBoss server with the JBoss Mail Server installed, I get the following error:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.mail:service=Hibernate
      State: CONFIGURED
      I Depend On:
      jboss.har:service=HARDeployer
      jboss.jca:service=LocalTxCM,name=JBMSDS

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.har:service=HARDeployer
      State: NOTYETINSTALLED
      Depends On Me:
      jboss.mail:service=Hibernate


      My hibernate-service.xml for the JBMS app looks like:

      <?xml version="1.0" encoding="UTF-8"?>
      <!--
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
      -->
      <jboss>
       <mbean code="org.jboss.hibernate.jmx.Hibernate"
       name="jboss.mail:service=Hibernate">
      
       <depends>jboss.har:service=HARDeployer</depends>
       <depends>jboss.jca:service=LocalTxCM,name=JBMSDS</depends>
      
       <attribute name="DatasourceName">java:/JBMSDS</attribute>
       <attribute name="SessionFactoryName">java:/jbossmail.HibernateSessionFactory</attribute>
       <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
       <attribute name="Hbm2ddlAuto">update</attribute>
       <attribute name="ShowSqlEnabled">false</attribute>
      
       <!--attribute name="CacheProviderClass">
       net.sf.hibernate.cache.TreeCacheProvider
       </attribute-->
       <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
       </mbean>
      </jboss>
      



      And the jboss-service.xml in the META-INF folder under the mail.ear app has the PostgreSQL part that was mentioned in the instructions:

      <!--
       PostgreSQL base store that uses the LargeObjectAPI
       in order to store data.
       -->
       <mbean code="org.jboss.mail.store.postgresql.PostgreSQLStore"
       name="jboss.mail:type=MailServices,name=PostgreSQLStore">
       <attribute name="Disconnected">true</attribute>
       <attribute name="DataSource">java:/JBMSDS</attribute>
       <attribute name="PageSize">131072</attribute>
       </mbean>
      
      
       <!-- Mail Body Manager -->
       <mbean code="org.jboss.mail.message.MailBodyManager"
       name="jboss.mail:type=MailServices,name=MailBodyManager">
       <attribute name="UseStore">true</attribute>
       <depends optional-attribute-name="Store"
       proxy-type="attribute">jboss.mail:type=MailServices,name=PostgreSQLStore</depends>
       </mbean>
      





      I know its probably something stupid I'm missing. And yes, I started the Database server.

        • 1. Re: JBMS and Hibernate
          Andrew Oliver Master

          delete this line:

          <depends>jboss.har:service=HARDeployer</depends>
          


          What version of JBMS is this? How did you install? What version of JBoss (and was it the one that came with JBMS?)?

          • 2. Re: JBMS and Hibernate
            John Doe Newbie

            I installed JBMS 1.0M3 using the installer on JBoss AS 4.0.3SP1 installed by extracting the zip file. The JBoss AS isn't the one that you can download with JBMS.

            • 3. Re: JBMS and Hibernate
              John Doe Newbie

              I removed that line from the hibernate-service.xml and now the MBeans deploy without an error. But when I try to send an email on the server (using Mozilla Thunderbird setup the way you explained) I get the following error:

              14:29:19,765 INFO [Server] Got request
              14:29:19,765 INFO [Server] waiting for request
              14:29:29,171 INFO [Mail] all headers after loading: MailHeadersImpl (12): [hdr(Return-Path = 'Return-Path: <testUser2@localhost>'), hdr(Received = 'Received: from [127.0.0.1] (localhost 127.0.0.1) by localhost.localdomain/JBossMail 1.0M3 (127.0.0.1)
               with SMTP id 1132082969171782.7186350001641; Tue, 15 Nov 2005 14:29:29 -0500 (EST)'), hdr(Message-ID = 'Message-ID: <437A370F.5060404@localhost>'), hdr(Date = 'Date: Tue, 15 Nov 2005 14:29:19 -0500'), hdr(From = 'From: Test 2 User <testUser2@localhost>'), hdr(User-Agent = 'User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)'), hdr(X-Accept-Language = 'X-Accept-Language: en-us, en'), hdr(MIME-Version = 'MIME-Version: 1.0'), hdr(To = 'To: testUser@localhost.localdomain'), hdr(Subject = 'Subject: tttt'), hdr(Content-Type = 'Content-Type: text/plain; charset=ISO-8859-1; format=flowed'), hdr(Content-Transfer-Encoding = 'Content-Transfer-Encoding: 7bit')]
              14:29:29,187 INFO [AbstractStore] Creating store item
              14:29:29,187 ERROR [PostgreSQLStore] Unable to get reference to PGConnection: org.postgresql.jdbc2.Jdbc2Connection
              14:29:29,203 ERROR [Mail] org.jboss.mail.store.StoreException: Unable to get reference to PGConnection
              org.jboss.mail.store.StoreException: Unable to get reference to PGConnection
               at org.jboss.mail.store.postgresql.PostgreSQLStore.getLargeObjectManager(PostgreSQLStore.java:135)
               at org.jboss.mail.store.postgresql.PostgreSQLStore.org$jboss$mail$store$postgresql$PostgreSQLStore$doCreate$aop(PostgreSQLStore.java:309)
               at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
               at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:113)
               at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:138)
               at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
               at org.jboss.mail.store.postgresql.PostgreSQLStore.doCreate(PostgreSQLStore.java)
               at org.jboss.mail.store.AbstractStore.org$jboss$mail$store$AbstractStore$createStoreItem$aop(AbstractStore.java:76)
               at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
               at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
               at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
               at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
               at org.jboss.mail.store.AbstractStore.createStoreItem(AbstractStore.java)
               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:585)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
               at $Proxy50.createStoreItem(Unknown Source)
               at org.jboss.mail.message.StoredMailBody.newInstance(StoredMailBody.java:62)
               at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:40)
               at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:85)
               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:585)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
               at $Proxy60.createMailBody(Unknown Source)
               at org.jboss.mail.message.Mail.constructMessage(Mail.java:177)
               at org.jboss.mail.message.Mail.<init>(Mail.java:153)
               at org.jboss.mail.message.Mail.create(Mail.java:305)
               at org.jboss.mail.smtp.handlers.CmdDATA.handleRequest(CmdDATA.java:79)
               at org.jboss.mail.smtp.handlers.RequireSTARTTLSProxy.handleRequest(RequireSTARTTLSProxy.java:49)
               at org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolInstance.java:167)
               at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:168)
               at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:73)
               at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
               at java.lang.Thread.run(Thread.java:595)
              Caused by: java.lang.ClassCastException: org.postgresql.jdbc2.Jdbc2Connection
               at org.jboss.mail.store.postgresql.PostgreSQLStore.getLargeObjectManager(PostgreSQLStore.java:129)
               ... 47 more
              14:29:29,203 INFO [STDOUT] Exception in thread "Thread-18"
              14:29:29,203 INFO [STDOUT] java.lang.RuntimeException: Error
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.message.Mail.<init>(Mail.java:159)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.message.Mail.create(Mail.java:305)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.smtp.handlers.CmdDATA.handleRequest(CmdDATA.java:79)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.smtp.handlers.RequireSTARTTLSProxy.handleRequest(RequireSTARTTLSProxy.java:49)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolInstance.java:167)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:168)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:73)
              14:29:29,203 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
              14:29:29,203 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
              14:29:29,203 INFO [STDOUT] Caused by: org.jboss.mail.store.StoreException: Unable to get reference to PGConnection
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore.getLargeObjectManager(PostgreSQLStore.java:135)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore.org$jboss$mail$store$postgresql$PostgreSQLStore$doCreate$aop(PostgreSQLStore.java:309)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
              14:29:29,203 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:113)
              14:29:29,203 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:138)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore.doCreate(PostgreSQLStore.java)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.AbstractStore.org$jboss$mail$store$AbstractStore$createStoreItem$aop(AbstractStore.java:76)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
              14:29:29,203 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
              14:29:29,203 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.AbstractStore.createStoreItem(AbstractStore.java)
              14:29:29,203 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              14:29:29,203 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              14:29:29,203 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              14:29:29,203 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              14:29:29,203 INFO [STDOUT] at $Proxy50.createStoreItem(Unknown Source)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.message.StoredMailBody.newInstance(StoredMailBody.java:62)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:40)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:85)
              14:29:29,203 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              14:29:29,203 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              14:29:29,203 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              14:29:29,203 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              14:29:29,203 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              14:29:29,203 INFO [STDOUT] at $Proxy60.createMailBody(Unknown Source)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.message.Mail.constructMessage(Mail.java:177)
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.message.Mail.<init>(Mail.java:153)
              14:29:29,203 INFO [STDOUT] ... 8 more
              14:29:29,203 INFO [STDOUT] Caused by: java.lang.ClassCastException: org.postgresql.jdbc2.Jdbc2Connection
              14:29:29,203 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore.getLargeObjectManager(PostgreSQLStore.java:129)
              14:29:29,203 INFO [STDOUT] ... 47 more
              


              • 4. Re: JBMS and Hibernate
                Andrew Oliver Master

                have you put your jdbc driver in server/default/lib?

                • 5. Re: JBMS and Hibernate
                  John Doe Newbie

                  I have 3 PostgreSQL drivers in the server/default/lib folder.

                  postgresql-8.0-311.jdbc2.jar
                  postgresql-8.0-311.jdbc2ee.jar
                  postgresql-8.0-311.jdbc3.jar

                  • 6. Re: JBMS and Hibernate
                    Andrew Oliver Master

                    remove jdbc3 and jdbc2ee. I think they must be conflicting.

                    • 7. Re: JBMS and Hibernate
                      John Doe Newbie

                      If I take all but the jdbc2 driver out I get the following error:

                      23:34:04,390 INFO [Server] Got request
                      23:34:04,406 INFO [Server] waiting for request
                      23:34:10,109 INFO [STDOUT] javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
                      23:34:10,109 INFO [STDOUT] at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:345)
                      23:34:10,109 INFO [STDOUT] at org.jboss.mail.smtp.handlers.CmdSTARTTLS$1.handshakeCompleted(CmdSTARTTLS.java:81)
                      23:34:10,109 INFO [STDOUT] at com.sun.net.ssl.internal.ssl.SSLSocketImpl$NotifyHandshakeThread$1.run(SSLSocketImpl.java:1988)
                      23:34:10,109 INFO [STDOUT] at java.security.AccessController.doPrivileged(Native Method)
                      23:34:10,109 INFO [STDOUT] at com.sun.net.ssl.internal.ssl.SSLSocketImpl$NotifyHandshakeThread.run(SSLSocketImpl.java:1986)
                      23:34:16,093 INFO [Mail] all headers
                      after loading: MailHeadersImpl (10): [hdr(Return-Path = 'Return-Path: <testUser@localhost.localdomain>'),
                      hdr(Received = 'Received: from null (127.0.0.1 127.0.0.1) by localhost.localdomain/JBossMail 1.0M3 (127.0.0.1)
                       with SMTP id 1132202056093984.9734680977517; Wed, 16 Nov 2005 23:34:16 -0500 (EST)'), hdr(Message-ID = 'Message-ID: <437C083C.3050008@localhost.localdomain>'),
                      hdr(Date = 'Date: Wed, 16 Nov 2005 23:34:04 -0500'), hdr(From = 'From: Test User <testUser@localhost.localdomain>'),
                      hdr(User-Agent = 'User-Agent: Thunderbird 1.5 (Windows/20051025)'), hdr(MIME-Version = 'MIME-Version: 1.0'), hdr(To = 'To: testUser2@loxalhost.localdomain'), hdr(Subject = 'Subject: Test Email 1'), hdr(Content-Type = 'Content-Type: multipart/alternative;
                       boundary="------------020209070202010303030308"')]
                      23:34:16,109 INFO [AbstractStore] Creating store item
                      23:34:16,140 INFO [STDOUT] Exception in thread "Thread-18"
                      23:34:16,140 INFO [STDOUT] java.lang.NoClassDefFoundError: org/postgresql/jdbc3/Jdbc3Connection
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore.getLargeObjectManager(PostgreSQLStore.java:129)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore.org$jboss$mail$store$postgresql$PostgreSQLStore$doCreate$aop(PostgreSQLStore.java:309)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
                      23:34:16,140 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:113)
                      23:34:16,140 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:138)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.postgresql.PostgreSQLStore.doCreate(PostgreSQLStore.java)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.AbstractStore.org$jboss$mail$store$AbstractStore$createStoreItem$aop(AbstractStore.java:76)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
                      23:34:16,140 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
                      23:34:16,140 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.store.AbstractStore.createStoreItem(AbstractStore.java)
                      23:34:16,140 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      23:34:16,140 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      23:34:16,140 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      23:34:16,140 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                      23:34:16,140 INFO [STDOUT] at $Proxy50.createStoreItem(Unknown Source)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.message.StoredMailBody.newInstance(StoredMailBody.java:62)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:40)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:85)
                      23:34:16,140 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      23:34:16,140 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      23:34:16,140 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      23:34:16,140 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                      23:34:16,140 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                      23:34:16,156 INFO [STDOUT] at $Proxy55.createMailBody(Unknown Source)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.message.Mail.constructMessage(Mail.java:177)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.message.Mail.<init>(Mail.java:153)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.message.Mail.create(Mail.java:305)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.smtp.handlers.CmdDATA.handleRequest(CmdDATA.java:79)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.smtp.handlers.RequireSTARTTLSProxy.handleRequest(RequireSTARTTLSProxy.java:49)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolInstance.java:167)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:168)
                      23:34:16,156 INFO [STDOUT] at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:73)
                      23:34:16,156 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
                      23:34:16,156 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
                      


                      Then if I put the jdbc3 driver in I receive this error instead:
                      23:40:33,875 INFO [Server] Got request
                      23:40:33,875 INFO [Server] waiting for request
                      23:40:34,968 INFO [Mail] all headers after loading: MailHeadersImpl (11): [hdr(Return-Path = 'Return-Path: <testUser@localhost.localdomain>'), hdr(Received = 'Received: from [127.0.0.1] (127.0.0.1 127.0.0.1)
                       by localhost.localdomain/JBossMail 1.0M3 (127.0.0.1)
                       with SMTP id 1132202434968286.8774528792002; Wed, 16 Nov 2005 23:40:34 -0500
                      (EST)'), hdr(Message-ID = 'Message-ID: <437C09C1.5010603@localhost.localdomain>'), hdr(Date = 'Date: Wed,
                      16 Nov 2005 23:40:33 -0500'), hdr(From = 'From: Test User <testUser@localhost.localdomain>'),
                      hdr(User-Agent = 'User-Agent: Thunderbird 1.5 (Windows/20051025)'), hdr(MIME-Version = 'MIME-Version: 1.0'), hdr(To = 'To: testUser2@loxalhost.localdomain'), hdr(Subject = 'Subject: Test Email 1'), hdr(Content-Type = 'Content-Type: text/plain; charset=ISO-8859-1; format=flowed'), hdr(Content-Transfer-Encoding = 'Content-Transfer-Encoding: 7bit')]
                      23:40:34,968 INFO [AbstractStore] Creating store item
                      23:40:34,984 ERROR [PostgreSQLStore] Unable to get reference to PGConnection: org.postgresql.jdbc2.Jdbc2Connection
                      23:40:35,000 ERROR [Mail] org.jboss.mail.store.StoreException: Unable to get reference to PGConnection
                      org.jboss.mail.store.StoreException: Unable to get reference to PGConnection
                       at org.jboss.mail.store.postgresql.PostgreSQLStore.getLargeObjectManager(PostgreSQLStore.java:135)
                       at org.jboss.mail.store.postgresql.PostgreSQLStore.org$jboss$mail$store$postgresql$PostgreSQLStore$doCreate$aop(PostgreSQLStore.java:309)
                       at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:113)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:138)
                       at org.jboss.mail.store.postgresql.PostgreSQLStore$doCreate_3781003712992460599.invokeNext(PostgreSQLStore$doCreate_3781003712992460599.java)
                       at org.jboss.mail.store.postgresql.PostgreSQLStore.doCreate(PostgreSQLStore.java)
                       at org.jboss.mail.store.AbstractStore.org$jboss$mail$store$AbstractStore$createStoreItem$aop(AbstractStore.java:76)
                       at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
                       at org.jboss.mail.store.AbstractStore$createStoreItem_N1420184194359260484.invokeNext(AbstractStore$createStoreItem_N1420184194359260484.java)
                       at org.jboss.mail.store.AbstractStore.createStoreItem(AbstractStore.java)
                       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:585)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                       at $Proxy50.createStoreItem(Unknown Source)
                       at org.jboss.mail.message.StoredMailBody.newInstance(StoredMailBody.java:62)
                       at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:40)
                       at org.jboss.mail.message.MailBodyManager.createMailBody(MailBodyManager.java:85)
                       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:585)
                       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                       at $Proxy60.createMailBody(Unknown Source)
                       at org.jboss.mail.message.Mail.constructMessage(Mail.java:177)
                       at org.jboss.mail.message.Mail.<init>(Mail.java:153)
                       at org.jboss.mail.message.Mail.create(Mail.java:305)
                       at org.jboss.mail.smtp.handlers.CmdDATA.handleRequest(CmdDATA.java:79)
                       at org.jboss.mail.smtp.handlers.RequireSTARTTLSProxy.handleRequest(RequireSTARTTLSProxy.java:49)
                       at org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolInstance.java:167)
                       at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:168)
                       at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:73)
                       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
                       at java.lang.Thread.run(Thread.java:595)
                      Caused by: java.lang.ClassCastException: org.postgresql.jdbc2.Jdbc2Connection
                       at org.jboss.mail.store.postgresql.PostgreSQLStore.getLargeObjectManager(PostgreSQLStore.java:129)
                       ... 47 more
                      


                      • 8. Re: JBMS and Hibernate
                        Andrew Oliver Master

                        Interesting...Ahh okay the fixes that we submitted must not have gone into the 8.0-311 driver. Please try upgrading to the latest PGSQL jdbc drivers. apparently the first real release version of the driver they went into was Version 8.0-312 (2005-07-24) (search on Michael Barker) http://jdbc.postgresql.org/changes.html.. Disregard all previous advice and upgrade to at least that version.

                        • 9. Re: JBMS and Hibernate
                          Michael Barker Apprentice

                          Can you post the configuration for your java:/JBMSDS datasource?