anodynos
Sep 14th, 2011, 01:51 PM
Hi to all Graphistas,
First of all I want to congratulate all the the developers of SDG - version 1.1 has added a lot of functionality, especially in terms of querying (Cypher, Gremlin etc).
Now to the problem, Summary : Eclipse editor reports errors such as
Type mismatch : Cannot convert from Class<XXX> to Class<? extends RelationshipBacked>
or
The method relateTo(World, String) is undefined for the type
Its is an old problem that's been mentioned a lot
http://forum.springsource.org/showthread.php?108930-spring-data-graph-persist-undefined
http://forum.springsource.org/showthread.php?113629-Using-Spring-Data-Graph-in-real & http://stackoverflow.com/questions/7144097/spring-data-graph-and-eclipse
http://forum.springsource.org/showthread.php?110204-Spring-Data-Graph-Example-(cineasts)-Related-blues-amp-how-to-run (http://forum.springsource.org/showthread.php?110204-Spring-Data-Graph-Example-%28cineasts%29-Related-blues-amp-how-to-run)
http://forum.springsource.org/showthread.php?110744-Neo4j-and-quot-Type-mismatch-quot-using-RelatedTo
http://forum.springsource.org/showthread.php?113244-Developing-Spring-Data-Graph-with-eclipse
http://forum.springsource.org/showthread.php?111908-Error-in-RelatedTo-Spring-Data-graph
Having spent the last couple of days trying every possible solution, I can assure you it has not been solved!
I 've created a JIRA issue (https://jira.springsource.org/browse/DATAGRAPH-104) inahope that the appropriate springers can rectify it...
To sum it up:
a) In @RelatedToVia & @RelatedTo & @NodeEntity annotations, you get something like : Type mismatch : Cannot convert from Class<XXX> to Class<? extends RelationshipBacked>
b) In relateTo(...) , getRelationshipTo(), persist() and all other introduced methods, you get a
The method relateTo(World, String) is undefined for the type XXX
or
The method persist() is undefined for the type XXX
etc
c) Finally in repository definitions like
public interface XXXRepository extends GraphRepository<XXX>, NamedIndexRepository<XXX> {}
you get:
Bound mismatch: The type XXX is not a valid substitute for the bounded parameter <T
extends GraphBacked<?>> of the type NamedIndexRepository<T>
Bound mismatch: The type XXX is not a valid substitute for the bounded parameter <T
extends GraphBacked<?>> of the type GraphRepository<T>
Remedies (with no cure)
a) The method with adding **/*.aj to the build path
(mentioned in https://jira.springsource.org/browse/DATAGRAPH-39 and elsewhere including par 18.1.1 in http://static.springsource.org/spring-data/data-graph/docs/current/reference/multi/programming-model.html) DOES NOT work.
It seems that it does, cause once you add **/*.aj as the the build path inclusion, your *.java files are not included in your build path anymore!
Therefore, ALL errors in those *.java files aren't reported & the editor functionality is hammered (no refactoring etc).
Now, trying to also add **/*.java to the include build path, reveals that the problem persists):-(
b) Updating Eclipse tools to the latest versions & configuring them is not verified to cure anything - check bellow :
Configurations
I have used various configurations that had the exact problem, my current is :
- Eclipse 3.7 Indigo (Version: 3.7.0, Build id: I20110613-1736) on a Windows 2003 VM with 4GB RAM and the following plugin versions :
AspectJ Development Tools
2.2.0.e37x-20110907-1500
AspectJ Development Tools (AJDT) Source Code
2.2.0.e37x-20110907-1500
Eclipse Weaving Service Feature
2.2.0.e37x-20110907-1500
Equinox Weaving SDK
1.0.100.v20110502-79-F8PEVVFNNFsFV
Maven Integration for Eclipse (Required)
0.12.1.20110112-1712
Maven Integration for WTP (Optional)
0.12.0.20110421-1500
Project configurators for commonly used maven plugins (temporary)
0.12.0.20101103-1500
Spring IDE AJDT Integration (optional)
2.7.1.201107082359-RELEASE
Spring IDE AOP Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Autowire Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Batch Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Core (required)
2.7.1.201107082359-RELEASE
Spring IDE Integration, Flex and Web Services Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Mylyn Integration (optional)
2.7.1.201107082359-RELEASE
Spring IDE OSGi Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Security Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Web Flow Extension (optional)
2.7.1.201107082359-RELEASE
SpringSource Tool Suite (required)
2.7.1.201107091000-RELEASE
SpringSource Tool Suite dm Server Tools
2.7.1.201107091000-RELEASE
SpringSource Tool Suite Maven Support
2.7.1.201107091000-RELEASE
SpringSource Tool Suite Roo Support
2.7.1.201107091000-RELEASE
SpringSource Tool Suite tc Server Tools
2.7.1.201107091000-RELEASE
SpringSource Tool Suite Tutorials
2.7.1.201107091000-RELEASE
SpringSource Tool Suite VMware Integration
2.7.1.201107091000-RELEASE
My Maven (3.0.3) pom has the following versions :
<spring.version>3.0.5.RELEASE</spring.version>
<aspectj.version>1.6.12.M1</aspectj.version> (also tried M2)
<slf4j.version>1.6.1</slf4j.version>
<datastore-graph.version>1.1.0.RELEASE</datastore-graph.version> (same problems with SDG 1.0.0.RELEASE)
Eclipse & Tools Configuration
Tried various possible Eclipse / plugin settings:
- Preferences -> JDT Weaving -> on & off (default) & reindexed
- Preferences -> AspectJ Compiler -> Incremental Compiler Optimizations on & off(default)
- Preferences -> Spring (used defaults)
Projects compile & run
I've verified the same exists problem on at least
- Spring Data Graph examples like hello-worlds (https://github.com/SpringSource/spring-data-graph-examples)
- Cineast (git://github.com/jexp/cineasts.git)
and my own apps.
Important : these apps compile fine with eclipse build and maven test. They also run fine.
But there are the following Spring related warnings [WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Person [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Movie [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Role [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.User [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Rating [Xlint:typeNotExposedToWeaver]
[WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTr anslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsy ncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.node.Neo4jN odeBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.node.Neo4jN odeBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.node.Neo4jN odeBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDriv enStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethod MockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethod MockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.relationshi p.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.relationshi p.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]
First of all I want to congratulate all the the developers of SDG - version 1.1 has added a lot of functionality, especially in terms of querying (Cypher, Gremlin etc).
Now to the problem, Summary : Eclipse editor reports errors such as
Type mismatch : Cannot convert from Class<XXX> to Class<? extends RelationshipBacked>
or
The method relateTo(World, String) is undefined for the type
Its is an old problem that's been mentioned a lot
http://forum.springsource.org/showthread.php?108930-spring-data-graph-persist-undefined
http://forum.springsource.org/showthread.php?113629-Using-Spring-Data-Graph-in-real & http://stackoverflow.com/questions/7144097/spring-data-graph-and-eclipse
http://forum.springsource.org/showthread.php?110204-Spring-Data-Graph-Example-(cineasts)-Related-blues-amp-how-to-run (http://forum.springsource.org/showthread.php?110204-Spring-Data-Graph-Example-%28cineasts%29-Related-blues-amp-how-to-run)
http://forum.springsource.org/showthread.php?110744-Neo4j-and-quot-Type-mismatch-quot-using-RelatedTo
http://forum.springsource.org/showthread.php?113244-Developing-Spring-Data-Graph-with-eclipse
http://forum.springsource.org/showthread.php?111908-Error-in-RelatedTo-Spring-Data-graph
Having spent the last couple of days trying every possible solution, I can assure you it has not been solved!
I 've created a JIRA issue (https://jira.springsource.org/browse/DATAGRAPH-104) inahope that the appropriate springers can rectify it...
To sum it up:
a) In @RelatedToVia & @RelatedTo & @NodeEntity annotations, you get something like : Type mismatch : Cannot convert from Class<XXX> to Class<? extends RelationshipBacked>
b) In relateTo(...) , getRelationshipTo(), persist() and all other introduced methods, you get a
The method relateTo(World, String) is undefined for the type XXX
or
The method persist() is undefined for the type XXX
etc
c) Finally in repository definitions like
public interface XXXRepository extends GraphRepository<XXX>, NamedIndexRepository<XXX> {}
you get:
Bound mismatch: The type XXX is not a valid substitute for the bounded parameter <T
extends GraphBacked<?>> of the type NamedIndexRepository<T>
Bound mismatch: The type XXX is not a valid substitute for the bounded parameter <T
extends GraphBacked<?>> of the type GraphRepository<T>
Remedies (with no cure)
a) The method with adding **/*.aj to the build path
(mentioned in https://jira.springsource.org/browse/DATAGRAPH-39 and elsewhere including par 18.1.1 in http://static.springsource.org/spring-data/data-graph/docs/current/reference/multi/programming-model.html) DOES NOT work.
It seems that it does, cause once you add **/*.aj as the the build path inclusion, your *.java files are not included in your build path anymore!
Therefore, ALL errors in those *.java files aren't reported & the editor functionality is hammered (no refactoring etc).
Now, trying to also add **/*.java to the include build path, reveals that the problem persists):-(
b) Updating Eclipse tools to the latest versions & configuring them is not verified to cure anything - check bellow :
Configurations
I have used various configurations that had the exact problem, my current is :
- Eclipse 3.7 Indigo (Version: 3.7.0, Build id: I20110613-1736) on a Windows 2003 VM with 4GB RAM and the following plugin versions :
AspectJ Development Tools
2.2.0.e37x-20110907-1500
AspectJ Development Tools (AJDT) Source Code
2.2.0.e37x-20110907-1500
Eclipse Weaving Service Feature
2.2.0.e37x-20110907-1500
Equinox Weaving SDK
1.0.100.v20110502-79-F8PEVVFNNFsFV
Maven Integration for Eclipse (Required)
0.12.1.20110112-1712
Maven Integration for WTP (Optional)
0.12.0.20110421-1500
Project configurators for commonly used maven plugins (temporary)
0.12.0.20101103-1500
Spring IDE AJDT Integration (optional)
2.7.1.201107082359-RELEASE
Spring IDE AOP Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Autowire Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Batch Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Core (required)
2.7.1.201107082359-RELEASE
Spring IDE Integration, Flex and Web Services Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Mylyn Integration (optional)
2.7.1.201107082359-RELEASE
Spring IDE OSGi Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Security Extension (optional)
2.7.1.201107082359-RELEASE
Spring IDE Web Flow Extension (optional)
2.7.1.201107082359-RELEASE
SpringSource Tool Suite (required)
2.7.1.201107091000-RELEASE
SpringSource Tool Suite dm Server Tools
2.7.1.201107091000-RELEASE
SpringSource Tool Suite Maven Support
2.7.1.201107091000-RELEASE
SpringSource Tool Suite Roo Support
2.7.1.201107091000-RELEASE
SpringSource Tool Suite tc Server Tools
2.7.1.201107091000-RELEASE
SpringSource Tool Suite Tutorials
2.7.1.201107091000-RELEASE
SpringSource Tool Suite VMware Integration
2.7.1.201107091000-RELEASE
My Maven (3.0.3) pom has the following versions :
<spring.version>3.0.5.RELEASE</spring.version>
<aspectj.version>1.6.12.M1</aspectj.version> (also tried M2)
<slf4j.version>1.6.1</slf4j.version>
<datastore-graph.version>1.1.0.RELEASE</datastore-graph.version> (same problems with SDG 1.0.0.RELEASE)
Eclipse & Tools Configuration
Tried various possible Eclipse / plugin settings:
- Preferences -> JDT Weaving -> on & off (default) & reindexed
- Preferences -> AspectJ Compiler -> Incremental Compiler Optimizations on & off(default)
- Preferences -> Spring (used defaults)
Projects compile & run
I've verified the same exists problem on at least
- Spring Data Graph examples like hello-worlds (https://github.com/SpringSource/spring-data-graph-examples)
- Cineast (git://github.com/jexp/cineasts.git)
and my own apps.
Important : these apps compile fine with eclipse build and maven test. They also run fine.
But there are the following Spring related warnings [WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Person [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Movie [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Role [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.User [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: org.neo4j.cineasts.domain.Rating [Xlint:typeNotExposedToWeaver]
[WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTr anslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsy ncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.node.Neo4jN odeBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.node.Neo4jN odeBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.node.Neo4jN odeBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDriv enStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethod MockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethod MockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.relationshi p.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.support.relationshi p.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]