History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: APF-699
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: Sebastian Lenk
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
AppFuse

Upgrade to MySQL JDBC Driver version 5.0.5

Created: 19/Mar/07 05:34 PM   Updated: 21/Mar/07 08:16 PM
Component/s: Persistence Layer, Installation
Affects Version/s: 2.0-M4
Fix Version/s: 2.0-M4

File Attachments: 1. Text File patch-mysql-connector-java-5.0.3.patch (0.7 kb)
2. Text File patch-mysql-connector-java-5.0.5.patch (0.7 kb)

Environment:
Windows XP German
Struts2-basic


 Description  « Hide
I've created a new Appfuse project using appfuse-basic-struts archetype and version 2.0-m4-SNAPSHOT.
During running the "mvn integration-test" I got the following Exception:
-------------------------------------------------------------------------------------------------------
[INFO] Configuration Properties file loaded: C:\Java\Appfuse\m4\target\classes\j
dbc.properties
[ERROR] SchemaExport - schema export unsuccessful <java.sql.SQLException: Unknow
n initial character set index '48' received from server. Initial client characte
r set can be forced via the 'characterEncoding' property.>java.sql.SQLException:
 Unknown initial character set index '48' received from server. Initial client c
haracter set can be forced via the 'characterEncoding' property.
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
        at com.mysql.jdbc.Connection.configureClientCharacterSet(Connection.java
:2345)
        at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3
913)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
n(DriverManagerConnectionProvider.java:110)
        at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(Ma
nagedProviderConnectionHelper.java:28)
        at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:180
)
        at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)

at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H
bm2DDLExporterMojo.java:112)
        at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE
xporterMojo.java:139)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:420)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

[WARNING] 1 errors occurred while performing <hbm2ddl>.
[ERROR] Error #1: java.sql.SQLException: Unknown initial character set index '48
' received from server. Initial client character set can be forced via the 'char
acterEncoding' property.
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to C:\Java\Appfuse\m4\target\test-classes
[INFO] [dbunit:operation {execution: test-compile}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing database operation: CLEAN_INSERT

Embedded error: Unknown initial character set index '48' received from server. I
nitial client character set can be forced via the 'characterEncoding' property.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 3 seconds
[INFO] Finished at: Mon Mar 19 21:42:24 CET 2007
[INFO] Final Memory: 16M/30M
[INFO] ------------------------------------------------------------------------

C:\Java\Appfuse\m4>
----------------------------------------------------------------------------------------

There is a problem with the mysql-connector-java driver version 5.0.4. Please see:
http://forums.mysql.com/read.php?39,139534,139889#msg-139889

After downgrading to 5.0.3 like in Milestone3 every thing went fine.
Afterwords I tried to upgrade it do the version 5.0.5. I got an exception because the version 5.0.5 is not yet available in the maven remote repository. So installed it to my local maven repository. Now every thing runs fine.

Pls decide weather to update or to downgrade. Pls find attached the to patches.

Best Regards

 All   Comments   Change History   FishEye      Sort Order:
Matt Raible - 21/Mar/07 04:23 PM
The 5.0.5 version of MySQL's JDBC Driver is now available. Can you try upgrading?

Sebastian Lenk - 21/Mar/07 07:28 PM
Looks good. I've tested the following scenario:
1. I deleted the JDBC-driver 5.0.5 from my local repository.
2. I created a new basic-struts2 project.
3. I changed the JDBC driver in the pom from 5.0.4 to 5.0.5.
4. I run the the integration-test successfully.

Is it correct that you only installed the JDBC driver 5.0.5 to the maven remote repository and that you not changed the pon.xml yet?

Maven downloaded the JDBC driver from the remote repository: See log:

C:\Java\Appfuse\m4APF699>mvn integration-test
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building AppFuse Struts 2 Application
[INFO] task-segment: [integration-test]
[INFO] -------------------------------------------------------------------------
---
Downloading: http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.0.5/mysq
l-connector-java-5.0.5.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.0.5/mysq
l-connector-java-5.0.5.jar
500K downloaded
[INFO] [warpath:add-classes {execution: default}]
....

Best Regards
Sebastian Lenk
 

Matt Raible - 21/Mar/07 08:14 PM
I'm in the process of uploading new archetypes now.