okay, my persistence.xml looks:

    <properties>
>       <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(SchemaAction='add')"/>
>       <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>
>       <property name="openjpa.jdbc.UpdateManager" value="operation-order"/>
>       <property name="openjpa.jdbc.DBDictionary"
> value="org.apache.openjpa.jdbc.sql.MySQLDictionary"/>
>       <property name="openjpa.RuntimeUnenhancedClasses" value="warn"/>

    </properties>
>
(<property name="openjpa.ConnectionDriverName"
value="com.mysql.jdbc.Driver"/> - makes no diff, I guess it takes
ConnectionDriverName from context.xml)

context.xml:

<?xml version="1.0" encoding="UTF-8"?>
> <Context>
>     <WatchedResource>WEB-INF/web.xml</WatchedResource>
>     <!-- mysql -->
>     <Resource name="jdbc/JuddiDS" auth="Container"
>             type="javax.sql.DataSource" username="juddi" password="juddipw"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/juddiv3"
>             maxActive="8"
>             />
> </Context>
>

I even found you have similar problems some time ago (
http://openjpa.208410.n2.nabble.com/Openjpa-MySQL-Tomcat-datasource-issue-td3680422.html).
However I still cannot manage how to force it to build tables. Now it
even does nothing.

localhost***.log tells:

Apr 5, 2011 5:58:03 PM org.apache.catalina.core.ApplicationContext log
> INFO: Initializing Spring root WebApplicationContext
> Apr 5, 2011 5:58:09 PM org.apache.catalina.core.ApplicationContext log
> 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
> 15097546 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)
>     at
> org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
> ...
>

Seems like a very similar exception to yours, but this time it's not
juddiv3.xml and context.xml conflict, since they are both the same and
nomater if I delete juddiv3.xml that makes no difference.

--Martin



2011/4/5 Kurt T Stam <[email protected]>

>  Martin,
>
> jUDDI uses JPA for persistence, and we support 2 implementations: OpenJPA
> and Hibernate. It looks like you are using OpenJPA, but with a
> persistence.xml which tries to use Hibernate.
>
> You should be using the OpenJPA persistence.xml. Can you try that?
>
> Thx,
>
> --Kurt
>
>
>
>
> On 4/5/11 10:01 AM, Martynas A. (chainer) wrote:
>
> Okay, I turned some debug options in log4j.properties:
>
> log4j.category.org.springframework.beans.property
> editors.CustomDateEditor=DEBUG
>
> log4j.debug=true
>
> # showing sql
> log4j.category.org.hibernate.hql.ast.QueryTranslatorImpl=DEBUG
> log4j.category.org.hibernate.SQL=DEBUG
> log4j.category.org.hibernate.loader.hql.QueryLoad er=DEBUG
>
>
> Launched on fresh juddi bundle deployment and juddiv3 database.This
> probably might be interesting:* localhost.2011-04-05.log (
> http://codepaste.net/yuq5jq )** *others should be pretty much the same (
> catalina.2011-04-05.log http://codepaste.net/o99gk3 ) and ( juddi.log
> http://codepaste.net/56hiet ).
>
> Tom Cunningham <[email protected]>
>
> instead.        I have MySQL 5 installed locally, so if you're still having
> problems after that, I'll run through the instructions on my box with the
> juddi-portal-bundle and double check them for you.
>
>
> Maybe u have checked that?
>
> --Martin
>
> 2011/4/5 Kurt T Stam <[email protected]>
>
>  Hi Martin,
>
> The logs you referenced do not show any logging of it creating tables.
>
> --K
>
>
> On 4/5/11 6:09 AM, Martynas A. (chainer) wrote:
>
> Morning,
>
> on fresh clean juddiv3 database, with mentioned presistence.xml (
> http://codepaste.net/donutg ) and context.xml (
> http://codepaste.net/hckpnf )
>
> juddi.log: ( http://codepaste.net/b317wh )
> cmd.exe: ( http://codepaste.net/xv6zmi )
>
> --Martin
>
>  2011/4/5 Kurt T Stam <[email protected]>
>
>  Can you check the juddi.log for errors? If it doesn't create all the
> tables, there must be some error that may give you a clue as to what's going
> on. --K
>
>
> On 4/4/11 12:43 PM, Martynas A. (chainer) wrote:
>
> okay I did it from the start with using MySQL5Dialect. Deleted juddiv3.xml,
> edited persistence.xml looks now ( http://codepaste.net/donutg ), and
> context.xml looks now ( http://codepaste.net/hckpnf ). Still creates only
> 34 tables.
>
> --Martin
>
> 2011/4/4 Tom Cunningham <[email protected]>
>
>
>
>
>
> On 04/04/2011 12:12 PM, Martynas A. (chainer) wrote:
>
> I'm using portable 'juddi-portal-bundle-3.0.4', MySQL5.5 [mysql  Ver 14.14
> Distrib 5.5.9, for Win32 (x86)], and now tried with PostgreSQL (postgres
> (PostgreSQL) 9.0.3).
>
>
>  okay I feel a bit green now, how to use MySQL5Dialect then? If it's about
> of downloading 'hibernate-core-3.3.2.GA.jar' and adding it to '~\lib', I did
> it but nothing changes. I don't know how exactly this object-relational
> mapping works.
>
>
>
> The first instruction in the User Guide on how to switch to MySQL talks
> about editing the persistence.xml file and adding :
>
>
>  <property name="hibernate.dialect" 
> value="org.hibernate.dialect.MySQLDialect"/>
>
>
>  What Kurt is suggesting is adding :
>
>  <property name="hibernate.dialect" 
> value="org.hibernate.dialect.MySQL5Dialect"/>
>
>
> instead.        I have MySQL 5 installed locally, so if you're still having
> problems after that, I'll run through the instructions on my box with the
> juddi-portal-bundle and double check them for you.
>
>
>
>
>
>
>
>

Reply via email to