Now, I write a entity named "Log_Entry"
@Entity
  | @Table(name = "log_records", schema = "CDatabase")
  | public class LogEntry implements Serializable {
  |    private int id;
  |    private Timestamp date;
  |    public LogEntry(final Level lvl, final String msg) {
  |         ....
  |     }
  |     @Id
  |     @GeneratedValue(strategy = GenerationType.AUTO)
  |     public int getId() {
  |     return id;
  |     }
  | ....
  And I have persistent.xml:
<persistence>
  |     <persistence-unit name="CDatabase">
  |             <jta-data-source>java:/MySqlDSTmp</jta-data-source>
  |             <properties>
  |                     <property name="hibernate.hbm2ddl.auto" value="update" 
/>
  |                     <property name="hibernate.connection.driver_class">
  |                             com.mysql.jdbc.Driver
  |                     </property>
  |                     <property name="hibernate.default_schema">
  |                             CDatabase
  |                     </property>
  |                     <property name="hibernate.dialect">
  |                             org.hibernate.dialect.MySQLDialect
  |                     </property>
  |             </properties>
  |     </persistence-unit>
  | </persistence>
  And I have some errors:
15:41:36,045 ERROR [SchemaUpdate] Unsuccessful: create table 456.log_records (id
  |  integer not null auto_increment, message varchar(255), date datetime, 
level var
  | char(255), primary key (id))
  | 15:41:36,061 ERROR [SchemaUpdate] Syntax error or access violation message 
from
  | server: "You have an error in your SQL syntax; check the manual that 
corresponds
  |  to your MySQL server version for the right syntax to use near 
'456.log_records
  | (id integer not null auto_increment, message varchar(255), date ' at line 1"
   But same as BDatabase, I deploy success (open MySql, and I see log_entry 
table!)! --> mean that JBoss server "not connect" to  CDatabase (not effect).
   have some ideas !

  Thank.

  Catania.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092903#4092903

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092903
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to