ervandew / eclim

Expose eclipse features inside of vim.
http://eclim.org
GNU General Public License v3.0
1.04k stars 127 forks source link

MaxPermSize options in java 1.8 is deprecated and causes un-attended install to break #431

Open si-mikey opened 9 years ago

si-mikey commented 9 years ago

Since java 1.8 is recommended for eclim then MaxPermSize option should be removed from the build process.

eclim_2.5.0.jar!/installer.xml:134: java.lang.RuntimeException: error: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 gogo: InterruptedException: sleep interrupted java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at org.apache.felix.gogo.shell.Activator.run(Activator.java:72) at java.lang.Thread.run(Thread.java:745) out: An error has occurred. See the log file

ervandew commented 9 years ago

Since java 1.8 is recommended for eclim

Where did you see that? The docs still reference "Java Development Kit 1.7 or greater", so I don't want to remove that option and affect users that cannot upgrade to java 1.8 yet.

As for your stack trace, can you provide more info from the log? I think the warning message regarding MaxPermSize is a red herring, and not the actual problem resulting in an error. I think the installer is just showing that warning under error: since the subprocess wrote that message to stderr, not because it was the cause of the failure.

ervandew commented 9 years ago

I just tested out the unattended install with java 1.8 on linux and didn't run into any issues. When I get a chance I'll try it out on OSX, but if you can provide the full log, that might help me see what problem you are running into.

emilio commented 9 years ago

I also had this issue with the GUI installer (with openJDK 8 on ubuntu 15.04).

Cloning the repo and running ant deploy allowed me to install eclim.

lycis commented 9 years ago

Hi,

Refer to this document by Oracle: http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html

MaxPermSize was removed from the JVM. Maybe this was not done on a non-Oracle implementation of the JVM on Linux. I experience the same issue with the installer on Windows.

ervandew commented 9 years ago

@lycis As the docs note, this is just a warning (emphasis mine):

The command line flags PermSize and MaxPermSize have been removed and are ignored. If used on the command line a warning will be emitted for each.

You can confirm this independent of eclim by creating a simple java file and running it with MaxPermSize set:

public class Test {
  public static void main(String[] args){
    System.out.println("Test");
  }
}

> javac Test.java
> java -XX:MaxPermSize=64m -classpath . Test
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64m; support was removed in 8.0
Test
> echo %errorlevel%
0

Warning emitted, then the program runs successfully with an exit code of 0.

I just ran the eclim installer on windows using oracle's 1.8.0_60-b27 java build and the installer runs just fine. As I stated earlier, seeing that message associated with the installer failing is a red-herring. It only shows up because it was written to stderr. Some other issue is causing the installer to fail, but I can't say what without some logs to look at.

mitermayer commented 8 years ago

Can confirm this issue still happening

jacketattack commented 8 years ago

Also tried installing on osx with both gui and automated install and ran into this issue. Below is log file.

!SESSION 2016-02-03 13:37:29.715 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -application org.eclipse.equinox.p2.director -repository file:///var/folders/3w/k_vw9frd4y19sdkp87fc_q84gk9bgj/T/formic_157026498/update -installIU org.eclim.installer.feature.group
Command-line arguments:  -clean -application org.eclipse.equinox.p2.director -repository file:///var/folders/3w/k_vw9frd4y19sdkp87fc_q84gk9bgj/T/formic_157026498/update -installIU org.eclim.installer.feature.group

!ENTRY org.eclipse.osgi 4 0 2016-02-03 13:37:29.976
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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:483)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
XiaoLiuAI commented 8 years ago

The same issue. With the eclipse home folder set to ~/.p2/pool/ since pointing to /Applications/Eclipse.app/ does not work.

alexmsmartins commented 8 years ago

Here is another instance of the same problem.

This is the linux version and java version.

alexandre@lt15713:eclipse-installer$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
alexandre@lt15713:eclipse-installer$ ~/eclipse/java-mars/eclipse/

This is the error when doing a gui install.

alexandre@lt15713:eclipse-installer$ java -jar ~/Downloads/eclim_2.5.0.jar 
Buildfile: installer.xml
2016-05-05 22:54:35,850 INFO  [org.formic.Installer] Running Installer...
2016-05-05 22:54:45,059 INFO  [org.formic.util.CommandExecutor] which gvim
2016-05-05 22:54:45,082 INFO  [org.eclim.installer.step.VimStep] which gvim: /usr/bin/gvim
2016-05-05 22:54:45,111 INFO  [org.formic.util.CommandExecutor] vim -f -X -u NONE -U NONE --cmd redir! > /tmp/eclim_installer4552228205912571786.tmp | silent! echo &rtp | quit
2016-05-05 22:55:05,698 INFO  [org.formic.util.CommandExecutor] vim --version
2016-05-05 22:55:08,657 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar /home/alexandre/.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar -clean -application org.eclipse.equinox.p2.director -repository file:///tmp/formic_1902985297/update -installIU org.eclim.installer.feature.group
2016-05-05 22:55:09,248 WARN  [org.eclim.installer.step.EclipseInfo] Error installing eclim installer feature, attempting uninstall/reinstall.
2016-05-05 22:55:09,249 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar /home/alexandre/.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar -clean -application org.eclipse.equinox.p2.director -repository file:///tmp/formic_1902985297/update -uninstallIU org.eclim.installer.feature.group
2016-05-05 22:55:09,852 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar /home/alexandre/.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar -clean -application org.eclipse.equinox.p2.director -repository file:///tmp/formic_1902985297/update -installIU org.eclim.installer.feature.group
java.lang.RuntimeException: error: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
 out: An error has occurred. See the log file
/home/alexandre/.p2/pool/configuration/1462485308933.log.
    at org.eclim.installer.step.EclipseInfo.installInstallerPlugin(EclipseInfo.java:183)
    at org.eclim.installer.step.EclipseInfoStep$1.run(EclipseInfoStep.java:67)
    at foxtrot.AbstractWorkerThread$1.run(AbstractWorkerThread.java:40)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:36)
    at foxtrot.workers.SingleWorkerThread.run(SingleWorkerThread.java:199)
    at foxtrot.workers.SingleWorkerThread.run(SingleWorkerThread.java:182)
    at java.lang.Thread.run(Thread.java:745)
Installer Context (Please include in bug reports):
  eclipse.home=/home/alexandre/.p2/pool
  vim.files=/home/alexandre/.vim
  vim.skip=false
2016-05-05 22:55:30,995 INFO  [org.formic.Installer] Installer Finished.
2016-05-05 22:55:30,998 DEBUG [ANT] 
BUILD SUCCESSFUL
Total time: 55 seconds
2016-05-05 22:55:31,010 WARN  [ANT]      [echo] Installation canceled.
alexandre@lt15713:eclipse-installer$ 

And this is the content of the /home/alexandre/.p2/pool/configuration/1462485308933.log mentioned in the error message.

alexandre@lt15713:eclipse-installer$ cat /home/alexandre/.p2/pool/configuration/1462485308933.log 
!SESSION 2016-05-05 22:55:08.813 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -application org.eclipse.equinox.p2.director -repository file:///tmp/formic_1902985297/update -installIU org.eclim.installer.feature.group
Command-line arguments:  -clean -application org.eclipse.equinox.p2.director -repository file:///tmp/formic_1902985297/update -installIU org.eclim.installer.feature.group

!ENTRY org.eclipse.osgi 4 0 2016-05-05 22:55:09.199
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
alexandre@lt15713:eclipse-installer$ 

If you need any more info to reproduce the problem, let me know.

loretoparisi commented 7 years ago

When using Java 1.8 you have to replace -XX:MaxPermSize with -XX:MaxMetaspaceSize.