Hi Burt,

Maybe the threads got crossed.... after Jacek pointed out this patch I decided this was a geronimo bug (GERONIMO-3880) and fixed it so you should not need to patch hibernate. I think this will work:

Anyway I think it's fixed now and I pushed the jar for trunk.... org/apache/geronimo/modules/geronimo-persistence-jpa10/2.2-SNAPSHOT/ geronimo-persistence-jpa10-2.2-20080228.021634-2.jar
to the apache snapshot repo.

If you install this in your geronimo repo you should be able to get past this problem. It might be simpler to name it geronimo- persistence-jpa10-2.1.jar although it would be better to keep its real name and put it in the right place and if necessary use an artifact_alias entry to get geronimo to find it.

entries would look like
org.apache.geronimo.modules/geronimo-persistence-jpa10// jar=org.apache.geronimo.modules/geronimo-persistence-jpa10/2.2- SNAPSHOT/jar org.apache.geronimo.modules/geronimo-persistence-jpa10/2.1/ jar=org.apache.geronimo.modules/geronimo-persistence-jpa10/2.2- SNAPSHOT/jar


Does this make sense?

thanks
david jencks

On Feb 28, 2008, at 9:38 AM, Burt Prior wrote:


Hi David,

I'm using the latest production Hibernate code from:
Hibernate Core 3.2
Hibernate Annotations 3.3.0.GA
Hibernate EntityManager 3.3.1.GA
Hibernate Tools 3.2.0.GA
Hibernate Validator 3.0.0.GA

Here was the patch i did to
C:\hibernate-entitymanager-3.3.1.GA\src\org\hibernate\ejb \Ejb3Configuration.java:

...

344:   boolean[] detectArtifactForOtherJars = getDetectedArtifacts(
info.getProperties(), null, false );
345:   boolean[] detectArtifactForMainJar = getDetectedArtifacts(
info.getProperties(), null, info.excludeUnlistedClasses() );
346:                    
347: // 022508: [EMAIL PROTECTED]: added patch to avoid NPE when running
Geronimo.
348:                    
349:  if (info.getJarFileUrls() != null) {
350:                    
351:   for ( URL jar : info.getJarFileUrls() ) {
352: if ( detectArtifactForOtherJars[0] ) scanForClasses( jar, packages,
entities );
353:       scanForXmlFiles( jar, hbmFiles, XML_SEARCH.getType(
detectArtifactForOtherJars[1], searchForORMFiles ) );
354:   }
355:                    
356:}
357:
358:                    if ( detectArtifactForMainJar[0] ) scanForClasses(
info.getPersistenceUnitRootUrl(), packages, entities );
359:                    scanForXmlFiles( info.getPersistenceUnitRootUrl(), 
hbmFiles,
XML_SEARCH.getType( detectArtifactForMainJar[1], searchForORMFiles ) );
...

This code section is a bit different than Jacek's example in this version of
Hibernate.

Or perhaps I didn't apply the patch correctly.  I did see the updated
hibernate-entitymanager.jar in:
C:\jboss-seam-2.1.0.A1\lib\hibernate-entitymanager.jar that I assume the
booking example is using instead of:
C:\hibernate-entitymanager-3.3.1.GA\hibernate-entitymanager.jar

Thanks,
.Burt


djencks wrote:


On Feb 27, 2008, at 3:40 PM, Burt Prior wrote:

Do you know what version of hibernate is in use?  I looked for the
source code that could cause this but so far it makes no sense to
me.  If you can debug here and poke around in the
PersistenceUnitInfoImpl to see if something is null or gives an
NPE??? that would be helpful.  My best guess from http://
fisheye.jboss.com/browse/Hibernate/entitymanager/trunk/src/java/org/
hibernate/ejb/Ejb3Configuration.java?r=11344 is that the
info.getJarFileURLs() is returning null but I can't see how that
could be happening.


java.lang.NullPointerException
        at
org.hibernate.ejb.Ejb3Configuration.configure
(Ejb3Configuration.java:346)
        at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerF ac
tory(HibernatePersistence.java:126)
        at
org.apache.geronimo.persistence.PersistenceUnitGBean.<init>
(PersistenceUnitGBean.java:117)


thanks
david jencks




--
View this message in context: http://www.nabble.com/Geronimo-2.1- and-Seam-tp15621154s134p15741787.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Reply via email to