Hi, I've just downloaded the tool and configure it, but I get the error:
d:\applications\development\sqlshell2>java -cp .;"D:\applications\development\sqlshell2\sqlshell.jar";"D:\applications\development\sqlshell2\lib\jcurses.jar";"D:\applications\devel
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Is it because I have Java 1.5?
If so, is it possible to make it work with Java 1.5? I am forced to use that version, because of some other technical restrictions.
PS: This tool could be very useful for me since I hate Oracle SQL*Plus command line tool, and I really need some simple tasks to do.
I got your source code and I managed to build it in Java 1.5, with just minor changes to the code.
It works well!
PS: If you want I can help you with some tasks, like list tables or persistent history between sessions (I really need this last one), or multiple databases.
Thanks for trying sqlshell. At work (where I mostly use this project) we have kind of skipped java 5 and moved to java 6. So I have not paid any attention to java 5 support at this time. I do realize this might be an issue.. I am not really sure if the svn server I use atm for sqlshell development supports anonymous access (I will talk to the maintainer of the server).
If you still want to help out that would be really really great. I am not sure what you mean by 'list tables', persistent history is something that has been on my mind as well. The 'problem' here is when you have more then one session open.. what would you do in that case (overwrite, merge, .. ).
I can spend some hours of development to this project. Is the project available in CVS or SVN? If so, please give me developer access.
I understand well about Java, JDBC and databases. I don't know JCurses, but looking at your code I understood a little bit.
I am thinking on building with Java 1.5. I am not sure if it will work for you in a Java 6 JVM. We can try. If not, maybe we will need to generate two builds.
Friday I implemented a basic "alpha" version of history persistence in my PC and it works (I really needed it). I am writing the history to a file on "quit" or "exit" and I am reading it on "connect". That way it will be different for each database. Besides, should I format (split in multiple lines) each command when reading, considering the current width of the screen? Anyway, I would like to discuss it, before continuing with it.
Then, my priority will be to add the "more" functionality (page up/down, left/right arrows, columns width). I will think about what you said and I will write my thoughts about it *before* developing anything.
It would be really nice if you could spend some time on improving this project. It really can need some (more) help. It is currently available via SVN. I will talk to the owner of the svn host for access for you. Could you send me an email at roy _at_ nospam vanderkuil dot nl (remove the nospam) with details? (preferred username and pwd). It would be nice if you could send me some sort of patch of what you have right now.. just so maybe I can comment on it before it will be part of sqlshell.
JCurses is 'just' a way of making sqlshell available in a shell environment. At the project's start I paid much attention to this, but I must say I haven't spend a lot of time with it since.
I don't think java 1.5 will be an issue. I don't have any specific 1.6 features I want to use. So I guess that won't be a big problem.
Page up/down should already work. About new functionality.. .it's always good to discuss things before committing it.. (that goes both ways btw...)
Hope to see some patches soon :)
Just a quick update of what I have been up to the last week. A major clean up I wanted has been implemented. This allows for easy configuration of new action keys. They will also appear in the help menu, so that it is more clear what options are available. I noticed I forgot some of them while in the clean up process :).
Furthermore sqlshell now uses 2 threads. One thread for executing commands and one for display and key-input handling. This allows for an 'abort' option for the current executing query.
I had a harddisk error, so if you did send me an e-mail it probably got lost.. Sorry about that.
I was really swamped at work, but finally I managed to develop and test the history persistence.
Since I didn't have access to the main repository, I commited my entire modified project to:
If you like my changes, how can we merge them?
I quickly browsed though your changes.. I had very little time to investigate but so far they looked really well.
Some things to consider though:
1. What happens if the history file changed after 'the current instance' is started (ie simultanious use)
2. Could the history folder be moved to ~/.sqlshell/history (or something similar)? I would like this to be user dependant
Could you send me an email so we can setup an account for you if you like. The current svn version is not entirely 'stable' since I have added some threading to it, but I should be able to find some time this week to fix the issues that I know are there :)).
Just sent you an email to the address you gave me. Let me know if it doesn't arrive.
I am storing one history file per "@user". That way if the user has multiple sessions, the file will be currently overwritten by the last one exits the session. I don't kow what is best to do here:
For example, if John and Sally use the same unix account "user1" and connect using the same "@mydatabase" database connector. Then both will point to the file "/home/user1/.sqlshell/history/mydatabase.history". I see no way to have separated history files, since both use the same unix account and the same database connector. Any idea?
Yep, no problem.
I got your mail and you should have a reply now :)
About 1: It might be an option to 'merge' (append) some stuff. But that maybe for later.
Look forward to your commits. The current svn should be pretty stable again. Still some code that can be cleaned-up. So if I find the time I will do so before releasing 0.5.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.