EntityBean jboss.xml problem
tsmets Apr 11, 2002 12:01 PMOK
Up to now I have managed to deply SessionBeans on JBoss 2.4.4.
I am now working for a while with Entity beans. I took the code from the book "Mastering EJB" (Publ. by WILEY).
The code deploy OK without a JBoss.xml but is (of course not callable as the JNDI is not started then!).
Now when I add to my jar the jboss.xml here below (which look OK to me), I get the following error :
[INFO,J2eeDeployer] install EJB module TestBMP.jar
[INFO,ContainerFactory] Deploying:file:/C:/cygwin/opt/jboss/tmp/deploy/Default/TestBMP.jar
[ERROR,XmlFileLoader] failed to load jboss.xml. There could be a syntax error.
[ERROR,ContainerFactory] InternalError
java.lang.NullPointerException
at org.jboss.metadata.ConfigurationMetaData.importJbossXml(ConfigurationMetaData.java:204)
at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMetaData.java:342)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:186)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:436)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:369)
at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:306)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)
at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
at java.lang.Thread.run(Thread.java:484)
[ERROR,J2eeDeployer] Starting TestBMP.jar failed!
[ERROR,Default] org.jboss.deployment.DeploymentException: Could not deploy file:/C:/cygwin/opt/jboss/tmp/deploy/Default/
TestBMP.jar, Cause: java.lang.NullPointerException
Could someone tell me what the problem is ?
jboss.xml & ejb-jar.xml are here under !
Tx,
Thomas,
====== jboss.xml =========================
<?xml version="1.0"?>
<enterprise-beans>
<ejb-name>Account</ejb-name>
<jndi-name>account/AccountHome</jndi-name>
<configuration-name>LRU Configuration</configuration-name>
</enterprise-beans>
<container-configurations>
<container-configuration>
<container-name>LRU Configuration</container-name>
<instance-cache>org.jboss.ejb.plugins.EntitySessionInstanceCache</instance-cache>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>5</min-capacity>
<max-capacity>200</max-capacity>
<overager-period>300</overager-period>
<max-bean-age>600</max-bean-age>
<resizer-period>400</resizer-period>
<max-cache-miss-period>60</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
<cache-load-factor>0.75</cache-load-factor>
</cache-policy-conf>
</container-cache-conf>
</container-configuration>
</container-configurations>
====== jboss.xml =========================
[]b====== ejb-jar.xml =========================
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<ejb-name>Account</ejb-name>
com.kls.account.AccountHome
com.kls.account.Account
<local-home>com.kls.account.AccountLocalHome</local-home>
com.kls.account.AccountLocal
<ejb-class>com.kls.account.AccountBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.kls.account.AccountPK</prim-key-class>
False
<!--
<resource-ref>
<res-ref-name>jdbc/ejbPool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
-->
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<ejb-name>Account</ejb-name>
<method-intf>Local</method-intf>
<method-name>*</method-name>
<ejb-name>Account</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
====== ejb-jar.xml =========================