db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Williamson, Nick" <nick_william...@mentor.com>
Subject Hibernate comment in SQL
Date Wed, 24 Oct 2007 14:42:39 GMT
Hi all,
 
I'm using Hibernate to hook my Java app up to a Derby 10.2 database for
the first time and I'm finding that something - which I *think* is
Hibernate - is embedding comments in the SQL that Derby can't handle:
 
Failed Statement is: /* criteria query */ select this_.COLOR_ID as
COLOR1_162_0_, this_.COLCODE as COLCODE162_0_, this_.COLDESC as
COLDESC162_0_, this_.MODIFIED as MODIFIED162_0_ from APP.COLOUR this_

ERROR 42X01: Syntax error: Encountered "/" at line 1, column 1.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown
Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareI
nternalStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
Source)
at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
Source)
at
org.apache.derby.impl.drda.DRDAStatement.prepareStatementJDBC3(Unknown
Source)
at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source)
at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown
Source)
at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown
Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown
Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

When I Google for that phrase "criteria query", it comes back with loads
of hits relating to Hibernate, so I['m guessing that Hibernate is the
guilty party. I'm specifying this in my connection URL: 

hibernateDialect="org.hibernate.dialect.DerbyDialect"

Has anyone here hit this one before?

TIA
Nick

Mime
View raw message