db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Watts <...@cliftonfarm.org>
Subject Can't run SYSCS_IMPORT_TABLE
Date Mon, 03 Oct 2011 20:44:46 GMT
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





Mime
View raw message