3 Replies Latest reply on Jan 9, 2007 6:09 PM by Max Rydahl Andersen

    Seam-gen

    J.R. Ector Newbie

      I'm using an Oracle Express db with seam-gen and I'm getting the following error message:

      generate-entities:
      [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
      [hibernate] 1. task: hbm2java (Generates a set of .java files)
      [hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files
      )
      [hibernate] To get the full stack trace run ant with -verbose
      [hibernate] org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSN
      TQ/5M5j/MQNSejz17KVYonQ==
      [hibernate] java.sql.SQLException: ORA-01424: missing or illegal character following the escape char
      acter
      [hibernate]
      
      BUILD FAILED
      C:\jboss-seam-1.1.0.GA\seam-gen\build.xml:665: org.hibernate.exception.DataException: Error while re
      ading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVYonQ==
       at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:222)
       at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:185)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
       at org.apache.tools.ant.Task.perform(Task.java:364)
       at org.apache.tools.ant.Target.execute(Target.java:341)
       at org.apache.tools.ant.Target.performTasks(Target.java:369)
       at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
       at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
       at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
       at org.apache.tools.ant.Main.runBuild(Main.java:668)
       at org.apache.tools.ant.Main.startAnt(Main.java:187)
       at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
       at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      Caused by: org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNT
      Q/5M5j/MQNSejz17KVYonQ==
      


      Is there a known problem with seam-gen and oracle express?

        • 1. Re: Seam-gen
          Max Rydahl Andersen Master

          would be interesting to know the full stack trace.

          could you try and run with -verbose ?

          there is not a known issue with oracle express; but it is recommended for oracle to set hibernate.default_schema to make it only reverse engineer a single schema.

          • 2. Re: Seam-gen
            J.R. Ector Newbie

            Here's the stacktrace:

            $ ant -verbose generate-entities
            Apache Ant version 1.6.5 compiled on June 2 2005
            Buildfile: build.xml
            Detected Java version: 1.5 in: c:\Program Files\Java\jdk1.5.0_08\jre
            Detected OS: Windows XP
            parsing buildfile C:\jboss-seam-1.1.0.GA\seam-gen\build.xml with URI = file:///C:/jboss-seam-1.1.0.GA/seam-gen/build.xml
            
            Project base dir set to: C:\jboss-seam-1.1.0.GA\seam-gen
             [property] Loading C:\jboss-seam-1.1.0.GA\seam-gen\build.properties
            Build sequence for target(s) `generate-entities' is [validate-workspace, validate-project, generate-entities]
            Complete build sequence is [validate-workspace, validate-project, generate-entities, undeploy, setup-filters, deploy, fi
            le-copy-wtp, action-input, new-conversation, entity-input, copy-lib, new-form, new-entity, setup, update-project, clean,
             restart, explode, help, delete-project, file-copy, new-project, new-action, settings, reset, unexplode, ]
            
            validate-workspace:
            
            validate-project:
            
            generate-entities:
            [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
            [hibernate] 1. task: hbm2java (Generates a set of .java files)
            [hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
            [hibernate] To get the full stack trace run ant with -verbose
            [hibernate] org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVY
            onQ==
            [hibernate] java.sql.SQLException: ORA-01424: missing or illegal character following the escape character
            [hibernate]
            
            BUILD FAILED
            C:\jboss-seam-1.1.0.GA\seam-gen\build.xml:665: org.hibernate.exception.DataException: Error while reading column meta da
            ta for SYS.SYSNTQ/5M5j/MQNSejz17KVYonQ==
             at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:222)
             at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:185)
             at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
             at org.apache.tools.ant.Task.perform(Task.java:364)
             at org.apache.tools.ant.Target.execute(Target.java:341)
             at org.apache.tools.ant.Target.performTasks(Target.java:369)
             at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
             at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
             at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
             at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
             at org.apache.tools.ant.Main.runBuild(Main.java:668)
             at org.apache.tools.ant.Main.startAnt(Main.java:187)
             at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
             at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
            Caused by: org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVYo
            nQ==
             at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
             at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:146)
             at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:546)
             at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:84)
             at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:828)
             at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:118)
             at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89)
             at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
             at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:82)
             at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
             at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:298)
             at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:314)
             at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
             at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34)
             at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
             at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:182)
             ... 12 more
            Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape character
            
             at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
             at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
             at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
             at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
             at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
             at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
             at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
             at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
             at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
             at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
             at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
             at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:262)
             at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124)
             ... 26 more
            --- Nested Exception ---
            org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVYonQ==
             at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
             at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:146)
             at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:546)
             at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:84)
             at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:828)
             at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:118)
             at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89)
             at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
             at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:82)
             at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
             at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:298)
             at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:314)
             at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
             at org.hibernate.tool.ant.Hbm2JavaExporterTask.configureExporter(Hbm2JavaExporterTask.java:34)
             at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
             at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:182)
             at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
             at org.apache.tools.ant.Task.perform(Task.java:364)
             at org.apache.tools.ant.Target.execute(Target.java:341)
             at org.apache.tools.ant.Target.performTasks(Target.java:369)
             at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
             at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
             at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
             at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
             at org.apache.tools.ant.Main.runBuild(Main.java:668)
             at org.apache.tools.ant.Main.startAnt(Main.java:187)
             at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
             at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
            Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape character
            
             at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
             at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
             at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
             at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
             at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
             at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
             at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
             at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
             at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
             at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
             at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
             at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:262)
             at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:124)
             ... 26 more
            
            Total time: 3 minutes 50 seconds
            
            


            It worked fine when I set default_schema.

            Thanks

            • 3. Re: Seam-gen
              Max Rydahl Andersen Master

              ok - set hibernate.default_schema to avoid reading the system tables which apparently have a table with some characters the metadata lookups cannot handle.