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.
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??
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.
I trim the table name based on the data in DatabaseMetaData. Can you post the sql executed and exactally what oracle is complaining about?
Where can I see the sql that JBoss create to create the tables???? Logs of Oracle?
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
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?
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.
Luis JB Soeiro