Mantis - Resin
Viewing Issue Advanced Details
4434 minor always 03-11-11 15:13 04-05-11 16:29
rickHigh  
ferg  
normal  
closed 4.0.15  
fixed  
none    
none 4.0.17  
0004434: ResinBeanContainer fails with a null pointer exception when running standalone
Following the example here:

http://wiki.caucho.com/Testing. [^]

When I run the container standalone, it fails with a null pointer exception which seems to be related to not being able to load the validator jar file classes or some such.

Exception in thread "main" java.lang.NullPointerException

at com.caucho.config.reflect.ReflectionAnnotatedFactory.introspectType(ReflectionAnnotatedFactory.java:115)

at com.caucho.config.inject.InjectManager.createAnnotatedType(InjectManager.java:1099)

at com.caucho.config.inject.InjectManager.createManagedBean(InjectManager.java:1168)

at com.caucho.resin.ResinBeanContainer.<init>(ResinBeanContainer.java:162)

at org.cdi.advocacy.Example.main(Example.java:14)

Digging deeper. It works when commenting out the offending lines.

Notes
(0005129)
rickHigh   
03-11-11 15:17   
This works when I comment out the following lines:


$ svn diff modules/resin/src/com/caucho/resin/ResinBeanContainer.java
Index: modules/resin/src/com/caucho/resin/ResinBeanContainer.java
===================================================================
--- modules/resin/src/com/caucho/resin/ResinBeanContainer.java (revision 7940)
+++ modules/resin/src/com/caucho/resin/ResinBeanContainer.java (working copy)
@@ -156,10 +156,10 @@
 
       _cdiManager.addManagedBean(_cdiManager.createManagedBean(ResinCdiProducer.class));
 
- Class<?> resinValidatorClass = ResinCdiProducer.createResinValidatorProducer();
+// Class<?> resinValidatorClass = ResinCdiProducer.createResinValidatorProducer();
       
- if (_cdiManager != null)
- _cdiManager.addManagedBean(_cdiManager.createManagedBean(resinValidatorClass));
+ // if (_cdiManager != null)
+ // _cdiManager.addManagedBean(_cdiManager.createManagedBean(resinValidatorClass));
 
       _classLoader.scanRoot();
     } finally {
(0005155)
ferg   
04-05-11 16:29   
ioc/5040