ReflectingPersistenceCapable exception  in JPA

I am running a ApacheOpenJPA + HSQL unit test and facing the following exception
Test set: com.att.osd.bcs.domain.TestBcsPortDAO
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 9.859 sec <<< FAILURE!
testCountPortsByStateAndEms(com.att.osd.bcs.domain.TestBcsPortDAO)  Time elapsed: 9.765 sec  <<< ERROR!
<openjpa-1.1.0-r422266:657916 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: org.apache.openjpa.enhance.ReflectingPersistenceCapable cannot be cast to com.att.osd.bcs.domain.ne.BcsNe
     at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3213)
     at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1158)
     at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:769)
     at com.att.osd.bcs.domain.ne.BcsNElementDaoBean.updateNE(BcsNElementDaoBean.java:145)
     at com.att.osd.bcs.domain.TestBcsPortDAO.testCountPortsByStateAndEms(TestBcsPortDAO.java:65)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)The code I have singled out is as follows
public void updateNE(BcsNe ne) throws DAOException {
          if (neExists(ne.getNe())) {                    
               em.merge(ne);
              else {               
               em.persist(ne);
          if (em.isOpen())
               em.flush();                    
// neExists Method
public BcsNe getNeByNe(String ne) {
          BcsNe bcsNe=em.find(BcsNe.class, ne);          
               return bcsNe;          
     }The relation between BcsNe and BcsPort is one to many with BcsNe as the parent and BcsPort as the child.
Junit invocation is as follows
//@testMethod
     tx.begin();
     for (BcsPort port : bcsPortList) {      // All the ports have the same ne
     neBean.*updateNE*(port.getBcsNe());//Throwing the Exception in question          
   tx.commit();The Junit runs well if the ne values are different,
All comments suggestion are welcome..
Thanks
Edited by: RainaV on Aug 30, 2011 2:19 PM

merge can only be called for an entity that comes out of the entity manager. If you jUnit test creates the entity instance without first getting it it from the entity manager, this latter cannot "merge" it, merely "create" it. I'm not talking about whether the entity's data exist in the DB, really about which entity manager you get the entity from.
Edited by: jduprez on Aug 30, 2011 12:30 PM
Crossposted in forum {forum:id=922}: {thread:id=2275897}

Similar Messages

  • Exception in JPA (NoClassDefFoundError: org/hibernate/AnnotationException)

    Hi,
    I´m having a serious problem when using JPA. I´m using Weblogic Server 10 and developing in Weblogic Workshop Studio. When I start the WLS in Workshop, all works fine, but when I use the "publish" over my WLS Server in Workshop because I change any class in the project (and I need to republish the project to send the changed class to WLS), the following error is reported when I try to use the JPA:
    Caused by: javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.NoClassDefFoundError: org/hibernate/AnnotationException
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:353)
    at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
    at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265)
    at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:884)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186)
    Why the AnnotationException class is no more found after a publish in a started Weblogic Server ?
    Thanks in advance,
    Sergio Stateri Jr.
    [email protected]

    Sergio,
    there are at least three implementation for JPA available: OpenJPA, TopLink, and Hibernate. The first two are or can easily installed in WLS. If you intend to use Hibernate as the persistence provider you should ensure that all libraries are in the class path of your application.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How To Handle SQL Exceptions in JPA

    Hi,
    we are working on toplink JPA. My use case is I have an emp table with columns as "empid" , "emp name" , "job" with "empid" as primary Key. Here I'm creating a record in the Database by using a jspx page. Here My problem is when I'm entering a duplicate value for the empid I'm getting "ORA-00001: unique constraint (constraint_name) violated" . I'm able to catch the exception in the jspx backing bean where I'm calling the JPA insert method, But i could not catch the exception in the sessionEJB Bean. Is there any way to catch such exception in the sessionEJB.
    could anyone help me out.
    Thanks in Advance.
    regards,
    PrapanSol

    You should be able to call flush on your EntityManager in your SessionBean to trigger the exception.
    Note that the transaction will still be rolled back even if you catch this exception.

  • Coherence exception in JPA

    Hi,
    I am using open jpa for persistence in my clustered weblogic server envirnment. I am using coherence for locking support and distributed cache mgmt.
    But while creating entity manager from the Persistence.xml file, i am getting an error, for which the base exception is thrown from the tangosol classes.
    Here is a complete stack trace of the error.
    [21 May 2008 18:33:36,650] ERROR [[ACTIVE] ExecuteThread: '0' for queue:
    'weblogic.kernel.Default (self-tuning)'] test.TestSessionBean:83 - Exception
    <1.0.0 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: (Wrapped: Failed to load the factory) null
         at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:193)
         at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
         at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:190)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:74)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:36)
         at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:143)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:70)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:36)
         at com.git.test.TestSessionBean.<init>(TestSessionBean.java:49)
         at com.git.test.TestSessionBean_eb2d8g_Impl.<init>(TestSessionBean_eb2d8g_Impl.java:45)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at weblogic.ejb.container.injection.EjbComponentCreatorImpl.getBean(EjbComponentCreatorImpl.java:73)
         at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:216)
         at weblogic.ejb.container.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:233)
         at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:305)
         at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:173)
         at weblogic.ejb.container.pool.Pool.createInitialBeans(Pool.java:295)
         at weblogic.ejb.container.manager.StatelessManager.initializePool(StatelessManager.java:446)
         at weblogic.ejb.container.deployer.EJBDeployer.initializePools(EJBDeployer.java:1635)
         at weblogic.ejb.container.deployer.EJBDeployer.start(EJBDeployer.java:1464)
         at weblogic.ejb.container.deployer.EJBModule.start(EJBModule.java:513)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:182)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:359)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:283)
         at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:610)
         at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:689)
         at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:667)
         at kodo.datacache.TangosolDataCache.newTangosolCache(TangosolDataCache.java:251)
         at kodo.datacache.TangosolDataCache.endConfiguration(TangosolDataCache.java:224)
         at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:450)
         at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:375)
         at org.apache.openjpa.lib.conf.PluginListValue.instantiate(PluginListValue.java:93)
         at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:79)
         at kodo.datacache.KodoDataCacheManager.instantiateDataCaches(KodoDataCacheManager.java:77)
         at kodo.datacache.KodoDataCacheManager.initialize(KodoDataCacheManager.java:49)
         at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getDataCacheManagerInstance(OpenJPAConfigurationImpl.java:588)
         at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
         ... 48 more

    Hi,
    I am using open jpa for persistence in my clustered weblogic server envirnment. I am using coherence for locking support and distributed cache mgmt.
    But while creating entity manager from the Persistence.xml file, i am getting an error, for which the base exception is thrown from the tangosol classes.
    Here is a complete stack trace of the error.
    [21 May 2008 18:33:36,650] ERROR [[ACTIVE] ExecuteThread: '0' for queue:
    'weblogic.kernel.Default (self-tuning)'] test.TestSessionBean:83 - Exception
    <1.0.0 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: (Wrapped: Failed to load the factory) null
         at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:193)
         at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
         at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:190)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:74)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:36)
         at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:143)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:70)
         at kodo.persistence.KodoEntityManagerFactoryImpl.createEntityManager(KodoEntityManagerFactoryImpl.java:36)
         at com.git.test.TestSessionBean.<init>(TestSessionBean.java:49)
         at com.git.test.TestSessionBean_eb2d8g_Impl.<init>(TestSessionBean_eb2d8g_Impl.java:45)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at weblogic.ejb.container.injection.EjbComponentCreatorImpl.getBean(EjbComponentCreatorImpl.java:73)
         at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:216)
         at weblogic.ejb.container.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:233)
         at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:305)
         at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:173)
         at weblogic.ejb.container.pool.Pool.createInitialBeans(Pool.java:295)
         at weblogic.ejb.container.manager.StatelessManager.initializePool(StatelessManager.java:446)
         at weblogic.ejb.container.deployer.EJBDeployer.initializePools(EJBDeployer.java:1635)
         at weblogic.ejb.container.deployer.EJBDeployer.start(EJBDeployer.java:1464)
         at weblogic.ejb.container.deployer.EJBModule.start(EJBModule.java:513)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:182)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:359)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:283)
         at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:610)
         at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:689)
         at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:667)
         at kodo.datacache.TangosolDataCache.newTangosolCache(TangosolDataCache.java:251)
         at kodo.datacache.TangosolDataCache.endConfiguration(TangosolDataCache.java:224)
         at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:450)
         at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:375)
         at org.apache.openjpa.lib.conf.PluginListValue.instantiate(PluginListValue.java:93)
         at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:79)
         at kodo.datacache.KodoDataCacheManager.instantiateDataCaches(KodoDataCacheManager.java:77)
         at kodo.datacache.KodoDataCacheManager.initialize(KodoDataCacheManager.java:49)
         at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getDataCacheManagerInstance(OpenJPAConfigurationImpl.java:588)
         at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
         ... 48 more

  • JPA and database error handling

    Can anyone point me towards any information or discussions on methods of handling database initiated exceptions with JPA? Specifically, I'm trying to handle common data exceptions, like primary/foreign key violations etc., so I don't have to duplicate that level of data integrity checking in my business logic.
    It seems I can only get hold of a RollbackException if something goes wrong. Ok, I can get into the underlying cause easily enough, but then I'm straight into implementation specific stuff (in my case, Hibernate exceptions). Are there any good techniques/patterns to reduce this dependency to an absolute minimum?

    In this situation I created @Id for one of the columns or created @IdClass from all view fields.

  • Error while deploying a war file in Oracle Weblogic 10gr3 server

    Hi
    I am trying to deploy a web application which uses Hibernate 3 in Oracle weblogic 10gr3.But I am getting following exception.The same application gets deployed in tomcat without any problem.
    urce [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'autoMeteringInterceptor' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'validator' while setting bean property 'validator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'tenant.tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenant.tenantService' defined in ServletContext resource [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:256)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
         at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'tenant.tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenant.tenantService' defined in ServletContext resource [WEB-INF/servicesContext.xml]: Cannot resolve reference to bean 'genericDao' while setting bean property 'genericDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'saasHibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saasHibernateSessionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: Tenant.byUserName, slaUsageOfTenant.bySlaCriterion, ServiceUsage.byCriterion, SLA.getSlaList, ServiceUsage.byTenantId
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:256)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:248)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
         at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Initially this application was giving me absolute path related errors.But when I made changes to applicationContext.xml as follows,giviing absolute path for Hibernate mapping files
    <property name="mappingDirectoryLocations">
         <list>
         *<value>file:D:\saas-mappings</value>*
         </list>
    </property>
    I have extrached all the *.hbm.xml file to above location that is D:\saas-mappings.But now the application is giving me above mentioned error.The error says that it is related to Named queries.I am pasting the contents of a sample *.hbm.xml file having named query as a sample
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping package="com.psl.saas.domain">
         <class name="TenantSlaUsage" table="tenantslausage_v2">
                   <id name="tenantId" column="tenantId">
                   </id>
                   <property name="maxValue">
                        <column name="maxValue"></column>
                   </property>
                   <property name="thresholdValue">
                        <column name="thresholdValue"></column>
                   </property>
                   <property name="slaType" column="slaType" type="com.psl.saas.dataservice.SaasEnumSlaType"/>
                   <many-to-one name="slaCriterion" class="SLACriterion" column="slaCriterionName" lazy="false" unique="true" />          
                   <property name="usageCount">
                   <column name="usageCount"></column>
                   </property>
         </class>
         *<query name="slaUsageOfTenant.bySlaCriterion">
              <![CDATA[from com.psl.saas.domain.TenantSlaUsage where tenantId=:tenantId and slaCriterionName=:slaCriterionName]]>
         </query>*
    </hibernate-mapping>
    Any help on this will be greatly appreciated
    Thanks in Advance
    -Sameer Gijare

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

  • Error while deploying a .war file

    Hi,
    I have a one Servlet class, which references two more classes for database
    connection. After creating a .war file, I am trying to deploy it on iAS, and I
    get the following error:
    Failed to deploy web application "MBSServlet". Jar file: /var/tmp/jar61304.tmp
    is missing its standard xml descriptor located at WEB-INF/web.xml
    I don't know anything about /var/tmp/jar61304.tmp, I don't know where is it picking it up from. And my web.xml is as follows:
    <?xml version="1.0" standalone='yes'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" " " target="_new">http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <servlet>
    <servlet-name>MBSServlet</servlet-name>
    <servlet-class>MBSServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>MBSServlet</servlet-name>
    <url-pattern>/MBSServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    Any help!!
    thanks!!
    Shalu

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

  • Error while deploying a war file:Urgent

    Hi,
    I am trying to deploy a war file and i am getting the followinig error on the emd console.
    "Failed to deploy application 'xxxx'. No config data persisted for component apache, transaction ID 192.168.40.44.5789f3......"
    The opmn log file in the oracle directory is showing the following exceptioin
    java.net.ConnectException: Connection refused
    Can any one please help me resolve this issue.
    Regards
    Badari

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

  • Error while deploying helloservice.war

    Hello Friends,
    I have been trying to deploy the "helloservice" web service but unable to do so. I am using the Sun Java Sever 9.0. When i run the ant for deploy, it throws me the below error.
    {color:#000080}C:\javaeetutorial5\examples\jaxws\helloservice>ant deploy
    Buildfile: build.xml
    check:
    tools:
    -pre-deploy:
    deploy:
    [exec] Oct 31, 2009 12:05:53 PM com.sun.appserv.management.client.ProxyFact
    ory getInstance
    [exec] SEVERE: ProxyFactory.getInstance: Failure trying to create a new Pro
    xyFactory: java.io.IOException: Server returned HTTP response code: 500 for URL:
    http://localhost:4848/web1/remotejmx
    [exec] CLI171 Command deploy failed : Deployment of application failed - ja
    va.io.IOException: Server returned HTTP response code: 500 for URL: http://local
    host:4848/web1/remotejmx; requested operation cannot be completed
    deploy-url-message:
    [echo] Application Deployed at: http://localhost:8080/helloservice
    BUILD SUCCESSFUL
    {color}{color:#000000}Please help as i am stuck totally and unable to proceed further.
    Best Regards,
    Sudeep Pandey{color}

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

  • Error using weblogic.deploy tool, while deploying a war

              Hi all, I'm trying to deploy a war with the follw command:
              java weblogic.deploy -host localhost -port 7001 -component NewScreenWar:BEAserver
              deploy beasystem NewScreenWar d:\newsscreen\weblogic\NewScreenWar.war
              It gives me following error:
              weblogic.j2ee.DeploymentException: Application NewScreenWar does not contain com
              ponent NewScreenWar at weblogic.deploy.deploy(deploy.java:668) at weblogic.deploy.runBody(deploy.java:358)
              at weblogic.utils.compiler.Tool.run(Tool.java:79) at weblogic.deploy.main(deploy.java:1601)
              Application NewScreenWar does not contain component NewScreenWar
              how do I resolve this...??
              thanx --anjaly
              

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

  • Vulnerabilities in webserviceclient+ssl.jar in Weblogic 10gR3 server

    Hi,
    I am using Weblogic server 10gR3. While checking for the vulnerabilities in project, came across CVE-2007-0417,CVE-2003-0640,CVE-2001-0098,CVE-2000-0681,CVE-2007-4618,CVE-2007-4617,CVE-2007-0425,CVE-2007-0418,CVE-2007-0408,CVE-2005-4757,CVE-2005-4756 all high vulnerabilities present in webserviceclient+ssl.jar. The description of these vulnerabilities says that they should be present in previous versions of Weblogic and should work fine in 10gR3.
    I am not sure, may be I have missed something while understanding as I am new to this.
    Please suggest me the way to resolve these security concerns.
    Thanks in Advance!

    Hi,
    For a tutorial with source on how to create and deploy a simple quickstart JEE5 JPA enterprise 3-tier application on your Oracle WebLogic 10.3 server - see the following example that uses the EclipseLink JPA provider. You should be able to transition all of your mapping information (the @ManyToOne and table/column overrides and named queries for example) using either JPA via entity annotations or native extensions if you do not want to implement EJB3.
    see...
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    We also have a similar version for Tomcat 6 except the JPA entity beans run outside a container-managed JTA transaction on the web container - for reference.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial
    thank you
    /michael
    www.eclipselink.org

  • Update bidirectional ManyToMany relationship

    Hello,
    we have a bidirectional man-to-many relationship (User - Course).
    Now we want users to join courses. How to update the relationship correctly?
    If I do
    course.getUsers().add(user);
    entityManager.merge(course);The user is not updated. Also if a add course to the users course list but only merge the course.
    And if I do
    course.getUsers().add(user);
    user.getCourses().add(course);
    entityManager.merge(course);
    entityManager.merge(user);I get a duplicate key exception, because jpa tries to add the entry in the join table twice.
    How to do this right?
    thanks
    Dirk

    No, they are not managed by the jpa at this moment.
    They come from a jsf application, that have serialized the course (into a selectbox).
    So simply adding the user to the coures is not enough.
    I've tried merging both bevore adding, to get them managed. But this doesn't work too. (The user is in the courses user list, but the course not in the users courses list)
    Edited by: Freak.2k on Jun 12, 2009 9:34 AM

  • OC4J 10.1.3.2, JPA and Hibernate 3.2 Exception on Deployment

    I can't get my simple web application to deploy in my standalone oc4j container. The European organization that I working for wants to use the new technologies out there. Part of the testing is getting oc4j working with hibernate. My web application works just fine with Toplink, but not with Hibernate3. The same web application in Tomcat works for both. The error that oc4j generates is shown below and really doesn't say much that I can do. I followed this blog instructions.
    http://debupanda.blogspot.com/2007/01/using-hibernate-as-pluggable-ejb-3-jpa.html
    2007-04-23 11:48:57.477 NOTIFICATION Starting application : TestJPA
    2007-04-23 11:48:57.477 NOTIFICATION Initializing ClassLoader(s)
    2007-04-23 11:48:57.477 NOTIFICATION Initializing EJB container
    2007-04-23 11:48:57.477 NOTIFICATION Loading connector(s)
    2007-04-23 11:48:57.524 NOTIFICATION Starting up resource adapters
    2007-04-23 11:48:57.524 NOTIFICATION Initializing EJB sessions
    2007-04-23 11:48:57.524 NOTIFICATION Committing ClassLoader(s)
    2007-04-23 11:48:57.524 NOTIFICATION Initialize TestJPA begins...
    2007-04-23 11:48:57.539 NOTIFICATION Initialize TestJPA ends...
    2007-04-23 11:48:57.539 NOTIFICATION Started application : TestJPA
    2007-04-23 11:48:57.555 NOTIFICATION Binding web application(s) to site default-
    web-site begins...
    2007-04-23 11:48:57.571 NOTIFICATION Binding TestJPA web-module for application
    TestJPA to site default-web-site under context root jpa
    07/04/23 11:48:57 oracle.oc4j.admin.internal.DeployerException: [TestJPA:TestJPA
    ] - Exception creating EntityManagerFactory using PersistenceProvider class org.
    hibernate.ejb.HibernatePersistence for persistence unit TestPU.
    07/04/23 11:48:57 at com.evermind.server.ejb.exception.DeploymentException
    .exceptionCreatingEntityManagerFactory(DeploymentException.java:130)
    07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
    nagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:19
    7)
    07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
    nagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:159)
    07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
    nagerImpl.initialize(PersistenceUnitManagerImpl.java:86)
    07/04/23 11:48:57 at com.evermind.server.http.HttpApplication.<init>(HttpA
    pplication.java:733)
    07/04/23 11:48:57 at com.evermind.server.ApplicationStateRunning.getHttpAp
    plication(ApplicationStateRunning.java:414)
    07/04/23 11:48:57 at com.evermind.server.Application.getHttpApplication(Ap
    plication.java:571)
    07/04/23 11:48:57 at com.evermind.server.http.HttpSite$HttpApplicationRunT
    imeReference.createHttpApplicationFromReference(HttpSite.java:1990)
    07/04/23 11:48:57 at com.evermind.server.http.HttpSite$HttpApplicationRunT
    imeReference.<init>(HttpSite.java:1909)
    07/04/23 11:48:57 at com.evermind.server.http.HttpSite.addHttpApplication(
    HttpSite.java:1606)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.WebApplicationBinder.bindW
    ebApp(WebApplicationBinder.java:238)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.WebApplicationBinder.bindW
    ebApp(WebApplicationBinder.java:99)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.ApplicationDeployer.bindWe
    bApp(ApplicationDeployer.java:547)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.ApplicationDeployer.doDepl
    oy(ApplicationDeployer.java:202)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.DeployerBase.execute(Deplo
    yerBase.java:93)
    07/04/23 11:48:57 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeploy
    erRunnable.doRun(OC4JDeployerRunnable.java:52)
    07/04/23 11:48:57 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRu
    nnable.run(DeployerRunnable.java:81)
    07/04/23 11:48:57 at com.evermind.util.ReleasableResourcePooledExecutor$My
    Worker.run(ReleasableResourcePooledExecutor.java:298)
    07/04/23 11:48:57 at java.lang.Thread.run(Unknown Source)
    2007-04-23 11:48:57.726 NOTIFICATION Application Deployer for TestJPA FAILED.
    2007-04-23 11:48:57.726 NOTIFICATION Application UnDeployer for TestJPA STARTS.
    2007-04-23 11:48:57.742 NOTIFICATION Removing all web binding(s) for application
    TestJPA from all web site(s)
    07/04/23 11:48:57 SEVERE: ProgressObjectImpl.reportError [TestJPA:TestJPA] - Exc
    eption creating EntityManagerFactory using PersistenceProvider class org.hiberna
    te.ejb.HibernatePersistence for persistence unit TestPU.oracle.oc4j.admin.jmx.sh
    ared.exceptions.InternalException: [TestJPA:TestJPA] - Exception creating Entity
    ManagerFactory using PersistenceProvider class org.hibernate.ejb.HibernatePersis
    tence for persistence unit TestPU.
    at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.<init>(Notif
    icationUserData.java:107)
    at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:123
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun
    (OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(Deplo
    yerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
    sableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Unknown Source)
    Caused by: oracle.oc4j.admin.internal.DeployerException: [TestJPA:TestJPA] - Exc
    eption creating EntityManagerFactory using PersistenceProvider class org.hiberna
    te.ejb.HibernatePersistence for persistence unit TestPU.
    at com.evermind.server.ejb.exception.DeploymentException.exceptionCreati
    ngEntityManagerFactory(DeploymentException.java:130)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.create
    ContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:197)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initia
    lizePersistenceUnit(PersistenceUnitManagerImpl.java:159)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initia
    lize(PersistenceUnitManagerImpl.java:86)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:
    733)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(Applic
    ationStateRunning.java:414)
    at com.evermind.server.Application.getHttpApplication(Application.java:5
    71)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.cre
    ateHttpApplicationFromReference(HttpSite.java:1990)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<in
    it>(HttpSite.java:1909)
    at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:16
    06)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplica
    tionBinder.java:238)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplica
    tionBinder.java:99)
    at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(Application
    Deployer.java:547)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDe
    ployer.java:202)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    ... 4 more
    2007-04-23 11:48:58.225 NOTIFICATION Application UnDeployer for TestJPA COMPLETE
    S.
    07/04/23 11:48:58 WARNING: DeployerRunnable.run [TestJPA:TestJPA] - Exception cr
    eating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.Hi
    bernatePersistence for persistence unit TestPU.oracle.oc4j.admin.internal.Deploy
    erException: [TestJPA:TestJPA] - Exception creating EntityManagerFactory using P
    ersistenceProvider class org.hibernate.ejb.HibernatePersistence for persistence
    unit TestPU.
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun
    (OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(Deplo
    yerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
    sableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Unknown Source)

    I am not using JDeveloper, the project was created in Netbeans 5.5. I only use the WAR created and Deploy it using the web administration of Oracle 10.1.3.2

  • JPA - "no Metadata found for type" exception

    I use WebLogic 10 with Kodo as the JPA implementation. When attempting to query the DB for an entity, I get this very weird exception:
    org.apache.openjpa.persistence.ArgumentException: No metadata was found for type "class com.verid.ims.model.AddressUS". The class does not appear in the list of persistent types: [com.verid.ims.model.Birthdate, com.verid.ims.model.PersonName, com.verid.ims.model.AddressUS, com.rsa.idv.ims.feedback.IMSFeedback, com.rsa.idv.ims.notification.IMSNotification, com.rsa.idv.ims.provider.IMSProvider, com.rsa.idv.ims.notification.NotificationEntry, com.rsa.idv.ims.enroll.SecretUserQuestion, com.rsa.idv.ims.enroll.Enrollment].
    Please take into account that the AddressUS class, which according to the exception does not appear in the list of persistent types, is actually in the list! (Bold)
    The AddressUS class is mapped in my orm.xml file (it's not in the persistence.xml descriptor since it's not an entity, only an embeddable). Here is the mapping:
    <embeddable class="com.verid.ims.model.AddressUS">
    <attributes>
    <basic name="city" />
    <basic name="state">
    <enumerated>STRING</enumerated>
    </basic>
    <basic name="street1" />
    <basic name="street2" />
    <basic name="zipcode" />
    <basic name="suite" />
    </attributes>
    </embeddable>
    Needless to say, the persistence.xml descriptor refers to the orm.xml file.
    The exception only happens on some environments (not all of them), which basically means that it's an environmental problem. What could cause this?

    Thanks, that did help and it was throwing similar errors for other jar files, which I added and now the page opens.
    But the issue that I am facing now is on this page there is a Manager Search, wherein I can proxy a manager.
    This Search popup is not returning any values. Previously if I reinstalled my system-jazn-data.xml file from my colleauge
    and rebooting my laptop worked. But now even that doe snot help.
    Srinivasa Sunchu

  • JPA error with nested exception for more details

    Hi All,
    A strange thing is that when i can deploy javaee app successfully. But some time, it is failed and i have to wait for 10, 15 minutes then i can deploy again. When i got error, below is the error message:
    I don't know if you can find a hint.
    INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
    SEVERE: Local Exception Stack:
    Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 more
    SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
    SEVERE: Exception while preparing the app
    SEVERE: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
    javax.persistence.PersistenceException: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    ... 40 more
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 more
    SEVERE: Exception while preparing the app : Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
    Local Exception Stack:
    Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 morethanks,
    -Hoang Long

    r035198x wrote:
    Yep, the appserver got hold of a usable connection but the connection was closed before the appserver had finished/committed with it. It could be that the connection was closed by the database or some firewall timeout setting.
    A good start is to investigate options of configuring your appserver's connection eviction policies including forcing a validation SQL to be executed when a connection is acquired. Make sure that such a query doesn't impact on performance and have some performance and integration testing before rolling out.i found that if i close the computer which causes this issue, hence other dev computers can deploy normally.
    "deploy" here i mean deploy to a running instance on each dev's machine.
    From this, i would guess the common database server itself rejects connection from clients.
    I will try to investigate more if i am missing something.
    And here i found a link that possibly a first good attempt:
    [http://www.eclipse.org/forums/index.php/m/505809/]
    EclipseLink automatically recovers from communication failures, but there is little we can do to diagnose the failure. We basically execute a query and have to wait for the JDBC driver, or DataSource's response, if it hangs for 10minutes, then we are waiting. You could set the JDBC timeout hint on your query, but whether the JDBC driver honors this is up to the driver. You should see the SQLException in your logs, provided your log level is warning or lower.
    If you cannot fix your firewall, they you could change your connection pool settings to use a min number of connections of 0, so there will never be idle connections. But then you will be reconnecting a lot.
    You could also use a third party connection pool or DataSource that supports a timeout setting on the pooled connections, or spawn a thread in your application the clears the connection pool every 30minutes.regards,
    -HL

Maybe you are looking for

  • Is there a way to allow only selected 17+ apps

    My daughter is 14. I would like to allow all 14+ apps, and also allow selected (but not all) 17+ apps. Is there a way to do that?

  • What kind of credit card usage led to a credit limit increase for you?

     What type of spending behavior led to your credit limit increases?  (Ie zero balance, high usage with early payments, 9%, 30%, ect).   Were they notable increases?   What time frame did the increases occur in?

  • Reading information from multiple arrays efficiently

    So I'm trying to make a flash application about number of felonies of different trafic violations from different years, example: In 2002 there was 9631 drunk drivers, 13481 driving without a license, 9863 speeders and 18862 who broke other laws In 20

  • 2 Different Ipods with 2 different Apple IDs

    My daughter got a new Ipod and gave her old to her brother. Sister and brother have their own Apple IDs. When changes are made to old Ipod 's apps or songs(3rd gen) changes are made to the new Ipod (5th gen) and Iphone 4. What do we need to do stop t

  • PSE 9 encountered a problem and needs to close

    A few hours ago I posted the following: I have been using PSE 5 for years but all of a sudden when I try to open multiple files "could not complete the open command because of a program error" appears. I have reformatted my computer and reinstalled a