GithubHelp home page GithubHelp logo

onurciner / ohibernate Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 5.0 10.06 MB

SQLite Connection for Android. ORM tool for Android devices. First ORM with Geometric-Spatial data support for Android operating systems.

Home Page: http://www.onurciner.com

Java 100.00%

ohibernate's Issues

Database problem

I've tried to make a simple CRUD, but when my application start, I receive the errors:

Database Problem -> Error: Failed to open database! unknown error in open
Error: Table could not be deleted : database already closed
Error: database already closed

Problem on table creation

I have such error when try this ORM:

java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
at java.util.ArrayList.get(ArrayList.java:411)
at com.onurciner.OHibernate.tableCreate(OHibernate.java:521)
at com.onurciner.OHibernate.engine(OHibernate.java:432)
at com.onurciner.OHibernate.insert(OHibernate.java:626)

my model:

@Entity(TABLE_NAME = "book", TABLE_OPERATION = Entity.TABLE_OPERATION_TYPE.DROP_AND_CREATE) public class Book{
@Id(PRIMARY_KEY_AUTOINCREMENT = true)
@Column(NAME="id")
private long id;
private String author;
private String title;
private int pagesCount;
private int bookId;

init:

private OHibernate bookDao = new OHibernate<>(Book.class);
public static final String DATABASE_EXTERNAL = Environment.getExternalStorageDirectory().getPath(); 
public static final String DATABASE_SUB = "/folderName/";
public static final String DATABASE_DB_PATH = DATABASE_EXTERNAL + DATABASE_SUB;
public static final String DATABASE_DATA_NAME = "databaseName.sqlite";

@Override
public void onCreate() {
    super.onCreate();
    OHibernateConfig.DB_PATH = DATABASE_DB_PATH; // DATABASE PATH
    OHibernateConfig.DB_NAME = DATABASE_DATA_NAME; // DATABASE NAME
}

java.lang.UnsatisfiedLinkError

java.lang.UnsatisfiedLinkError: No implementation found for void jsqlite.Database.internal_init() (tried Java_jsqlite_Database_internal_1init and Java_jsqlite_Database_internal_1init__)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.