Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.0
-
None
-
None
Description
Same problem as : WW-1978, the problem is still not fixed in 2.1.0, nor in 2.1.1-SNAPSHOT
when xwork-conversion.properties contains an entry, Struts 2 startup throws a NPE :
[ERROR] [2008-02-03 17:09:16,181] [com.opensymphony.xwork2.conversion.impl.XWorkConverter] (main,) : Conversion registration error
java.lang.NullPointerException
at com.opensymphony.xwork2.conversion.impl.XWorkConverter.createTypeConverter(XWorkConverter.java:729)
at com.opensymphony.xwork2.conversion.impl.XWorkConverter.loadConversionProperties(XWorkConverter.java:756)
at com.opensymphony.xwork2.conversion.impl.XWorkConverter.<init>(XWorkConverter.java:184)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:388)
at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:211)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:49)
at com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:431)
at com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:446)
So, it looks like the object factory is not set in XWorkConverter :
Object obj = objectFactory.buildBean(className, null);
Is there a quick work-around ?