[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Configure JBoss to connect to multi database on multi ma
catania
do-not-reply at jboss.com
Tue Oct 9 04:56:38 EDT 2007
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
More information about the jboss-user
mailing list