weblogic 12c中的EJB 2.1部署问题

时间:2015-07-23 15:34:30

标签: weblogic weblogic12c ejb-2.x

我正在尝试在weblogic 12c中部署包含在EAR maven应用程序中的EJB 2.1,我已经提到在我的类路径中更喜欢ejb 2.1 jar,但我仍然得到以下错误,因为它指的是weblogic ejb jar。 / p>

我正在尝试不同的事情,但仍然没有接受我的。请找到以下xml文件,请帮我解决这个问题?

我厌倦了找到根本原因:(



There are 6 nested errors:

weblogic.ejb.container.compliance.ComplianceException: In EJB MonthlySessionStatMgmt, the bean class must implement directly or indirectly the javax.ejb.SessionBean interface.
	at weblogic.ejb.container.compliance.SessionBeanClassChecker.checkClassImplementsSessionBean(SessionBeanClassChecker.java:68)

weblogic.ejb.container.compliance.ComplianceException: In EJB MonthlySessionStatMgmt, method getHandle() defined in the local interface either does not exist in the bean class, or it is not a public method. Each method in the local interface must have a corresponding public method in the bean class.
	at weblogic.ejb.container.compliance.BeanClassChecker.checkBusinessMethods(BeanClassChecker.java:328)

weblogic.ejb.container.compliance.ComplianceException: In EJB MonthlySessionStatMgmt, method getEJBHome() defined in the local interface either does not exist in the bean class, or it is not a public method. Each method in the local interface must have a corresponding public method in the bean class.
	at weblogic.ejb.container.compliance.BeanClassChecker.checkBusinessMethods(BeanClassChecker.java:328)

weblogic.ejb.container.compliance.ComplianceException: In EJB MonthlySessionStatMgmt, method getPrimaryKey() defined in the local interface either does not exist in the bean class, or it is not a public method. Each method in the local interface must have a corresponding public method in the bean class.
	at weblogic.ejb.container.compliance.BeanClassChecker.checkBusinessMethods(BeanClassChecker.java:328)

weblogic.ejb.container.compliance.ComplianceException: In EJB MonthlySessionStatMgmt, method isIdentical(javax.ejb.EJBObject) defined in the local interface either does not exist in the bean class, or it is not a public method. Each method in the local interface must have a corresponding public method in the bean class.
	at weblogic.ejb.container.compliance.BeanClassChecker.checkBusinessMethods(BeanClassChecker.java:328)

weblogic.ejb.container.compliance.ComplianceException: In EJB MonthlySessionStatMgmt, method remove() defined in the local interface either does not exist in the bean class, or it is not a public method. Each method in the local interface must have a corresponding public method in the bean class.
	at weblogic.ejb.container.compliance.BeanClassChecker.checkBusinessMethods(BeanClassChecker.java:328)




application.xml中



    <?xml version="1.0" encoding="UTF-8"?>`enter code here
    <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns="http://java.sun.com/xml/ns/javaee"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"
    	id="Application_ID" version="6">
    	<display-name>XYZ</display-name>
    	<module>
    		<ejb>logar.jar</ejb>
    	</module>
    	<library-directory>lib</library-directory>
    </application>
&#13;
&#13;
&#13;

WebLogic的application.xml中

&#13;
&#13;
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-application
	xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.5/weblogic-application.xsd">
	<ejb>
		<start-mdbs-with-application>false
		</start-mdbs-with-application>
	</ejb>
	<application-param>
		<param-name>webapp.encoding.default</param-name>
		<param-value>UTF-8</param-value>
	</application-param>
	<prefer-application-packages xsi:type="prefer-application-packagesType">
		<package-name>javax.ejb.*</package-name>
	</prefer-application-packages>
</weblogic-application>
&#13;
&#13;
&#13;

ejb-jar.xml中

&#13;
&#13;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<!--
  ** This file was automatically generated by EJBGen 2.16
  ** Build: 20031001-1049
-->
<ejb-jar>
	<enterprise-beans>
		<session>
			<ejb-name>MonthlySessionStatMgmt</ejb-name>
			<home>com.xyz.MonthlySessionStatMgmtHome</home>
			<remote>com.xyz.MonthlySessionStatMgmt</remote>
			<ejb-class>com.xyz.MonthlySessionStatMgmtBean</ejb-class>
			<session-type>Stateless</session-type>
			<transaction-type>Container</transaction-type>
		</session>
	</enterprise-beans>
	<assembly-descriptor>
		<container-transaction>
			<method>
				<ejb-name>MonthlySessionStatMgmt</ejb-name>
				<method-name>*</method-name>
			</method>
	 		<trans-attribute>Required</trans-attribute> 
		</container-transaction>
 	</assembly-descriptor>
</ejb-jar>
&#13;
&#13;
&#13;

WebLogic的EJB-jar.xml中

&#13;
&#13;
<weblogic-ejb-jar>
	<weblogic-enterprise-bean>
		<ejb-name>MonthlySessionStatMgmt</ejb-name>
		<stateless-session-descriptor>
			<pool>
				<max-beans-in-free-pool>1000</max-beans-in-free-pool>
				<initial-beans-in-free-pool>0</initial-beans-in-free-pool>
			</pool>
		</stateless-session-descriptor>
		<transaction-descriptor>
			<trans-timeout-seconds>45</trans-timeout-seconds>
		</transaction-descriptor>
		<enable-call-by-reference>true</enable-call-by-reference>
		<jndi-name>com/xyz/MonthlySessionStatMgmt</jndi-name>
	</weblogic-enterprise-bean>
</weblogic-ejb-jar>
&#13;
&#13;
&#13;

0 个答案:

没有答案