Well the thing is that exactly same problem goes with postgres.
> javax.xml.ws.soap.SOAPFaultException: ERROR: unterminated quoted string at
> or near "'\')"
> Position: 348 {prepstmnt 19982237 SELECT DISTINCT t1.entity_key FROM
> j3_business_entity t0 INNER JOIN j3_uddi_entity t1 ON t0.entity_key =
> t1.entity_key JOIN j3_business_name t2 ON (1 = 1) INNER JOIN
> j3_business_entity t3 ON t2.entity_key = t3.entity_key INNER JOIN
> j3_uddi_entity t4 ON t3.entity_key = t4.entity_key WHERE (t1.entity_key =
> t4.entity_key AND t2.name LIKE ? ESCAPE '\') [params=(String) %]} [code=0,
> state=42601]
> at
> com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
> at
> com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
> at
> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
> at
> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
> at
> com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
> at $Proxy44.findBusiness(Unknown Source)
>
Took a look into postgres juddi db, same 34 tables created.
2011/4/4 Tom Cunningham <[email protected]>
>
> What are you using?
>
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).
Hi Martin,
>
> If you are using Mysql 5, try using the MySQL5Dialect. Make sure to drop
> all tables from the database before starting up jUDDI, and
> make sure that all tables are created at startup time. You should have 46
> tables (not 34 as you have). Also you should see some Seed Data in the
> database.
>
> -K
>
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.
--Martin
2011/4/4 Tom Cunningham <[email protected]>
>
> What are you using?
>
> Everson's directions are for JBoss, but I think he was confused and didn't
> know what container you are using. If you're not using JBoss, just
> ignore those instructions and follow what Kurt said.
>
>
>
>
> On 04/04/2011 11:49 AM, Martynas A. (chainer) wrote:
>
> I'm not using jboss. Seems like I must if I wanna use mysql?
>
> 2011/4/4 everson santos <[email protected]>
>
>> did you change the juddi-ds.xml ??
>>
>>
>> <mbean
>> code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
>> name="jboss.esb:service=JUDDIDatabaseInitializer">
>> <attribute name="Datasource">java:/juddiDB</attribute>
>> <attribute name="ExistsSql">select count(*) from
>> j3_publisher</attribute>
>> <attribute name="SqlFiles">
>> juddi-sql/mysql/import.sql
>> </attribute>
>> <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
>> </mbean>
>> </datasources>
>>
>>
>> --- Em *seg, 4/4/11, Kurt T Stam <[email protected]>* escreveu:
>>
>>
>> De: Kurt T Stam <[email protected]>
>> Assunto: Re: juddiv3 (3.0.4) mysql problems
>> Para: [email protected]
>> Data: Segunda-feira, 4 de Abril de 2011, 11:51
>>
>>
>> Hi Martin,
>>
>> If you are using Mysql 5, try using the MySQL5Dialect. Make sure to drop
>> all tables from the database before starting up jUDDI, and
>> make sure that all tables are created at startup time. You should have 46
>> tables (not 34 as you have). Also you should see some Seed Data in the
>> database.
>>
>> -K
>>
>>
>> On 4/4/11 10:45 AM, Martynas A. (chainer) wrote:
>>
>> Also, now I cannot even get authtoken:
>>
>> javax.xml.ws.soap.SOAPFaultException: 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 'VARCHAR(1000))) LIKE '%KEYGENERATOR' ESCAPE
>> '\')' at line 1 {prepstmnt 5378543 SELECT t1.entity_key FROM j3_tmodel t0
>> INNER JOIN j3_uddi_entity t1 ON t0.entity_key = t1.entity_key WHERE
>> (t1.authorized_name = ? AND UPPER(CAST(t1.entity_key AS VARCHAR(1000))) LIKE
>> ? ESCAPE '\') [params=(String) root, (String) %KEYGENERATOR]} [code=1064,
>> state=42000]
>> at
>> com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
>> at
>> com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
>> at
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
>> at
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
>> at
>> com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
>> at $Proxy39.getAuthToken(Unknown Source)
>> at juddiv3admin.juddiv3.Tools.getAuthToken(Tools.java:118)
>>
>>
>> like in sentence 'SELECT t1.entity_key FROM j3_tmodel' from this
>> exception, I cannot even see 'j3_tmodel' table in 'juddiv3' schema (if I
>> understand correctly, there should be one).
>>
>> --Martin
>>
>>
>>
>> 2011/4/4 chainerlt
>> <[email protected]<http://mc/[email protected]>
>> >
>>
>>
>> Hello,
>>
>> I got some problems while switching to MySQL (using latest 5.5 [mysql Ver
>> 14.14 Distrib 5.5.9, for Win32 (x86)]). From User-Guide (
>>
>> http://juddi.apache.org/docs/3.0/userguide/html/chap-database_setup.html#sect-switch_to_mysql
>> ) everything seems to be very easy. But it is not. Let me describe what
>> I've
>> done in case to switch to MySQL:
>> (First of all, lets make sure that I have default juddiv3 installation, so
>> I
>> downloaded latest 'juddi-portal-bundle-3.0.4.zip' and extracted it. That's
>> it). Also downloaded latest 'mysql-connector-java-5.1.9.jar' and added to
>> my
>> applications path.
>> 1. Created empty 'juddiv3' schema in mysql:
>>
>>
>> > mysql> show databases;
>> > +--------------------+
>> > | Database |
>> > +--------------------+
>> > | information_schema |
>> > | mysql |
>> > | performance_schema |
>> > +--------------------+
>> > 3 rows in set (0.00 sec)
>> >
>> > mysql> create database juddiv3;
>> > Query OK, 1 row affected (0.00 sec)
>> >
>> > mysql> show databases;
>> > +--------------------+
>> > | Database |
>> > +--------------------+
>> > | information_schema |
>> > | juddiv3 |
>> > | mysql |
>> > | performance_schema |
>> > +--------------------+
>> > 4 rows in set (0.00 sec)
>> >
>> 2. Created user 'juddi' with password 'juddipw' with privileges to
>> perform:
>> ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES,
>> CREATE VIEW, DELETE, DROP, EVENT, GRANT OPTION, INDEX, INSERT, LOCK
>> TABLES,
>> SELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE.
>> Here's how it looks in user table in mysql db:
>>
>>
>> > '%', 'juddi', '*D4EF5792C4530F9685E4217ED24678BA48C6ACB4', 'Y', 'Y',
>> 'Y',
>> > 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'Y', 'Y', 'Y', 'N', 'Y',
>> 'Y',
>> > 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y', 'N', 'Y', 'Y', 'N', '', ?, ?, ?, '0',
>> > '0', '0', '0', '', ''
>> >
>> > 'localhost', 'juddi', '*D4EF5792C4530F9685E4217ED24678BA48C6ACB4', 'Y',
>> > 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'Y', 'Y', 'Y',
>> 'N',
>> > 'Y', 'Y', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y', 'N', 'Y', 'Y', 'N', '', ?,
>> ?,
>> > ?, '0', '0', '0', '0', '', ''
>> >
>> 3. Added '<property name="hibernate.dialect"
>> value="org.hibernate.dialect.MySQLDialect"/>' to
>> '!~\webapps\juddiv3\WEB-INF\classes\META-INF\persistence.xml'. So it looks
>> like this now: ( http://pastecode.com/2793 )
>> 4. Edited '~\webapps\juddiv3\META-INF\context.xml'. (username="juddi"
>> password="juddipw") So it looks like: ( http://pastecode.com/2795 )
>> 5. Here I should delete '~\conf\Catalina\localhost\juddiv3.xml' but since
>> it
>> is the first time we are going to run juddiv3, there are no 'juddiv3.xml'
>> and we don't need to delete anything.
>> 6. Seems like everything is ready. 'persistence.xml' is set up,
>> 'context.xml' is changed, 'juddiv3' database and 'juddi' user created.
>> Lets
>> start juddiv3: '~\bin\startup.bat' (I'm using Windows Vista 32x at the
>> moment). Here we go, no errors or messages, seems like the server is up.
>>
>> Now lets look deeper:
>>
>> 1. First of all lets try to open ( http://localhost:8080/juddiv3/ ). Here
>> we
>> go: ( http://pastecode.com/2796 ).
>> 2. However juddiv3 is still running so lets try to connect it from my
>> application (App is okay and works good with default juddiv3 db):
>> Connection is okay, wsdls are alive and we even can get authentication
>> token. Lets try to get authtoken with username 'admin' and empty password
>> ''. Since publishers table (j3_publisher) in juddiv3 database is empty and
>> juddi authenticator is set up to: 'juddi.authenticator =
>> org.apache.juddi.v3.auth.JUDDIAuthenticator', it should create a new
>> publisher on the fly. And it does it. We can even watch it from mysql:
>>
>>
>> > mysql> select * from j3_publisher;
>> >
>> +-----------------+---------------+----------+------------+---------------------
>> >
>> -----+----------------+---------------------------+-------------+---------------
>> > -+
>> > | authorized_name | email_address | is_admin | is_enabled |
>> > max_bindings_per_ser
>> > vice | max_businesses | max_services_per_business | max_tmodels |
>> > publisher_name
>> > |
>> >
>> +-----------------+---------------+----------+------------+---------------------
>> >
>> -----+----------------+---------------------------+-------------+---------------
>> > -+
>> > | admin | NULL | false | true |
>> > 199 | 100 | 100 | 100 |
>> Unknown
>> > |
>> >
>> +-----------------+---------------+----------+------------+---------------------
>> >
>> -----+----------------+---------------------------+-------------+---------------
>> > -+
>> > 1 row in set (0.00 sec)
>> >
>> And we also get authentication token successfully. From my application I
>> can
>> view all publishers. So far we have that 'admin' publisher alone: (
>> http://img217.imageshack.us/img217/5553/publishers.png ).
>> But once I try to view all business (or services), here we go:
>>
>>
>> > javax.xml.ws.soap.SOAPFaultException: 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 ''\')' at line 1 {prepstmnt 4686 SELECT
>> > DISTINCT t1.entity_key FROM j3_business_entity t0 INNER JOIN
>> > j3_uddi_entity t1 ON t0.entity_key = t1.entity_key JOIN j3_business_name
>> > t2 ON (1 = 1) INNER JOIN j3_business_entity t3 ON t2.entity_key =
>> > t3.entity_key INNER JOIN j3_uddi_entity t4 ON t3.entity_key =
>> > t4.entity_key WHERE (t1.entity_key = t4.entity_key AND t2.name LIKE ?
>> > ESCAPE '\') [params=(String) %]} [code=1064, state=42000]
>> > at
>> >
>> com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
>> > at
>> >
>> com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
>> > at
>> >
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
>> > at
>> >
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
>> > at
>> > com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
>> > at $Proxy44.findBusiness(Unknown Source)
>> > at
>> > juddiv3admin.juddiv3.Tools$BusinessWorker.findBusiness(Tools.java:265)
>> >
>> I looked into juddiv3 schema:
>>
>>
>> > mysql> show tables;
>> > +-------------------------------+
>> > | Tables_in_juddiv3 |
>> > +-------------------------------+
>> > | j3_address |
>> > | j3_address_line |
>> > | j3_auth_token |
>> > | j3_binding_category_bag |
>> > | j3_binding_descr |
>> > | j3_binding_template |
>> > | j3_business_category_bag |
>> > | j3_business_descr |
>> > | j3_business_entity |
>> > | j3_business_identifier |
>> > | j3_business_name |
>> > | j3_business_service |
>> > | j3_category_bag |
>> > | j3_clerk |
>> > | j3_client_subscriptioninfo |
>> > | j3_contact |
>> > | j3_contact_descr |
>> > | j3_discovery_url |
>> > | j3_email |
>> > | j3_instance_details_descr |
>> > | j3_instance_details_doc_descr |
>> > | j3_keyed_reference |
>> > | j3_keyed_reference_group |
>> > | j3_node |
>> > | j3_overview_doc |
>> > | j3_overview_doc_descr |
>> > | j3_person_name |
>> > | j3_phone |
>> > | j3_publisher |
>> > | j3_publisher_assertion |
>> > | j3_service_category_bag |
>> > | j3_service_descr |
>> > | j3_service_name |
>> > | j3_service_projection |
>> > +-------------------------------+
>> > 34 rows in set (0.01 sec)
>> >
>> tables are up, but seems they are empty and even main juddi business
>> entity
>> and services are not set up. (Here's how they usually look like:
>> http://img864.imageshack.us/img864/1708/defaultjuddinode.png )
>> So I guess mysql initialization is not full or smth?
>> Also here is the juddiv3.log: Only 1 line after find all business
>> operation
>> (And same when opening http://localhost:8080/juddiv3/ ):
>>
>>
>> > 2011-04-04 17:20:13,262 INFO [org.apache.juddi.config.AppConfig] -
>> Reading
>> > from properties file:
>> >
>> file:/C:/juddi-portal-bundle-3.0.4/webapps/juddiv3/WEB-INF/classes/juddiv3.properties
>> >
>> Since I don't have much knowledge on juddiv3 project, maybe it has smth to
>> do with these lines in juddiv3.properties:
>>
>>
>> > # Name of the persistence unit to use (the default, "juddiDatabase"
>> refers
>> > to the unit compiled into the juddi library)
>> > juddi.persistenceunit.name=juddiDatabase
>> >
>>
>> Waiting for answer, thanks!
>>
>> --Martin
>> --
>> View this message in context:
>> http://old.nabble.com/juddiv3-%283.0.4%29-mysql-problems-tp31314994p31314994.html
>> Sent from the jUDDI - User mailing list archive at Nabble.com.
>>
>>
>>
>>
>
>