[Neo4j] [SDN] 2 questions about a Maven/SDN/Aspectj Eclipse project

311 views
Skip to first unread message

Marc de Verdelhan

unread,
Apr 6, 2012, 9:23:47 AM4/6/12
to ne...@googlegroups.com
Hello there,

I'm using Neo4j/SDN/Aspectj/Maven in a Eclipse project I hosted here: http://www.verdelhan.eu/wiki/lib/exe/fetch.php?media=sdntest.zip  (don't be afraid: it's very simple)

If I build it with Maven I get the following output: http://paste.pocoo.org/show/576901/

So my first question is: What do all these warnings mean?
[WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.aspects.support.relationship.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.aspects.support.relationship.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.data.neo4j.aspects.support.relationship.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]

My second problem is about Eclipse recognition.
As you maybe noticed the only test case (see src/test/com/mygroup/myapp/test/FeatureTest.java:testFeature()) creates 2 "Feature" objects in the DB. For those who would be a bit lazy I copy the code here:
Feature feat1 = new Feature("feat_1");
Assert.assertNotNull(featureRepository.save(feat1));
Feature feat2 = new Feature("feat_2");
feat2.persist();
Assert.assertNotNull(featureRepository.findByObjectId("feat_2"));

Both creations work fine (i.e. there's no test failure and the app is built correctly). But in my IDE (Eclipse), the persist() method is unrecognized (i.e. always underlined in red with "The method persist() is undefined for the type Feature"). So what do I have to configure to make Eclipse recognizing that method? (I have the same problem with remove())

Cheers,

MV

Marc de Verdelhan

unread,
Apr 6, 2012, 10:55:15 AM4/6/12
to ne...@googlegroups.com
Solved the 2nd question thanks to these links:

Peter Neubauer

unread,
Apr 11, 2012, 3:50:10 AM4/11/12
to ne...@googlegroups.com
Mmh,
I think you can ignore the warnings, it's just about unused Mocks?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j                                - Graphs rule.
Program or be programmed - Computer Literacy for kids.
http://foocafe.org/#CoderDojo

On Fri, Apr 6, 2012 at 4:55 PM, Marc de Verdelhan

Michael Hunger

unread,
Apr 11, 2012, 3:56:29 AM4/11/12
to ne...@googlegroups.com
Marc,

the warning are just the AJC compiler telling us that some of the aspects have not been applied to some classes (which didn't fit the pointcuts defined).

HTH

Michael

Marc de Verdelhan

unread,
Apr 11, 2012, 8:01:21 AM4/11/12
to ne...@googlegroups.com
Ok, so no real problem.

Thank you for your opinion about that. :)

MV
Reply all
Reply to author
Forward
0 new messages