database to be case insensitive. So I hacked the
jtrac-hsqldb-to-mysql.bsh file. See below for the full file.
BIT(1), which is used for storing boolean values. To get past this
script was attempting to convert it to a string. And the string
conn2 = DriverManager.getConnection("jdbc:mysql://localhost/jtrac", "root", "");
ins = "insert into " + tableName + " (" + cols + ") values (" + vals + ")";
>
>
> lol good timing on my part, that definately fixed the problem thatnks foir
> that Peter, but has raised another during the migration process
>
> D:\jtrac\data\db>java -cp
> bsh-2.0b4.jar;hsqldb-1.8.0.1.jar;mysql-connector-java-
> 5.1.6-bin.jar bsh.Interpreter jtrac-hsqldb-to-mysql.bsh
> insert into ATTACHMENTS (ID, PREVIOUS_ID, FILE_NAME, FILE_PREFIX, ITEM_ID)
> values (?, ?, ?, ?, ?)
> insert into CONFIG (PARAM, VALUE) values (?, ?)
> insert into HISTORY (ID, ITEM_ID, VERSION, TYPE, ACTUAL_EFFORT,
> ATTACHMENT_ID, COMMENT, TIME_STAMP, LOGGED_BY, ASSIGNED_TO, SUMMARY, DETAIL,
> STATUS, SEVERITY, PRIORITY, CUS_DBL_01, CUS_DBL_02, CUS_DBL_03, CUS_INT_01,
> CUS_INT_02, CUS_INT_03, CUS_INT_04, CUS_INT_05, CUS_INT_06, CUS_INT_07,
> CUS_INT_08, CUS_INT_09, CUS_INT_10, CUS_STR_01, CUS_STR_02, CUS_STR_03,
> CUS_STR_04, CUS_STR_05, CUS_TIM_01, CUS_TIM_02, CUS_TIM_03) values (?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?)
> insert into ITEMS (ID, VERSION, TYPE, PARENT_ID, SPACE_ID, SEQUENCE_NUM,
> TIME_STAMP, PLANNED_EFFORT, LOGGED_BY, ASSIGNED_TO, SUMMARY, DETAIL, STATUS,
> SEVERITY,PRIORITY, CUS_DBL_01, CUS_DBL_02, US_DBL_03, CUS_INT_01,
> CUS_INT_02, CUS_INT_03, CUS_INT_04, CUS_INT_05, CUS_INT_06, CUS_INT_07,
> CUS_INT_08, CUS_INT_09, CUS_INT_10, CUS_STR_01, CUS_STR_02, CUS_STR_03,
> CUS_STR_04, CUS_STR_05, CUS_TIM_01, CUS_TIM_02, CUS_TIM_03) values (?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?)
> insert into ITEM_ITEMS (ID, ITEM_ID, RELATED_ITEM_ID, TYPE) values (?, ?, ?,
> ?)
> insert into ITEM_TAGS (ID, TAG_ID, TYPE, ITEM_ID) values (?, ?, ?, ?)
> insert into ITEM_USERS (ID, USER_ID, TYPE, ITEM_ID) values (?, ?, ?, ?)
> insert into METADATA (ID, VERSION, TYPE, NAME, DESCRIPTION, PARENT_ID,
> XML_STRING) values (?, ?, ?, ?, ?, ?, ?)
> insert into SPACES (ID, VERSION, TYPE, PREFIX_CODE, NAME, DESCRIPTION,
> METADATA_ID, GUEST_ALLOWED) values (?, ?, ?, ?, ?, ?, ?, ?)
> Script threw exception: Sourced file: jtrac-hsqldb-to-mysql.bsh : Method
> Invocation stmt2.execute : at Line: 48 : in file: jtrac-hsqldb-to-mysql.bsh
> : stmt2 .execute ( )
>
> Target exception: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data
> too long for column 'guest_allowed' at row 1
>
> com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for
> column 'guest_allowed' at row 1
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3489)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
> at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at bsh.Reflect.invokeMethod(Unknown Source)
> at bsh.Reflect.invokeObjectMethod(Unknown Source)
> at bsh.Name.invokeMethod(Unknown Source)
> at bsh.BSHMethodInvocation.eval(Unknown Source)
> at bsh.BSHPrimaryExpression.eval(Unknown Source)
> at bsh.BSHPrimaryExpression.eval(Unknown Source)
> at bsh.BSHBlock.evalBlock(Unknown Source)
> at bsh.BSHBlock.eval(Unknown Source)
> at bsh.BSHBlock.eval(Unknown Source)
> at bsh.BSHWhileStatement.eval(Unknown Source)
> at bsh.BSHBlock.evalBlock(Unknown Source)
> at bsh.BSHBlock.eval(Unknown Source)
> at bsh.BSHBlock.eval(Unknown Source)
> at bsh.BSHEnhancedForStatement.eval(Unknown Source)
> at bsh.Interpreter.eval(Unknown Source)
> at bsh.Interpreter.source(Unknown Source)
> at bsh.Interpreter.main(Unknown Source)
>
> ________________________________
> From:
j-trac-users-bounces@...
> [mailto:
j-trac-users-bounces@...] On Behalf Of Peter
> Thomas
> Sent: Wednesday, 2 April 2008 11:33 PM
> To: JTrac users mailing-list
> Subject: Re: [jtrac-users] Mysql migration problems
>
>
>
> Hi,
>
> I ran into this exact same problem today (coincidence!) when migrating
> another Java app from windows to linux at work. We found this link which
> saved the day:
>
>
http://confluence.atlassian.com/display/KB/CSP-13667+-+java.sql.SQLException++Table+%27confluence.BANDANA%27+doesn%27t+exist>
> I think the simplest solution is to switch your MySQL database to
> case-insensitive, here is the link the above knowledge-base article points
> to:
>
>
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html>
> Thanks,
>
> Peter.
>
>
> On 4/2/08, Stephen Eaton <
seaton@...> wrote:
> >
> >
> > I'm trying to migrate my existing JTRAC installation, the current stable
> release of jtrac using HQDB on a win2003 server, to mysql running on a
> seperate linux server.
> >
> > I have made the changes the jtrac.properties connector and restarted
> jtrac, jtrac successfully connects to mysql and creates the missing tables,
> however the migration script bombs out with the following errors:
> >
> > D:\jtrac\data\db>java -cp
> bsh-2.0b4.jar;hsqldb-1.8.0.1.jar;mysql-connector-java-
> > 5.1.6-bin.jar bsh.Interpreter jtrac-hsqldb-to-mysql.bsh
> > insert into ATTACHMENTS (ID, PREVIOUS_ID, FILE_NAME, FILE_PREFIX, ITEM_ID)
> value
> > s (?, ?, ?, ?, ?)
> > Script threw exception: Sourced file: jtrac-hsqldb-to-mysql.bsh : Method
> Invocat
> > ion stmt2.execute : at Line: 48 : in file: jtrac-hsqldb-to-mysql.bsh :
> stmt2 .ex
> > ecute ( )
> >
> > Target exception:
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Tab
> > le 'jtrac.ATTACHMENTS' doesn't exist
> >
> > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
> 'jtrac.ATTACHME
> > NTS' doesn't exist
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> >
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
> >
> > at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
> > rce)
> > at java.lang.reflect.Constructor.newInstance(Unknown Source)
> > at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
> > at com.mysql.jdbc.Util.getInstance(Util.java:381)
> > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
> > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
> >
> >
> > What looks like the problem are the table names that jtrac created within
> mysql are all in lowercase, not uppercase that the script seems to show and
> so does not see them.
> >
> >
> > Stephen...
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> >
>
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace> > _______________________________________________
> > j-trac-users mailing list
> >
j-trac-users@...
> >
https://lists.sourceforge.net/lists/listinfo/j-trac-users> >
> >
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
>
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace> _______________________________________________
> j-trac-users mailing list
>
j-trac-users@...
>
https://lists.sourceforge.net/lists/listinfo/j-trac-users>
>