Hi!
Converting a project from Hibernate to JPA, I got several classes
annotated (they was xml based mapping).
Everything goes fine until last night, when I run refactor (in real,
renamed) several fields and methods using latest NB 5.5 (200606090200).
The code compiles perfectly (Clean and Build all), but I can't deploy.
I'm getting an error every time run verifier (or when I deploy -
comments continue bellow this stack trace):
com.sun.enterprise.tools.verifier.tests.persistence.DefaultProviderVerification
java.lang.ClassCastException:
oracle.toplink.essentials.mappings.OneToManyMapping
at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processOneToMany(MetadataProcessor.java:1346)
at
oracle.toplink.essentials.internal.ejb.cmp3.annotations.EJBAnnotationsProcessor.processOneToMany(EJBAnnotationsProcessor.java:1487)
at
oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processRelationshipAccessor(MetadataProcessor.java:1643)
at
oracle.toplink.essentials.internal.ejb.cmp3.annotations.EJBAnnotationsProcessor.processRelatedEntity(EJBAnnotationsProcessor.java:1786)
at
oracle.toplink.essentials.internal.ejb.cmp3.annotations.EJBAnnotationsProcessor.processORAnnotations(EJBAnnotationsProcessor.java:1543)
at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:405)
at
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:156)
at
com.sun.enterprise.tools.verifier.tests.persistence.DefaultProviderVerification.check(DefaultProviderVerification.java:80)
at com.sun.enterprise.tools.verifier.CheckMgr.check(CheckMgr.java:120)
at
com.sun.enterprise.tools.verifier.persistence.PersistenceUnitCheckMgrImpl.check(PersistenceUnitCheckMgrImpl.java:83)
at
com.sun.enterprise.tools.verifier.CheckMgr.checkPersistenceUnits(CheckMgr.java:377)
at
com.sun.enterprise.tools.verifier.web.WebCheckMgrImpl.check(WebCheckMgrImpl.java:69)
at
com.sun.enterprise.tools.verifier.BaseVerifier.verify(BaseVerifier.java:133)
at
com.sun.enterprise.tools.verifier.web.WebVerifier.verify(WebVerifier.java:79)
at
com.sun.enterprise.tools.verifier.VerificationHandler.runVerifier(VerificationHandler.java:223)
at
com.sun.enterprise.tools.verifier.VerificationHandler.verifyArchive(VerificationHandler.java:134)
at com.sun.enterprise.tools.verifier.Verifier.verify(Verifier.java:131)
at com.sun.enterprise.tools.verifier.Verifier.main(Verifier.java:101)
PS: the error line number (1346) don't match to any released source code
I've found on CVS (most close I got was a empty line or a comment line)!
As far as I could track, the problem is with OneToMany mappings, but
there is no error treatment on the referred method, and there is no
attribute reference on the stack trace.
If this is a unknown issue, I'll add it on bug database, because I can't
evolute, neither can find cause, blocking completely further progress.
The code causing problem is pretty complex and closed, so I can't share
with community, but I'll be happy to help debug/fix it.
IMHO, a try-catch, correctly put in the method could lead to a clear
understanding where the problem is.
Thanks,
Richter