ObjectDB ObjectDB

Spring and packagesToScan


Hi i am trying to configure ObjectDB using Spring JavaConfig but packageToScan is not working. I am getting Type XXX is not found


LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
factory.setLoadTimeWeaver(new InstrumentationLoadTimeWeaver());

        Map jpa = MapBuilder.
                put("javax.persistence.jdbc.url", "objectdb://localhost:6136/mydb.odb",
                        "javax.persistence.jdbc.user", "admin",
                        "javax.persistence.jdbc.password", "admin");


mydb.odb is created but when i try to query "select p from Person p" throw com.objectdb.o.TEX: Type com.myentities.Person is not found.

I need packageToScan because there are many jar files with entities under "com.myentities." package and subpackage


Try to define a persistence unit and declare the class in that persistence unit.

See also this forum thread.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply