Results 1 to 7 of 7

Thread: DBRE error --Invalid byte 2 of 2-byte UTF-8 sequence

  1. #1
    Join Date
    Apr 2012
    Posts
    2

    Default DBRE error --Invalid byte 2 of 2-byte UTF-8 sequence

    Hi guys, when I run command “database reverse engineer --schema no-schema-required” to reverse engineer with a MySQL database containing Chinese description, Prompt an error:

    Updated SRC_MAIN_RESOURCES\dbre.xml
    Undo manage SRC_MAIN_RESOURCES\dbre.xml
    Invalid byte 2 of 2-byte UTF-8 sequence.
    , how to solve?

    --Development environment: WINDOWS XP SP2(Simplified Chinese), JAVA:1.6.0_31,SpringSource Tool Suite 2.9.1.RELEASE(Roo 1.2.1.RELEASE [rev 6eae723])

  2. #2
    Join Date
    Apr 2012
    Posts
    1

    Default I have the same problem when I try to use "database" command!

    Quote Originally Posted by moowx View Post
    Hi guys, when I run command “database reverse engineer --schema no-schema-required” to reverse engineer with a MySQL database containing Chinese description, Prompt an error:



    , how to solve?

    --Development environment: WINDOWS XP SP2(Simplified Chinese), JAVA:1.6.0_31,SpringSource Tool Suite 2.9.1.RELEASE(Roo 1.2.1.RELEASE [rev 6eae723])
    I have the same problem when I try to use "database" command! How to solve ?

  3. #3
    Join Date
    May 2006
    Location
    Madrid
    Posts
    382

    Default

    Another one:

    C:\...>roo
    ____ ____ ____
    / __ \/ __ \/ __ \
    / /_/ / / / / / / /
    / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/ 1.2.1.RELEASE [rev 6eae723]


    Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
    roo> database reverse engineer --schema MY_SCHEMA --package ~.tables --testAutomatically
    Updated SRC_MAIN_RESOURCES\dbre.xml
    Undo manage SRC_MAIN_RESOURCES\dbre.xml
    Invalid byte 2 of 2-byte UTF-8 sequence.
    roo>
    What I've found weird, as far as I know, is that the error is due to a problem parsing the XML that is being generating by Roo: dbre.xml (src/main/resources)

    Maybe the problem is in some character obtained from the database that is not UTF-8 compliant. I've tried to change within the POM the property project.build.sourceEncoding from UTF-8 to iso-8859-1, but it didn't work either.

    It would be a good if Roo provided more information regarding the problem. But maybe it's not easy.

    I wish someone from Spring could help us with this problem

    Roo Environment:
    Windows 7 (32 bits)
    Java 6
    Roo 1.2.1

    DB Environment:
    Oracle v8.1

    In Spanish (international, I hope)

  4. #4

    Default

    Quote Originally Posted by jbbarquero View Post

    Maybe the problem is in some character obtained from the database that is not UTF-8 compliant. I've tried to change within the POM the property project.build.sourceEncoding from UTF-8 to iso-8859-1, but it didn't work either.
    Hi, I'm stuck in the same problem. the rare thing is that I can perform a

    database introspect --schema
    And Roo print the schema structure.

    The tables in my schema has comments with accented words and html things like:
    Code:
    <column description="Indicador de que la tarea se realizó.&#13 ;&#10 ;0: no realizada&#13 ;
    1: realizada"
    I did a test with a very simple schema and the DBRE ran perfectly.

  5. #5
    Join Date
    May 2006
    Location
    Madrid
    Posts
    382

  6. #6
    Join Date
    May 2006
    Location
    Madrid
    Posts
    382

    Default

    Thanks Giovanni.

    I've tried database introspect with the "--file" option and I've found the XML errors using Notepad++ (with the XML Tools plugin). With it, I could locate the very lines that was producing the error.

    <table alias="ALIAS" name="TEMPORADA">
    <column .../>
    <column name="AÑO" primaryKey="false" required="true" scale="0" size="4" type="3,NUMBER"/>

    <table alias="ALIAS" name="APLICACIÓN">
    ...
    </table>

  7. #7
    Join Date
    Apr 2012
    Posts
    3

    Default dirty workaround

    Hi all,

    I've got the same problem and I solved it by doing database introspect, copy the result from the console into notepad++, change the encoding in the XML declaration on the first line and save it as dbre.xml in the right folder, everything went smoothly after that when I called database reverse engineer.
    Only thing is that if your DB changes, you have to repeat the procedure.

    Hope it helps

    Best regards from France

    Benoit


    Quote Originally Posted by jbbarquero View Post
    Thanks Giovanni.

    I've tried database introspect with the "--file" option and I've found the XML errors using Notepad++ (with the XML Tools plugin). With it, I could locate the very lines that was producing the error.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •