Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830
this week in the
Programmer Certification
forum!
zhou xingqi
Greenhorn
+ Follow
news
2
Posts
1
Threads
since Jan 12, 2011
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads
Recent posts by zhou xingqi
deploy ejb3 on weblogic errors
i have added the log4j jar to my classpath ,but it still have the same exception,someone could save me ? sos~
show more
13 years ago
Object Relational Mapping
deploy ejb3 on weblogic errors
i want to deploy a test project on weblogic ,but there have some errors , i have no idea ,someone could help me !!! thanks!!
the error code
java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2291) at java.lang.Class.getDeclaredFields(Class.java:1743) at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.getFields(BaseJ2eeAnnotationProcessor.java:1024) at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.getFields(BaseJ2eeAnnotationProcessor.java:1017) at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.processJ2eeAnnotations(BaseJ2eeAnnotationProcessor.java:98) at weblogic.j2ee.dd.xml.J2eeAnnotationProcessor.processJ2eeAnnotations(J2eeAnnotationProcessor.java:37) at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processSessionAnnotations(EjbAnnotationProcessor.java:775) at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:310) at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:180) at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandardAnnotations(EjbDescriptorReaderImpl.java:344) at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:204) at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93) at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1242) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:395) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367) at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 39 more <2011-1-12 下午04时43分48秒 CST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1294821827750' for task '2'. Error is: 'weblogic.application.ModuleException: Exception preparing module: EJBModule(yptc-ctipaybl-ejb) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Lorg/apache/log4j/Logger;.' weblogic.application.ModuleException: Exception preparing module: EJBModule(yptc-ctipaybl-ejb) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Lorg/apache/log4j/Logger;. at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:467) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149) Truncated. see log file for complete stacktrace Caused By: java.lang.ClassNotFoundException: org.apache.log4j.Logger at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177) Truncated. see log file for complete stacktrace > <2011-1-12 下午04时43分48秒 CST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application '_appsdir_yptc-ctipaybl-ejb_dir'.> <2011-1-12 下午04时43分48秒 CST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004 weblogic.application.ModuleException: Exception preparing module: EJBModule(yptc-ctipaybl-ejb) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Lorg/apache/log4j/Logger;. at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:467) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149) Truncated. see log file for complete stacktrace Caused By: java.lang.ClassNotFoundException: org.apache.log4j.Logger at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177) Truncated. see log file for complete stacktrace >
weblogic-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?> <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd"> <weblogic-enterprise-bean> <ejb-name>CardCTIBeanEJB</ejb-name> <stateless-session-descriptor> <pool> <max-beans-in-free-pool>10</max-beans-in-free-pool> <initial-beans-in-free-pool>1</initial-beans-in-free-pool> </pool> </stateless-session-descriptor> <transaction-descriptor> <trans-timeout-seconds>60</trans-timeout-seconds> </transaction-descriptor> <enable-call-by-reference>true</enable-call-by-reference> </weblogic-enterprise-bean> <security-role-assignment> <role-name>YPTC2008</role-name> <principal-name>weblogic</principal-name> </security-role-assignment> <run-as-role-assignment> <role-name>YPTC2008</role-name> <run-as-principal-name>weblogic</run-as-principal-name> </run-as-role-assignment> </weblogic-ejb-jar>
persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="CardPU" transaction-type="JTA"> <jta-data-source>yptcCTIDB</jta-data-source> <class> com.zysoft.yptc.ctipaybl.dto.Account</class> <class> com.zysoft.yptc.ctipaybl.dto.Bizlist</class> <class> com.zysoft.yptc.ctipaybl.dto.Card</class> <class> com.zysoft.yptc.ctipaybl.dto.Cardbill</class> <class> com.zysoft.yptc.ctipaybl.dto.Cardlog</class> <class> com.zysoft.yptc.ctipaybl.dto.Customer</class> <class> com.zysoft.yptc.ctipaybl.dto.DfBill</class> <class> com.zysoft.yptc.ctipaybl.dto.Payfee</class> <class> com.zysoft.yptc.ctipaybl.dto.Recharge</class> <class> com.zysoft.yptc.ctipaybl.dto.User</class> <class> com.zysoft.yptc.ctipaybl.dto.DfPayidl</class> <class> com.zysoft.yptc.ctipaybl.dto.AccBill</class> <properties> </properties> </persistence-unit> </persistence>
show more
13 years ago
Object Relational Mapping