You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Tim Watts <ti...@cliftonfarm.org> on 2011/10/03 22:44:46 UTC

Can't run SYSCS_IMPORT_TABLE

Hello,

Using Derby 10.8.1.2, I'm getting this exception:

        java.sql.SQLSyntaxErrorException:
        'SYSCS_UTIL.SYSCS_IMPORT_TABLE' is not recognized as a function
        or procedure.

whenever I try to execute this code:

        String statement = "CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE (?,?,?,?,?,?,?,?,?)";
        try {
        	stmt = conn.prepareStatement(statement);
        }
        catch (SQLException e) {
        	throw new LoaderException(String.format(
        		"Error creating statement [%s]", statement), e);
        }

I saw on the wiki that, at least on earlier versions, this could occur
if I didn't have the correct number of parameters. But I believe I'm
passing the right number (9). The procedure does in fact exist according
to ij's "show procedures" command. Any ideas what I'm doing wrong?

Here's the full stack trace:

org.cliftonfarm.feed.load.LoaderException: Error creating statement [CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE (?,?,?,?,?,?,?,?,?)]
	at org.cliftonfarm.feed.load.Loader.<init>(Loader.java:86)
	at org.cliftonfarm.feed.load.LoaderTest.testLoader(LoaderTest.java:57)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.sql.SQLSyntaxErrorException: 'SYSCS_UTIL.SYSCS_IMPORT_TABLE' is not recognized as a function or procedure.
	at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
	at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
	at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
	at org.cliftonfarm.feed.load.Loader.<init>(Loader.java:83)
	... 27 more
Caused by: org.apache.derby.client.am.SqlException: 'SYSCS_UTIL.SYSCS_IMPORT_TABLE' is not recognized as a function or procedure.
	at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
	at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
	at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
	at org.apache.derby.client.net.NetStatementReply.readPrepare(Unknown Source)
	at org.apache.derby.client.net.StatementReply.readPrepare(Unknown Source)
	at org.apache.derby.client.net.NetStatement.readPrepare_(Unknown Source)
	at org.apache.derby.client.am.Statement.readPrepare(Unknown Source)
	at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInput(Unknown Source)
	at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
	at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
	at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
	... 29 more





Unsubscribe

Posted by Don Clary <do...@sbcglobal.net>.

Re: Can't run SYSCS_IMPORT_TABLE

Posted by Tim Watts <ti...@cliftonfarm.org>.
On Mon, 2011-10-03 at 23:37 +0200, Dag H. Wanvik wrote:
> > But I believe I'm
> > passing the right number (9). The procedure does in fact exist according
> > to ij's "show procedures" command. Any ideas what I'm doing wrong?
> 
> No. This procedure has seven arguments. The one that has nine is
> SYSCS_UTIL.SYSCS_IMPORT_DATA. (i.e. *_TABLE vs, *_DATA).
> 
Bingo. Much Thanks.

> Hope this helps,
> Dag



Re: Can't run SYSCS_IMPORT_TABLE

Posted by "Dag H. Wanvik" <da...@oracle.com>.
Tim Watts <ti...@cliftonfarm.org> writes:

>         java.sql.SQLSyntaxErrorException:
>         'SYSCS_UTIL.SYSCS_IMPORT_TABLE' is not recognized as a function
>         or procedure.
>
> whenever I try to execute this code:
>
>         String statement = "CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE (?,?,?,?,?,?,?,?,?)";

> I saw on the wiki that, at least on earlier versions, this could occur
> if I didn't have the correct number of parameters. 

Yup.

> But I believe I'm
> passing the right number (9). The procedure does in fact exist according
> to ij's "show procedures" command. Any ideas what I'm doing wrong?

No. This procedure has seven arguments. The one that has nine is
SYSCS_UTIL.SYSCS_IMPORT_DATA. (i.e. *_TABLE vs, *_DATA).

Hope this helps,
Dag