Hi,
I have the following NamedQuery in an Entity
import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.NamedQuery; import javax.persistence.Table;
@Entity @Table(name="VW_OFA_MCI") @NamedQuery(name="vwOfaResultadoMci.buscarTodos" , query="SELECT v FROM VwOfaResultadoMci v") public class VwOfaResultadoMci extends AbstractDomainObject implements Serializable {
When I deploy wiht the namedquery annotation i get this error:
Its very strange!!!
2010-08-23 17:25:08.596 ERROR J2EE EJB-03027 [NCA-Ofa_Dummy] An error occured deploying EJB module: com.evermind.server.ejb.exception.DeploymentException: [NCA-Ofa_Dummy:nca.ofa-dummy-business] - Exce ption creating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.HibernatePersi stence for persistence unit nca.ofa-dummy. 2010-08-23 17:25:08.634 NOTIFICATION application : NCA-Ofa_Dummy is in failed state 10/08/23 17:25:08 WARNING: Application.setConfig Application: NCA-Ofa_Dummy is in failed state as in itialization failed. java.lang.InstantiationException: Error initializing ejb-modules: [NCA-Ofa_Dummy:nca.ofa-dummy-busin ess] - Exception creating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.Hib ernatePersistence for persistence unit nca.ofa-dummy. 10/08/23 17:25:08 oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Ap plication: NCA-Ofa_Dummy is in failed state as initialization failed 10/08/23 17:25:08 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(Application Deployer.java:518) 10/08/23 17:25:08 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeploy er.java:199) 10/08/23 17:25:08 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93) 10/08/23 17:25:08 at com.evermind.server.ApplicationServerTask.deploySingleFile(ApplicationSer verTask.java:133) 10/08/23 17:25:08 at com.evermind.server.ApplicationServerTask.performAutoDeployCheck(Applicat ionServerTask.java:97) 10/08/23 17:25:08 at com.evermind.server.ApplicationServerTask.run(ApplicationServerTask.java: 71) 10/08/23 17:25:08 at com.evermind.util.Task.schedule(Task.java:51) 10/08/23 17:25:08 at com.evermind.util.TaskManager.run(TaskManager.java:212) 10/08/23 17:25:08 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasabl eResourcePooledExecutor.java:298) 10/08/23 17:25:08 at java.lang.Thread.run(Thread.java:595) 10/08/23 17:25:08 Caused by: java.lang.InstantiationException: Application: NCA-Ofa_Dummy is in fail ed state as initialization failed 10/08/23 17:25:08 at com.evermind.server.Application.setConfig(Application.java:512) 10/08/23 17:25:08 at com.evermind.server.Application.setConfig(Application.java:355) 10/08/23 17:25:08 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.ja va:1895) 10/08/23 17:25:08 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(Application Deployer.java:515) 10/08/23 17:25:08 ... 9 more 10/08/23 17:25:08 Caused by: java.lang.InstantiationException: Error initializing ejb-modules: [NCA- Ofa_Dummy:nca.ofa-dummy-business] - Exception creating EntityManagerFactory using PersistenceProvide r class org.hibernate.ejb.HibernatePersistence for persistence unit nca.ofa-dummy. 10/08/23 17:25:08 at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:1060) 10/08/23 17:25:08 at com.evermind.server.ApplicationStateRunning.initializeApplication(Applica tionStateRunning.java:231) 10/08/23 17:25:08 at com.evermind.server.Application.setConfig(Application.java:454) 10/08/23 17:25:08 ... 12 more 10/08/23 17:25:08 Caused by: com.evermind.server.ejb.exception.DeploymentException: [NCA-Ofa_Dummy:n ca.ofa-dummy-business] - Exception creating EntityManagerFactory using PersistenceProvider class org .hibernate.ejb.HibernatePersistence for persistence unit nca.ofa-dummy. 10/08/23 17:25:08 at com.evermind.server.ejb.exception.DeploymentException.exceptionCreatingEn tityManagerFactory(DeploymentException.java:130) 10/08/23 17:25:08 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.createCont ainerEntityManagerFactory(PersistenceUnitManagerImpl.java:197) 10/08/23 17:25:08 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initialize PersistenceUnit(PersistenceUnitManagerImpl.java:159) 10/08/23 17:25:08 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initialize (PersistenceUnitManagerImpl.java:87) 10/08/23 17:25:08 at com.evermind.server.ejb.EJBPackageDeployment.initializePersistenceUnitMan ager(EJBPackageDeployment.java:1055) 10/08/23 17:25:08 at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:841) 10/08/23 17:25:08 ... 14 more 10/08/23 17:25:08 Caused by: javax.persistence.PersistenceException: [PersistenceUnit: nca.ofa-dummy ] Unable to build EntityManagerFactory 10/08/23 17:25:08 at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configu ration.java:677) 10/08/23 17:25:08 at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactor y(HibernatePersistence.java:132) 10/08/23 17:25:08 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.createCont ainerEntityManagerFactory(PersistenceUnitManagerImpl.java:192) 10/08/23 17:25:08 ... 18 more 10/08/23 17:25:08 Caused by: org.hibernate.HibernateException: Errors in named queries: vwOfaResulta doMci.buscarTodos 10/08/23 17:25:08 at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:407)
10/08/23 17:25:08 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:13 41) 10/08/23 17:25:08 at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationC onfiguration.java:867) 10/08/23 17:25:08 at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configu ration.java:669) 10/08/23 17:25:08 ... 20 more
ANY IDEAS PLEASE???????
|