1 Reply Latest reply on Nov 14, 2012 5:41 PM by John Doe

    Schema Validation in JBoss 6.0

    John Doe Newbie

      Hi everyone!

      I'm new to this, I hope you can all help me with my issue.

       

       

      I have 2 instances of JBoss Server installed, both on different Servers. One is a Test- Server, and one is for the productive enivornment. On each Server, there is a database installed.

      So:

       

      On Server A: Database- name is database_usertest

      On Server B: Database- name is database_user

       

       

      In my persistence.xml, i have defined my persistence-unit, and of course :

       

      <jta-data-source>java:jboss/datasources/MyDataSource</jta-data-source>

       

      So, on the

      Server A: the Data- Source (with the JNDI- Name "MyDataSource") points to the data-base user database_usertest

      Server B: the Data- Source (with the JNDI- Name "MyDataSource") points to the data-base user database_user

       

      When i deploy my ear- File on JBoss, i get different results for the schema validator.

      On Server A, it looks like this:

       

      15:01:30,803 INFO  [SchemaValidator] Running schema validator

      15:01:30,803 INFO  [SchemaValidator] fetching database metadata

      15:01:31,216 INFO  [DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

      15:01:31,244 INFO  [TableMetadata] table found: DATABASE_USERTEST.TABLE_NAME

      15:01:31,244 INFO  [TableMetadata] columns: [abtname, abtnr, flags, abtkurz]

      15:01:31,246 INFO  [DatabaseMetadata] table not found: TABLE_NAME_2

       

      On Server B, it looks like this:

       

      12:15:20,832 INFO  [SchemaValidator] Running schema validator

      12:15:20,832 INFO  [SchemaValidator] fetching database metadata

      12:15:21,566 INFO  [DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

      12:15:21,597 INFO  [TableMetadata] table found: DATABASE_USER.TABLE_NAME

      12:15:21,597 INFO  [TableMetadata] columns: [column1, column2, column3, column4]

      12:15:21,604 INFO  [TableMetadata] table found: DATABASE_USER.TABLE_NAME_2

      12:15:21,604 INFO  [TableMetadata] columns: [column1, column2, column3, column4]

       

      So, when i deploy my ear- File on Server A, i get an Deployment- Error, because 15:01:31,246 INFO  [DatabaseMetadata] table not found: TABLE_NAME_2. Clearly, the prefix (which in this case is DATABASE_USERTEST) is missing, but only for TABLE_NAME_2. For the Table TABLE_NAME, it is written correctly.

      Not only that - on Server B, which points to the database database_user, it deploys without any error...

       

      Anyone, any ideas? Please help ...