You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@juddi.apache.org by Computer Learning Inst <cl...@yahoo.com> on 2011/04/27 16:30:44 UTC
MySQL and org.apache.openjpa.lib.jdbc.ReportingSQLException
Hello jUDDI v3.0.4 users:
We are now using MySQL (instead of derby).
Made correct changes to:
....juddi-portal-bundle-3.0.4\webapps\juddiv3\META-INF\context.xml
<!-- mysql -->
<Resource name="jdbc/JuddiDS" auth="Container"
type="javax.sql.DataSource" username="root" password="<correct password>"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/juddiv3"
maxActive="8"
/>
Removed file
....juddi-portal-bundle-3.0.4\conf\Catalina\localhost\juddiv3.xml.
Used correct name in
....juddi-portal-bundle-3.0.4\webapps\juddiv3\WEB-INF\web.xml
<res-ref-name>jdbc/JuddiDS</res-ref-name>
Ran client code (that worked before on embedded derby) that saves an organization.
Exception that we ran into:
(Sorry, sounds like a complaint!! but helping you guys and helping us)
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: You have an error in your SQL syntax; check the manual that corresponds to you
r MySQL server version for the right syntax to use near 'VARCHAR(1000))) LIKE '%KEYGENERATOR' ESCAPE '\')' at line 1 {prepstmnt 2084547450 S
ELECT 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 org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionD
ecorator.java:852)
at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:262)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1599)
at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:252)
at org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:509)
at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:384)
at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:339)
at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:420)
at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:206)
at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:1954)
at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:34)
... 51 more
Re: MySQL and org.apache.openjpa.lib.jdbc.ReportingSQLException
Posted by Kurt T Stam <ku...@gmail.com>.
Maybe this tread helps you:
http://mail-archives.apache.org/mod_mbox/juddi-user/201104.mbox/browser
On 4/27/11 10:30 AM, Computer Learning Inst wrote:
> Hello jUDDI v3.0.4 users:
>
> We are now using MySQL (instead of derby).
>
> Made correct changes to:
> ....juddi-portal-bundle-3.0.4\webapps\juddiv3\META-INF\context.xml
>
> <!-- mysql -->
> <Resource name="jdbc/JuddiDS" auth="Container"
> type="javax.sql.DataSource" username="root"
> password="<correct password>"
> driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/juddiv3"
> maxActive="8"
> />
>
> Removed file
> ....juddi-portal-bundle-3.0.4\conf\Catalina\localhost\juddiv3.xml.
>
> Used correct name in
> ....juddi-portal-bundle-3.0.4\webapps\juddiv3\WEB-INF\web.xml
> <res-ref-name>jdbc/JuddiDS</res-ref-name>
>
> Ran client code (that worked before on embedded derby) that saves an
> organization.
>
> Exception that we ran into:
> (Sorry, sounds like a complaint!! but helping you guys and helping us)
>
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: You have
> an error in your SQL syntax; check the manual that corresponds to you
> r MySQL server version for the right syntax to use near
> 'VARCHAR(1000))) LIKE '%KEYGENERATOR' ESCAPE '\')' at line 1
> {prepstmnt 2084547450 S
> ELECT 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
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
> at
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)
> at
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionD
> ecorator.java:852)
> at
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:262)
> at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1599)
> at
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:252)
> at
> org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:509)
> at
> org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:384)
> at
> org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:339)
> at
> org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:420)
> at
> org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
> at
> org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
> at
> org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:206)
> at
> org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
> at
> org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:1954)
> at
> org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:34)
> ... 51 more
>