1 Reply Latest reply on Nov 17, 2004 2:17 PM by Bill Burke

    hibernate.properties

    Jason Wood Newbie

      JBoss 4.0 1RC1
      JBoss AOP 1.0.0 Final
      JBoss EJB 3.0 Preview

      I read the following in the Turtorial...

      You will probably need to override the default hibernate.properties file. To do this, create your own hibernate.properties file with all the above variables defined in minimum. Place this hibernate.properties file the META-INF/ directory of your .ejb3 jar or within your EAR file.

      I changed the hiberante property file to use the MySQL Dialect and the MySQLDS datasource.

      hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
      hibernate.hbm2ddl.auto=create-drop
      #hibernate.hbm2ddl.auto=create
      hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
      hibernate.connection.datasource=java:/MySQLDS
      hibernate.dialect=org.hibernate.dialect.MySQLDialect

      After JBoss starts up the Exchange table should be created (MySQL) but is not. Below is the log file, there is alot of output but you can skip to the bolded text to view what is puzzling me. Notice that is says it found a Hibernate.properties file and then states that no Hiberante file was found. I am not sure what I did wrong since the documentation mentioned to drop the Hibernate.properties within the meta-inf directory of .ejb3 (which is what I did following the example) or the .ear file. Any idea what I am doing wrong?

      2004-11-14 22:46:33,964 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:33,964 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:33,964 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3 -> C:\jboss-4.0.1RC1\server\all\tmp\deploy\tmp65357exchange.ejb3
      2004-11-14 22:46:34,024 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.ejb3.EJB3Deployer@1f82ab4
      2004-11-14 22:46:34,024 DEBUG [org.jboss.ejb3.EJB3Deployer] looking for nested deployments in : file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:34,024 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:service=LoaderRepository,name=Default, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
      2004-11-14 22:46:34,034 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url file:/C:/jboss-4.0.1RC1/server/all/tmp/deploy/tmp65357exchange.ejb3
      2004-11-14 22:46:34,034 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@4fce71, cl=org.jboss.mx.loading.UnifiedClassLoader3@190d1e8{ url=file:/C:/jboss-4.0.1RC1/server/all/tmp/deploy/tmp65357exchange.ejb3 ,addedOrder=0}
      2004-11-14 22:46:34,034 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@4fce71, cl=org.jboss.mx.loading.UnifiedClassLoader3@190d1e8{ url=file:/C:/jboss-4.0.1RC1/server/all/tmp/deploy/tmp65357exchange.ejb3 ,addedOrder=0}
      2004-11-14 22:46:34,034 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@190d1e8{ url=file:/C:/jboss-4.0.1RC1/server/all/tmp/deploy/tmp65357exchange.ejb3 ,addedOrder=0}
      2004-11-14 22:46:34,034 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:34,034 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:34,034 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:34,064 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-14 22:46:34,064 DEBUG [org.jboss.ejb3.EJB3Deployer] Deploying: file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:34,064 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EJB3,module=exchange.ejb3
      2004-11-14 22:46:34,064 DEBUG [org.jboss.ejb3.Ejb3Module] Creating jboss.j2ee:service=EJB3,module=exchange.ejb3
      2004-11-14 22:46:34,295 INFO [org.jboss.ejb3.Ejb3Module] found EJB3 Entity bean: com.entity.Exchange
      2004-11-14 22:46:34,295 DEBUG [org.jboss.ejb3.Ejb3Module] Created jboss.j2ee:service=EJB3,module=exchange.ejb3
      2004-11-14 22:46:34,295 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EJB3,module=exchange.ejb3 dependents are: []
      2004-11-14 22:46:34,295 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying exchange.ejb3
      2004-11-14 22:46:34,295 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      2004-11-14 22:46:34,295 DEBUG [org.jboss.ejb3.EJB3Deployer] start application, deploymentInfo: org.jboss.deployment.DeploymentInfo@a3a07485 { url=file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3 }
      deployer: org.jboss.ejb3.EJB3Deployer@1f82ab4
      status: Starting
      state: START_DEPLOYER
      watch: file:/C:/jboss-4.0.1RC1/server/all/deploy/exchange.ejb3
      altDD: null
      lastDeployed: 1100493994034
      lastModified: 1100493993974
      mbeans:
      , short name: exchange.ejb3, parent short name: null
      2004-11-14 22:46:34,295 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:service=EJB3,module=exchange.ejb3
      2004-11-14 22:46:34,295 DEBUG [org.jboss.ejb3.Ejb3Module] Starting jboss.j2ee:service=EJB3,module=exchange.ejb3
      2004-11-14 22:46:34,305 INFO [org.jboss.ejb3.Ejb3Module] Found hibernate.properties file in EJB3 jar or ear
      2004-11-14 22:46:34,365 INFO [org.hibernate.cfg.Environment] Hibernate 3.0 beta 1
      2004-11-14 22:46:34,365 INFO [org.hibernate.cfg.Environment] hibernate.properties not found
      2004-11-14 22:46:34,375 INFO [org.hibernate.cfg.Environment] using CGLIB reflection optimizer
      2004-11-14 22:46:34,375 INFO [org.hibernate.cfg.Environment] using JDK 1.4 java.sql.Timestamp handling
      2004-11-14 22:46:34,545 DEBUG [org.hibernate.cfg.Configuration] Mapping XML:
      <?xml version="1.0"?>
      <!DOCTYPE hibernate-mapping PUBLIC
      "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
      <hibernate-mapping>







      </hibernate-mapping>