db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lily Wei (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4689) Provide a JUnit test option to isolate client from server jars in a separate class loader to expose any dependencies that may exist
Date Thu, 28 Oct 2010 21:11:20 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lily Wei updated DERBY-4689:
----------------------------

    Attachment: derby-4689-01.diff

This is the attempt to try to address this issue. The patch is not ready for review. While
only loading derbyclient.jar and derbyTesting.jar, UDTTest.test_06_casts() failed with java.sql.SQLException:
At least one parameter to the current statement is uninitialized. The reason being on org.apache.derby.client.am.PreparedStatement.setUDTX
checking if (targetClass.isInstance( x) is false for targetClass.isInstance(x) where targetClass
is org.apache.derbyTesting.functionTests.tests.lang.Price. 

I would thinks x(Price) is still an instance of org.apache.derbyTesting.functionTests.tests.lang.Price.
However, it is not in this case. Why is so? Is this an expected behavior?
This is the stack trace:
There was 1 error:
1) test_06_casts(org.apache.derbyTesting.functionTests.tests.lang.UDTTest)java.s
ql.SQLException: At least one parameter to the current statement is uninitialize
d.
        at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLE
xceptionFactory40.java:96)
        at org.apache.derby.client.am.SqlException.getSQLException(SqlException.
java:358)
        at org.apache.derby.client.am.PreparedStatement.executeQuery(PreparedSta
tement.java:376)
        at org.apache.derbyTesting.functionTests.tests.lang.UDTTest.test_06_cast
s(UDTTest.java:505)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
109)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
Caused by: org.apache.derby.client.am.SqlException: At least one parameter to th
e current statement is uninitialized.
        at org.apache.derby.client.am.PreparedStatement.checkThatAllParametersAr
eSet(PreparedStatement.java:2411)
        at org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStat
ement.java:1959)
        at org.apache.derby.client.am.PreparedStatement.executeQueryX(PreparedSt
atement.java:382)
        at org.apache.derby.client.am.PreparedStatement.executeQuery(PreparedSta
tement.java:367)
        ... 38 more


> Provide a JUnit test option to isolate client from server jars in a separate class loader
to expose any dependencies that may exist
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4689
>                 URL: https://issues.apache.org/jira/browse/DERBY-4689
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.7.1.0
>            Reporter: Kathey Marsden
>         Attachments: derby-4689-01.diff
>
>
> Client programs should be able to run without derby.jar or derbynet.jar in the classpath.
 It would be great to have a test option, e.g. derby.tests.isolateServer which isolates derbynet.jar
and derby.jar from derbyclient.jar,  derbytools.jar and derbyTesting.jar to verify this. One
recent issue that was discovered and not caught by the tests was DERBY-4688.  

-- 
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