Hi Martin,
I'm glad you found it. OpenJPA allows you to specifiy different engine
settings:
Maybe you can make it work with setting the
|TableType|: The MySQL table type to use when creating tables. Defaults
to |innodb|.
in the persistence.xml. See
http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_mysql
Or maybe you can ask what to use at the OpenJPA forums. It'd be
interesting for us
to know if we should upgrade to a newer version of OpenJPA to support
this version of MySQL.
Thx,
--Kurt
On 4/6/11 4:59 AM, Martynas A. (chainer) wrote:
Morning,
Yes that was it, it worked with mysql Ver 14.14 Distrib 5.1.56. So I
guess this is a version leak which should be fixed in the future.
--Martin
2011/4/5 Martynas A. (chainer) <[email protected]
<mailto:[email protected]>>
Hi again,
Well I looked deeper in SQL error and I remembered that
TYPE=innodb is incorrect and mysql only 'eats' ENGINE=innodb. I'm
totally unexperienced in mysql, but I manually tried to give this
to mysql:
CREATE TABLE j3_address (id BIGINT NOT NULL, sort_code
VARCHAR(10), tmodel_key VARCHAR(255), use_type VARCHAR(255),
address_id BIGINT NOT NULL, PRIMARY KEY (id)) ENGINE = innodb
And mysql 'ate' it.
mysql> show tables;
+-------------------+
| Tables_in_juddiv4 |
+-------------------+
| j3_address |
+-------------------+
1 row in set (0.00 sec)
mysql>
I guess TYPE is off since 5.1? I'm using 5.5. Could that be a problem?
--Martin
2011/4/5 Martynas A. (chainer) <[email protected]
<mailto:[email protected]>>
Kurt,
I know about copying juddiv3/META-INF/context.xml to
conf/Catalina/localhost/juddiv3.xml, so I always delete
juddiv3.xml. Just tried on win7 64x. Fresh mysql5.5 install,
fresh database, fresh unzip, only persistence.xml and
context.xml changes, and it goes same like on my winVista32x.
Creates 0 tables. Same exception:
SEVERE: StandardWrapper.Throwable
<openjpa-1.2.2-r422266:898935 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: 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 'TYPE = innodb' at line 1 {stmnt
726045964 CREATE TABLE j3_address (id BIGINT NOT NULL,
sort_code VARCHAR(10), tmodel_key VARCHAR(255), use_type
VARCHAR(255), address_id BIGINT NOT NULL, PRIMARY KEY
(id)) TYPE = innodb} [code=1064, state=42000]
at
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
at
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
...
This makes me crazy since I just did it on linux few hours
ago. I will create a prefab.zip with these changes where you
can only unzip it and hit startup.
Here it is (under mysql juddiv4 database, with login 'root'
and no password):
http://rapidshare.com/files/456047193/juddi-portal-bundle-3.0.4_mysql.localhost.3306.juddiv4__root_____.zip
Already tested with it on third pc (win7 32x). Still creates 0
tables.
Looking for anything... :-|
--Martin