ObjectDB ObjectDB

java.lang.NoClassDefFoundError: java/time/LocalDate

#1

Following https://www.objectdb.com/tutorial/jpa/eclipse/store

get the message:

Exception in thread "main" [ObjectDB 2.8.6] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) Client VM 1.7.0_51 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/issue/new
com.objectdb.o.InternalException: java.lang.NoClassDefFoundError: java/time/LocalDate
java.lang.NoClassDefFoundError: java/time/LocalDate
    at com.objectdb.o.VUT.<clinit>(VUT.java:71)
    at com.objectdb.o.RAT.l(RAT.java:106)
    at com.objectdb.o.RTT.g(RTT.java:136)
    at com.objectdb.o.TSK.b(TSK.java:146)
    at com.objectdb.o.TSK.c(TSK.java:96)
    at com.objectdb.o.MST.at(MST.java:758)
    at com.objectdb.o.MST.am(MST.java:259)
    at com.objectdb.o.MST.<init>(MST.java:131)
    at com.objectdb.o.MST.ap(MST.java:109)
    at com.objectdb.o.MSF.Z5(MSF.java:190)
    at com.objectdb.o.OMF.s(OMF.java:805)
    at com.objectdb.jpa.EMF.s(EMF.java:130)
    at com.objectdb.o.OMF.x(OMF.java:716)
    at com.objectdb.jpa.EMF.createEntityManager(EMF.java:149)
    at tutorial.Main2.main(Main2.java:12)
Caused by: java.lang.ClassNotFoundException: java.time.LocalDate
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 15 more

by the way, the following codes runs OK.

    public static void main(String[] args) {
        System.out.println(new Date());
    }
edit
delete
#2

I removed the ObjectDB 2.8.6, and use the old version(see attachment), the tutorial runs OK.

edit
delete
#3

By replacing the jar, the old 2011 version, 2.6.0 and 2.7.0 and 2.8.0 runs OK.

But failed on version 2.8.6

edit
delete
#4

Thank you for this report. It seems that starting ObjectDB version 2.8.3 (which adds support of Java 8 date and time types) you have to use Java 8 or above, rather than Java 7 that you are currently using.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.