-
1. Re: Hibernate Configurations problem
maxandersen Mar 4, 2009 12:04 PM (in response to paulkeogh)hmm - should just work.
Project > Clean
and Refresh the console config
if that does not help run ant test (that should no longer be a requirement, but it was in earlier versions) -
2. Re: Hibernate Configurations problem
paulkeogh Mar 4, 2009 3:53 PM (in response to paulkeogh)Thanks for the reply Max. Unfortunately your suggestion does not work. I havent not yet tried the ant suggestion.
Some more background on this; the project was originally created with JBT 3.0.0 CR1/Eclipse 3.4.1 and was imported as a project into the current environment.
A seam-gen project that I created from scratch in the current environment works fine so I started comparing the various artefacts.
persistence.xml files are the same, as are the ds- files, as are the hibernate-console.properties and the xxx-launch files.
Any suggestions where I might start to debug this ? Are there other files that are not visible in the Eclipse views that might be out of alignment ?
Or... is there another UI to test JPA queries in ? -
3. Re: Hibernate Configurations problem
maxandersen Mar 4, 2009 4:01 PM (in response to paulkeogh)the problem is that the console config can't find a META-INF/persistence.xml in the classpath.
Look for that and check it is in the classpath. -
4. Re: Hibernate Configurations problem
paulkeogh Mar 5, 2009 3:05 AM (in response to paulkeogh)Thank you very much. That was the problem, but in a more indirect way.
The .classpath file in the xxx-ejb project had an entry of;
when I removed the excluding attribute and reopened the Hibernate Configurations view, it worked fine.
I wonder how the excluding attribute got added though ? I dont hack the .classpath files for Eclipse projects in any way.
Perhaps consider annonating the error message with a "is META-INF/persistence.xml in the classpath" style hint ?
Thanks again. -
5. Re: Hibernate Configurations problem
maxandersen Mar 5, 2009 3:53 AM (in response to paulkeogh)The xml snippet got quoted out - what was in it ?
With respect to errors, yeah - we could make it better. Could you report it in jira so we don't forget ? -
6. Re: Hibernate Configurations problem
paulkeogh Mar 5, 2009 3:53 AM (in response to paulkeogh).classpath entry;
-
7. Re: Hibernate Configurations problem
paulkeogh Mar 5, 2009 3:55 AM (in response to paulkeogh)Argh..
classpathentry excluding="META-INF/|META-INF/" kind="src" path="ejbModule"/
I'll create a JIRA ticket. -
8. Re: Hibernate Configurations problem
maxandersen Mar 5, 2009 4:03 AM (in response to paulkeogh)yeah that exclusion looks really really weird.
How was this project created exactly ? -
9. Re: Hibernate Configurations problem
paulkeogh Mar 5, 2009 4:15 AM (in response to paulkeogh)It was created using Eclipse 3.4.1/Seam 2.1.1 CR2/JBT 3.0.0 CR1, selecting the New/Seam Web project option and building as an EAR.
That generated the four standard projects which worked fine. I then added some jBPM artefacts following the instructions in Chapter 14 of the "Seam In Action" book, but as I said, no direct editing of .classpath files.
Had to upgrade to Eclipse 3.4.2 for other reasons so rebuilt the dev. environment with Seam 2.1.1 GA/JBT 3.0.0 CR2 and imported the project into this new env. -
10. Re: Hibernate Configurations problem
maxandersen Mar 5, 2009 4:43 AM (in response to paulkeogh)just weird that the exclusion is there - we don't add it afaik (our tests would fail if we did) hence trying to understand how it got there...
-
11. Re: Hibernate Configurations problem
asookazian Mar 10, 2009 12:00 PM (in response to paulkeogh)I'm using JBDS 1.1.0.GA and experiencing the same problem.
My persistence.xml is located here:
C:\java\projects\BETS\exploded-archives\BETS.jar\META-INF
There are the following persistence-*.xml files here:
C:\java\projects\BETS\resources\META-INF\persistence-dev.xml
C:\java\projects\BETS\resources\META-INF\persistence-test.xml
C:\java\projects\BETS\resources\META-INF\persistence-prod.xml
the build.xml picks up the appropriate file depending on configuration.
Must I have the ant explode and/or ant deploy target(s) copy the persistence.xml to this location (C:\java\projects\BETS\resources\META-INF) as well in order to avoid this error??? -
12. Re: Hibernate Configurations problem
asookazian Mar 10, 2009 12:02 PM (in response to paulkeogh)So after I copied the persistence.xml from exploded to the correct directory:
org.hibernate.console.HibernateConsoleRuntimeException: Could not load JPA Configuration Could not load JPA Configuration org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration Could not create JPA based Configuration org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration Could not create JPA based Configuration org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'null'. Persistence unit not found: 'null'.
-
13. Re: Hibernate Configurations problem
asookazian Mar 10, 2009 12:03 PM (in response to paulkeogh)here is my .classpath file contents:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" output="classes/model" path="src/model"/> <classpathentry kind="src" output="classes/action" path="src/action"/> <classpathentry kind="src" output="classes/test" path="src/test"/> <classpathentry kind="src" output="classes/dao" path="src/dao"/> <classpathentry kind="src" output="classes/util" path="src/util"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="bootstrap"/> <classpathentry kind="lib" path="lib/hibernate-validator.jar"/> <classpathentry kind="lib" path="lib/hibernate3.jar"/> <classpathentry kind="lib" path="lib/hibernate-annotations.jar"/> <classpathentry kind="lib" path="lib/hibernate-commons-annotations.jar"/> <classpathentry kind="lib" path="lib/hibernate-entitymanager.jar"/> <classpathentry kind="lib" path="lib/jboss-seam.jar" sourcepath="lib/src/jboss-seam-sources.jar"/> <classpathentry kind="lib" path="lib/jboss-seam-debug.jar"/> <classpathentry kind="lib" path="lib/jboss-cache.jar"/> <classpathentry kind="lib" path="lib/jbpm-jpdl.jar"/> <classpathentry kind="lib" path="lib/antlr.jar"/> <classpathentry kind="lib" path="lib/jgroups.jar"/> <classpathentry kind="lib" path="lib/jsf-facelets.jar"/> <classpathentry kind="lib" path="lib/jstl.jar"/> <classpathentry kind="lib" path="lib/jsf-api.jar"/> <classpathentry kind="lib" path="lib/servlet-api.jar"/> <classpathentry kind="lib" path="lib/testng.jar"/> <classpathentry kind="lib" path="lib/jboss-el.jar"/> <classpathentry kind="lib" path="lib/el-api.jar"/> <classpathentry kind="lib" path="lib/mvel14.jar"/> <classpathentry kind="lib" path="lib/drools-core.jar"/> <classpathentry kind="lib" path="lib/drools-compiler.jar"/> <classpathentry kind="lib" path="lib/janino.jar"/> <classpathentry kind="lib" path="lib/antlr-runtime.jar"/> <classpathentry kind="lib" path="lib/mail.jar"/> <classpathentry kind="lib" path="lib/persistence-api.jar"/> <classpathentry kind="lib" path="lib/ejb-api.jar"/> <classpathentry kind="lib" path="lib/jsr250-api.jar"/> <classpathentry kind="lib" path="lib/jta.jar"/> <classpathentry kind="lib" path="lib/core.jar"/> <classpathentry kind="lib" path="lib/jboss-embedded-api.jar"/> <classpathentry kind="lib" path="lib/hibernate-search.jar"/> <classpathentry kind="lib" path="lib/sqljdbc.jar"/> <classpathentry kind="lib" path="lib/lucene-core.jar"/> <classpathentry kind="lib" path="lib/jcifs-1.2.17.jar"/> <classpathentry kind="lib" path="lib/v20070621-common.jar"/> <classpathentry kind="lib" path="lib/v20080929-cadils.jar"/> <classpathentry kind="lib" path="lib/richfaces-api-3.2.1.GA.jar"/> <classpathentry kind="output" path="test-build"/> </classpath>
-
14. Re: Hibernate Configurations problem
asookazian Mar 10, 2009 2:06 PM (in response to paulkeogh)I upgraded (i.e. installed) JBDS 2.0CR2 and reproduced the error:
severity: error msg: org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'null'. exception stack trace: org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'null'. at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:148) at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:541) at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:526) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:222) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:204) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:111) at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:40) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:99) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:105) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) session data: eclipse.buildId=M20090107-0800 java.version=1.5.0_17 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86