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.createContainerEntityManagerFac 
>> 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