Domanda

Hi I am new to openTaps ERP development just a day before I started it.I have install a previously done project in my eclips.When I run it it gives me following error.I dont understand that error.

what should be done?

(I am using Postgresql database in it)

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:152)
    at org.opentaps.foundation.infrastructure.Infrastructure.getSessionFactory(Infrastructure.java:120)
    at org.opentaps.common.container.HibernateContainer.start(HibernateContainer.java:109)
    at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:102)
    at org.ofbiz.base.start.Start.startStartLoaders(Start.java:264)
    at org.ofbiz.base.start.Start.startServer(Start.java:313)
    at org.ofbiz.base.start.Start.start(Start.java:317)
    at org.ofbiz.base.start.Start.main(Start.java:400)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 8 more

Anyone knows how to resolve it??

È stato utile?

Soluzione

try to download http://www.slf4j.org/download.html and extract it to some folder, then add the jar file (slf4j-api-1.6.4.jar) to your project build path (http://www.cs.duke.edu/courses/cps004g/fall05/assign/final/addlibrary.html) or http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-%28Java%29 , if another exception appeared related to (slf4j) , try to add all jar files in the (slf4j-1.6.4) folder.

Altri suggerimenti

It seems that there is problem in Ehcache jar file or configuration. ensure that (ehcache-1.6.1.jar) in the build classpath, if not, try to download ehcache-1.6.1.jar.zip from http://www.java2s.com/Code/Jar/e/Downloadehcache161jar.htm then extract it and add it to the build path. or download the last version from http://ehcache.org/downloads/catalog ,

It seems also that opentaps ERP uses the hibernate library that uses the ehcache cache provider , but you have to configure it properly based on the version of hibernate and ehcache as mentioned here (https://forum.hibernate.org/viewtopic.php?f=1&t=1003897&view=previous) or http://forums.terracotta.org/forums/posts/list/4932.page or http://www.bonitasoft.org/forum/viewtopic.php?id=4783

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top