[jboss-user] [JBoss Seam] - Re: Error using Eclipse Hibernate Tools for JPA after greati

shivdeepk do-not-reply at jboss.com
Sun Nov 11 05:48:54 EST 2007


This is my environment:

Environment:

Seam 2.0.0.GA
  | JBoss Tools 2.0.0.beta4
  | JBoss 4.2.1.GA
  | Eclipse Platform Version: 3.3.0 Build id: M20070921-1145
  | Linux (Ubuntu Gutsy)
  | Postgresql 8.2

Exception:

org.hibernate.console.HibernateConsoleRuntimeException: Could not load JPA Configuration
  | at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:499)
  | at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:484)
  | at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:203)
  | at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
  | at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:185)
  | at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:106)
  | at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:38)
  | at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:89)
  | at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:95)
  | at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
  | at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  | Caused by: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
  | at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:142)
  | at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:496)
  | ... 10 more
  | Caused by: org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'null'.
  | at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:134)
  | ... 11 more

hibernate-console.properties:

#File used by hibernate tools to override <datasource> and other container specific settings in persistence.xml
  | hibernate.connection.password=test123
  | hibernate.connection.username=testuser
  | hibernate.connection.driver_class=org.postgresql.Driver
  | hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
  | hibernate.connection.url=jdbc:postgresql:testdb
  | hibernate.hbm2ddl.auto=update
  | hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
  | hibernate.datasource=
  | hibernate.transaction.manager_lookup_class=

testapp.launch:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  | <launchConfiguration type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
  | <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="testapp"/>
  | <stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="JPA"/>
  | <listAttribute key="org.hibernate.eclipse.launch.FILE_MAPPINGS"/>
  | <stringAttribute key="org.hibernate.eclipse.launch.PROPERTY_FILE" value="/testapp/hibernate-console.properties"/>
  | </launchConfiguration>

I observed there is no persistence.xml and orm.xml in resources->META-INF. There are 3 other persistence-*.xml. However the build.xml creates one when building & deploying the application. I could get a normal "JPA Project" working in eclipse.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103463#4103463

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103463



More information about the jboss-user mailing list