[b]Estou utilizando a IDE Netbeans e eclipselink
Esta ocorrendo a exception abaixo na hora de abrir uma conexão, o problema é que isso não ocorre toda vez, normalmente a cada 3 vezes que eu executo o sistema.
A entidade descrita na exception “PessoaRepresentante” segue exatamente o padrão das outras classes sendo que nosso sistema já contêm perto de 500 classes de entidade e somente nas novas classes estão ocorrendo essa exception.
Essa entidade foi gerada por aquela opção “Gerar classe de banco de dados” do próprio Netbeans e adicionada no persistense XML…
Alguem já teve esse problema? Desde já agradeço a atenção…[/b]
Exception in thread "main" Local Exception Stack:
Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@35ce36
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [totemPU] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class entidade.PessoaCliente] uses a non-entity [class entidade.PessoaRepresentante] as target entity in the relationship attribute [field pessoaRepresentante].
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:115)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at data.EntityRemoto.getEntityManagerRemoto(EntityRemoto.java:70)
at data.EntityRemoto.getEntityManager(EntityRemoto.java:52)
at totem.Main.main(Main.java:202)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [totemPU] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class entidade.PessoaCliente] uses a non-entity [class entidade.PessoaRepresentante] as target entity in the relationship attribute [field pessoaRepresentante].
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1385)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:105)
... 4 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [totemPU] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class entidade.PessoaCliente] uses a non-entity [class entidade.PessoaRepresentante] as target entity in the relationship attribute [field pessoaRepresentante].
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221)
... 7 more