2 Replies Latest reply on Sep 15, 2002 8:40 PM by roque

    Jboss 3, Mysql and special characters

    roque

      I've configured my JBoss without problems to use Mysql, and everything went fine, but now I've noticed that all "special characters" are stored in db OK but when I get them from db they are converted in '?'.
      However if I run a select with this code, everything is ok. So the problem must be with the datasource configuration in jboss.

      Connection C = DriverManager.getConnection(
      "jdbc:mysql://localhost/mydb?useUnicode=true&user=root&password=12345");


      I've seen people here with similar problems with Firebird, but it was not useful to me.

      Can anyone help me please?
      Thanks in advance, Pedro Roque

        • 1. Re: Jboss 3, Mysql and special characters
          davidjencks

          What happens if you specify the db url including the bit about unicode support? Not showing the configuration you are using limits the relevance of any replies.

          • 2. Re: Jboss 3, Mysql and special characters
            roque

            Thanks David...

            I was sure that I had previously tested with this ConnectionURL:
            jdbc:mysql://localhost:3306/mydb?useUnicode=true
            But to send you my config, I've tried it again! Guess what, it works!

            Now my mysql-service.xml look like this:

            <depends optional-attribute-name="ManagedConnectionFactoryName">


            DefaultDS



            <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/mydb?useUnicode=true</config-property>
            <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
            <config-property name="UserName" type="java.lang.String">root</config-property>
            <config-property name="Password" type="java.lang.String">xxxx</config-property>



            <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper





            Thanks!
            Pedro Roque