Posts Tagged ‘IntelliJ IDEA’
IntelliJ IDEA: javac: source release 1.6 requires target release 1.6
Case
After my Java project upgrade from “Tiger” to “Mustang”, I tried to launch a “make module” within IntelliJ IDEA. I got this message
javac: source release 1.6 requires target release 1.6
Fix
In IntelliJ IDEA, go to:
File > Settings > Compiler > Java Compiler > remove > Additional command line parameters >
remove the parameter -target 1.5
sljava.dll / IntelliJ IDEA / ActivIdentity
Case
The administrators tried to install ActivIdentity on my desktop. Then I rebooted my computer and launched IntelliJ IDEA 8.1.4 as usual.
IDEA froze. I tried to launch former versions (8.0, 7.5.4), with the same result. Then I launched the idea.bat
(available in the same folder as the idea.exe
), setting echo on
, to have a little more logs.
Stacktrace
Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: \Program Files\ActivIdentity\SecureLogin\sljava.dll
Complete stacktrace
C:\Program Files\JetBrains\IntelliJ IDEA 8.1.4\bin>"C:\win32app\Java\jdk1.6.0_01\jre\bin\java.exe" " -Xms256m" "-Xmx1024m" "-XX:MaxPermSize=140m" "-Xbootclasspath/p:../lib/boot.jar " "-ea" -Xbootclassp ath/a:../lib/boot.jar -cp "..\lib\bootstrap.jar;..\lib\util.jar;..\lib\jdom.jar;..\lib\log4j.jar;. .\lib\extensions.jar;..\lib\trove4j.jar;C:\win32app\Java\jdk1.6.0_01\lib\tools.jar" com.intellij.ide a.Main java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:126) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: \Program Files \ActivIdentity\SecureLogin\sljava.dll at java.lang.Runtime.load0(Runtime.java:767) at java.lang.System.load(System.java:1005) at com.actividentity.sso.javasso.SSOLoginScriptRunner.(SSOLoginScriptRunner.java:905 ) at com.actividentity.sso.javasso.ConsoleLogger.(Logger.java:54) at com.actividentity.sso.javasso.Logger.(Logger.java:73) at com.actividentity.sso.javasso.awt_swing.JavaSSOHook.(JavaSSOHook.java:32) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:773) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:861) at java.awt.Window.getToolkit(Window.java:1127) at java.awt.Window.init(Window.java:369) at java.awt.Window.(Window.java:407) at java.awt.Frame.(Frame.java:402) at java.awt.Frame.(Frame.java:367) at javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1731) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1808) at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1673) at com.intellij.idea.MainImpl.b(MainImpl.java:8) at com.intellij.idea.MainImpl.a(MainImpl.java:79) at com.intellij.idea.MainImpl.start(MainImpl.java:73) ... 6 more ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: [] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:126) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: \Program Files \ActivIdentity\SecureLogin\sljava.dll at java.lang.Runtime.load0(Runtime.java:767) at java.lang.System.load(System.java:1005) at com.actividentity.sso.javasso.SSOLoginScriptRunner.(SSOLoginScriptRunner.java:905 ) at com.actividentity.sso.javasso.ConsoleLogger.(Logger.java:54) at com.actividentity.sso.javasso.Logger.(Logger.java:73) at com.actividentity.sso.javasso.awt_swing.JavaSSOHook.(JavaSSOHook.java:32) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:773) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:861) at java.awt.Window.getToolkit(Window.java:1127) at java.awt.Window.init(Window.java:369) at java.awt.Window.(Window.java:407) at java.awt.Frame.(Frame.java:402) at java.awt.Frame.(Frame.java:367) at javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1731) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1808) at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1673) at com.intellij.idea.MainImpl.b(MainImpl.java:8) at com.intellij.idea.MainImpl.a(MainImpl.java:79) at com.intellij.idea.MainImpl.start(MainImpl.java:73) ... 6 more ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: [] java.lang.AssertionError: Error while accessing com.intellij.idea.MainImpl.start with arguments: [] at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:49) at com.intellij.openapi.diagnostic.Logger.error(Logger.java:56) at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:130) at java.lang.Thread.run(Thread.java:619)
Explanation and Fix
I ran other Java applications, such as Eclipse and Mule ESB. The result was the same.
When you look at the stacktrace, you can see that sun.reflect.NativeConstructorAccessorImpl.newInstance0
calls com.actividentity.sso.javasso.awt_swing.JavaSSOHook
. This makes me think ActivIdentity intercepts Java calls, even of very low level, and checks them before executing them. I don’t know if compiled code of JRE’s jars is modified, or if some methods are inserted through a mechanism similar to AOP. Anyway, the fact is that ActivIdentity is always called, even though I doubt a lot that original HotSpot was designed to do so…
I tried to uninstall ActivIdentity, this had no effect. I looked in Windows regedit but I found nothing. I tried also to check the value of java.library.path
which, for Windows, points to Windows’PATH
environment variable.
Therefore, the only solution I found to fix the issue was to changed the JAVA_HOME
parameter (more accurately: the parameter IDEA_JDK
) from one JDK to another, in my case: from 1.6.0_01 to 1.6.0_18)
svn: OPTIONS request failed on
Case
IntelliJ IDEA 7.x, version control with Subversion.
When I try to update the project, I get the following error:
Error:svn: unknown host myHost svn: OPTIONS request failed on /myProject/trunk/
On another hand, I can update the project thanks to TortoiseSVN. Then, I conclude the server exists and allows updates.
Fix
Firstly I thought of an issue of proxy, hence check your settings if you face the problem. Else:
- Shutdown IDEA
- Delete
~/.IntelliJIdea70/system/caches
- Restart IDEA
Remote debug on Mule 2.2.1
Case
You have to run a standalone Mule 2.2.1 in debug mode. Since Mule is launched in standalone, you have to debug a remote application.
Fix
Nice case
- Edit the
%MULE_HOME%/conf/wrapper.conf
- Uncomment the line:
wrapper.java.additional.<n>=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
- Don’t forget to set the parameter <n>
Boring case
In my case (Windows XP SP2, Java 1.5), the Mule refused to start and freezed:
------------------------------------------------------------------------ The JVM is being launched with a debugger enabled and could possibly be suspended. To avoid unwanted shutdowns, timeouts will be disabled, removing the ability to detect and restart frozen JVMs. ------------------------------------------------------------------------ Launching a JVM... Listening for transport dt_socket at address: 5005 ------------------------------------------------------------------------ Startup: Timed out waiting for a signal from the JVM. The JVM was launched with debug options so this may be because the JVM is currently suspended by a debugger. Any future timeouts during this JVM invocation will be silently ignored. ------------------------------------------------------------------------
The fix this:
- Download the jar spring-agent here.
- Move it into
%MULE_HOME%/lib/user/
- Edit the
%MULE_HOME%/conf/wrapper.conf
- add the following block:
wrapper.java.additional.3=-javaagent:%MULE_HOME%\lib\user\spring-agent-2.5.3.jar wrapper.java.additional.4=-Xdebug wrapper.java.additional.5=-Xnoagent wrapper.java.additional.6=-Djava.compiler=NONE wrapper.java.additional.7=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
localhost:5005
IDEA: “Debug info unavailable”
Error: IntelliJ IDEA does not allow to see the values of local variables. The error message displayed is: Debug info unavailable
.
Fix:
- open the settings
- open
Compiler
tab - check
Generate debugging info