在jboss中部署cmpbean问题

05-10-16 zkjf161
在jboss中部署cmpbean时出现如下错误,不知如何解决,请高手指点,谢谢!

javax.ejb.EJBException: RuntimeException; CausedByException is:

createBeanClassInstanceCommand == null

org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:357)

org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:124)

org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)

org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)

org.jboss.ejb.Container.invoke(Container.java:876)

org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)

org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)

$Proxy68.create(Unknown Source)

cmpentitybean.MyejbServlet.service(MyejbServlet.java:31)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

banq
2005-10-17 10:07
错误不完全,需要找出导致这个错误的根本错误

zkjf161
2005-10-17 10:21
我是使用servlet调用entitybean时在浏览器中出现的如上提示,我也就是不知错误的关键在哪里啊

zkjf161
2005-10-17 11:16
oracle-ds.xml内容如下:

<datasources>

<local-tx-datasource>

<jndi-name>pbds</jndi-name>

<connectionurl>jdbc:oracle:thin:@127.0.0.1:1521:pbds</connection-url>

<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

<user-name>pm</user-name>

<password>pm</password>

<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

<metadata>

<type-mapping>Oracle8i</type-mapping>

</metadata>

</local-tx-datasource>

</datasources>

standardjbosscmp-jdbc.xml主要内容如下:

<datasource>java:/pbds</datasource>

<datasource-mapping>Oracle8i</datasource-mapping>

<create-table>false</create-table>

<remove-table>false</remove-table>

<read-only>false</read-only>

<read-time-out>300000</read-time-out>

<row-locking>false</row-locking>

<pk-constraint>true</pk-constraint>

<fk-constraint>false</fk-constraint>

<preferred-relation-mapping>foreign-key</preferred-relation-mapping>

<read-ahead>

<strategy>on-load</strategy>

<page-size>1000</page-size>

<eager-load-group>*</eager-load-group>

</read-ahead>

<list-cache-max>1000</list-cache-max>

<clean-read-ahead-on-load>false</clean-read-ahead-on-load>

jbosscmp-jdbc.xml内容如下:

<jbosscmp-jdbc>

<defaults>

<datasource>java:/pbds</datasource>

<datasource-mapping>Oracle9i</datasource-mapping>

</defaults>

<enterprise-beans>

<entity>

<ejb-name>Book</ejb-name>

<datasource>pbds</datasource>

<datasource-mapping>Oracle9i</datasource-mapping>

<table-name>BOOK</table-name>

<cmp-field>

<field-name>bookid</field-name>

<column-name>BOOKID</column-name>

</cmp-field>

<cmp-field>

<field-name>bookname</field-name>

<column-name>BOOKNAME</column-name>

</cmp-field>

<cmp-field>

<field-name>bookprice</field-name>

<column-name>BOOKPRICE</column-name>

</cmp-field>

</entity>

</enterprise-beans>

</jbosscmp-jdbc>

我想应该是这些配置文件出了问题,但不知具体哪里出错?

猜你喜欢