8 Replies Latest reply on May 24, 2002 2:20 PM by soeiro

    3.0RC1 deploy problem with Oracle8

    bpeeters


      Hello,

      I want to deploy an ear (CMP 2.0)file, It works fine with the Hypersonic DB, the tables where automaticly created.
      Now I want to deploy this ear file with an Oracle database. An exeption occurs:

      4:43:01,292 INFO [BasePropertiesLocalBean] Created table 'BASEPROPERTIESLOCALBEAN' successfully.
      14:43:01,941 INFO [TerminalLocalBean] Created table 'TERMINALLOCALBEAN' successfully.
      14:43:02,082 ERROR [EntityContainer] Exception in service lifecyle operation: start
      org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable is: java.sql.SQLException: ORA-00972: identifier is too long

      java.sql.SQLException: ORA-00972: identifier is too long

      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
      at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
      at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)

      Where can I find the mapping files that the JBoss engine creates to create the tables...
      Can anybody help my with this problem.

      Bart

        • 1. Re: 3.0RC1 deploy problem with Oracle8
          armint

          Bart,

          Use jbosscmp-jdbc.xml to map your CMP fields and table name to their database equivalents. Also, the server log (if debug is on) will show what statement is being used to create the table.

          • 2. Re: 3.0RC1 deploy problem with Oracle8
            bpeeters

            Yes but I don't want to make jbosscmp.xml file.
            I've so many tables and CMR, with Hypersonic, the engine creates al the tables automaticly without this file, so,
            I want it also for Oracle.
            How can I set debug on??

            Bart

            • 3. Re: 3.0RC1 deploy problem with Oracle8
              armint

              I think debug might be turned on by default. But you can edit conf/log4j.xml to change logging priorities. If your not familiar with log4j go to http://jakarta.apache.org/log4j/docs/index.html. Not sure, but you may have to turn on trace logging which is more sensitive than debug. Uncomment the line like:





              I'm not sure if you can change the rules JBoss uses to create the db object mappings. If you really don't want to use jbosscmp-jdbc.xml, you could shorten the bean names ( maybe abstract-schema-name ) and the field names of your beans.

              • 4. Re: 3.0RC1 deploy problem with Oracle8
                dsundstrom

                I trim the table name based on the data in DatabaseMetaData. Can you post the sql executed and exactally what oracle is complaining about?

                • 5. Re: 3.0RC1 deploy problem with Oracle8
                  bpeeters

                  Where can I see the sql that JBoss create to create the tables???? Logs of Oracle?

                  • 6. Re: 3.0RC1 deploy problem with Oracle8
                    chgrimm

                    from Oracle8i Error Messages:

                    ORA-00972 identifier is too long

                    Cause: The name of a schema object exceeds 30 characters. Schema objects are tables, clusters, views, indexes, synonyms, tablespaces, and usernames.

                    Action: Shorten the name to 30 characters or less.

                    ____________________
                    check if your Bean name has more than 30 characters
                    i don't know hypersonic, but maybe i does not have this 30 chararacter restriction, and so it worked

                    • 7. Re: 3.0RC1 deploy problem with Oracle8
                      bpeeters

                      I've no Bean names with more than 30 characters.
                      I think that the problem is when the container generate a table name for link tables (many to many relationship)
                      I think he adds the 2 bean names together and then it's more than 30 characters. But how to fix it?

                      • 8. 3837337
                        soeiro

                        Hello

                        I have the same kind of problem and it is not so easy to solve. We have an object model that is very large. From the start we have been using object names that are complete. For exemple, we use "PersonSituation" and "PersonSituationHistory". There is a lot of code and we would like to keep the long names.

                        Is there any way to tell JBOSS to map an entity bean long name to some kind of internal hash code name? Or mapping?Then it could use a short "alias" to send SQL statements to that primitive and archaic database interface engine that is used by Oracle.

                        Thanks,

                        Luis JB Soeiro