Hi All,

Im building a java application that uses JDBC to connect to MySQL. I have an 
ant script that compiles my code and then packages it, along with log4j, junit, 
libshout-java and the mysql jdbc driver into one executable jar. This all works 
fine on ubuntu 9.10, and my code connects to mysql and away we go.

However my production env will be solaris (my dev box is ubuntu) and when I 
came to build and run this on there i had the following errors.

17 [main] DEBUG com.radiobusi.ShoutGen.ParseConfig  - [SQL, SELECT * FROM 
RadioBusi.RadioBusi_song JOIN RadioBusi.RadioBusi_playlist WHERE 
RadioBusi_playlist.Name = 'Placebo 2';]
18 [main] DEBUG com.radiobusi.ShoutGen.ParseConfig  - this is able to be broken 
up[SQL, SELECT * FROM RadioBusi.RadioBusi_song JOIN 
RadioBusi.RadioBusi_playlist WHERE RadioBusi_playlist.Name = 'Placebo 2';]
78 [main] ERROR com.radiobusi.ShoutGen  - An error occured instantiating the 
class ShoutGen
java.lang.ExceptionInInitializerError
        at com.mysql.jdbc.Util.stackTraceToString(Util.java:351)
        at com.mysql.jdbc.Util.<clinit>(Util.java:116)
        at 
com.mysql.jdbc.NonRegisteringDriver.parseURL(NonRegisteringDriver.java:672)
        at 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:277)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at com.radiobusi.ShoutGen.PlayList.<init>(Unknown Source)
        at com.radiobusi.ShoutGen.ShoutGen.<init>(Unknown Source)
        at com.radiobusi.ShoutGen.ShoutGen.main(Unknown Source)
Caused by: java.lang.RuntimeException: Can't load resource bundle due to 
underlying exception java.util.MissingResourceException: Can't find bundle for 
base name com.mysql.jdbc.LocalizedErrorMessages, locale en_AU
        at com.mysql.jdbc.Messages.<clinit>(Messages.java:60)
        ... 9 more
Caused by: java.util.MissingResourceException: Can't find bundle for base name 
com.mysql.jdbc.LocalizedErrorMessages, locale en_AU
        at 
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:715)
        at com.mysql.jdbc.Messages.<clinit>(Messages.java:58)
        ... 9 more
Exception in thread "main" java.lang.NullPointerException
        at com.radiobusi.ShoutGen.ShoutGen.main(Unknown Source)

My mysql database locale is en_US on solaris, but my ubuntu mysql database is 
the also en_US.

Anybody got any idea's?

Im not sure what other information is needed, so if you would like more 
information just let me know in the comments.

Jars that get packaged

junit-4.8.1.jar
libshout.jar
log4j-1.2.15.jar
mysql-5.1.6.jar

munderwo at opensolaris:~/ShoutGen-Java$ uname -a
SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris

MySQL Version: MySQL 5.1.30

Cheers

Mark

PS I tried changing the locale of opensolaris to match the en_US locale of 
mysql, but to no effect. I do admit that it was a temporary thing, so if 
somebody thinks this really is the problem and can point me in the direction of 
good instructions on how to change my opensolaris locale or the Mysql locale im 
happy to have another go.
-- 
This message posted from opensolaris.org

Reply via email to