Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GreenDao freemaker.jar is missing

I just downloaded the new jar file for GreenDao in order to create my DB for the app I'm building.

After going through all the process of modeling my entities and the connections between them, I tried to run the generator project but got this error for the line that generated the DB:

Exception in thread "main" java.lang.NoClassDefFoundError: freemarker/template/ObjectWrapper
    at com.glide.talk.glide.model.generator.Model.main(Model.java:29)
Caused by: java.lang.ClassNotFoundException: freemarker.template.ObjectWrapper
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 1 more

The line this happened in is: new DaoGenerator().generateAll(schema, src); and I have in the buildpath and in the lib folder only the greendao-generator-1.3.0.jar file.

Any thoughts or solutions will be very helpful.

p.s. is it ok to use the freemaker.jar that was in version 1.2?

EDIT: for now, I downloaded this version from sourceforge and am hoping this is actually what I need to use.

like image 351
thepoosh Avatar asked May 19 '13 11:05

thepoosh


1 Answers

I had a similar problem and downloaded the jar from http://mvnrepository.com/artifact/org.freemarker/freemarker which worked out well.

When you take a look at build.gradle in the DaoGenerator-project, you'll find a dependency that points exactly to this artifact. I guess using gradle to build your project automatically downloads these dependencies just like maven does. If you do not wish to use either, it's probably fine to download and include the artifacts manually.

like image 91
Father Stack Avatar answered Oct 21 '22 12:10

Father Stack