All, I've gone through the process of configuring Orion and the ejbsamples to run with a mysql database. Things seem to be nearly correct. Orion connects to the database ok, but dies trying to create tables. The problem seems to be related to syntax or type mismatches between hypersonic db and mysql. Some of the postings on this list seem to suggest that these mismatches can be addressed by defining type mappings in mysql.xml. I've tried this without success.
I've included the error message, data-sources.xml and the mysql.xml I'm using. If anyone's been through the exercies and can provide any useful pointers, it would be much appreciated. TIA. John Hogan ERROR TEXT: ======================= [root@dalcassion orion]# java -classpath /opt/orion/application-deployments/serverclasses/mm.mysql-2.0.8 -jar orion.jar Auto-deploying ejbsamples (New server version detected)... Auto-deploying usermanager (No previous deployment found)... Auto-creating table: create table com_evermind_ejb_EJBUser (username SET(255) not null primary key, password SET(255) null, description SET(255) null, locale SET(5) null, certificateIssuerDN SET(255) null, certificateSerial SET(100) null) Warning: Error creating table: Syntax error or access violation: You have an error in your SQL syntax near '255) not null primary key, password SET(255) null, description SET(255) null, lo' at line 1 Auto-creating table: create table com_evermind_ejb_EJBUser_groups (username SET(255) not null, value SET(255) not null, primary key (username, value)) Warning: Error creating table: Syntax error or access violation: You have an error in your SQL syntax near '255) not null, value SET(255) not null, primary key (username, value))' at line 1 done. Auto-deploying product (No previous deployment found)... Auto-creating table: create table MyProduct (id BIGINT not null primary key, name SET(255) null, description SET(255) null, price FLOAT null) Warning: Error creating table: Syntax error or access violation: You have an error in your SQL syntax near '255) null, description SET(255) null, price FLOAT null)' at line 1 done. Auto-deploying cart (No previous deployment found)... done. Orion/1.4.8 initialized ================================= data-sources.xml ================================= <?xml version="1.0"?> <!DOCTYPE data-sources PUBLIC "Orion data-sources" " http://www.orionserver.com/dtds/data-sources.dtd"> <data-sources> <!-- An example/default DataSource that uses an ordinary JDBC-driver (in this case hsql) to create the connections. This tag creates all the needed kinds of data-sources, transactional, pooled and EJB-aware sources. The source generally used in application code is the "EJB" one - it provides transactional safety and connection pooling. --> <data-source name="mysql" class="com.evermind.sql.DriverManagerDataSource" location="jdbc/mysql" pooled-location ="jdbc/mysqlPooled" xa-location="jdbc/xa/mysql" ejb-location="jdbc/mysql" url="jdbc:mysql:/opt/mysql/mysql/data/menagerie" connection-driver="org.gjt.mm.mysql.Driver" username="root" password="sPikeO1" inactivity-timeout="30" /> </data-sources> ============================= database-schemas/mysql.xml ============================= <?xml version="1.0"?> <!DOCTYPE database-schema PUBLIC "-//Evermind//- Database schema" " http://www.orionserver.com/dtds/database-schemas.dtd"> <database-schema name="Mysql" not-null="not null" null="" primary-key ="primary key"> <type-mapping type="java.lang.String" name="varchar(255)" /> <type-mapping type="int" name="integer" /> <type-mapping type="float" name="float" /> <type-mapping type="double" name="double" /> <type-mapping type="byte" name="smallint" /> <type-mapping type="char" name="char(1)" /> <type-mapping type="short" name="integer" /> <type-mapping type="boolean" name="char(1)"/> <type-mapping type="java.util.Date" name="datetime" /> <disallowed-field name="password" /> <disallowed-field name="username" /> <disallowed-field name="date" /> <disallowed-field name="text" /> </database-schema> -- _______________________________________________ Get your email from http://www.ireland.com