[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Jisql version 2.0 now available  XML
Forum Index » Jisql
Author Message
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Thanks for your help. There is a bug in 2.0.1 with the password - that is fixed now in 2.0.2 (which I'll post after this). As far as the classpath, I've always felt that the Main-Class stuff is a bit limited and you're pointing that out. However, I've simplified it a little bit:



works just fine for me. Note that I didn't include the JavaCSV nor jopt-simple jars on the command line. Of course, this blows the whole point of Main-Class so I'm not sure that it is super valuable for you.

Anyhow, let me post 2.0.2 and, again, thanks very much for your help.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
mkienenb

Newbie

Joined: 01/25/2010 13:51:47
Messages: 7
Offline

Actually, for my limited use, I can stick with specifying everything. But I was just pointing it out in hopes of making it easier for others down the road.
Not having to specify the secondary jars certainly helps, especially for those of us who didn't read the directions before we upgraded
[Email]
Michael Ambrus

Newbie

Joined: 09/06/2011 03:12:37
Messages: 4
Offline

Hi, I get a java.lang.OutOfMemoryError exception. when running any query with MS Server.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuffer.append(StringBuffer.java:224)
at com.xigole.util.sql.Jisql.doIsql(Jisql.java:396)
at com.xigole.util.sql.Jisql.run(Jisql.java:295)
at com.xigole.util.sql.Jisql.main(Jisql.java:270)


Jisql is wrapped around a script like this:

java -Xms128m -Xmx3g \
-classpath lib/jisql-2.0.9.jar:${HOME}/opt/sqljdbc_3.0/enu/sqljdbc4.jar \
com.xigole.util.sql.Jisql \
-user me \
-password apassword \
-driver com.microsoft.sqlserver.jdbc.SQLServerDriver \
-cstring "jdbc:sqlserver://aserver\something;databaseName=adatabase;APP=Database Browser;WSID=${HOSTNAME};DATABASE=Adatamase" "$@"

The runtime is:
jisql-2.0.9$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Any suggestions?
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

I've had this problem with other drivers too. Can you try out Jisql 2.0.10 available at http://www.xigole.com/software/jisql/jisql.jsp? I was able to reproduce the issue under PostgreSQL and 2.0.10 fixes it.

Note that the underlying issue is that with text (CLOB in some databases) or binary (BLOB) columns the width of the column comes back as a very large number - usually 2GB. The code was trying to print out a string 2GB in length for the column. Now the formatter defaults to a max column width of 2048. You can override that with the "-w" switch.

Let me know if that helps things any.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
Michael Ambrus

Newbie

Joined: 09/06/2011 03:12:37
Messages: 4
Offline

Hi stdunbar. That sounds about right.

I tried experimenting with some different queries and especially one field, when selected caused this exception to happen. Excluding it, and everything workes fine. The field is typically one which would contain a long string. I'm not sure if it's size is variable or not.

I'll try Jisql 2.0.10 ASAP.

The -w option sounds like an excellent workaround, but I couldn't get it to work however

myDB.sh -input ../my.sql -delimiter=";" -noheader -trim -left -w1024

:
Additional command line arguments of the com.xigole.util.sql.outputformatter.DefaultFormatter class are
-w specifies the maximum field width for a column. The default is to output the full width of the column
:

I looked into the jisql-2.0.9.jar and DefaultFormatter.class is there.

Minor additional issue:
It seems that -nohead doesn't work either (I can't see any difference with or without it).

Thanks for
/Michael
Michael Ambrus

Newbie

Joined: 09/06/2011 03:12:37
Messages: 4
Offline

Jisql 2.0.10 solves everything, thanks!

-w works, but even without it the default is well chosen.

Only -nohead left to fix now.

Regards
/Michael
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Thanks for the bug report - I'll take a look at this. I saw that the -w wasn't working correctly in 2.0.9 - I'm not as good at Q/A as I should be!

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Michael - thanks very much for the feedback. I've released 2.0.11 that has this and another command line parsing bug fixed (the delimiter). I believe that all of the command line options are working now but, of course, if you find anything let me know.

2.0.11 is available at the same place.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
Michael Ambrus

Newbie

Joined: 09/06/2011 03:12:37
Messages: 4
Offline

Confirmed, everything works perfectly in 2.0.11

Thanks!

//Michael
 
Forum Index » Jisql
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle