问题描述
Jndi数据源:OracleDs数据源正常。<?xmlversion="1.0"encoding="UTF-8"?><persistencexmlns="http://java.sun.com/xml/ns/persistence"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/persistencehttp://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"version="2.0"><persistence-unitname="report"transaction-type="JTA"><provider>org.hibernate.ejb.HibernatePersistence</provider><jta-data-source>java:/OracleDs</jta-data-source><properties><propertyname="hibernate.transaction.manager_lookup_class"value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/><propertyname="hibernate.dialect"value="org.hibernate.dialect.Oracle10gDialect"/></properties></persistence-unit></persistence>
解决方案二:
#<2012-3-30下午03时32分08秒CST><Error><Deployer><MICROSOF-11756B><AdminServer><[ACTIVE]ExecuteThread:'0'forqueue:'weblogic.kernel.Default(self-tuning)'><<WLSKernel>><><><1333092728437><BEA-149231><Unabletosettheactivationstatetotruefortheapplication'reportService'.javax.naming.NameNotFoundException:remainingname:/OracleDsatweblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)atweblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)atweblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)atweblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)atweblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)atweblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)atjavax.naming.InitialContext.lookup(InitialContext.java:392)atorg.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)atorg.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)atorg.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)atorg.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)atorg.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)atorg.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)atorg.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)atorg.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)atorg.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)atweblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)atweblogic.deployment.BasePersistenceUnitInfoImpl.activate(BasePersistenceUnitInfoImpl.java:788)atweblogic.deployment.PersistenceUnitInfoImpl.activate(PersistenceUnitInfoImpl.java:19)atweblogic.ejb.container.deployer.EJBModule.reconfigPersistenceUnits(EJBModule.java:554)atweblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:538)atweblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)atweblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:541)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)atweblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:175)atweblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:167)atweblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)atweblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)atweblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)atweblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)atweblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)atweblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)atweblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)atweblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)atweblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)atweblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)atweblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)atweblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)atweblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)atweblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)atweblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)atweblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)atweblogic.work.ExecuteThread.execute(ExecuteThread.java:209)atweblogic.work.ExecuteThread.run(ExecuteThread.java:178)CausedBy:javax.naming.NameNotFoundException:remainingname:/OracleDsatweblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)atweblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)atweblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)atweblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)atweblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)atweblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)atjavax.naming.InitialContext.lookup(InitialContext.java:392)atorg.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)atorg.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)atorg.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)atorg.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)atorg.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)atorg.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)atorg.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)atorg.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)atorg.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)atweblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)atweblogic.deployment.BasePersistenceUnitInfoImpl.activate(BasePersistenceUnitInfoImpl.java:788)atweblogic.deployment.PersistenceUnitInfoImpl.activate(PersistenceUnitInfoImpl.java:19)atweblogic.ejb.container.deployer.EJBModule.reconfigPersistenceUnits(EJBModule.java:554)atweblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:538)atweblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)atweblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:541)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)atweblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:175)atweblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:167)atweblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)atweblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)atweblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)atweblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)atweblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)atweblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)atweblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)atweblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)atweblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)atweblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)atweblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)atweblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)atweblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)atweblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)atweblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)atweblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)atweblogic.work.ExecuteThread.execute(ExecuteThread.java:209)atweblogic.work.ExecuteThread.run(ExecuteThread.java:178)>