Discussion:
[Middlegen-user] Column type change
Fabrizio Di Giuseppe
2003-09-22 10:58:19 UTC
Permalink
I'm using CVS from SF VALUEOBJECT_REFACTORING_BRANCH with Oracle9i.

When I change the type of a column in a table and the prefs file
already exists, middlegen does not change the type of the field in the
generated entity. I have noticed that the preferences maintain the old
type, so I have to remove the preferences file before calling middlegen
task. Is this a known problem?

Tks
D***@cexp.com
2003-09-22 12:24:10 UTC
Permalink
This behavior is a good thing. The preferences file maintains the changes
you make to attribute names, datatypes, etc. If you want to change the
datatype, do this in the GUI and upon exit, the change will be saved to the
preferences file and recognized the next time you invoke middlegen.

Don Shade
Boulder, Colorado

-----Original Message-----
From: Fabrizio Di Giuseppe [mailto:***@ianus.net]
Sent: Monday, September 22, 2003 6:58 AM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Column type change


I'm using CVS from SF VALUEOBJECT_REFACTORING_BRANCH with Oracle9i.

When I change the type of a column in a table and the prefs file
already exists, middlegen does not change the type of the field in the
generated entity. I have noticed that the preferences maintain the old
type, so I have to remove the preferences file before calling middlegen
task. Is this a known problem?

Tks



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Fabrizio Di Giuseppe
2003-09-22 13:01:04 UTC
Permalink
Post by D***@cexp.com
This behavior is a good thing. The preferences file maintains the changes
you make to attribute names, datatypes, etc. If you want to change the
datatype, do this in the GUI and upon exit, the change will be saved to the
preferences file and recognized the next time you invoke middlegen.
My question is not about changing preferred type mapping, but about
changing column type inside the DB. For me is the DB that drives the
generation of the entities (it should be so in middlegen, is it
right?). So I want that every time that a change in the DB happens,
like a field that was NUMBER(1) becomes CHAR(1) for example, the same
change would be reflected to the entities automatically. Actually if I
change a column from NUMBER to VARCHAR2, the type of the entity
property still remain an int or a BigDecimal.
D***@cexp.com
2003-09-22 13:16:52 UTC
Permalink
The preferences file cannot distinguish between datatypes which you have
overridden and those defined in the database.

It would be a smart enhancement to only record in the properties file those
changes the designer manually entered through the middlegen GUI. All other
datatypes and names should come from the database schema.

Until this is enhanced, you will have to change the datatype in two
places--1) the database i.e., Number to Varchar2 and 2) middlegen GUI
BigDecimal to String.

-----Original Message-----
From: Fabrizio Di Giuseppe [mailto:***@ianus.net]
Sent: Monday, September 22, 2003 9:00 AM
To: middlegen-***@lists.sourceforge.net
Subject: Re: [Middlegen-user] Column type change
Post by D***@cexp.com
This behavior is a good thing. The preferences file maintains the
changes
you make to attribute names, datatypes, etc. If you want to change the
datatype, do this in the GUI and upon exit, the change will be saved
to the
preferences file and recognized the next time you invoke middlegen.
My question is not about changing preferred type mapping, but about
changing column type inside the DB. For me is the DB that drives the
generation of the entities (it should be so in middlegen, is it
right?). So I want that every time that a change in the DB happens,
like a field that was NUMBER(1) becomes CHAR(1) for example, the same
change would be reflected to the entities automatically. Actually if I
change a column from NUMBER to VARCHAR2, the type of the entity
property still remain an int or a BigDecimal.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Fabrizio Di Giuseppe
2003-09-22 14:35:01 UTC
Permalink
Post by D***@cexp.com
Until this is enhanced, you will have to change the datatype in two
places--1) the database i.e., Number to Varchar2 and 2) middlegen GUI
BigDecimal to String.
I've seen that there is no preferred type mapping mechanism in
middlegen. Is it right? This by my opinion would be more usefull.
The good is that I've looked at the middlegen code to find a solution
(or the problem), and for me is quite easy to understand.

Ok, thanks a lot.
Ryosuke Mori
2003-09-22 15:11:09 UTC
Permalink
Hi,

I just downloaded Middlegen 2.0 beta 1 and tried to run the sample program
with 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)
[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:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/Mi
ddlegen-Hibernate-r2/build.xml:216: jav
a.lang.ExceptionInInitializerError

Thanks,

Ryosuke Mori
James Cooper
2003-09-23 04:18:04 UTC
Permalink
I'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 Mori
Hi,
I just downloaded Middlegen 2.0 beta 1 and tried to run the sample program
with 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)
[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:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/Mi
ddlegen-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
Ryosuke Mori
2003-09-23 02:43:02 UTC
Permalink
Hello again,

I would just like to let you know that Ant didn't generate any error when I
run the program from Eclipse 2.1 (version of ant is 1.5.3). But I still
can't run the build file from command line. I'm using WinXP by the way. Any
idea?

Ryosuke Mori

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]On Behalf Of Ryosuke Mori
Sent: Tuesday, September 23, 2003 3:10 AM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] newbie question: Middlegen


Hi,

I just downloaded Middlegen 2.0 beta 1 and tried to run the sample program
with 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)
[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:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/Mi
ddlegen-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
Eivind Waaler
2003-09-23 04:38:02 UTC
Permalink
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 Cooper
I'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 Mori
Hi,
I just downloaded Middlegen 2.0 beta 1 and tried to run the sample program
with 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)
[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:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/Mi
ddlegen-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
Ryosuke Mori
2003-09-23 06:20:11 UTC
Permalink
Thanks 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

init:

fail-if-no-xdoclet-1.2:

check-driver-present:

panic-if-driver-not-present:

middlegen:
[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-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]On Behalf Of Eivind
Waaler
Sent: Tuesday, September 23, 2003 4:37 PM
To: middlegen-***@lists.sourceforge.net
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 Cooper
I'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 Mori
Hi,
I just downloaded Middlegen 2.0 beta 1 and tried to run the sample
program
Post by James Cooper
Post by Ryosuke Mori
with 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 Cooper
Post 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 Cooper
Post 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 Cooper
Post 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 Cooper
Post by Ryosuke Mori
[middlegen] ... 18 more
BUILD FAILED
file:D:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/M
i
Post by James Cooper
Post by Ryosuke Mori
ddlegen-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
Eivind Waaler
2003-09-23 06:30:49 UTC
Permalink
Hmm, I've never seen this error before. Have you tried with a different
version of the JDBC driver? If possible maybe you could try with a
different MySQL version too? I'm using version 4.0.12-nt on winXP, works
fine for me.

If this does not help, or is not an option, I suggest you try the MySQL
community to figure out..

.eivind
Post by Ryosuke Mori
Thanks 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 Cooper
I'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 Mori
Hi,
I just downloaded Middlegen 2.0 beta 1 and tried to run the sample
program
Post by James Cooper
Post by Ryosuke Mori
with 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 Cooper
Post 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 Cooper
Post 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 Cooper
Post 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 Cooper
Post by Ryosuke Mori
[middlegen] ... 18 more
BUILD FAILED
file:D:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/M
i
Post by James Cooper
Post by Ryosuke Mori
ddlegen-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
Ryosuke Mori
2003-09-23 08:19:11 UTC
Permalink
Now I updated MySQL to its latest version, 4.0.15 and tried two different
connectors, mysql-connector-java-3.0.0-beta-bin.jar and
mysql-connector-java-2.0.14-bin.jar. The result is
mysql-connector-java-3.0.0-beta-bin.jar didn't work whereas
mysql-connector-java-2.0.14-bin.jar worked for me. I've got no idea but I
guess this is only a minor problem so that I've decided not to care too much
about this problem. Again thank you so much for your help.

Ryosuke Mori

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]On Behalf Of Eivind
Waaler
Sent: Tuesday, September 23, 2003 6:27 PM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] newbie question: Middlegen


Hmm, I've never seen this error before. Have you tried with a different
version of the JDBC driver? If possible maybe you could try with a
different MySQL version too? I'm using version 4.0.12-nt on winXP, works
fine for me.

If this does not help, or is not an option, I suggest you try the MySQL
community to figure out..

.eivind
Post by Ryosuke Mori
Thanks 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
Post by Ryosuke Mori
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)
Post 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 Ryosuke Mori
[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 Cooper
I'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 Mori
Hi,
I just downloaded Middlegen 2.0 beta 1 and tried to run the sample
program
Post by James Cooper
Post by Ryosuke Mori
with 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 Cooper
Post 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 Cooper
Post 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 Cooper
Post 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)
String
Post by Ryosuke Mori
Post by James Cooper
Post by Ryosuke Mori
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 Cooper
Post by Ryosuke Mori
[middlegen] ... 18 more
BUILD FAILED
file:D:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/M
i
Post by James Cooper
Post by Ryosuke Mori
ddlegen-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
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Russell Simpkins
2003-09-23 12:19:51 UTC
Permalink
After you change jdbc drivers from mm.mysql-2.0.xxx-bin.jar, you need to
update build.properties.

Your driver should not be
driver=org.gjt.mm.mysql.Driver
it should be
driver=com.mysql.jdbc.Driver
or something like that, refere to the docs that came with the jars you're
using.

You could've picked that up from the stack dump.
Post by Ryosuke Mori
Subject: RE: [Middlegen-user] newbie question: Middlegen
Date: Tue, 23 Sep 2003 20:18:48 +1000
Now I updated MySQL to its latest version, 4.0.15 and tried two different
connectors, mysql-connector-java-3.0.0-beta-bin.jar and
mysql-connector-java-2.0.14-bin.jar. The result is
mysql-connector-java-3.0.0-beta-bin.jar didn't work whereas
mysql-connector-java-2.0.14-bin.jar worked for me. I've got no idea but I
guess this is only a minor problem so that I've decided not to care too
much
about this problem. Again thank you so much for your help.
Ryosuke Mori
-----Original Message-----
Waaler
Sent: Tuesday, September 23, 2003 6:27 PM
Subject: RE: [Middlegen-user] newbie question: Middlegen
Hmm, I've never seen this error before. Have you tried with a different
version of the JDBC driver? If possible maybe you could try with a
different MySQL version too? I'm using version 4.0.12-nt on winXP, works
fine for me.
If this does not help, or is not an option, I suggest you try the MySQL
community to figure out..
.eivind
Post by Ryosuke Mori
Thanks 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
Post by Ryosuke Mori
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
Post by Ryosuke Mori
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)
Post 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 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 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 Ryosuke Mori
[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
Post by Ryosuke Mori
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 Cooper
I'm not enitrely sure this is a middlegen problem, or at least it
could
Post by Ryosuke Mori
Post by James Cooper
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
Post by Ryosuke Mori
Post by James Cooper
of range: 222"
Post by Ryosuke Mori
Hi,
I just downloaded Middlegen 2.0 beta 1 and tried to run the sample
program
Post by James Cooper
Post by Ryosuke Mori
with MySQL 3.0. But Ant generated the following error and I just
cannot
Post by Ryosuke Mori
Post by James Cooper
Post by Ryosuke Mori
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
Post by Ryosuke Mori
Post by James Cooper
Post by Ryosuke Mori
please give me suggestions for running the program with MySQL!!!
[echo] Class path = D:\Study\Programming\Java\Server Side
Java\DB
Post by Ryosuke Mori
Post by James Cooper
Post by Ryosuke Mori
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 Cooper
Post 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)
Post by James Cooper
Post by Ryosuke Mori
[middlegen] at
middlegen.MiddlegenPopulator.<init>(MiddlegenPopulator.java:131)
[middlegen] at
middlegen.MiddlegenTask.execute(MiddlegenTask.java:397)
Post by James Cooper
Post 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)
Post by Ryosuke Mori
Post by James Cooper
Post by Ryosuke Mori
[middlegen] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
Post by James Cooper
Post 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)
String
Post by Ryosuke Mori
Post by James Cooper
Post by Ryosuke Mori
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 Cooper
Post by Ryosuke Mori
[middlegen] ... 18 more
BUILD FAILED
file:D:/Study/Programming/Java/Server%20Side%20Java/DB%20Access/Middlegen/M
i
Post by James Cooper
Post by Ryosuke Mori
ddlegen-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
-------------------------------------------------------
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
_________________________________________________________________
Instant message with integrated webcam using MSN Messenger 6.0. Try it now
FREE! http://msnmessenger-download.com

Loading...