cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lachlan Deck (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAY-1067) likeIgnoreCase is not supported for CLOBs in MS SQL adapter
Date Thu, 02 Jul 2009 06:24:47 GMT

    [ https://issues.apache.org/jira/browse/CAY-1067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726346#action_12726346
] 

Lachlan Deck commented on CAY-1067:
-----------------------------------

Hi Andrus,

we have a notes field (Types.CLOB) and for mssql the following query fails. This task seems
to be relevant though I'm not seeing the CAST.

[java] 29 Jun 2009 13:22:59,747 [13043649@qtp0-0 ] INFO org.apache.cayenne.access.QueryLogger
:357
- SELECT t0.id FROM Contact t0 WHERE (UPPER(t0.notes) LIKE UPPER(?)) AND ((t0.isDeleted IS
NULL) OR
(t0.isDeleted = ?)) ORDER BY t0.lastName [bind: 1->notes:'%test%', 2->isDeleted:0] 



[java] Caused by: java.lang.Exception: [v.3.0-SNAPSHOT ${project.build.date} 
${project.build.time}] Error getting ResultIterator: Query Exception: 
[java] com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type text is invalid
for
argument 1 of upper function. 
[java] at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown
Source) 
[java] at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source) 
[java] at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown
Source) 
[java] at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown
Source) 
[java] at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source) 
[java] at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)

[java] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source) 
[java] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)

[java] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown
Source) 
[java] at org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:71)

[java] at org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)

[java] at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:274) 
[java] at
org.apache.cayenne.access.DataDomainLegacyQueryAction.execute(DataDomainLegacyQueryAction.java:79)

[java] at org.apache.cayenne.access.DataDomain$1.transform(DataDomain.java:716) 
[java] at org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:836) 
[java] at org.apache.cayenne.access.DataDomain.performQueries(DataDomain.java:713) 
[java] at
org.apache.cayenne.access.DataContext.internalPerformIteratedQuery(DataContext.java:1205)

[java] at org.apache.cayenne.access.DataContext.performIteratedQuery(DataContext.java:1171)

[java] at
org.apache.cayenne.access.IncrementalFaultList.fillIn(IncrementalFaultList.java:189) 
[java] at
org.apache.cayenne.access.IncrementalFaultList.<init>(IncrementalFaultList.java:139)

[java] at
org.apache.cayenne.access.SimpleIdIncrementalFaultList.<init>(SimpleIdIncrementalFaultList.jav
a:42) 
[java] at
org.apache.cayenne.access.DataContextQueryAction.interceptPaginatedQuery(DataContextQueryAction.java
:92) 
[java] at
org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:95)

[java] at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1268) 
[java] at
org.apache.cayenne.access.ClientServerChannelQueryAction.runQuery(ClientServerChannelQueryAction.jav
a:119) 
[java] at
org.apache.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java
:65) 
[java] at org.apache.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:81)

[java] at org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:39)

[java] at
org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:152)

[java] at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) 
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
[java] at java.lang.reflect.Method.invoke(Method.java:585) 
[java] at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:180) 
[java] at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:109) 
[java] at com.caucho.hessian.server.HessianServlet.service(HessianServlet.java:396) 
[java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) 
[java] at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1124) 
[java] at ish.oncourse.server.SecurityFilter.doFilter(SecurityFilter.java:110) 
[java] at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115) 
[java] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361) 
[java] at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) 
[java] at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) 
[java] at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) 
[java] at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

[java] at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) 
[java] at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) 
[java] at org.mortbay.jetty.Server.handle(Server.java:324) 
[java] at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) 
[java] at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)

[java] at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:828) 
[java] at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207) 
[java] at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403) 
[java] at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) 
[java] at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522) 
[java] 
[java] at
org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:160)

[java] ... 25 more 

> likeIgnoreCase is not supported for CLOBs in MS SQL adapter
> -----------------------------------------------------------
>
>                 Key: CAY-1067
>                 URL: https://issues.apache.org/jira/browse/CAY-1067
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>            Reporter: √ėyvind Harboe
>            Assignee: Andrus Adamchik
>             Fix For: 3.0M5
>
>         Attachments: patch.txt
>
>
> I'd like to see likeIgnoreCase be supported for CLOBs in MS SQL w/paged queries.
> Is this hard to add? 
> I'm interested to have a stab at it...
> at org.apache.tapestry.listener.ListenerMap.invokeTargetMethod(ListenerMap.java:257)
> ... 29 more
> Caused by: org.apache.cayenne.CayenneException: [v.3.0-SNAPSHOT May 21 2008 12:37:01]
Error getting ResultIterator: Query Exception:
> java.sql.SQLException: Argument data type text is invalid for argument 1 of upper function.
> at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364)
> at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
> at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message