V8 version in node and ChromeDevTools? - eclipse

My main questions are:
What version of V8 am I running from node 0.4.10?
How can I tell if this version is compatible with ChromeDevTools 0.2.2 in Eclipse?
Background: I've almost got Eclipse working for debugging node.js remotely. In fact it works perfectly (after adding a server proxy) for a simple "Hello World" app, but it won't hook up properly when I add "express" to the mix. The Eclipse error is:
An internal error occurred during: "Debug session initialization:
Remote NodeJS". Exception occured in callback
...which I tracked down to line 61 of the this source code (Thanks to the misspelling of "occured".)
I'd like to eliminate version skew possibilities before going further.
EDIT: Dug the stack trace out of the error log. Hmmm, maybe I have an encoding problem in my server proxy?
java.lang.RuntimeException: Exception occured in callback
at org.chromium.sdk.CallbackSemaphore.tryAcquire(CallbackSemaphore.java:61)
at org.chromium.sdk.CallbackSemaphore.tryAcquireDefault(CallbackSemaphore.java:29)
at org.chromium.sdk.internal.JavascriptVmImpl.getScripts(JavascriptVmImpl.java:33)
at org.chromium.debug.core.model.VProjectWorkspaceBridge.reloadScriptsAtStart(VProjectWorkspaceBridge.java:121)
at org.chromium.debug.core.model.LaunchInitializationProcedure.execute(LaunchInitializationProcedure.java:80)
at org.chromium.debug.core.model.LaunchInitializationProcedure.access$0(LaunchInitializationProcedure.java:64)
at org.chromium.debug.core.model.LaunchInitializationProcedure$1.run(LaunchInitializationProcedure.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.Exception: Exception saved from callback
at org.chromium.sdk.CallbackSemaphore.callbackDone(CallbackSemaphore.java:72)
at org.chromium.sdk.internal.DebugSession$ScriptLoader$2.callbackDone(DebugSession.java:276)
at org.chromium.sdk.internal.tools.v8.BaseCommandProcessor.callThemBack(BaseCommandProcessor.java:136)
at org.chromium.sdk.internal.tools.v8.BaseCommandProcessor.processIncoming(BaseCommandProcessor.java:103)
at org.chromium.sdk.internal.tools.v8.V8CommandProcessor.processIncomingJson(V8CommandProcessor.java:109)
at org.chromium.sdk.internal.StandaloneVmImpl$4.messageReceived(StandaloneVmImpl.java:108)
at org.chromium.sdk.internal.transport.SocketConnection$RegularMessageItem.report(SocketConnection.java:120)
at org.chromium.sdk.internal.transport.SocketConnection$ResponseDispatcherThread.run(SocketConnection.java:206)
Caused by: java.lang.RuntimeException: org.eclipse.core.internal.resources.ResourceException: < is an invalid character in resource name '<eval #83>.chromium'.
at org.chromium.debug.core.util.ChromiumDebugPluginUtil$4.tryCreate(ChromiumDebugPluginUtil.java:247)
at org.chromium.debug.core.util.ChromiumDebugPluginUtil$4.tryCreate(ChromiumDebugPluginUtil.java:1)
at org.chromium.debug.core.util.UniqueKeyGenerator.createUniqueKey(UniqueKeyGenerator.java:22)
at org.chromium.debug.core.util.ChromiumDebugPluginUtil.createFile(ChromiumDebugPluginUtil.java:254)
at org.chromium.debug.core.model.ResourceManager.createAndRegisterResourceFile(ResourceManager.java:106)
at org.chromium.debug.core.model.ResourceManager.addScript(ResourceManager.java:72)
at org.chromium.debug.core.model.VProjectWorkspaceBridge$2.success(VProjectWorkspaceBridge.java:131)
at org.chromium.sdk.internal.DebugSession$ScriptLoader$1$1.call(DebugSession.java:236)
at org.chromium.sdk.internal.DebugSession$ScriptLoader$1.processCall(DebugSession.java:258)
at org.chromium.sdk.internal.DebugSession$ScriptLoader$1.success(DebugSession.java:233)
at org.chromium.sdk.internal.tools.v8.V8Helper$2.success(V8Helper.java:120)
at org.chromium.sdk.internal.tools.v8.V8CommandCallbackBase.messageReceived(V8CommandCallbackBase.java:25)
at org.chromium.sdk.internal.tools.v8.V8CommandCallbackBase.messageReceived(V8CommandCallbackBase.java:1)
at org.chromium.sdk.internal.tools.v8.BaseCommandProcessor$2.call(BaseCommandProcessor.java:99)
at org.chromium.sdk.internal.tools.v8.BaseCommandProcessor$2.call(BaseCommandProcessor.java:1)
at org.chromium.sdk.internal.tools.v8.BaseCommandProcessor.callThemBack(BaseCommandProcessor.java:129)
... 5 more
Caused by: org.eclipse.core.internal.resources.ResourceException: < is an invalid character in resource name '<eval #83>.chromium'.
at org.eclipse.core.internal.resources.Resource.checkValidPath(Resource.java:432)
at org.eclipse.core.internal.resources.File.create(File.java:116)
at org.eclipse.core.internal.resources.File.create(File.java:196)
at org.chromium.debug.core.util.ChromiumDebugPluginUtil$4.tryCreate(ChromiumDebugPluginUtil.java:245)
... 20 more

process.versions in the repl reveals this information:
> process.versions
{ node: '0.4.10', v8: '3.1.8.26', ares: '1.7.4', ev: '4.4', openssl: '1.0.0d' }

There shouldn't be any version-related problem here, at least at initialization stage.
V8 debug protocol is evolving quite slowly.
Unfortunately the message you cite is too general. Do you think you can find a stacktrace somewhere? The message may have 'details' button (but you would probably spot it), also the exception is usually logged. You can try to open a view "General->Error Log" (available in most Eclipse configurations), or you can take a look inside a file in your Eclipse workspace: /.metadata/.log.
The code indicates that there is a cause exception, which is missing from the error message.
Thank you for the spelling error report. :)

Related

RuntimeException trying to run Drools examples

I downloaded Drools 7.46.0.Final and extracted the contents to my local drive. When I try to run the examples from the Linux command line using the provided runExamples.sh script I'm getting the following exception. I've tried with Java 8 and Java 11 (the only versions I have installed). Does this really require Java 6 like the message recommends or is there some other problem here?
I'm new to Drools, so I'm afraid I'm not sure how to troubleshoot this.
UPDATE: interestingly I tried version 7.44.0.Final and that runs fine. So downloaded 7.45.0.Final and that one is broken too. So something changed between 7.44 and 7.45 that's causing this.
10:06:44.154 [main] INFO o.k.a.i.utils.ServiceDiscoveryImpl.processKieService:129 - Cannot load service: org.kie.internal.process.CorrelationKeyFactory
10:06:44.157 [main] ERROR o.k.a.i.utils.ServiceDiscoveryImpl.processKieService:131 - Loading failed because There already exists an implementation for service org.drools.core.reteoo.KieComponentFactoryFactory with same priority 0
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.drools.dynamic.DynamicServiceRegistrySupplier.get(DynamicServiceRegistrySupplier.java:32)
at org.drools.dynamic.DynamicServiceRegistrySupplier.get(DynamicServiceRegistrySupplier.java:23)
at org.kie.api.internal.utils.ServiceRegistry$Impl.getServiceRegistry(ServiceRegistry.java:88)
at org.kie.api.internal.utils.ServiceRegistry$ServiceRegistryHolder.<clinit>(ServiceRegistry.java:47)
at org.kie.api.internal.utils.ServiceRegistry.getInstance(ServiceRegistry.java:39)
at org.kie.api.internal.utils.ServiceRegistry.getService(ServiceRegistry.java:35)
at org.kie.api.KieServices$Factory$LazyHolder.<clinit>(KieServices.java:358)
at org.kie.api.KieServices$Factory.get(KieServices.java:365)
at org.kie.api.KieServices.get(KieServices.java:349)
at org.drools.examples.DroolsExamplesApp.<init>(DroolsExamplesApp.java:59)
at org.drools.examples.DroolsExamplesApp.main(DroolsExamplesApp.java:52)
Caused by: java.lang.RuntimeException: Unable to build kie service url = jar:file:/home/davek/apps/drools-distribution-7.46.0.Final/examples/binaries/drools-examples-7.46.0.Final.jar!/META-INF/kie.conf
at org.kie.api.internal.utils.ServiceDiscoveryImpl.registerConfs(ServiceDiscoveryImpl.java:105)
at org.kie.api.internal.utils.ServiceDiscoveryImpl.lambda$getServices$1(ServiceDiscoveryImpl.java:83)
at java.util.Optional.ifPresent(Optional.java:159)
at org.kie.api.internal.utils.ServiceDiscoveryImpl.getServices(ServiceDiscoveryImpl.java:81)
at org.kie.api.internal.utils.ServiceRegistry$Impl.<init>(ServiceRegistry.java:60)
at org.drools.dynamic.DynamicServiceRegistrySupplier$LazyHolder.<clinit>(DynamicServiceRegistrySupplier.java:27)
... 11 more
Caused by: java.lang.RuntimeException: There already exists an implementation for service org.drools.core.reteoo.KieComponentFactoryFactory with same priority 0
at org.kie.api.internal.utils.ServiceDiscoveryImpl$PriorityMap.put(ServiceDiscoveryImpl.java:222)
at org.kie.api.internal.utils.ServiceDiscoveryImpl.processKieService(ServiceDiscoveryImpl.java:124)
at org.kie.api.internal.utils.ServiceDiscoveryImpl.registerConfs(ServiceDiscoveryImpl.java:101)
... 16 more
Unfortunately this is a known issue that I fixed with this commit.
Upcoming Drools 7.47.0.Final (to be released next week) won't suffer of this.
Switching to version 8.16.0.Beta or newer resolved this for me

Issue "Exception in thread "main"# START NON-TRANSLATABLEjava.lang.NoClassDefFoundError: G€“Xmx3072m" (MyEclipse 12.0 Blue & Websphere7)

I am using MyEclipse 14.0 Blue & Websphere7. I am trying to deploy into the Websphere via Server tab, and when it starts to deploy I am getting below issue.
****Exception in thread "main"# START NON-TRANSLATABLEjava.lang.NoClassDefFoundError: G€“Xmx3072m
Caused by: java.lang.ClassNotFoundException: G€“Xmx3072m
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
Could not find the main class: GÇôXmx3072m. Program will exit.****
Any suggestion to resolve this issue?
I think, you have typo in your jvm configuration so it thinks max heap size param (-Xmx3072m) is a classpath variable, please check configuration.
I had a similar problem and fixed it by fixing the global PATH variable.
One variable had two quotes around it which messed up the path for the websphere...
A second thing would be to check for any characters that would be invalid for batch files or scripts in the operating system (because your problem seems to be encoding related)
Some more hints you may find here.

Running Play 2.4.x Locally Yields: java.lang.IllegalArgumentException: port out of range:-1

While trying to start my Play app locally I am getting a
java.lang.IllegalArgumentException: port out of range:-1
exception followed by a
(*:playRun) java.lang.reflect.InvocationTargetException
message. I can see in the trace the invalid port arg being sent (..../Scala/launcher/sbt-launch.jar" xsbt.boot.Boot "~run -1") but cannot find where to update this argument. There has to be somewhere to override default values. And... No matter what is in the application.conf (http.port) or what I pass on the command line -Dhttp.port I still get the same error. Any info would be enormously appreciated.
I had the same exception and I was in touch with the IntelliJ support team, and got the message it was a bug, because of the https protocol in the open browser field. The url parser cannot handle https and thus not extract the port number.
Bug report here: https://youtrack.jetbrains.com/issue/SCL-9971

Error running hadoop application in Eclipse on Windows

I'm trying to set up an Eclipse environment for developing and debugging hadoop. I'm following Tom White's Definitive Hadoop 3rd ed. What I would like to do is get the MaxTemperature app working locally on my Windows within Eclipse before moving it to my Hortonworks sandbox VM. The comment on page 158 about using the local job runner seems to be what I want. I don't want to set up a full hadoop implementation on Windows. I'm hoping with the right config params I can convince it to run as a java application inside Eclipse.
Windows: 7
Eclipse: Luna
Hadoop: 2.4.0
JDK: 7
When I set the Run configuration for MaxTemperatureDriver (Source code on page 157) to
inputfile outputdir foo (deliberate bogus 3rd parameter)
I get the usage message so I know I'm running my program with those params.
If I remove the bogus third param I get
Exception in thread "main" java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.
at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:120)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:75)
at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1255)
at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1251)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at org.apache.hadoop.mapreduce.Job.connect(Job.java:1250)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1279)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1303)
at mark.MaxTemperatureDriver.run(MaxTemperatureDriver.java:52)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at mark.MaxTemperatureDriver.main(MaxTemperatureDriver.java:56)
I've tried inserting -conf but it seems to be ignored. There is no error message if I specify a nonexistent path.
I've tried inserting -fs file:/// -jt local, but it makes no difference
I've tried inserting -D mapreduce.framework.name=local
I've tried specifying the input and output with the file: format
Note. I'm not asking about how to configure eclipse to connect to a remote Hadoop installation. I want the application to run within eclipse.
Is this possible? Any ideas?
Additional info:
I turned on debugging. I saw:
582 [main] DEBUG org.apache.hadoop.mapreduce.Cluster - Trying ClientProtocolProvider : org.apache.hadoop.mapred.YarnClientProtocolProvider
583 [main] DEBUG org.apache.hadoop.mapreduce.Cluster - Cannot pick org.apache.hadoop.mapred.YarnClientProtocolProvider as the ClientProtocolProvider - returned null protocol
I'm wondering not why YarnClientProtocolProvider failed, but why it didn't try LocalClientProtocolProvider.
New info:
It seems that this is an issue with Hadoop 2.4.0. I recreated my environment with Hadoop 1.2.1, followed the instructions in
http://gerrymcnicol.com/index.php/2014/01/02/hadoop-and-cassandra-part-4-writing-your-first-mapreduce-job/
added the Windows hack from
http://bigdatanerd.wordpress.com/2013/11/14/mapreduce-running-mapreduce-in-windows-file-system-debug-mapreduce-in-eclipse
and it all started working.
Following blog will be useful.
Running mapreduce in Windows filesystem

ClickOnce: DeploymentDownloadException: The operation has timed out

Symptom: ClickOnce installation starts and stops after around 600 kB (out of 2 MB).
Progress bar always stops at the same value (tried ten times).
Error log says that The operation has timed out (in inner exception) and fails with "DeploymentDownloadException (Unknown subtype)".
Error log details (irrelevant information trimmed):
ERROR DETAILS
Following errors were detected during this operation.
System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://fullpath/name.dll.deploy did not succeed.
- Source: System.Deployment
- Stack trace: at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(Downloa
dQueueItem next)
at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState)
--- Inner Exception ---
System.Net.WebException
- The operation has timed out.
- Source: System
- Stack trace:
at System.Net.ConnectStream.Read(Byte[] buffer,
Int32 offset, Int32 size)
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(Downloa
dQueueItem next)
This only happens for two customers. The install works OK for thousands of others. I have found numerous posts via google with no answer or generic "firewall is the issue" or "customer was using dialup".
Has anyone solved this? Is this a ClickOnce bug?
Disabling firewall software on the machine did not help because a hardware firewall installed on the network was the cause (FortiGate 30B).
I doubt that it's a bug. However, it seems like it gets stuck at one file in the deployment path. Maybe it is a type of file that is blocked by a firewall.
I would just remove all files but one from the build and see if that gets downloaded ok, and then add the rest of the files one by one (or maybe type by type) and see at what file ClickOnce gets stuck downloading.
If that doesn't seem to do anything, I'd build a dummy app and deploy it with ClickOnce and see if it installs at all on the customer's box.