well I did the above instructions and still didn't work.
the persistence.xml in the exploded deployment in the %JBOSS_HOME%/server/default/deploy
folder was only found in
C:\jboss-4.2.1.GA\server\default\deploy\SHIMS.ear\SHIMS.jar\META-INF
so I closed Eclipse and copied that persistence.xml into:
C:\jboss-4.2.1.GA\server\default\deploy\SHIMS.ear\META-INF as well just to be safe.
restarted Eclipse and rebuild the hibernate config. when I refresh the hibernate config I
still get the same errors:
org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found:
'SHIMS'.
|
| org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found:
'SHIMS'.
| at
org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:134)
| at
org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:496)
| 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:97)
| at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
| at
org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
| at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
| org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based
Configuration
|
| 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)
| 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:97)
| at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
| 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: Persistence unit
not found: 'SHIMS'.
| at
org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:134)
| ... 11 more
|
| org.hibernate.console.HibernateConsoleRuntimeException: Could not load JPA
Configuration
|
| 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:97)
| at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
| 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: 'SHIMS'.
| at
org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:134)
| ... 11 more
Once again, here is the contents of the persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <!-- Persistence deployment descriptor for dev profile -->
| <persistence
xmlns="http://java.sun.com/xml/ns/persistence"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
| version="1.0">
|
| <persistence-unit name="SHIMS">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/SHIMSDatasource</jta-data-source>
| <properties>
| <property name="hibernate.dialect"
value="org.hibernate.dialect.SQLServerDialect"/>
| <!--
| <property name="hibernate.hbm2ddl.auto"
value="validate"/>
| -->
| <property name="hibernate.show_sql" value="true"/>
| <property name="hibernate.format_sql"
value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name"
value="java:/SHIMSEntityManagerFactory"/>
| <property name="hibernate.default_catalog"
value="boSHIMS"/>
| <property name="hibernate.default_schema"
value="dbo"/>
| </properties>
| </persistence-unit>
|
| <persistence-unit name="coxIM">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/COXIMDatasource</jta-data-source>
| <properties>
| <property name="hibernate.dialect"
value="org.hibernate.dialect.SQLServerDialect"/>
| <!--
| <property name="hibernate.hbm2ddl.auto"
value="validate"/>
| -->
| <property name="hibernate.show_sql" value="true"/>
| <property name="hibernate.format_sql"
value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name"
value="java:/COXIMEntityManagerFactory"/>
| <property name="hibernate.default_catalog"
value="coxIM"/>
| <property name="hibernate.default_schema"
value="dbo"/>
| </properties>
| </persistence-unit>
|
| </persistence>
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142402#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...