Nodeclipse / nodeclipse

Nodeclipse-1 : Eclipse plugin for Node.js, PhantomJS development (Nodeclipse core plugin); Maven and Gradle (with Android) plugins
https://nodeclipse.github.io/
158 stars 78 forks source link

All nodejs apps fail to run (JDK 6 only?) #72

Open seanodell opened 11 years ago

seanodell commented 11 years ago

I let Eclipse upgrade nodeclipse to 0.5 and my .js apps no longer run inside Eclipse. The console window just flickers briefly and says "terminated" in the title (normal when a console app terminates). I can run them from the command-line, and I've not changed any of my code since the upgrade. I double-checked that the path to node.exe is correct under preferences. I'm running node v0.8.21 (need to run a slightly older version for compatibility with production platform). I uninstalled and re-installed nodeclipse; same thing. I'm not getting any errors, either.

Steps to reproduce are simple: Make a new basic project with express and listen to any port. Run "npm install" and then "node app.js" and it starts up just fine. Right-click on app.js in Eclipse and Run->Node Application and the console window just flickers and says "terminated".

Let me know if I can provide any additional information or perhaps I should be trying something else.

Thanks,

UPDATE: solved by https://github.com/Nodeclipse/nodeclipse-1/issues/72#issuecomment-25942319

also asked on http://stackoverflow.com/questions/19689501/togglebreakpointstargetfactory-specified-id-is-already-registered

paulvi commented 11 years ago

I ran the same today in one of mine Eclipses. Thanks for letting know. Now I am sure it is not only 1 Eclipse bug.

This issue is very bad. I will announce on website.

paulvi commented 11 years ago

@seanodell

Please give standard info: OS, x32 or x63 , Java version

I got the same error today on Eclipse Kepler running on x32 JVM.

Need to understand clear when & when it is happening.

paulvi commented 11 years ago

The only thing I know now I that on Windows, 32bit JVM:

the first time Node.js app run there are errors in Error Log

0911-050-error

After that there are absolutely no errors even after restart. But Node.js apps finishes promptly in a second as reported.

seanodell commented 11 years ago

Hi Paul,

Thanks for the quick response.

Some details:

Windows 7 (x64) Eclipse Kepler Java 1.6.0_25 (x64) node.js 0.8.21 (both x32 and x64)

Hope this helps! I'll downgrade to 0.4 and will try updating again later. If you need any more information from me, let me know.

paulvi commented 11 years ago

Thank you.

I will be trying to reproduce on other systems. So far it is not clear in what circumstances the issue arise.

If it happens to you again, please open Error Log View (like on the picture above)

Also

The '.log' file from the directory '.metadata' in your workspace

may help a bit

seanodell commented 11 years ago

I was able to reproduce with a fresh install of Kepler; I installed nodeclipse 0.5 first thing, then created a new Node Application project.

I did that, cleared the error log and restarted and have a nice, short capture of the error log. Going to try and submit that somehow. If you'd prefer I email it to you, let me know.

seanodell commented 11 years ago

I don't see a way to attach files, so here's the error log:

!SESSION 2013-09-10 18:11:19.555 ----------------------------------------------- eclipse.buildId=4.3.0.I20130605-2000 java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.nodeclipse.ui 1 0 2013-09-10 18:12:03.930 !MESSAGE templateRoot: C:\Users\MYUSERNAME\Downloads\eclipse-java-kepler-R-win32-x86_64\eclipse\configuration\org.eclipse.osgi\bundles\426\1.cp\common-templates

!ENTRY org.nodeclipse.ui 1 0 2013-09-10 18:12:03.957 !MESSAGE RelativityFileSystemStructureProvider.getContents() called. elemnt=C:\Users\MYUSERNAME\Downloads\eclipse-java-kepler-R-win32-x86_64\eclipse\configuration\org.eclipse.osgi\bundles\426\1.cp\common-templates.settings\com.eclipsesource.jshint.ui.prefs

!ENTRY org.eclipse.egit.ui 2 0 2013-09-10 18:12:04.305 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\MYUSERNAME'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.nodeclipse.ui 1 0 2013-09-10 18:12:04.505 !MESSAGE RelativityFileSystemStructureProvider.getContents() called. elemnt=C:\Users\MYUSERNAME\Downloads\eclipse-java-kepler-R-win32-x86_64\eclipse\configuration\org.eclipse.osgi\bundles\426\1.cp\common-templates\README.md

!ENTRY org.nodeclipse.ui 1 0 2013-09-10 18:12:04.689 !MESSAGE templateRoot: C:\Users\MYUSERNAME\Downloads\eclipse-java-kepler-R-win32-x86_64\eclipse\configuration\org.eclipse.osgi\bundles\426\1.cp\templates

!ENTRY org.nodeclipse.ui 1 0 2013-09-10 18:12:04.692 !MESSAGE RelativityFileSystemStructureProvider.getContents() called. elemnt=C:\Users\MYUSERNAME\Downloads\eclipse-java-kepler-R-win32-x86_64\eclipse\configuration\org.eclipse.osgi\bundles\426\1.cp\templates\hello-world-server.js

!ENTRY org.nodeclipse.ui 1 0 2013-09-10 18:12:04.697 !MESSAGE RelativityFileSystemStructureProvider.getContents() called. elemnt=C:\Users\MYUSERNAME\Downloads\eclipse-java-kepler-R-win32-x86_64\eclipse\configuration\org.eclipse.osgi\bundles\426\1.cp\templates\package.json

!ENTRY org.eclipse.debug.ui 4 120 2013-09-10 18:12:10.004 !MESSAGE org.eclipse.debug.ui.toggleBreakpointsTargetFactory extension failed to load breakpoint toggle target because the specified id is already registered. Specified ID is: org.chromium.debug.ui.ChromiumToggleBreakpointTargetFactory !SESSION 2013-09-11 08:25:40.010 ----------------------------------------------- eclipse.buildId=4.3.0.I20130605-2000 java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.egit.ui 2 0 2013-09-11 08:25:52.249 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\MYUSERNAME'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. !SESSION 2013-09-11 08:27:13.744 ----------------------------------------------- eclipse.buildId=4.3.0.I20130605-2000 java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.egit.ui 2 0 2013-09-11 08:27:26.384 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\MYUSERNAME'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

paulvi commented 11 years ago

!MESSAGE org.eclipse.debug.ui.toggleBreakpointsTargetFactory extension failed to load breakpoint toggle target because the specified id is already registered. Specified ID is: org.chromium.debug.ui.ChromiumToggleBreakpointTargetFactory

Yes, that is what I also seen in one of mine Eclipses.

@tomotaro1065 can you join here.

tomotaro1065 commented 11 years ago

Please wait until this week-end. I still have been so busy this week too.

paulvi commented 11 years ago

Excellent. I also plan to spend some time for Nodeclipse this week-end.

tomotaro1065 commented 11 years ago

I'm sorry I have to go work tomorrow. So I will do for Nodeclipse on Sunday.

tomotaro1065 commented 11 years ago

It couldn't be reproduced on my environment.

Windows 7 (x64) Eclipse Kepler Java 1.7.0_25 (x64) node.js 0.10.17

@PaulVI Could you reproduce it?

By the way, the error of duplication toggle target is not related with this issue.

paulvi commented 11 years ago

I only run into it once on my work PC that has JDK 7 x64 and JDK 6 x32 (on Windows 7)

The problem was on JDK 6 x32.

@seanodell https://github.com/seanodell also run into it on JDK 1.6.0_25 ( but x64)

Can it be only on JDK 6 ?

paulvi commented 11 years ago

I installed JDK 7 x32 ( on my work PC with Windows 7 64x ). That solved this bug for Eclipse win32.

@seanodell Can you check on your PC if JDK 7 helps.

paulvi commented 10 years ago

Close as it can't be reproduced

bjm88 commented 10 years ago

I have this issue. Windows x64, Eclipse 32 bit (b/c of windows I found eclipse 64bit was buggy), and JDK 1.6. patch 24. I tried changing my eclipse.ini to specify Java 7 64 bit and that didn't help. What java version are you referring to? What is declared in JAVA_HOME? what is in eclipse.ini? What is registered as installed jres in eclipse preferences?

node version is v0.10.20. I have not solved this yet through any updates or reinstalls.

bjm88 commented 10 years ago

Ok working now for me. It does seem you have to uninstall nodeclipse then do Java 7 update ( i tried jre 64 bit and jdk 32 bit, both ok), and set that new java 7 in your eclipse.ini file (format is important). Then reinstall nodeclipse and it will work. Example eclipse.ini entry: -vm C:/dev/java7/bin/javaw.exe -vmargs -Xms128m -Xmx1024m

paulvi commented 10 years ago

Hi Benjamin, thank for letting know.

have to uninstall nodeclipse then do Java 7 update ( i tried jre 64 bit and jdk 32 bit, both ok), and set that new java 7 in your eclipse.ini file (format is important). Then reinstall nodeclipse and it will work.

Exact reason unknown, it seems to be combination of Java, Eclipse, Nodeclipse versions.

I can solve by updating Java, Nodeclipse. Eclipse 4.3 works better wit Java 7.

paulvi commented 10 years ago

I ran again with Aptana Studio.

Yes, it can be solved with pointing to JDK 7 in AptanaStudio.ini

-vm
C:/Program Files (x86)/Java/jdk1.7.0_40/bin/javaw.exe
-vmargs

then unistall Nodeclipse and install Nodeclipse. (Used latest Nodeclipse version 0.6)

paulvi commented 10 years ago

Reopen as users keep running into

seanodell commented 10 years ago

I had fallen back to Juno to get back to running order, but then suddenly for no reason the issue I reported originally started happening on my Juno install. I am pretty sure I didn't update the nodeclipse plug-in, so I have no explanation for it.

I upgraded to JDK 1.7 and went back to Kepler (with nodeclipse 0.11) and the problem went away.

It's time we upgraded to JDK 1.7 anyway.

paulvi commented 10 years ago

OK

so it is not related to Eclipse version, nodeclipse update may help, JDK 7 is better ...

It seems like what we knew before. Thanks for updating.