0

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??

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
ani
  • 15
  • 5

2 Answers2

0

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.

houssam11350
  • 216
  • 1
  • 9
  • I have solved that issue byb adding slf4j.jar file.But after that I get other errors like- – ani May 11 '12 at 04:39
  • Errors are--- Exception in thread "main" org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] Caused by: java.lang.reflect.InvocationTargetException. Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException. and also I cant see the src folder in opentaps components in eclipse i.e opentaps-1.4/hot-deploy/warehouse/src – ani May 11 '12 at 05:40
0

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

houssam11350
  • 216
  • 1
  • 9
  • I have put ehcache.jar file in buildpath and now its giving me---- Exception in thread "main" org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer] Caused by: java.lang.reflect.InvocationTargetException Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/MethodFilter Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter – ani May 14 '12 at 11:37
  • I import opentaps-1.4 in eclips but I can't see src folders in hot-deploy folder.How to get it? – ani May 17 '12 at 04:41