db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Using ASTParser and TreeWalker for parsing SQL query
Date Tue, 18 Jun 2013 12:19:13 GMT
On 6/17/13 1:01 PM, Rick Hillegas wrote:
> On 6/17/13 12:02 PM, venu wrote:
>> Hi Rick,
>> Thanks for the reply.
>> I took the development trunk code
>> (svn checkout https://svn.apache.org/repos/asf/db/derby/code/trunk/) and
>> replaced SelectNode.java file with the given SelectedNode.java file and
>> managed to generate a derby.jar file.
>>
>> But, when I run Treewalker or ASTParser I got this error.
>> Does I did anything wrong while making jar file?
>> or Is this a issue ?
>>
>> java.sql.SQLException: Java exception: 'ASSERT FAILED Six-argument 
>> init()
>> not implemented for org.apache.derby.impl.sql.compile.SelectNode:
>> org.apache.derby.shared.common.sanity.AssertFailure'.
>>     at
>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)

>>
>>     at 
>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:141)
>>     at org.apache.derby.impl.jdbc.Util.javaException(Util.java:335)
>>     at
>> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:436)

>>
>>     at
>> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)

>>
>>     at
>> org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2395)

>>
>>     at
>> org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)

>>
>>     at
>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:152)

>>
>>     at
>> org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Driver40.java:98) 
>>
>>     at
>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1733)

>>
>>     at
>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1561)

>>
>>     at
>> com.ibm.tivoli.tnpm.dal.jdbc.sqlparser.TreeWalker.execute(TreeWalker.java:100) 
>>
>>
>> Thanks,
>> Venu
>>
>>
>>
>> -- 
>> View this message in context: 
>> http://apache-database.10148.n7.nabble.com/Using-ASTParser-and-TreeWalker-for-parsing-SQL-query-tp131219p131496.html
>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>
> Hi Venu,
>
> I also ported the fix to the 10.10 branch. That may be a more stable 
> place to look for the change to SelectNode. The error you are seeing 
> suggests that you have tripped across some interference from the work 
> being done on the NodeFactory.
>
> Hope this helps,
> -Rick
>
I'm told that the NodeFactory work hasn't been checked in yet. So that's 
not the explanation. What's the query you're running through ASTParser 
and TreeWalker? Does the query work standalone when you just give it to 
Derby?

Thanks,
-Rick

Mime
View raw message