views:

52

answers:

0

I am currently getting the following error when I try to startup an EAR that includes OpenEJB. The error is:

    java.lang.NullPointerException
 at org.apache.openejb.config.DeploymentLoader.getWebDescriptors(DeploymentLoader.java:1057)
 at org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1162)
 at org.apache.openejb.config.DeploymentsResolver.processUrls(DeploymentsResolver.java:294)
 at org.apache.openejb.config.DeploymentsResolver.loadFromClasspath(DeploymentsResolver.java:248)
 at org.apache.openejb.spring.ClassPathApplication.loadApplications(ClassPathApplication.java:56)
 at org.apache.openejb.spring.AbstractApplication.deployApplication(AbstractApplication.java:106)
 at org.apache.openejb.spring.OpenEJB.deployApplication(OpenEJB.java:342)
 at org.apache.openejb.spring.AbstractApplication.start(AbstractApplication.java:94)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:618)
 at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)

The environment consists of:

  • Spring 3.0
  • OpenEJB 3.1
  • WebSphere 6.1 (Without EJB/Web Service feature packs)
  • OpenEJB-Spring jar

The app-config.xml that configures Spring and OpenEJB looks like:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
 xmlns:p="http://www.springframework.org/schema/p"
 xsi:schemaLocation="
  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;


 <context:annotation-config />

 <bean name="TransactionManager"
  class="org.apache.geronimo.transaction.manager.GeronimoTransactionManager" />

 <bean name="SecurityService" class="org.apache.openejb.core.security.SecurityServiceImpl" />


<bean name="classPathApplication" class="org.apache.openejb.spring.ClassPathApplication" />
</beans>

Also please note that I do have a JUnit test that runs against the app-config.xml specified above that can successfully load the application context file. It is just when I deploy it to WebSphere I encounter the error provided at the beginning of this message.