6 Replies Latest reply on Jun 26, 2006 11:36 AM by tsar_bomba

    Cannot get connection to Progress 10.0B DB

      We're trying to use JBoss 4.0.4.GA and EJB3 to connect to a Progress database, which is supported according to the example progress-ds.xml file I found in the examples.

      We're using Progress 10.0B and have tried their type 3 and type 4 JDBC drivers and consistently get the same errors.

      Here's my progress-ds.xml file:

      <datasources>
      
       <local-tx-datasource>
       <jndi-name>Sports2000PROGRESSDS</jndi-name>
      
       <connection-url>jdbc:jdbcprogress:T:localhost:3805:sports2000</connection-url>
       <driver-class>com.progress.sql.jdbc.JdbcProgressDriver</driver-class>
       <user-name>myuser</user-name>
       <password></password>
      
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
       <metadata>
       <type-mapping>PostgreSQL 7.2</type-mapping>
       </metadata>
       </local-tx-datasource>
      
      </datasources>
      


      Here's my persistence.xml file:

      <persistence>
       <persistence-unit name="sports2000">
       <jta-data-source>java:/Sports2000PROGRESSDS</jta-data-source>
       <properties>
       <!--
       <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
       -->
       <property name="hibernate.show_sql" value="false"/>
       <property name="hibernate.format_sql" value="true"/>
       <property name="hibernate.use_sql_comments" value="true"/>
       <property name="hibernate.max_fetch_depth" value="1"/>
       </properties>
       </persistence-unit>
      </persistence>
      


      Here's the exception we get when deploying the .ear app into JBoss:

      .....
      11:10:28,630 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=Sports2000PROGRESSDS' to JNDI name 'java:Sports2000PROGRESSDS'
      .....
      11:11:05,298 INFO [Ejb3Configuration] found EJB3 Entity bean: com.mydomain.model.Customer
      11:11:05,308 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
      11:11:05,449 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
      11:11:05,449 INFO [Ejb3Configuration] [PersistenceUnit: sports2000] no META-INF/orm.xml found
      11:11:05,599 INFO [AnnotationBinder] Binding entity from annotated class: com.mydomain.model.Customer
      11:11:05,689 INFO [EntityBinder] Bind entity com.mydomain.model.Customer on table pub.Customer
      11:11:06,060 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      11:11:06,080 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
      11:11:06,140 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Wrong driver class for this connection URL)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:177)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:539)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:228)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:417)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:324)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:301)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:379)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
       at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
       at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
       at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
       at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:350)
       at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:119)
       at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
      


      Obviously, there's a glaring message in there, "Wrong driver class for this connection URL" - however this can't be. I can create jdbc connections w/ this class, no problem. I'm also using it in my database manager in eclipse and that was the class it chose to use.

      So, I suppose the question is; is Progress 10.x or greater even supported by Hibernate currently? We need to know if JBoss will fit as an app server at one of our companies for future projects and everything they've built in-house is sitting on Progress 10.0+ databases.

      Any help would be greatly appreciated, thanks!

        • 1. Re: Cannot get connection to Progress 10.0B DB
          jatsrt

          Does nobody want to point out that Progress DB 10 is NOT PostgreSQL 8

          • 2. Re: Cannot get connection to Progress 10.0B DB

            Wow, good eye. What this means is, however, that someone screwed up the example progress-ds.xml file in the JBOSS_HOME/docs/example/jca/ folder because that's where I got this file.

            I guess that answers my question of how popular Progress is w/ JBoss users...

            • 3. Re: Cannot get connection to Progress 10.0B DB

              OK, I just looked through the standardjbosscmp-jdbc.xml file and I don't see an entry for Progress at all - does that mean it's not supported? Can someone help us if it *is* in fact supported?

              We had great hopes that it was since there was a progress-ds.xml file sitting in the examples dir...that now appears to be incorrectly written.

              • 4. Re: Cannot get connection to Progress 10.0B DB
                jatsrt

                Since EJB is more Hibernate based, it being in the standardjboss.xml is less important. I have not use dit, but is there a dialect available for it?

                Also, if you have a proper driver and a proper connection URL(see your driver's documantation) it should at least start up. The mapping is only used later.

                • 5. Re: Cannot get connection to Progress 10.0B DB

                   

                  "jatsrt" wrote:
                  Since EJB is more Hibernate based, it being in the standardjboss.xml is less important. I have not use dit, but is there a dialect available for it?

                  Also, if you have a proper driver and a proper connection URL(see your driver's documantation) it should at least start up. The mapping is only used later.


                  I realize that, yes, there is a Hibernate dialect for it and I'm *quite* sure that in JBoss 4.0.4.RC1 there was a correct example -ds.xml file as we started looking at it then but it dropped in priority at the time. I think it was targeted for the Progress 9.1 JDBC driver but we wanted to try it anyhow - it seems that this has disappeared in the GA release.

                  The server does start up and it accepts the ds.xml file, maps it to JNDI, etc. It's only when we attempt to use the EntityManager do we start to have the problems stated in my first post. Also, if you read my original post - w/ that driver and connection string we're successfully creating JDBC connections and executing queries manually through JDBC just fine...EJB3/Hibernate is the problem here.

                  • 6. Re: Cannot get connection to Progress 10.0B DB