Does your deployment contain OSGI manifests?
No...it doesn't. If it needs to have OSGI then please let me know how to do it because i am not much aware of it.
Can you show us the code of the bean?
You're using any xml files in you deployment unit?
Show us a jar -tvf xyz-startup-bean-3.0.0-SNAPSHOT.jar.
I was following another thread where you suggested EJB option for invoking something while JBoss startup .(https://community.jboss.org/thread/201070)
Jaikiran made a correction in your suggestion, and now this error is gone but another issue is surfaced.....
Now my jar is getting deployed but init method(annotated with @PostConstruct) is not getting invoke.
This is my bean class...
public class xyzStartupBean
System.out.println("bean instance created");
public void init()
Attached is the output of jar-tvf .................
0 Tue Jun 19 14:45:34 IST 2012 META-INF/
214 Tue Jun 19 14:45:32 IST 2012 META-INF/MANIFEST.MF
0 Tue Jun 19 14:45:34 IST 2012 com/
0 Tue Jun 19 14:45:34 IST 2012 com/abc/
0 Tue Jun 19 14:45:34 IST 2012 com/abc/xyz/
714 Tue Jun 19 14:45:34 IST 2012 com/abc/xyz/XyzStartupBean.class
395 Tue Jun 19 14:45:34 IST 2012 META-INF/ejb-jar.xml
1667 Tue Jun 19 14:45:34 IST 2012 META-INF/harvest.sig
0 Tue Jun 19 14:45:36 IST 2012 META-INF/maven/
0 Tue Jun 19 14:45:36 IST 2012 META-INF/maven/xyz/
0 Tue Jun 19 14:45:36 IST 2012 META-INF/maven/xyz/xyz-startup-bean/
1649 Tue Jun 19 11:30:54 IST 2012 META-INF/maven/xyz/xyz-startup-bean/pom.xml
124 Tue Jun 19 14:45:34 IST 2012 META-INF/maven/xyz/xyz-startup-bean/pom.properties
In ejb-jar.xml i have just <display-name> and MANIFEST.MF have just version.
Please let me know if i need to do some explicit configuration, so that init() get invoke while JBoss startup.
Wrong import! It should be javax.ejb.Singleton.
I corrected the import stmnt...now i am ending up with the same exception what i posted in the starting of this thread
1 of 1 people found this helpful
A NullPointerException is always a bug. That said, it would be helpful if you could open a JIRA at http://issues.jboss.org/browse/AS7 containing the stack trace and an EJB JAR which reproduces the issue, along with the corresponding source code.
I opened a JIRA bug for it.