Play framework, typesafe activator: "error loading JNotify watch service: no jnotify in java.library.path" - activator

I am trying to open an existing application through typesafe activator 1.3.
The error message says that JNotify is missing in java library but I've also added jnotify_64bit.dll file to the "/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin" directory. But I'm still facing the error. Below is the log. It's been a while I'm stuck here and I really need some help here.
java.lang.UnsatisfiedLinkError: no jnotify in java.library.path at
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at
java.lang.Runtime.loadLibrary0(Runtime.java:870) at
java.lang.System.loadLibrary(System.java:1122) at
net.contentobjects.jnotify.macosx.JNotify_macosx.(Unknown
Source) at
net.contentobjects.jnotify.macosx.JNotifyAdapterMacOSX.(Unknown
Source) 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:423)
at java.lang.Class.newInstance(Class.java:442) at
net.contentobjects.jnotify.JNotify.(Unknown Source) 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
play.runsupport.JNotifyPlayWatchService$JNotifyDelegate.ensureLoaded(PlayWatchService.scala:168)
at
play.runsupport.JNotifyPlayWatchService$$anonfun$5.apply(PlayWatchService.scala:223)
at
play.runsupport.JNotifyPlayWatchService$$anonfun$5.apply(PlayWatchService.scala:179)
at
scala.util.control.Exception$Catch$$anonfun$withTry$1.apply(Exception.scala:129)
at
scala.util.control.Exception$Catch$$anonfun$withTry$1.apply(Exception.scala:129)
at scala.util.control.Exception$Catch.apply(Exception.scala:102) at
scala.util.control.Exception$Catch.withTry(Exception.scala:129) at
play.runsupport.JNotifyPlayWatchService$.apply(PlayWatchService.scala:179)
at
play.runsupport.PlayWatchService$$anon$1.delegate$lzycompute(PlayWatchService.scala:65)
at
play.runsupport.PlayWatchService$$anon$1.delegate(PlayWatchService.scala:61)
at
play.runsupport.PlayWatchService$$anon$1.watch(PlayWatchService.scala:74)
at play.runsupport.Reloader.(Reloader.scala:268) at
play.runsupport.Reloader$.reloader$lzycompute$1(Reloader.scala:174)
at
play.runsupport.Reloader$.play$runsupport$Reloader$$reloader$1(Reloader.scala:174)
at play.runsupport.Reloader$.startDevMode(Reloader.scala:197) at
play.forkrun.ForkRun$.startServer(ForkRun.scala:82) at
play.forkrun.ForkRun.run(ForkRun.scala:173) at
play.forkrun.ForkRun$$anonfun$settingUp$1.applyOrElse(ForkRun.scala:162)
at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at
play.forkrun.ForkRun.aroundReceive(ForkRun.scala:148) at
akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at
akka.actor.ActorCell.invoke(ActorCell.scala:487) at
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254) at
akka.dispatch.Mailbox.run(Mailbox.scala:221) at
akka.dispatch.Mailbox.exec(Mailbox.scala:231) at
scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at
scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

I was facing the same error of you. In my case, I've cloned a play framework(2.3.x) repository project to run the project.
I actually followed this steps:
sbt clean compile
sbt evicted
set ~run
Now, It's working well!
If this doen't work, try to change to your java and javac to 1.6 version.
Actually, until the Play 2.3 use Java 6.

Related

org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: No ExecutorFactory found to execute the application

I am trying to submit a flink job of version 1.11.3 . The actual application is developed in flink 1.8.1.
Since the Hadoop cluster is 3.2.0 apache I downloaded flink 1.11.3 (flink-1.11.3-bin-scala_2.11.tgz) and tried to submit the job.
while submitting facing the below mentioned exception . I have set the HADOOP parameters :
export HADOOP_CONF_DIR=/etc/hadoop/conf
export HADOOP_CLASSPATH='hadoop classpath'
Is there any changes I need to do it the pom file to overcome this
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: No ExecutorFactory found to execute the application.
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:302)
at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:198)
at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:149)
at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:699)
at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:232)
at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:916)
at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:992)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:992)
Caused by: java.lang.IllegalStateException: No ExecutorFactory found to execute the application.
at org.apache.flink.core.execution.DefaultExecutorServiceLoader.getExecutorFactory(DefaultExecutorServiceLoader.java:84)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1809)
at org.apache.flink.client.program.StreamContextEnvironment.executeAsync(StreamContextEnvironment.java:128)
at org.apache.flink.client.program.StreamContextEnvironment.execute(StreamContextEnvironment.java:76)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1700)
at org.sapphire.appspayload.StreamingJob.main(StreamingJob.java:214)
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.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:288)

Suddenly getting Error in server build process (Codename One)

I cannot remember changing anything on my conputer but since around 18:40 CET I have not been able anymore to send any build to CN1. Here is the error it shows :
java.net.ConnectException: Connexion terminée par expiration du délai d'attente (Connection timed out)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1022)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1020)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1019)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
at sun.net.www.protocol.http.HttpURLConnection.access$100(HttpURLConnection.java:91)
at sun.net.www.protocol.http.HttpURLConnection$8.run(HttpURLConnection.java:1283)
at sun.net.www.protocol.http.HttpURLConnection$8.run(HttpURLConnection.java:1281)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1280)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at com.codename1.build.client.BuildProcess.uploadToS3(BuildProcess.java:305)
at com.codename1.build.client.BuildProcess.sendS3Build(BuildProcess.java:366)
at com.codename1.build.client.BuildProcess.sendRequestToServer(BuildProcess.java:432)
at com.codename1.build.client.CodeNameOneBuildTask.execute(CodeNameOneBuildTask.java:507)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
/home/path/to/myProject/build.xml:338: Error in server build process
BUILD FAILED (total time: 2 minutes 15 seconds)
I did not change the way I am sending the build either, what should I do ?
Any help appreciated,
Regards,
I believe this is related to the Amazon outage people are experiencing world wide. Try again after the issues are figured out at Amazon. I am unable to download my previous builds as well.
You could follow the status here:
https://status.aws.amazon.com/
https://twitter.com/awscloud

Is reference methods supported in Apache Flink 1.0.0?

This code works fine:
.keyBy(value -> value.getSessionUid())
but this
.keyBy(LogItem::getSessionUid)
throw exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:294)
at org.apache.flink.api.java.typeutils.TypeExtractor.getKeySelectorTypes(TypeExtractor.java:253)
at org.apache.flink.api.java.typeutils.TypeExtractor.getKeySelectorTypes(TypeExtractor.java:246)
at org.apache.flink.streaming.api.datastream.KeyedStream.<init>(KeyedStream.java:87)
at org.apache.flink.streaming.api.datastream.DataStream.keyBy(DataStream.java:241)
at streamer_sessions_aggregator.StreamerSessionAggregator.runFlow(StreamerSessionAggregator.java:40)
at streamer_sessions_aggregator.Main.main(Main.java:10)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
As I understand Apache Flink 1.0.0 doesn't support reference methods now. Right?
Flink does currently not support reference methods. Here is the JIRA to add support for it: https://issues.apache.org/jira/browse/FLINK-3138

How to run Storm Topology class through command prompt?

Hi i have a single topology class with main method in it. It starts zookeeper and run in eclispe right click run as java application. But i am trying it to be able to run through batch file i have tried
java -classpath jar-with-classes-and-dependency.jar com.demo.Topology
but this gives me exception like this.
Exception in thread "main" java.lang.NoClassDefFoundError:
backtype/storm/generated/AlreadyAliveException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException:
backtype.storm.generated.AlreadyAliveException
at java.net.URLClassLoader$1.run(Unknown Source)
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)
I think this is about missing any dependency.
Please help in running this topology class.
Try running like this...
pathToStorm/bin/storm jar ./target/jar-with-classes-and-dependency.jar com.demo.Topology.
And remember, you should build your jar before doing this step. You can build your jar by running
mvn clean install inside your storm project where your pom.xml file is located.

Gatling fetching from csv file

I have created a Gatling simulation, by creating a ".har" file from Google Chrome. And I have changed input parameters & trying to fetch data from a ".csv" file.
Now when I run the simulation, how can I check if Gatling simulation has fetched data fields from ".csv" file?
Temporarily lower logging level to DEBUG in conf/logback.xml, you'll see the requests that are being generated.
Gatling has quite good error handling/logging connected to feeders.
When you provide wrong file name or path of your feeder file you will get following error (java.lang.IllegalArgumentException: Could not locate feeder file). Note that tests will not run.
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:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.IllegalArgumentException: Could not locate feeder file: file gatling/src/test/resources/data/wrongFile.csv doesn't exist
at io.gatling.core.feeder.FeederSupport$class.feederBuilder(FeederSupport.scala:53)
at io.gatling.core.Predef$.feederBuilder(Predef.scala:22)
at io.gatling.core.feeder.FeederSupport$class.separatedValues(FeederSupport.scala:44)
at io.gatling.core.Predef$.separatedValues(Predef.scala:22)
at io.gatling.core.feeder.FeederSupport$class.separatedValues(FeederSupport.scala:41)
at io.gatling.core.Predef$.separatedValues(Predef.scala:22)
at io.gatling.core.feeder.FeederSupport$class.csv(FeederSupport.scala:34)
at io.gatling.core.Predef$.csv(Predef.scala:22)
at com.scenario.Scenario.<init>(Scenario.scala:10)
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:423)
at java.lang.Class.newInstance(Class.java:442)
at io.gatling.app.Gatling$.io$gatling$app$Gatling$$$anonfun$1(Gatling.scala:41)
at io.gatling.app.Gatling.run(Gatling.scala:92)
at io.gatling.app.Gatling.runIfNecessary(Gatling.scala:75)
at io.gatling.app.Gatling.start(Gatling.scala:65)
at io.gatling.app.Gatling$.start(Gatling.scala:57)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
at io.gatling.app.Gatling$.main(Gatling.scala:43)
at io.gatling.app.Gatling.main(Gatling.scala)
When your attribute will not matched column name from feeder you will get following error. All tests will end with error.
00:10:07.937 [ERROR] i.g.h.a.s.HttpRequestAction - 'httpRequest-1' failed to execute: No attribute named 'wrongAttributeName' is defined
When you have empty file with feeder data you will get following error.
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:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.IllegalStateException: Feeder is now empty, stopping engine
at io.gatling.core.action.SingletonFeed$$anonfun$receive$1.applyOrElse(SingletonFeed.scala:61)
at akka.actor.Actor$class.aroundReceive(Actor.scala:482)
at io.gatling.core.akka.BaseActor.aroundReceive(BaseActor.scala:23)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
at akka.actor.ActorCell.invoke(ActorCell.scala:495)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
When non of this appear you can be almost sure that everything is ok. But to verify parameters send by Gatling you can check
Gatling logs (change logging level to DEBUG) in logback.xml
<root level="DEBUG">
<appender-ref ref="CONSOLE" />
</root>
And then you will see log similar to
00:13:53.233 [DEBUG] i.g.h.a.s.HttpTx$ - Sending request=Action name uri=http://your-rest-service?param1=value1&param2=value2: scenario=com.scenario.Scenario Scenario name, userId=1
Access logs on your server. In Tomcat instruction you can get for example here

Resources