Not understandable error when injecting a reference into a non static property in a JEE client app.
In a JEE client app, when injecting a reference to a bean into a property ; this property has to be a static property. If mistakenly the word 'static' is forgotten ; an error not understandable is displayed. All that to say that in reality the property is not static.
Execution example : jclient testClient-0.0.1-SNAPSHOT.jar -cp lib/eventswitch-api-1.2.1-M2.jar:lib/jasmine-event-api-1.3.1-M2.jar There was the following exception : null java.lang.NullPointerException at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36) at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57) at java.lang.reflect.Field.set(Field.java:657) at org.ow2.easybeans.injection.impl.ArchiveInjection.setFieldValue(ArchiveInjection.java:651) at org.ow2.easybeans.injection.impl.ArchiveInjection.setValue(ArchiveInjection.java:579) at org.ow2.easybeans.injection.impl.ArchiveInjection.injectEJB(ArchiveInjection.java:433) at org.ow2.easybeans.injection.impl.ArchiveInjection.inject(ArchiveInjection.java:230) at org.ow2.easybeans.injection.impl.ArchiveInjection.inject(ArchiveInjection.java:285) at org.ow2.easybeans.injection.impl.ArchiveInjection.init(ArchiveInjection.java:205) at org.ow2.jonas.client.ClientContainer.invokeClient(ClientContainer.java:739) at org.ow2.jonas.client.ClientContainer.start(ClientContainer.java:705) at org.ow2.jonas.client.ClientContainer.main(ClientContainer.java:244) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.ow2.jonas.client.boot.Bootstrap.main(Bootstrap.java:103)
Can you add a check on properties whose reference is injected, so that the word 'static' is well specified (with an understandable error message on error). Attached a code sample.