Hmm, I've never seen this error before. Have you tried with a different
fine for me.
community to figure out..
Post by Ryosuke MoriThanks for your reply.
Well, I should've told you that, because I could 't even do "ant
create-tables", I've imported the sql statements manually into MySQL. By the
way, I get the same error message for both "ant create-tables" and "ant
all". I couldn't find out what the default Middlegen directory structure
supposed to be but tried the ant file in different directory. Here is the
result.
D:\test>mysqladmin create airline
D:\test>mysql airline < D:\test\src\sql\airline-mysql.sql
D:\test>ant
Buildfile: build.xml
[echo] Class path = D:\test
[echo] appname=airline
[echo] prefsdir=D:\test/src
[echo] gui=true
[echo] databaseurl=jdbc:mysql://localhost/airline
[echo] datasourceJNDIName=airline/datasource
[echo] driver=org.gjt.mm.mysql.Driver
[echo] username=root
[echo] password=n7OgUcH7
[echo] schema=
[echo] catalog=
[middlegen] Database URL:jdbc:mysql://localhost/airline
[middlegen] java.lang.ExceptionInInitializerError
[middlegen] at com.mysql.jdbc.ResultSet.getString(ResultSet.java:2202)
[middlegen] at
com.mysql.jdbc.Connection.connectionInit(Connection.java:1083)
[middlegen] at com.mysql.jdbc.Driver.connect(Driver.java:297)
[middlegen] at
java.sql.DriverManager.getConnection(DriverManager.java:512)
[middlegen] at
java.sql.DriverManager.getConnection(DriverManager.java:171)
[middlegen] at
middlegen.StandardDatabase.getConnection(StandardDatabase.java:109)
[middlegen] at
middlegen.MiddlegenPopulator.getConnection(MiddlegenPopulator.java:491)
[middlegen] at
middlegen.MiddlegenPopulator.<init>(MiddlegenPopulator.java:131)
[middlegen] at middlegen.MiddlegenTask.execute(MiddlegenTask.java:397)
[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
[middlegen] at org.apache.tools.ant.Task.perform(Task.java:341)
[middlegen] at org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[middlegen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[middlegen] at org.apache.tools.ant.Main.start(Main.java:196)
[middlegen] at org.apache.tools.ant.Main.main(Main.java:235)
[middlegen] Caused by: java.lang.StringIndexOutOfBoundsException: String
index out of range: 222
[middlegen] at java.lang.String.charAt(String.java:455)
[middlegen] at com.mysql.jdbc.StringUtils.<clinit>(StringUtils.java:37)
[middlegen] ... 18 more
BUILD FAILED
file:D:/test/build.xml:216: java.lang.ExceptionInInitializerError
Ryosuke Mori
-----Original Message-----
Waaler
Sent: Tuesday, September 23, 2003 4:37 PM
Subject: Re: [Middlegen-user] newbie question: Middlegen
I use MySQL on winXP too. No problems. The default setup of MySQL on XP is
without userid, password etc. so that should work.
Have you created the airline database?
Since you get different results with eclipse I would guess this has
something to do with the classpath you're using.
Seems to me you're not running with the default Middlegen directory
structure. Could you try running it right out of the default structure,
only changing from hsqldb to mysql?
.eivind
Post by James CooperI'm not enitrely sure this is a middlegen problem, or at least it could
well simply be how task attributes are passed to the task. Might be
cause these 4 are left blank
[echo] username=
[echo] password=
[echo] schema=
[echo] catalog=
And this maybe the exception
"Caused by: java.lang.StringIndexOutOfBoundsException: String index out
of range: 222"
Post by Ryosuke MoriHi,
I just downloaded Middlegen 2.0 beta 1 and tried to run the sample
program
Post by James CooperPost by Ryosuke Moriwith MySQL 3.0. But Ant generated the following error and I just cannot
figure out why, since the sample program fully worked with HSQL (just
changed build.xml's db setting from mysql.xml to hsqldb.xml). Could you
please give me suggestions for running the program with MySQL!!!
[echo] Class path = D:\Study\Programming\Java\Server Side Java\DB
Access\Middlegen\Middlegen-Hibernate-r2
[echo] appname=airline
[echo] prefsdir=D:\Study\Programming\Java\Server Side Java\DB
Access\Middlegen\Middlegen-Hibernate-r2/src
[echo] gui=true
[echo] databaseurl=jdbc:mysql://localhost/airline
[echo] driver=org.gjt.mm.mysql.Driver
[echo] username=
[echo] password=
[echo] schema=
[echo] catalog=
[middlegen] Database URL:jdbc:mysql://localhost/airline
[middlegen] java.lang.ExceptionInInitializerError
[middlegen] at
com.mysql.jdbc.ResultSet.getString(ResultSet.java:2202)
Post by James CooperPost by Ryosuke Mori[middlegen] at
com.mysql.jdbc.Connection.connectionInit(Connection.java:1083)
[middlegen] at com.mysql.jdbc.Driver.connect(Driver.java:297)
[middlegen] at
java.sql.DriverManager.getConnection(DriverManager.java:512)
[middlegen] at
java.sql.DriverManager.getConnection(DriverManager.java:171)
[middlegen] at
middlegen.StandardDatabase.getConnection(StandardDatabase.java:109)
[middlegen] at
middlegen.MiddlegenPopulator.getConnection(MiddlegenPopulator.java:491)
[middlegen] at
middlegen.MiddlegenPopulator.<init>(MiddlegenPopulator.java:131)
[middlegen] at
middlegen.MiddlegenTask.execute(MiddlegenTask.java:397)
Post by James CooperPost by Ryosuke Mori[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
[middlegen] at org.apache.tools.ant.Task.perform(Task.java:341)
[middlegen] at org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
Post by James CooperPost by Ryosuke Mori[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[middlegen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[middlegen] at org.apache.tools.ant.Main.start(Main.java:196)
[middlegen] at org.apache.tools.ant.Main.main(Main.java:235)
[middlegen] Caused by: java.lang.StringIndexOutOfBoundsException: String
index out of range: 222
[middlegen] at java.lang.String.charAt(String.java:455)
[middlegen] at
com.mysql.jdbc.StringUtils.<clinit>(StringUtils.java:37)
Post by James CooperPost by Ryosuke Mori[middlegen] ... 18 more
BUILD FAILED
file:D:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/M
i
Post by James CooperPost by Ryosuke Moriddlegen-Hibernate-r2/build.xml:216: jav
a.lang.ExceptionInInitializerError
Thanks,
Ryosuke Mori
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user