You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Myrna van Lunteren <m....@gmail.com> on 2006/01/27 19:34:48 UTC
running getCurConnJdbc20 with db2jcc*.jar in classpath and useprocess=false...
Hi,
When I run the test jdbcapi/getCurConnJdbc20 with db2jcc.jar (and
db2jcc_license_c.jar) in my classpath, like so:
java -Duseprocess=false
org.apache.derbyTesting.functionTests.harness.RunTestjdbcapi/getCurConnJdbc20.sql
I get the following diff:
-------------------
14a15,20
> ERROR 38000: The exception 'java.lang.ExceptionInInitializerError' was
thrown
while evaluating an expression.
> ERROR XJ001: Java exception: ': java.lang.ExceptionInInitializerError'.
> ERROR XJ001: Java exception: 'access denied (java.lang.RuntimePermission
loadLibrary.db2jcct2): java.security.AccessControlException'.
> ij> ------------------------------------------------------------
> -- drop the table
> drop table T;
16,19d21
< ij> ------------------------------------------------------------
< -- drop the table
< drop table T;
< 0 rows inserted/updated/deleted
---------------
(more fun and entertainment in the derby.log).
I don't understand why the call to the method
(...)util.Jdbc20Test.newJdbc20Method would attempt to load the jcc driver?
I'm not running networkserver here - just embedded...
Does this maybe mean that
driverManager.getConnection("jdbc:default:connection")
goes through all available drivers in the classpath?
Thx,
Myrna
Re: running getCurConnJdbc20 with db2jcc*.jar in classpath and useprocess=false...
Posted by Kathey Marsden <km...@sbcglobal.net>.
Myrna van Lunteren wrote:
>Hi,
>
>When I run the test jdbcapi/getCurConnJdbc20 with db2jcc.jar (and
>db2jcc_license_c.jar) in my classpath, like so:
> java -Duseprocess=false
>org.apache.derbyTesting.functionTests.harness.RunTestjdbcapi/getCurConnJdbc20.sql
>I get the following diff:
>-------------------
>14a15,20
>
>
>>ERROR 38000: The exception 'java.lang.ExceptionInInitializerError' was
>>
>>
>(...)util.Jdbc20Test.newJdbc20Method would attempt to load the jcc driver?
>I'm not running networkserver here - just embedded...
>Does this maybe mean that
>driverManager.getConnection("jdbc:default:connection")
>goes through all available drivers in the classpath?
>
>
>
Yes, I think you are right, that it goes through all the registered
drivers. The drivers are registered automatically when the driver is
loaded. What might happen with useprocess=false is that the harness has
loaded JCC to get version information etc, then
driverManager.getConnection("jdbc:default:connection") considers it for
selection.
Kathey
Re: running getCurConnJdbc20 with db2jcc*.jar in classpath and useprocess=false...
Posted by Myrna van Lunteren <m....@gmail.com>.
On 1/27/06, Manjula G Kutty <ma...@gmail.com> wrote:
>
> Myrna van Lunteren wrote:
>
> > Hi,
> >
> > When I run the test jdbcapi/getCurConnJdbc20 with db2jcc.jar (and
> > db2jcc_license_c.jar) in my classpath, like so:
> > java -Duseprocess=false
> > org.apache.derbyTesting.functionTests.harness.RunTest
> > jdbcapi/getCurConnJdbc20.sql
> > I get the following diff:
> > -------------------
> > 14a15,20
> > > ERROR 38000: The exception 'java.lang.ExceptionInInitializerError'
> > was thrown
> > while evaluating an expression.
> > > ERROR XJ001: Java exception: ': java.lang.ExceptionInInitializerError
> '.
> > > ERROR XJ001: Java exception: 'access denied (
> > java.lang.RuntimePermission loadLibrary.db2jcct2):
> > java.security.AccessControlException'.
> > > ij> ------------------------------------------------------------
> > > -- drop the table
> > > drop table T;
> > 16,19d21
> > < ij> ------------------------------------------------------------
> > < -- drop the table
> > < drop table T;
> > < 0 rows inserted/updated/deleted
> > ---------------
> > (more fun and entertainment in the derby.log).
> >
> > I don't understand why the call to the method
> > (...)util.Jdbc20Test.newJdbc20Method would attempt to load the jcc
> > driver? I'm not running networkserver here - just embedded...
> > Does this maybe mean that
> > driverManager.getConnection("jdbc:default:connection") goes through
> > all available drivers in the classpath?
> >
> > Thx,
> > Myrna
>
> Hi Myrna ,
>
> You are seeing this problem because of the property you set
> useproperty=false. Please see the Jira entry
>
> http://issues.apache.org/jira/browse/DERBY-885
>
> Thanks
> Manjula
>
>
>
>
Hi Manjula,
No, this is not at all the same thing. If I run the same test without the
db2jcc*.jars in my classpath, I get no errors.
Setting useprocess=false is a valid setting which should not cause trouble.
I've been trying very hard to make things work again after the security
check-ins for useprocess messed up the RemoteHost functionality, and this
was one of the surprises I saw on the way.
Myrna
Re: running getCurConnJdbc20 with db2jcc*.jar in classpath and useprocess=false...
Posted by Manjula G Kutty <ma...@gmail.com>.
Myrna van Lunteren wrote:
> Hi,
>
> When I run the test jdbcapi/getCurConnJdbc20 with db2jcc.jar (and
> db2jcc_license_c.jar) in my classpath, like so:
> java -Duseprocess=false
> org.apache.derbyTesting.functionTests.harness.RunTest
> jdbcapi/getCurConnJdbc20.sql
> I get the following diff:
> -------------------
> 14a15,20
> > ERROR 38000: The exception 'java.lang.ExceptionInInitializerError'
> was thrown
> while evaluating an expression.
> > ERROR XJ001: Java exception: ': java.lang.ExceptionInInitializerError'.
> > ERROR XJ001: Java exception: 'access denied (
> java.lang.RuntimePermission loadLibrary.db2jcct2):
> java.security.AccessControlException'.
> > ij> ------------------------------------------------------------
> > -- drop the table
> > drop table T;
> 16,19d21
> < ij> ------------------------------------------------------------
> < -- drop the table
> < drop table T;
> < 0 rows inserted/updated/deleted
> ---------------
> (more fun and entertainment in the derby.log).
>
> I don't understand why the call to the method
> (...)util.Jdbc20Test.newJdbc20Method would attempt to load the jcc
> driver? I'm not running networkserver here - just embedded...
> Does this maybe mean that
> driverManager.getConnection("jdbc:default:connection") goes through
> all available drivers in the classpath?
>
> Thx,
> Myrna
Hi Myrna ,
You are seeing this problem because of the property you set
useproperty=false. Please see the Jira entry
http://issues.apache.org/jira/browse/DERBY-885
Thanks
Manjula
Re: running getCurConnJdbc20 with db2jcc*.jar in classpath and useprocess=false...
Posted by Manjula G Kutty <ma...@gmail.com>.
Myrna van Lunteren wrote:
> Hi,
>
> When I run the test jdbcapi/getCurConnJdbc20 with db2jcc.jar (and
> db2jcc_license_c.jar) in my classpath, like so:
> java -Duseprocess=false
> org.apache.derbyTesting.functionTests.harness.RunTest
> jdbcapi/getCurConnJdbc20.sql
> I get the following diff:
> -------------------
> 14a15,20
> > ERROR 38000: The exception 'java.lang.ExceptionInInitializerError'
> was thrown
> while evaluating an expression.
> > ERROR XJ001: Java exception: ': java.lang.ExceptionInInitializerError'.
> > ERROR XJ001: Java exception: 'access denied (
> java.lang.RuntimePermission loadLibrary.db2jcct2):
> java.security.AccessControlException'.
> > ij> ------------------------------------------------------------
> > -- drop the table
> > drop table T;
> 16,19d21
> < ij> ------------------------------------------------------------
> < -- drop the table
> < drop table T;
> < 0 rows inserted/updated/deleted
> ---------------
> (more fun and entertainment in the derby.log).
>
> I don't understand why the call to the method
> (...)util.Jdbc20Test.newJdbc20Method would attempt to load the jcc
> driver? I'm not running networkserver here - just embedded...
> Does this maybe mean that
> driverManager.getConnection("jdbc:default:connection") goes through
> all available drivers in the classpath?
>
> Thx,
> Myrna
Hi Myrna,
I think you have the derbynet.jar and derbyclient.jar also in your
classpath. When I ran the same test without derbynet.jar and
derbyclient.jar but with db2jcc and it's license I got the exception below
RunIJ --> java.security.AccessControlException: access denied
(java.io.FilePermi
ssion C:\test\getCurConnJdbc20\getCurConnJdbc20_app.properties read)
java.security.AccessControlException: access denied
(java.io.FilePermission
C:\test\getCurConnJdbc20\getCurConnJdbc20_app.properties read)
at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:264)
at
java.security.AccessController.checkPermission(AccessController.java:
427)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.FileInputStream.<init>(FileInputStream.java:100)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at org.apache.derby.impl.tools.ij.util.getPropertyArg(Unknown
Source)
at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source)
at org.apache.derby.tools.ij.main(Unknown Source)
at
org.apache.derbyTesting.functionTests.harness.RunIJ.run(Unknown Sourc
e)
at java.lang.Thread.run(Thread.java:595)
Exception in thread "main" java.security.AccessControlException: access
denied (
java.util.PropertyPermission * read,write)
at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:264)
at
java.security.AccessController.checkPermission(AccessController.java:
427)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at
java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:
1252)
at java.lang.System.getProperties(System.java:560)
at
org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProce
ss(Unknown Source)
at
org.apache.derbyTesting.functionTests.harness.RunTest.testRun(Unknown
Source)
at
org.apache.derbyTesting.functionTests.harness.RunTest.main(Unknown So
urce)
I think the error is related to the policy file permission.
Thanks
Manjula