Exceptions when discovering java model from java project with annotations [message #667413] |
Thu, 28 April 2011 15:10 |
Eclipse User |
|
|
|
Originally posted by: vanbeerst.gmail.com
This is a multi-part message in MIME format.
--------------030502070700030402040405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
I am having trouble discovering a java model from a java project.
Everything works fine when there are no annotations used in the project,
but when there are annotations, some exceptions are thrown.
I have tried this with following configurations, which gave all the same
results :
- Modisco 0.7 on eclipse Galileo
- Modisco 0.8 on eclipse Helios
- Modisco 0.9 on eclipse Indigo (M6)
There are 3 different kinds of exceptions thrown :
- classcast exception from AnnotationTypeMemberDeclarationImpl to
AbstractMethodDeclaration
- classcast exception from TypeParameterImpl to UnresolvedItem
- IOWrappedException stating that TypeAccessImpl is not contained by a
resource
For my project I get several of these exceptions. In attachment for each
of those types of exceptions one stack trace is given.
Note that I only get these exception when doing a full java analysis. I
do not get any exceptions when setting following value in the
DiscoveryParametersBean :
this.discoveryParametersBean.setFullJavaLevel(false);
Does anyone know what I can do about this?
If necessary, I will try to create a minimal project which has these
exceptions, for now I only have fairly large projects, which I can not
just post here.
Best regards,
Tony.
--------------030502070700030402040405
Content-Type: text/plain;
name="classcastexception1.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="classcastexception1.txt"
eclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product
Error
Thu Apr 28 16:59:48 CEST 2011
org.eclipse.gmt.modisco.java.emf.impl.AnnotationTypeMemberDe clarationImpl cannot be cast to org.eclipse.gmt.modisco.java.AbstractMethodDeclaration (org.eclipse.gmt.modisco.java.discoverer_0.8.0.v201006150543 )
java.lang.ClassCastException: org.eclipse.gmt.modisco.java.emf.impl.AnnotationTypeMemberDe clarationImpl cannot be cast to org.eclipse.gmt.modisco.java.AbstractMethodDeclaration
at org.eclipse.gmt.modisco.java.io.java.JDTVisitor.endVisit(JDT Visitor.java:1698)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvo cation.java:247)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:25 28)
at org.eclipse.jdt.core.dom.ReturnStatement.accept0(ReturnState ment.java:136)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:25 28)
at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.jav a:190)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java :2551)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:25 28)
at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDec laration.java:504)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java :2551)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclara tion.java:484)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java :2551)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(Compilation Unit.java:219)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.gmt.modisco.java.io.java.JavaReader.visitCompila tionUnit(JavaReader.java:266)
at org.eclipse.gmt.modisco.java.io.java.JavaReader.parseTypeRoo t(JavaReader.java:225)
at org.eclipse.gmt.modisco.java.io.java.JavaReader.parsePackage (JavaReader.java:246)
at org.eclipse.gmt.modisco.java.io.java.JavaReader.readModel(Ja vaReader.java:175)
at org.eclipse.gmt.modisco.java.actions.DiscoverJavaModelFromJa vaProject$2.run(DiscoverJavaModelFromJavaProject.java:194)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
--------------030502070700030402040405
Content-Type: text/plain;
name="classcastexception2.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="classcastexception2.txt"
eclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product
Error
Thu Apr 28 16:59:48 CEST 2011
org.eclipse.gmt.modisco.java.emf.impl.TypeParameterImpl cannot be cast to org.eclipse.gmt.modisco.java.UnresolvedItem
java.lang.ClassCastException: org.eclipse.gmt.modisco.java.emf.impl.TypeParameterImpl cannot be cast to org.eclipse.gmt.modisco.java.UnresolvedItem
at org.eclipse.gmt.modisco.java.emf.impl.UnresolvedItemAccessIm pl.eSet(UnresolvedItemAccessImpl.java:212)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1081)
at org.eclipse.gmt.modisco.java.io.java.binding.PendingElement. affectTarget0(PendingElement.java:172)
at org.eclipse.gmt.modisco.java.io.java.binding.PendingElement. affectTarget(PendingElement.java:152)
at org.eclipse.gmt.modisco.java.io.java.binding.BindingManager. resolveBindings(BindingManager.java:312)
at org.eclipse.gmt.modisco.java.io.java.JavaReader.finalResolve Bindings(JavaReader.java:285)
at org.eclipse.gmt.modisco.java.io.java.JavaReader.terminate(Ja vaReader.java:337)
at org.eclipse.gmt.modisco.java.actions.DiscoverJavaModelFromJa vaProject$2.run(DiscoverJavaModelFromJavaProject.java:202)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
--------------030502070700030402040405
Content-Type: text/plain;
name="typeaccessimpl_not_contained.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="typeaccessimpl_not_contained.txt"
eclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product
Error
Thu Apr 28 16:59:48 CEST 2011
Unkown error.
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'org.eclipse.gmt.modisco.java.emf.impl.TypeAccessImpl@63f8ce' is not contained in a resource.
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveIm pl.java:306)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:270)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLRes ourceImpl.java:206)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:1406)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:993)
at org.eclipse.gmt.modisco.java.actions.DefaultDiscoverer.saveR esource(DefaultDiscoverer.java:125)
at org.eclipse.gmt.modisco.java.actions.DiscoverJavaModelFromJa vaProject$2.run(DiscoverJavaModelFromJavaProject.java:205)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object 'org.eclipse.gmt.modisco.java.emf.impl.TypeAccessImpl@63f8ce' is not contained in a resource.
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingH REF(XMLHelperImpl.java:760)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment( XMLHelperImpl.java:731)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getIDREF(XMLHel perImpl.java:753)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveIDRefMany(XML SaveImpl.java:2003)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1355)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2685)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1174)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1035)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2386)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1533)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2685)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1174)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1035)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2386)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1533)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2685)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1174)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1035)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2386)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1533)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2685)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1174)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1035)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2386)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1533)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2685)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1174)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1035)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2386)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1533)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2685)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XM LSaveImpl.java:680)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:588)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:256)
... 6 more
--------------030502070700030402040405--
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03360 seconds