While trying out Automatic redeployment in IntelliJ IDEA, I'm stuck with onRedeploy, My bash script file has the following code:
#!/usr/bin/env bash
mvn package
java -jar target/Test-1.0-SNAPSHOT-fat.jar \
--redeploy="src/**/*.js,src/**/*.java,src/**/*.html,src/**/*.jade" \
--onRedeploy="./run.sh"
So, whenever I run this bash script, I got an error:
Error while executing command run: Cannot inject value for option 'onRedeploy'
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at io.vertx.core.cli.annotations.CLIConfigurator.inject(CLIConfigurator.java:237)
at io.vertx.core.spi.launcher.DefaultCommandFactory.create(DefaultCommandFactory.java:50)
at io.vertx.core.impl.launcher.VertxCommandLauncher.getNewCommandInstance(VertxCommandLauncher.java:162)
at io.vertx.core.impl.launcher.VertxCommandLauncher.execute(VertxCommandLauncher.java:217)
at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:383)
at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:328)
at io.vertx.core.Launcher.main(Launcher.java:48)
Caused by: java.lang.NullPointerException
at io.vertx.core.impl.launcher.commands.RunCommand.setOnRedeployCommandOld(RunCommand.java:154)
... 11 more
I followed up a tutorial from youtube by Clement Escoffier & Paulo Lopes
demonstrating how to develop a realtime web application using vert.x 3
It looks like the Output Stream of yours is null. Obvs a Bug in vertx3 but not really worth fixxing because:
You would see this message: "[WARNING] the 'onRedeploy' option is deprecated, and will be removed in vert.x 3.3. Use " +
"'on-redeploy' instead."
so try "--on-redeploy" instead and tell me if it works.
Jeerze
Related
Hadoop version 2.9.0, Java - 1.8.0_162
When trying to run the example given here: https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html, under standalone operation, I get the following error:
$ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.9.0.jar grep input output 'dfs[a-z.]+'
java.lang.NoSuchMethodError: org.apache.hadoop.util.ProgramDriver.run([Ljava/lang/String;)I
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
I am new to hadoop and not sure how to fix this. I have set the JAVA_HOME in hadoop-env.sh. I am pretty sure that I am using the correct compatible versions of java and hadoop.
Any help will be useful.
Nish,
The error message means that while the runtime was able to find the class ProgramDriver, the function run() is not present.
The most likely reason for this is that you're running an old version of Hadoop that exposed a difference interface in ProgramDriver. About a year ago this method was renamed to run() after being called driver().
The fix for that would be making sure you're running a recent version of Hadoop.
For your reference please check following links they have asked same question.
Error while executing hadoop-mapreduce-examples-2.2.0.jar
Can the hadoop programm which write under the hadoop-2.2.0 run in hadoop-1.2.1?
Why am getting below error in codename one while running or opening theme file. please provide solution on same.
java.io.IOException: Corrupt theme file unrecognized magic number: 0
com.svastikagames.gkquiz.MyApplication.start() Error java.lang.NullPointerException
at com.codename1.ui.util.Resources.openFileImpl(Resources.java:332)
at com.codename1.ui.util.Resources.openFile(Resources.java:261)
at com.codename1.ui.util.Resources.<init>(Resources.java:181)
at com.codename1.ui.util.Resources.open(Resources.java:729)
at com.codename1.ui.util.Resources.openLayered(Resources.java:694)
at com.codename1.ui.util.Resources.openLayered(Resources.java:658)
at generated.StateMachineBase.startApp(StateMachineBase.java:59)
at generated.StateMachineBase.<init>(StateMachineBase.java:31)
at generated.StateMachineBase.<init>(StateMachineBase.java:124)
at userclasses.StateMachine.<init>(StateMachine.java:236)
at com.svastikagames.gkquiz.MyApplication.start(MyApplication.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.codename1.impl.javase.Executor$1$1.run(Executor.java:100)
at com.codename1.ui.Display.processSerialCalls(Display.java:1149)
at com.codename1.ui.Display.mainEDTLoop(Display.java:966)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Usually this error means the file is 0 length and got corrupted at some point due to an unclear reason.
If the file is of 0 length there is nothing we can do to help recover its content unless you are using the XML team mode.
If you are using that then just launch the designer tool from command line and edit the theme it should actually work since it loads the resources from the XML's under the res directory and not the res file itself. If it prints out errors during save these might help you narrow down the problem and you can also refer these errors to us.
In order to launch the designer from command line use this on Unix/Linux/Mac:
java -jar ~/.codenameone/designer_1.jar
And on Windows:
java -jar MY_USER_DIRECTORY\.codenameone\designer_1.jar
I try to install ruby runtime, rvm, cucumber plugins in Jenkins,
When I am installing ruby runtime plugin, I meet this error:
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install ruby-runtime plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:487)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
... 5 more
Caused by: java.io.IOException: Failed to initialize
at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:441)
at hudson.PluginManager.dynamicLoad(PluginManager.java:478)
... 6 more
Caused by: java.lang.ClassCircularityError: org/jruby/RubyClass
at java.lang.Class.forName0(Native Method)
...
How to fix it? Thanks in advance
It's a known bug.
There is a workaround:
in /etc/default/jenkins
-Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true
JAVA_ARGS="$JAVA_ARGS -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true"
At the moment there is no definitive solution as you can see.
On Windows,
Adding argument
-Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true
in jenkins.xml file worked for me as #lvthillo stated.
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true -jar "%BASE%\jenkins.war" --httpPort=8081 --webroot="%BASE%\war"</arguments>
On OSX I had to edit /Library/Application Support/Jenkins/jenkins-runner.sh
to add these lines at a point after javaArgs was defined
# workaround for ruby runtime install issue
# per http://stackoverflow.com/questions/33883551/error-installing-ruby-runtime-in-jenkins
javaArgs="$javaArgs -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true"
There is probably a more mac-ish way to do this.
Upon rebooting Jenkins, the ruby runtime plugin, which was already downloaded, started working, as did the also-downloaded rvm plugin, which is the one I was after.
I solved it by changing java version to 8th.
Maybe there is a problem with java 11 compatibility issues.
1- https://www.liquidweb.com/kb/install-java-8-on-centos-7/
2- On Centos delete all ruby plugin in /var/lib/jenkins/plugins
3- download ruby-runtime.hpi plugin from https://updates.jenkins-ci.org/download/plugins/ruby-runtime/
4- Upload Plugin in jenkins /pluginManager/advanced.
Adding -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true in jenkins.xml file doesn't work for me (Windows, Jenkins 2.277.1).
So I just deleted all files for ruby-runtime from Plugins folder (you need to shutdown Jenkins service) and start Jenkins again.
For me, installing java 8 solved the problem. After that I was able to install the ruby-runtime plugin.
Environment: Debian 10
I did everything but i cant run play :/ so this is my error snapshot.Java 1.8 isntalled..
i tried brew also same end. if its possible to know whats is problem please help. thanks in advance.
sudo play
Password:
java.lang.Error: posix_spawn is not a supported process launch mechanism on this platform.
at java.lang.UNIXProcess$1.run(UNIXProcess.java:105)
at java.lang.UNIXProcess$1.run(UNIXProcess.java:94)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.UNIXProcess.<clinit>(UNIXProcess.java:92)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:183)
at jline.internal.TerminalLineSettings.exec(TerminalLineSettings.java:173)
at jline.internal.TerminalLineSettings.stty(TerminalLineSettings.java:168)
at jline.internal.TerminalLineSettings.get(TerminalLineSettings.java:72)
at jline.internal.TerminalLineSettings.<init>(TerminalLineSettings.java:52)
at jline.UnixTerminal.<init>(UnixTerminal.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:433)
at jline.TerminalFactory.getFlavor(TerminalFactory.java:168)
at jline.TerminalFactory.create(TerminalFactory.java:81)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:227)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:219)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:207)
at play.console.Console$.<init>(Console.scala:14)
at play.console.Console$.<clinit>(Console.scala)
at play.console.Console.run(Console.scala:201)
at play.console.Console.run(Console.scala:198)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.Error: posix_spawn is not a supported process launch mechanism on this platform.
You must install Java JDK 1.7 to use Play! Framework
See https://groups.google.com/forum/#!topic/play-framework/eLTQr-vVolY
everything is working, because of language settings of MacBook Pro, change language and region to USA restart and retry again. I think that it's only in Turkey ,Thats a localized bug i suppose.its ok now working. Thanks for replies
I want to run either editor.sh or snippetCollector.sh under modules/editor/scripts in Sentrick. So I got it by git clone git://sentrick.git.sourceforge.net/gitroot/sentrick/sentrick. That is not a problem. I read the documentation under the doc folder. It says to run either editor.sh or snippetCollector.sh. I go and I do: ./editor.sh and it doesn't work. So I see online that you can also use sh editor.sh which also doesn't work. It says
Exception in thread "main" java.lang.NoClassDefFoundError: de/denkselbst/sentrick/sbeditor/SbEditor
Caused by: java.lang.ClassNotFoundException: de.denkselbst.sentrick.sbeditor.SbEditor
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)
Could not find the main class: de.denkselbst.sentrick.sbeditor.SbEditor. Program will exit.
I have not edited anything so I think that it should work, but it doesn't!!
Inside editor.sh (the one I want to run but can't) it says only this:
java -cp #CP.UNIX# de.denkselbst.sentrick.sbeditor.SbEditor
The problem with snippetCollector.sh is the same
-cp is configuring the CLASSPATH, which should contain a reference to the directory containing your classes. I suspect that's not been set correctly, and this is a useful reference for setting it.
It seems that you are missing some class files while running your code..please check whether you follow all the steps mentioned in your doc..make sure to set the CLASSPATH and try to rerun the program..
It is clear that you are having class path issue. Normaly when I run application in linux envirenment my sh is look like bellow.
#!/bin/sh
THE_CLASSPATH=/home/pathto/lib
java -cp ${THE_CLASSPATH}/required.jar de.denkselbst.sentrick.sbeditor.SbEditor