Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » ClassCastException while traversing resources
ClassCastException while traversing resources [message #605358] Mon, 13 August 2007 17:12
Eclipse UserFriend
Originally posted by: eclipse.spatula.net

When I start Europa or open the JPA perspective, I get the following
message:

An error occurred while traversing resources. Reason:
org.eclipse.jdt.core.dom.QualifiedName

This is on a project which already has a persistence.xml and for which
many Entities were already defined by hand. I added the JPA
natures/facets to it by hand based on the creation of a new JPA project.
That seems to have mostly worked, and I do get the JPA outlines for my
Entities, though not all of the time. Sometimes I also get a red
underline under my @Entity annotation and the error associated with it is
that the entity is not associated with any persistence unit (although it
plainly is in META-INF/persistence.xml and sysinternals.com's Filemon
shows that it was accessed and read). The behaviour here seems to be
somewhat nondeterministic, as sometimes it works and sometimes it doesn't,
with no obvious trigger.

Here's the full stack trace from the error log that causes the error while
traversing resources; perhaps it will be helpful:

java.lang.ClassCastException: org.eclipse.jdt.core.dom.QualifiedName
at
org.eclipse.jpt.core.internal.jdtutility.EnumArrayDeclaratio nAnnotationElementAdapter.resolve(EnumArrayDeclarationAnnota tionElementAdapter.java:91)
at
org.eclipse.jpt.core.internal.jdtutility.EnumArrayDeclaratio nAnnotationElementAdapter.getValue(EnumArrayDeclarationAnnot ationElementAdapter.java:66)
at
org.eclipse.jpt.core.internal.jdtutility.EnumArrayDeclaratio nAnnotationElementAdapter.getValue(EnumArrayDeclarationAnnot ationElementAdapter.java:1)
at
org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationEle mentAdapter.getValue(MemberAnnotationElementAdapter.java:43)
at
org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotat ionElementAdapter.getValue(ShortCircuitAnnotationElementAdap ter.java:47)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaCasc ade.updateFromJava(JavaCascade.java:574)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaRela tionshipMapping.updateFromJava(JavaRelationshipMapping.java: 567)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaMult iRelationshipMapping.updateFromJava(JavaMultiRelationshipMap ping.java:700)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaAttr ibuteMapping.initialize(JavaAttributeMapping.java:80)
at
org.eclipse.jpt.core.internal.content.java.JavaPersistentAtt ribute.updateFromJava(JavaPersistentAttribute.java:564)
at
org.eclipse.jpt.core.internal.content.java.JavaPersistentTyp e.updatePersistentFields(JavaPersistentType.java:694)
at
org.eclipse.jpt.core.internal.content.java.JavaPersistentTyp e.updatePersistentAttributes(JavaPersistentType.java:677)
at
org.eclipse.jpt.core.internal.content.java.JavaPersistentTyp e.updateFromJava(JavaPersistentType.java:671)
at
org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.synchronizePersistentTypes(JpaCompilationUnit.java:406)
at
org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.setFile(JpaCompilationUnit.java:325)
at
org.eclipse.jpt.core.internal.content.java.JavaJpaFileConten tProvider.buildRootContent(JavaJpaFileContentProvider.java:3 0)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
at
org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:630)
at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:497)
at
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:504)
at
org.eclipse.jpt.core.internal.JpaModelManager.fillJpaProject (JpaModelManager.java:180)
at org.eclipse.jpt.core.internal.JpaModel$1.visit(JpaModel.java :152)
at
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
at
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:119)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
at org.eclipse.jpt.core.internal.JpaModel.fill(JpaModel.java:15 8)
at
org.eclipse.jpt.core.internal.JpaModelManager$WorkspaceBuild Job$1.run(JpaModelManager.java:260)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1797)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1779)
at
org.eclipse.jpt.core.internal.JpaModelManager$WorkspaceBuild Job.run(JpaModelManager.java:257)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

And here's the session info:

eclipse.buildId=I20070625-1500
java.version=1.5.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

This is with JPA 1.0 in Eclipse Europa.
Previous Topic:Use Dali with EclipseUML 2007 Free Edition
Next Topic:Many problems with Dali
Goto Forum:
  


Current Time: Thu Apr 25 08:14:45 GMT 2024

Powered by FUDForum. Page generated in 0.03215 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top