4 Replies Latest reply on Mar 30, 2006 3:44 PM by Colin Goudie

    MIgrating to 4.0.4RC1 from 4.0.3SP1 and no Entity Beans are

    Colin Goudie Newbie

      Hi, I've been pulling my hair out for hours now migrating from 4.0.3SP1 to 4.0.4RC1. I'm using Postgres 8.1 as by database.

      My one remaining issue seems to be that my entity beans are either not being deployed or are using hibernate instead. No exceptions seem to be thrown at startup, JBoss is saying this such as

      2006-03-29 22:50:29,984 DEBUG [org.hibernate.cfg.AnnotationBinder] Processing annotations of com.tributech.tuxedo.beans.entity.AccountType.description

      2006-03-29 22:50:29,984 DEBUG [org.hibernate.cfg.Ejb3Column] Binding column description unique false

      2006-03-29 22:50:29,984 DEBUG [org.hibernate.cfg.annotations.PropertyBinder] binding property description with lazy=false

      2006-03-29 22:50:29,984 DEBUG [org.hibernate.cfg.annotations.SimpleValueBinder] building SimpleValue for description

      2006-03-29 22:50:29,984 DEBUG [org.hibernate.cfg.annotations.PropertyBinder] Building property description

      2006-03-29 22:50:29,984 DEBUG [org.hibernate.cfg.annotations.PropertyBinder] Cascading description with null

      There is also this in the log

      2006-03-29 22:50:29,640 DEBUG [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
      name: pos-em
      persistence provider classname: org.hibernate.ejb.HibernatePersistence
      classloader: org.jboss.mx.loading.UnifiedClassLoader3@fe89a{ url=file:/E:/jboss-4.0.4RC1/server/default/tmp/deploy/tmp11480posserver.ear ,addedOrder=32}
      Temporary classloader: null
      excludeUnlistedClasses: false
      JTA datasource: org.jboss.resource.adapter.jdbc.WrapperDataSource@aaf063
      Non JTA datasource: null
      Transaction type: JTA
      PU root URL: file:/E:/jboss-4.0.4RC1/server/default/tmp/deploy/tmp11480posserver.ear-contents/entities.jar
      Jar files URLs []
      Managed classes names []
      Mapping files names []
      Properties [

      Does this mean it hasnt picked up my ENtityManager pos-em and is using hibernate??? My persistence.xml looks like

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

      <persistence-unit name="pos-em">
      <jta-data-source>java:/PostgresDS</jta-data-source>



      </persistence-unit>


      The file I deploy is
      posserver.ear
      -->META-INF->application.xml
      -->business.jar-->[session classes]
      -->entities.jar-->META-INF
      -->postgres-ds.xml
      -->[entity classes]

      My postgres-ds.xml is like this

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

      <local-tx-datasource>
      <jndi-name>PostgresDS</jndi-name>
      <connection-url>jdbc:postgresql://127.0.0.1:5432/posejb3</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>postgres</user-name>
      gommo26

      <type-mapping>PostgreSQL 8.0</type-mapping>

      </local-tx-datasource>




      I originally had the postgres-ds.xml in the deploy directory and that didnt help so I've put it in the entities.jar. But all to no avail.

      This all worked perfectly under 4.0.3SP1 (With the postgres-ds.xml in the deploy directory, and the older style persistence.xml) but now it just doesnt create my entity beans?? My session beans are working because I connect to a session bean that queries the Configuration entity bean. That is where exceptions are being thrown because it has never been created. I have started with a blank database to let Jboss create the tables and it hasnt created any. Any pointers or help would be much appreciated. What else has changed in regards to persistence since 4.0.3SP1??

      Thanks again