Apache oozie database tool - java

I've been following these instructions and got as far as "Creating the Oozie Database Schema"; I chose to run the tool and tried
$ sudo -u oozie /usr/lib/oozie/bin/ooziedb.sh create -run
, which returned the following errors:
Validate DB Connection
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.10)
at org.apache.oozie.service.Services.setServiceInternal(Services.java:360)
at org.apache.oozie.service.Services.(Services.java:108)
at org.apache.oozie.tools.OozieDBCLI.getJdbcConf(OozieDBCLI.java:161)
at org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:461)
at org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:469)
at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:179)
at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:118)
at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:64)
Caused by: java.lang.NullPointerException
at org.apache.oozie.service.Service.(Service.java:60)
at java.lang.Class.initializeClass(libgcj.so.10)
...8 more
What might be the cause of this and how could I fix this?

edit the oozie-env.sh at last and append export JAVA_HOME=/usr/local/jdk1.7 the java_home is yourself javapath

Related

Hybris, ant clean all command failes with message Error occurred during initialization of VM

I'm getting this error while trying to build my Hybris project via ant clean all && ./hybrisserver.sh debug:
Error occurred during initialization of VM
java.lang.Error: Could not create SecurityManager
at java.lang.System.initPhase3(java.base#11.0.9.1/System.java:2065)
Caused by: java.lang.ClassNotFoundException: allow
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.9.1/BuiltinClassLoader.java:581)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.9.1/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.9.1/ClassLoader.java:522)
at java.lang.Class.forName0(java.base#11.0.9.1/Native Method)
at java.lang.Class.forName(java.base#11.0.9.1/Class.java:398)
at java.lang.System.initPhase3(java.base#11.0.9.1/System.java:2050)
Maybe I put a typo somewhere (see Caused by: java.lang.ClassNotFoundException: allow
) but I can't find anything and my repo's up to date with master which is correctly working, Is there a way to find the problem?
Note: i have Ubuntu 20.04.5 LTS
Thank you
Solution was simple:
Somehow I lost my setantenv.sh configuration, i had to re-run it in /platform

Mac JDK11: Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/SQLException

New to Java here. Using IntelliJ. I wrote a simple "helloworld" Spring application that compiles just fine, but when I run it receive the following error:
/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/java "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=51884:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -p /Users/winston.kotzan/Development/java-spring-helloworld/bin:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-aop-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-aspects-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-beans-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-context-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-context-indexer-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-context-support-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-core-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-expression-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-instrument-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-jcl-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-jdbc-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-jms-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-messaging-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-orm-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-oxm-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-test-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-tx-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-web-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-webflux-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-webmvc-5.1.3.RELEASE.jar:/Users/winston.kotzan/java/spring-framework-5.1.3/libs/spring-websocket-5.1.3.RELEASE.jar -m SpringHelloWorld/com.wakproductions.MainApp
Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/SQLException
at spring.core#5.1.3.RELEASE/org.springframework.core.Constants.<init>(Constants.java:67)
at spring.beans#5.1.3.RELEASE/org.springframework.beans.factory.xml.XmlBeanDefinitionReader.<clinit>(XmlBeanDefinitionReader.java:102)
at spring.context#5.1.3.RELEASE/org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:83)
at spring.context#5.1.3.RELEASE/org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
at spring.context#5.1.3.RELEASE/org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:622)
at spring.context#5.1.3.RELEASE/org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:518)
at spring.context#5.1.3.RELEASE/org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
at spring.context#5.1.3.RELEASE/org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:85)
at SpringHelloWorld/com.wakproductions.MainApp.main(MainApp.java:8)
Caused by: java.lang.ClassNotFoundException: java.sql.SQLException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 9 more
I suspect that it may have to do with the CLASSPATH. I tried setting the CLASSPATH environment variable, as well as adding this to the java command
-cp /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
But that does not seem to work. Might I have the incorrect CLASSPATH?
The comments about the module-info file led me to some clues. I took notice that IntelliJ seems to have created a module-info.java file with the following contents:
module SpringHelloWorld {
requires spring.context;
}
Did not realizing I was compiling a module. I deleted that file along with everything in the bin directory. Then I was able to run it by the Run menu using this option:
I can run it on the command line via:
java -Dfile.encoding=UTF-8 -classpath /Users/.../java-spring-helloworld/bin:/Users/.../<spring-framework-libs>... com.wakproductions.MainApp

selenium maven tests work on local machine but not on Jenkins

I have some tests in selenium. When I run them using maven on my local machine then everything works fine, but when I try to start them using jenkins I get an error. Can anyone help me out and tell why it works on my machine, and doesnt on Jenkins? Thanks
[SNOWDEN_develop_Selenium_AutoTests] $ java -cp /var/lib/jenkins/maven33-agent.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven /boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools /hudson.tasks.Maven_MavenInstallation/maven/conf/logging jenkins.maven3.agent.Maven33Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven /var/lib/jenkins/slave.jar /var/lib/jenkins/maven33-interceptor.jar /var/lib/jenkins/maven3-interceptor-commons.jar 43010
Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:133)
at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:64)
[SNOWDEN_develop_Selenium_AutoTests] $ /bin/bash -xe /tmp/hudson5734623695552292225.sh
+ cd /var/lib/jenkins/workspace/SNOWDEN_develop_Selenium_AutoTests/snowden-docker
+ ./docker.snowden.sh stop devsel
WORKSPACE: /var/lib/jenkins/workspace/SNOWDEN_develop_Selenium_AutoTests
Docker host : 10.0.0.27:4243 (SNOWDEN-DEV)
Stop docker container snowden_devsel ...
Stoping container snowden_devsel ...
snowden_devsel_tomcat
snowden_devsel_mongodb
ERROR: Failed to parse POMs
java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
at hudson.slaves.Channels.forProcess(Channels.java:115)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
at hudson.maven.ProcessCache.get(ProcessCache.java:236)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE

Cannot run WOInstaller.jar and thus cannot create frameworks in WOLips

I am installing WOLips. I have installed the plugins in Eclipse and everything seems fine (except Goodies won't install). I have tried to run WOInstaller.jar but I get a "connection time out" error:
$ sudo java -jar WOInstaller.jar 5.4.3 $HOME/workspace/WebObjects543/Versions/WebObjects543.
Exception in thread "main" java.net.ConnectException: Connection timed out at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
This is the build recommended for my version of Eclipse on Debian. Any ideas?
I solved it. It was a proxy problem. Using java -Dhttp.proxyHost=10.0.0.0 -Dhttp.proxyPort=8080 -jar etc. it works!

Nutch 2.1 - generator job runtime exception job failed

I am getting the below error when i try to generate urls using the generate command:
GeneratorJob: java.lang.RuntimeException: job failed: name=generate: 1357474131-234134646, jobid=job_local_0001
at org.apache.nutch.util.NutchJob.waitForCompletion(NutchJob.java:54)
at org.apache.nutch.crawl.GeneratorJob.run(GeneratorJob.java:191)
at org.apache.nutch.crawl.GeneratorJob.generate(GeneratorJob.java:213)
at org.apache.nutch.crawl.GeneratorJob.run(GeneratorJob.java:241)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.GeneratorJob.main(GeneratorJob.java:249)
The generate, fetch and parse were working fine, but updatedb was giving this error before sometimes:
Exception in thread "main" java.lang.RuntimeException: job failed: name=update-table, jobid=job_local_0001
at org.apache.nutch.util.NutchJob.waitForCompletion(NutchJob.java:54)
at org.apache.nutch.crawl.DbUpdaterJob.run(DbUpdaterJob.java:98)
at org.apache.nutch.crawl.DbUpdaterJob.updateTable(DbUpdaterJob.java:105)
at org.apache.nutch.crawl.DbUpdaterJob.run(DbUpdaterJob.java:119)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.DbUpdaterJob.main(DbUpdaterJob.java:123)
Now, it is continuously giving generate job failed. What might be the issue? Can it be mysql issue?
The above errors are due to insufficient space on the partition on the server where i have installed . check the answer at Insufficient space for shared memory file when i try to run nutch generate command

Categories

Resources