Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get the ClassInfo name of a labeled entity from Android #389

Closed
giograno opened this issue Aug 4, 2017 · 3 comments
Closed

Unable to get the ClassInfo name of a labeled entity from Android #389

giograno opened this issue Aug 4, 2017 · 3 comments
Assignees
Milestone

Comments

@giograno
Copy link

giograno commented Aug 4, 2017

Hi, I'm developing an Android application and I want to use neo4j-omg to interact with my local db instance.
When I save an entity with a session, I get the following stack traces:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.neo4j.ogm.metadata.ClassInfo.name()' on a null object reference
at org.neo4j.ogm.MetaData.entityType(MetaData.java:266)
at org.neo4j.ogm.session.Neo4jSession.entityType(Neo4jSession.java:415)
at org.neo4j.ogm.session.delegates.LoadByTypeDelegate.loadAll(LoadByTypeDelegate.java:58)
at org.neo4j.ogm.session.delegates.LoadByTypeDelegate.loadAll(LoadByTypeDelegate.java:115)
at org.neo4j.ogm.session.Neo4jSession.loadAll(Neo4jSession.java:131)
at analysis.io.GenericService.filter(GenericService.java:14)

Looking a bit into the codebase, it seems that it is not able to able to detect which classes I annotated. In fact, the classNameToClassInfo map in the DomainInfo is empty.

Running the same code from plain Java, it works without problems.
However, I perfectly know that the library is not tested for the Android environment.
In some way, it looks similar to the issue #34.

I'm using the omg version 2.1.1.

Many thanks.

@meistermeier meistermeier added this to the 4.0 milestone Nov 7, 2018
@meistermeier
Copy link
Collaborator

We will update the class scanning library in version 4.0, also with focus on Android support.

@michael-simons
Copy link
Collaborator

@meistermeier AFAIK you had a test case with some android code somewhere, right? Would you check this with the 3.2 alpha please, so that we can close this here (hopefully).

@meistermeier
Copy link
Collaborator

Closing this issue because the new way to scan for classes in the classpath does not support Dalvik out-of-the-box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants