Hi Steve,
Could you submit a JIRA bug report showing how to reproduce the
problem? FWIW our unit tests work with our simple test stored
procedures, so I guess the most important piece would be the actual
stored procedure SQL, so that it can be loaded to SQLServer for
testing.
Andrus
On Dec 20, 2004, at 5:29 PM, Steve Wells wrote:
>
> Thought I'd re-send this in the hope someone might have an idea of what
> is going wrong. I'd really like to get Cayenne into my client site but
> I can only call stored proc's.
>
> Thanks....
>
> ----- Original message -----
> From: "Steve Wells" <stwell..wnmail.net>
> To: cayenne-use..bjectstyle.org
> Date: Wed, 08 Dec 2004 16:57:12 +1000
> Subject: NPE calling SQL Server 2K Stored Procedure
>
> Has anyone had luck using stored proc with SQL 2K (V8 SP3)? I get this
> using the full release Cayenne 1.1:
>
> 297 [main] INFO access.QueryLogger - --- will run 1 query.
> 297 [main] INFO access.QueryLogger - Opening connection:
> jdbc:microsoft:sqlserver://xxxx;databaseName=xxx;SelectMethod=cursor
> Login: xxx
> Password: *******
> 500 [main] INFO access.QueryLogger - +++ Connecting: SUCCESS.
> 531 [main] INFO access.QueryLogger - --- transaction started.
> 625 [main] INFO access.QueryLogger - {? = call dbo.dms_maint_CCGet}
> [bind: '[OUT]']
> 953 [main] INFO access.QueryLogger - === returned 1 row. - took 16 ms.
> 953 [main] INFO access.QueryLogger - *** error.
> java.lang.NullPointerException
> at
> org.objectstyle.cayenne.access.util.ResultDescriptor.createDescriptor(R
> esultDescriptor.java:111)
> at
> org.objectstyle.cayenne.access.trans.ProcedureTranslator.getResultDescr
> iptor(ProcedureTranslator.java:178)
> at
> org.objectstyle.cayenne.access.DataNode.runStoredProcedure(DataNode.jav
> a:654)
> at
> org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:
> 345)
> at
> org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.jav
> a:654)
> at
> org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.j
> ava:1408)
> at
> org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.j
> ava:179)
> at
> org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.j
> ava:1366)
> at
> org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.jav
> a:1622)
> at
> org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.jav
> a:1485)
> at com.riotinto.test.TestDB.main(TestDB.java:35)
>
> I've also tried the SelectMethod=direct
>
> It seems the line DataNode.java:640
> boolean hasResultSet = statement.execute();
> returns true but the resultset is null but should have 100 or so in it.
> Its the resultset in ResultDescriptor that is null and throwing the
> npe.
>
> I've tried calling a few different procedures with and without params
> and get the same result.
>
> I have used the same drivers before to call procs via direct JDBC with
> no problems. I didnt use OUT params and called resultset =
> statement.executeQuery().
>
> BTW re-engineering to get the procs worked a treat. :)
>
> Thanks,
>
> Steve
>
This archive was generated by hypermail 2.0.0 : Mon Dec 20 2004 - 22:24:17 EST