Announcement Announcement Module
Collapse
No announcement yet.
1.1.3.RELEASE - Exception when reverse engineering Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 1.1.3.RELEASE - Exception when reverse engineering

    When trying to reverse engineer there seems to be a problem with an XML-file. I've checked the encoding of dbre.xml, pom.xml and persistence.xml - they're all UTF-8 without BOM. Any help would be appreciated. Thanks.

    Code:
    xx.xx.xx.xx roo> database reverse engineer --package ~.domain --schema public
    Created SRC_MAIN_RESOURCES\dbre.xml
    Updated ROOT\pom.xml
    Updated SRC_MAIN_RESOURCES\META-INF\persistence.xml
    java.lang.IllegalStateException: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence.
            at org.springframework.roo.addon.dbre.model.DatabaseXmlUtils.readDatabaseStructureFromInputStream(DatabaseXmlUtils.java:71)
            at org.springframework.roo.addon.dbre.model.DbreModelServiceImpl.getDatabase(DbreModelServiceImpl.java:92)
            at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.deserializeDatabase(DbreDatabaseListenerImpl.java:100)
            at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.onFileEvent(DbreDatabaseListenerImpl.java:82)
            at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330)
            at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:213)
            at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:189)
            at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:143)
            at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
            at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:182)
            at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:373)
            at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:134)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence.
            at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:684)
            at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:405)
            at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)
            at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral(XMLEntityScanner.java:1064)
            at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:974)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(XMLDocumentFragmentScannerImpl.java:1547)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1320)
    
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
            at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
            at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
            at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
            at org.springframework.roo.addon.dbre.model.DatabaseXmlUtils.readDatabaseStructureFromInputStream(DatabaseXmlUtils.java:66)
            ... 12 more

  • #2
    What JDK are you using with Roo? Please zip up the dbre.xml file, attach here, and I will try to replicate the issue.

    Comment


    • #3
      I'm currently using JDK 1.6.0.22 (64 bit).
      Last edited by ps3ud0nym; May 6th, 2011, 06:52 AM. Reason: preventing potential copyright violation

      Comment


      • #4
        I get the same problem. Please raise a Jira bug request. Attach your project if possible - use the "backup" command in the Roo shell.
        Thanks

        Comment


        • #5
          Also attach your schema DDL and let me know what database you're using. If it is an encoding issue I need to be able to regenerate the dbre.xml file.

          Comment


          • #6
            Actually, changing the encoding to ISO-8859-1 solves the problem.

            Comment


            • #7
              The database in use is PostgreSQL.

              Anyway, I have found what caused the problem. There was a special character in one of the table's description. This was not a problem in an earlier version of Roo however.

              Comment


              • #8
                I have the same problem with Postgresql 9.2 database.
                I tested next:

                • This problem exists in a spanish database
                • Run "locale" command
                • With LC_ALL=es_ES@euro error occurs
                • With LC_ALL=es_ES.UTF-8 error NOT occurs
                Regards !

                Comment

                Working...
                X