-
Notifications
You must be signed in to change notification settings - Fork 47
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
problem mapping entities on android project #27
Comments
I'm not sure what's going on right now. There may be several problems regarding this issue, let's work on it:
If none of the above solves your problem, can you simplify your source code and send us your environment so that we can debug? If you want to debug it yourself, clone project to your computer and then include in your classpath and add breakpoints to It is very unlikely that this problem is Android-specific, I think. |
I've created a new project now it couldn't find packages automatically or detect classes by specifying package name. The whole thing is broken for some reason now. @0ffffffffh can you investigate please? |
It seems broken, i built the jar from source but the problem persists.
|
It looks like there's a problem with Android SDK in this issue, it is different than entity search process (it creates dependency graph to create entities in correct order, that's when the error occurs). http://developer.android.com/reference/java/util/LinkedList.html#descendingIterator() says that this method is implemented. That's totally weird. |
Since API 9 only, however. What version are you running it on? |
@JakeWharton oops I missed that part (under jetlag) and just focused to LinkedList exists since API 1. We shouldn't rely on that and create our own iterator. @marcosbeirigo, thanks for noticing this bug. |
What's the MinSDK version to run orman on android? Couldn't find it on the wiki... |
Since it is written in pure Java SE, we didn't even checked for what's min version actually. That exception was really a surprise for me. It should throw compilation error before you create APK since the method does not exist, but apparently it doesn't. I'm fixing it right now. It should work on API≥3. |
It will only produce an error if you compile against the lowest API level you support. Most apps compile against higher API levels even though they support older ones. |
I didn't know that. |
@marcosbeirigo, i will investigate this issue. thanks for bug report. |
Have another problem with mapping on Android: When I map entities by hand everything works fine: I'm using last library built from git clone rep, built by rake. |
@0ffffffffh is working on it already. It is a dalvik vm classloading policy issue. He'll push his work when he's done with it. thanks for your patience. |
Thanks for your work, guys! When it would be critical bugs free, it would be awesome framework for Android. |
Is there any update on merging the development branch with |
yes. I will commit an update soon. Currently, I'm developing an eclipse plugin. Of course, that is related with this issue. (You can see at https://github.com/0ffffffffh/OrmanEclipseDevPlugin). Dalvik classloader issue is a stringent problem to resolve. I'm still working on it. |
Same issue @0ffffffffh here. Waiting for the update. |
I had the same issue, while registering packages and when searching automatically for entities. Registering the entities one by one seems to work. Database db = new SQLiteAndroid(getApplicationContext(), "mydatabase.db");
MappingSession.getConfiguration().setCreationPolicy(SchemaCreationPolicy.CREATE_IF_NOT_EXISTS);
MappingSession.registerEntity(MyEntity.class); //Works
MappingSession.registerPackage("my.package.name"); //Doesn't work
MappingSession.registerDatabase(db);
MappingSession.start(); |
@ragunathjawahar we are aware of the issue. Unfortunately classloading mechanism is kind of different in Dalvik VM than JVM. Therefore we are having issues, @0ffffffffh is working on it. Until that time, try to use |
@ahmetalpbalkan, anyways great job, I'll keep following orman closely. |
I don't know if this is the right place for this...
I'm trying to create a simple android project using orman but can't get my entities mapped.
I have all my entities under the "br.com.jera.shoplist.model" package and when i try to start the session i get this error:
Before anybody asks, all my entities have the @entity annotation.
I'm using this in my activty to start the session:
Any idea? am I missing something?
The text was updated successfully, but these errors were encountered: