Upgraded from 9.?, can't run or debug

Answered

I used to be on IntelliJ 9.something, upgraded recently to 2016.2.4.  I've stuck with JDK 1.6.0 for the moment since there are too many warnings/errors coming from 1.8.0 and I simply want to make sure my projects will compile and run/debug right now.

And there's the problem.  They'll compile perfectly happily, but they wiill neither run nor debug.  If I get Ant to make the executable, I can double-click it in the Finder, and it'll run like a lamb.  But from within the IDE I just get errors.

For run, the console reports the following:

/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/bin/java -Dapple.laf.useScreenMenuBar=true -Didea.launcher.port=7534 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/charsets.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/classes.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/jsse.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/ui.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/deploy.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/apple_provider.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/javaws.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/jce.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/plugin.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/sa-jdi.jar:/Users/n/Documents/Code/Java/NiNJAS/NiNJAS/out/production/NiNJAS:/Users/n/Documents/Code/Java/iText/iText-5.0.6.jar:/Users/n/Documents/Code/Java/NiNJAS/NiNJAS/Images.jar:/Users/n/Documents/Code/Java/h2_2012-05/h2-1.3.167.jar:/Users/n/Documents/Code/Java/javatuples-1.2/dist/javatuples-1.2.jar:/Users/n/Documents/Code/Java/poi-3.11/poi-3.11-20141221.jar:/Users/n/Documents/Code/Java/MyLib/jar/MyLib.jar:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain NiNJAS
dyld: lazy symbol binding failed: Symbol not found: _CGContextSetAllowsAcceleration
  Referenced from: /Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Libraries/libawt.jnilib
  Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices

dyld: Symbol not found: _CGContextSetAllowsAcceleration
  Referenced from: /Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Libraries/libawt.jnilib
  Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices

Process finished with exit code 133 (interrupted by signal 5: SIGTRAP)

 

For debug, the message is broadly similar, but not the same:

/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:54591,suspend=y,server=n -Dapple.laf.useScreenMenuBar=true -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/charsets.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/classes.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/jsse.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/../Classes/ui.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/deploy.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/apple_provider.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/javaws.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/jce.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/plugin.jar:/Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Home/lib/sa-jdi.jar:/Users/n/Documents/Code/Java/NiNJAS/NiNJAS/out/production/NiNJAS:/Users/n/Documents/Code/Java/iText/iText-5.0.6.jar:/Users/n/Documents/Code/Java/NiNJAS/NiNJAS/Images.jar:/Users/n/Documents/Code/Java/h2_2012-05/h2-1.3.167.jar:/Users/n/Documents/Code/Java/javatuples-1.2/dist/javatuples-1.2.jar:/Users/n/Documents/Code/Java/poi-3.11/poi-3.11-20141221.jar:/Users/n/Documents/Code/Java/MyLib/jar/MyLib.jar:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" NiNJAS
Connected to the target VM, address: '127.0.0.1:54591', transport: 'socket'
dyld: lazy symbol binding failed: Symbol not found: _CGContextSetAllowsAcceleration
  Referenced from: /Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Libraries/libawt.jnilib
  Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices

dyld: Symbol not found: _CGContextSetAllowsAcceleration
  Referenced from: /Library/Java/JavaVirtualMachines/1.6.0_24-b07-330.jdk/Contents/Libraries/libawt.jnilib
  Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices

Disconnected from the target VM, address: '127.0.0.1:54591', transport: 'socket'

Process finished with exit code 133 (interrupted by signal 5: SIGTRAP)

 

Can someone please help me to get this working?  I have no idea what to do.

 

 

9 comments
Comment actions Permalink

Try using a more recent Java 6 version.

You can also try changing JRE in the Run/Debug configuration so that your app is built using Java 6, but will run and debug on Java 8.

0
Comment actions Permalink

I'm unable to find a younger JDK6 for the Mac.  I changed the JRE to 1.8.0 and now I get different errors.  Now I get a stack trace (which I'm considering to be good news -- at least I have a chance of fixing the problem), but since IntelliJ is truncating the trace I can't tell what's actually wrong.

How do I tell IntelliJ to not do this?

Caused by: java.awt.IllegalComponentStateException: The frame is decorated
    at java.awt.Frame.setOpacity(Frame.java:960)
    at java.awt.Window$1.setOpacity(Window.java:4035)
    at com.sun.awt.AWTUtilities.setWindowOpacity(AWTUtilities.java:174)
    ... 21 more
0
Comment actions Permalink

Try adding -XX:MaxJavaStackTraceDepth=-1 to VM Options in the run/debug configuration.

0
Comment actions Permalink

Thanks, but it doesn't make any difference. I've even gone so far as to restart IntelliJ, and it still produces exactly the same as above :-(    What now?

0
Comment actions Permalink

I don't think it's IDEA specific, you should get exactly the same if you run it from the Terminal.

0
Comment actions Permalink

Yes, you're right.  I've just tried that.  So how do I get to see the whole contents of stack traces now?

0
Comment actions Permalink

You already have the full stacktrace, ... 21 more means that the last lines are duplicated and were omitted, see http://stackoverflow.com/a/2970366/104891.

0
Comment actions Permalink

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html#printStackTrace%28%29:

Note the presence of lines containing the characters "...". These lines indicate that the remainder of the stack trace for this exception matches the indicated number of frames from the bottom of the stack trace of the exception that was caused by this exception (the "enclosing" exception). This shorthand can greatly reduce the length of the output in the common case where a wrapped exception is thrown from same method as the "causative exception" is caught.

0
Comment actions Permalink

Ah, many thanks Serge :-)

0

Please sign in to leave a comment.