[jboss-dev-forums] [Design of EJB 3.0] - Status of annotation based configuration

scott.stark@jboss.org do-not-reply at jboss.com
Fri Nov 16 10:53:15 EST 2007


I'm seeing an NPE currently due to a lookup of an annotation not returning a value in the ejb3 container:


  | 07:44:30,645 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=appclient_dep_compat14_50.ear,jar=appclient_dep_compat14_50_ejb.jar,name=TestBean,service=EJB3 state=Create
  | java.lang.NullPointerException
  |         at org.jboss.ejb3.EJBContainer.initializePool(EJBContainer.java:804)
  |         at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:740)
  |         at org.jboss.ejb3.session.SessionContainer.start(SessionContainer.java:208)
  |         at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer.java:124)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | ...
  | 
  |    protected void initializePool() throws Exception
  |    {
  |       org.jboss.annotation.ejb.Pool poolAnnotation = getAnnotation(org.jboss.annotation.ejb.Pool.class);
  |       String registeredPoolName = poolAnnotation.value(); // line 804
  |       int maxSize = poolAnnotation.maxSize();
  |       long timeout = poolAnnotation.timeout();
  |       Ejb3Deployer deployer = deployment.getDeployer();
  |       PoolFactoryRegistry registry = deployer.getPoolFactoryRegistry();
  |       PoolFactory factory = registry.getPoolFactory(registeredPoolName);
  |       pool = factory.createPool();
  |       pool.initialize(this, maxSize, timeout);
  |  ...
  | 

What are we expecting to do with this type of code?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105529#4105529

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105529



More information about the jboss-dev-forums mailing list