Ability to run JDBC Console halted

I am very happy with the new JDBC console, and have been using it regularly.  It recently just stopped working.  I am pretty sure I know why.  When I look in the log, I see this message:

2009-01-12 16:25:30,272 [23504059]   INFO - ojectRoots.impl.SdkVersionUtil - 
java.io.IOException: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/bin/java: not found


So, I looked at this directory, and sure enough, the 1.5.0 directory does not have a bin beneath it.

I am pretty sure the path should be /System/Library/Frameworks/JavaVM.framework/Home.

Currently, in my list of JDKs, I only have one JDK named "1.5" and the JSDK Path is indeed /System/Library/Frameworks/JavaVM.framework/Home
and everything else is working fine (i.e. compilation, run configurations, ...).

So...

1.) Is this the correct path I should be using.

2.) Where would I set this path?

3.) What could have changed, such that my console stopped working, when it was already working fine.

I know this will probably turn out to be something really stupid obvious.

Thanks,

Eric

11 comments
Comment actions Permalink

Hello.

It looks like this issue: http://www.jetbrains.net/jira/browse/IDEADEV-33657
IDEA took project JDK instead of IDEA JDK.

Alexander.

0
Comment actions Permalink

Ok, I assume you are correct.  So, how do I fix it.  I am able to run/debug apps in my project, so my project JVM should be set up correctly.  So why does this console hang and never return with a prompt?

Here is the command line that is generated in the Output tab when I open the JDBC console:


/System/Library/Frameworks/JavaVM.framework/Home/bin/java -Dfile.encoding=MacRoman -classpath /Applications/IntelliJ IDEA 8.0.1.app/plugins/PersistenceSupport/lib/jdbc-console.jar:/Applications/IntelliJ IDEA 8.0.1.app/lib/util.jar:/Applications/IntelliJ IDEA 8.0.1.app/lib/annotations.jar:/Users/eb/Work/foobar/Projects/Main/lib/foreign/mysql-connector-java-5.1.6-bin.jar com.intellij.persistence.database.console.JdbcConsoleMain

0
Comment actions Permalink

In 9618 I have failed to configure Project JDK home directory as this: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 - IDEA adds "Home" subdirectory automatically and then all works.
I have managed to configure it as in your last post: /System/Library/Frameworks/JavaVM.framework/Home, and this is really a symlink, without physical contents. But JDBC console works with this symlink without problems (I connected to SQLite data file, not to MySQL server).

What build do you use?

0
Comment actions Permalink

I use mysql.  It used to run fine for me.  Not sure what changed.

0
Comment actions Permalink

When I go to my Project Structure and look at my jdk, the JSDK is "/System/Library/Frameworks/JavaVM.framework/Home

0
Comment actions Permalink

In 8.0.1 the console works for me too.

> So why does this console hang and never return with a prompt?

Are you sure you cannot execute a command? The console has Input and Output tabs. By default only Output is visible. You need to open Input to type a statement.

0
Comment actions Permalink

I am feeling pretty stupid.  It must be something really obvious.

I am attaching a pic of my idea window after launching the jdbc console.



Attachment(s):
IDEA_1.jpg
0
Comment actions Permalink

Your screenshot is Ok. Now you need to open Input tab. There are two ways:
1. Press the "Open in Editor" button on JDBC console's toolbar. Input tab will open in the main IDEA editor.
2. Output pane you see is actually the bottom panel of the splitpane. Input is the top panel and has zero size. Move mouse over, find the splitter and drag down.
In Input tab you can type statements and execute them with Ctrl+Enter / Ctrl+Shift+Enter.

Unfortunately, this is really not so obvious.

0
Comment actions Permalink

Aaah, yes.  As I expected, something very simple I was missing.  I agree though, not so obvious.  Thanks, working great.

0
Comment actions Permalink

Ok, I know it is now working, so there should be no more issue.  But despite the fact that it is working, this is coming up in my log every time I start a new JDBC Console

ava.io.IOException: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/bin/java: not found
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:52)
    at java.lang.ProcessImpl.start(ProcessImpl.java:91)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
    at java.lang.Runtime.exec(Runtime.java:591)
    at java.lang.Runtime.exec(Runtime.java:464)

....


Now, when I start the JDBC Console, this is in the Output console:

/System/Library/Frameworks/JavaVM.framework/Home/bin/java -Dfile.encoding=MacRoman -classpath /Applications/IntelliJ IDEA 8.0.1.app/plugins/PersistenceSupport/lib/jdbc-console.jar:/Applications/IntelliJ IDEA 8.0.1.app/lib/util.jar:/Applications/IntelliJ IDEA 8.0.1.app/lib/annotations.jar:/Users/eb/Work/Sesco/Projects/Main/lib/foreign/mysql-connector-java-5.1.6-bin.jar com.intellij.persistence.database.console.JdbcConsoleMain


So, why is it finding the right "java" and running properly, yet throwing an exception as well?

Thanks,

Eric

0
Comment actions Permalink

> So, why is it finding the right "java" and running properly, yet throwing an exception as well?

I've checked: IDEA really did so in build 9618, but does not do anymore at least in build 9672.

Regards,
Alexander.

0

Please sign in to leave a comment.