Opentaps ERP- ClassNotFoundException error during running - erp

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

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.

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

Related

Not able to generate Partner.jar

I want to integrate java with salesforce for that I'm trying to generate partner.jar, I'm following this link
Introduction to the Force.com Web Services Connector
I'm using Partner WSDL API. I'm stuck with generating Partner.jar file,
need some help here ..!!
I'm using command my command is **java -classpath J:\Practice\force-wsc-36.1.1.jar com.sforce.ws.tools.wsdlc J:\Practice\Partner.wsdl .\Partner.jar
now the exception is
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4
/STGroupDir
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.stringtemplate.v4.STGroupDir
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)
You are trying to generate partner.jar using WSDL file and you are using "force-wsc-36.1.1.jar" (File as Web Service Connector).
As of WSC-36 connector required an additional framework to generate "partner.jar" call "StringTemplate engine framework".
Download latest "StringTemplate binary" jar file using below link: String Template jar file
Put that String template jar, wsc jar and WSDL files in one location.
Open CMD
Go to the directory where you put your all files.
Fire below command to generate a partner.jar file.
java -classpath force-wsc-36.1.1.jar;ST-4.0.8.jar com.sforce.ws.tools.wsdlc partner.wsdl partner.jar
Syntax: Java -classpath [WSC jar file];[String template jar file] com.sforce.ws.tools.wsdlc [Partner.wsdl file] [Ouput file name with .jar extation]
Create a folder named wsdl in your C:\ drive and copy following jars in to it:
force-wsc-54.0.0.jar ST-4.3.1.jar rhino-1.7.14.jar antlr-4.0-complete.jar
Open cmd and run:
java -classpath C:\wsdl\force-wsc-54.0.0.jar;C:\wsdl\ST-4.3.1.jar;C:\wsdl\rhino-1.7.14.jar;C:\wsdl\antlr-4.0-complete.jar com.sforce.ws.tools.wsdlc partner.wsdl.xml C:\wsdl\sf-partner.jar
Note: C:\wsdl\sf-partner.jar is a generated .jar stub file

Usergrid-InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist

I install "Usergrid 2.1" follow by link
https://usergrid.apache.org/docs/installation/ug2-deploy-to-tomcat.html
But when I start tomcat, it throw exception as
(JobSchedulerService.java:118)
at com.google.common.util.concurrent.AbstractScheduledService$1$1.run(Ab
stractScheduledService.java:174)
at com.google.common.util.concurrent.Callables$3.run(Callables.java:95)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not
exist)
at org.apache.cassandra.thrift.Cassandra$set_keyspace_result.read(Cassan
dra.java:5540)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at org.apache.cassandra.thrift.Cassandra$Client.recv_set_keyspace(Cassan
dra.java:540)
at org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.j
ava:527)
at me.prettyprint.cassandra.connection.client.HThriftClient.getCassandra
(HThriftClient.java:110)
How to resolve my issue?
After struggling with this problem for very long, i realized that in my case elasticsearch 1.7.6 as well as 2.x does not start without an additional config in /etc/default/elasticsearch.
Just adding this line START_DAEMON=true in the file and restarting elasticsearch worked for me on Ubuntu 16.04.
Now able to connect to setup usergrid successfully. Had searched for the answer everywhere but could not find any reference till now. Hence thought of posting.
The stack I am using is
1. apache-usergrid-2.1.0
2. cassandra 3.7
3. tomcat8
4. elasticsearch 2.4.4
I had almost given up on using usergrid due to this issue, Hope this is one of the solution that might help anyone looking for this issue.

Jenkins JBehave Plugin Installation failed ClassNotFoundException dtkit.. TestTypeDescriptor

i want to install jbehave plugin for jenkins, but i got following error:
Failed to scout org.jbehave.jenkins.JBehavePluginType$DescriptorImpl
java.lang.InstantiationException: java.lang.NoClassDefFoundError: com/thalesgroup/dtkit/metrics/hudson/api/descriptor/TestTypeDescriptor
at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:663)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:339)
at hudson.ExtensionList.load(ExtensionList.java:300)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
at hudson.ExtensionList.iterator(ExtensionList.java:143)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:338)
at hudson.ExtensionList.load(ExtensionList.java:300)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
at hudson.ExtensionList.getComponents(ExtensionList.java:154)
at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:182)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
at hudson.ExtensionList.iterator(ExtensionList.java:143)
at org.jenkinsci.plugins.xunit.AliasInitializer.addAliases(AliasInitializer.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:886)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/thalesgroup/dtkit/metrics/hudson/api/descriptor/TestTypeDescriptor
I installed latest xunit plugin. Try latest stable jbehave (3.9) from link! and latest beta (4.0-beta-11) unsuccessfully. Furthermore i tried to add dtkit plugin. Have Jenkins 1.588 installed. I looked into source code, seems that they used a package which doesnt exists anymore link! What to do?
JUnitReporter was no solution. It only was made for eclipse. Only Solution was to change plugin by hand. I modified pom: changed xunit-plugin version from 1.6 to 1.9 and adapt imports. if someone has same issue here is hpi file: jbehaveplugin-modified
Have you followed the order required by JBehave plugin installation as described here: https://github.com/jbehave/jbehave-core/tree/master/jbehave-jenkins-plugin? It requires to install XUnit BEFORE JBehave plugin.
Also, I'd suggest to try with and older version from Jenkins, the last LTS, for example (1.580.1).
I created PR 118 to fix this issue. See also JBEHAVE-1160 for the Jira issue I created for this.

jenkins critical error after plugin update

I attempted to update a couple of my jenkins plugins (don't remember which) but got hung. After about 15 mins, I decided to restart the jenkins server. This is what I get on the jenkins UI:
org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:894)
at jenkins.model.Jenkins.<init>(Jenkins.java:796)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.model.Hudson.<init>(Hudson.java:77)
at hudson.WebAppMain$2.run(WebAppMain.java:214)
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124)
at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:883)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
... 8 more
Caused by: java.lang.NoClassDefFoundError: hudson/PluginManager$PluginUpdateMonitor
at hudson.maven.PluginImpl.init(PluginImpl.java:54)
... 13 more
Caused by: java.lang.ClassNotFoundException: hudson.PluginManager$PluginUpdateMonitor
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 java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 14 more
I attempted to update the war from 1.486 to 1.502 but no change in behavior. What can I do to get Jenkins operational again?
It's a known bug.
Copy/pasted for reference:
Start 1.490 on a clean home dir, then ask to upgrade the Maven plugin to version 1.491, and restart. After the restart, there are linkage errors from the Maven plugin, predictably enough (since it is using 1.491+ core APIs); but all of Jenkins fails to start, making it impossible to use the GUI to back out the update. (Workaround: delete $JENKINS_HOME/plugins/maven-plugin.jpi.pinned.)
Didn't work for me, so I just deleted every $JENKINS_HOME/plugins/maven-plugin* file.
Done.
I got the Same Error When Trying to Update the Plugins & Delete \Unpin some Plugins at the Same time.
Finally was able to Solve the issue by, Deleting all the "DISABLED" files in Plugins folder, restored back all the Maven files (if deleted on suggestion by previous Solutions), restarted the Jenkins Instance.
Understood this is because of Conflict with Plugins loading.
None of the above mentioned method is working for me.
Workaround: delete $JENKINS_HOME/plugins/maven-plugin.jpi.pinned
Deleting all the "DISABLED" files in Plugins folder, restored back all the Maven files
As per https://issues.jenkins-ci.org/browse/JENKINS-43446 :
I downgraded my maven to version 3.3.9 and It worked for me.

Some issue with AntBuilder?

When i am deploying grails application, it's show classnotfound Exception in AntBuilder class?. Do i need to add any jar files to project? Thanks in advance.
java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.tools.ant.Project.initProperties(Project.java:308)
at org.apache.tools.ant.Project.init(Project.java:295)
at com.cabot.reader.BookController$_closure5.doCall(BookController.groovy:109)
at com.cabot.reader.BookController$_closure5.doCall(BookController.groovy)
at java.lang.Thread.run(Unknown Source)
The Ant jars are available in run-app because they're needed to run the scripts. But the jars aren't included in a war because in general Ant isn't used by the web app. But you can include them by declaring a dependency in grails-app/conf/BuildConfig.groovy:
dependencies {
compile 'org.apache.ant:ant:1.7.1'
compile 'org.apache.ant:ant-launcher:1.7.1'
}
You might want to check out http://grails.org/plugin/grails-ant.
It does what Burt suggests, plus adds an ant dynamic property to your controller and other artifacts.

Resources