Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 81041 invoked from network); 29 Apr 2006 18:19:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Apr 2006 18:19:07 -0000 Received: (qmail 76407 invoked by uid 500); 29 Apr 2006 18:19:06 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 76373 invoked by uid 500); 29 Apr 2006 18:19:06 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 76364 invoked by uid 99); 29 Apr 2006 18:19:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Apr 2006 11:19:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Apr 2006 11:19:05 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BB73A7142DB for ; Sat, 29 Apr 2006 18:18:38 +0000 (GMT) Message-ID: <32557686.1146334718765.JavaMail.jira@brutus> Date: Sat, 29 Apr 2006 18:18:38 +0000 (GMT+00:00) From: "Andrew McIntyre (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-1229) sysinfo and sysinfo_withproperties.java fail with java.lang.RuntimePermission getProtectionDomain when db2jcc.jar is in same dir as the derby-jars In-Reply-To: <663209.1145527446606.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1229?page=3Dcomments#actio= n_12377111 ]=20 Andrew McIntyre commented on DERBY-1229: ---------------------------------------- Bryan, thanks again for the detailed analysis. I agree that the correct thi= ng to do in this case is to properly report the exception (and then sed it = out), not add the getProtectionDomain permission to the test. I'd say go ah= ead and commit this. > sysinfo and sysinfo_withproperties.java fail with java.lang.RuntimePermis= sion getProtectionDomain when db2jcc.jar is in same dir as the derby-jars > -------------------------------------------------------------------------= ------------------------------------------------------------------------- > > Key: DERBY-1229 > URL: http://issues.apache.org/jira/browse/DERBY-1229 > Project: Derby > Type: Test > Components: Security, Test, Tools > Versions: 10.2.0.0 > Environment: Solaris 10 x86 > Sun JDK=20 > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) > Reporter: Vemund =C3=98stgaard > Assignee: Bryan Pendleton > Priority: Minor > Attachments: derby-1229.diff, notes.html > > The problem I've been seeing is that if I run: > java -Dframework=3DDerbyNetClient org.apache.derbyTesting.functionTests.h= arness.RunTest derbynet/sysinfo.java > in a configuration where my db2jcc.jar is located in the same directory a= s all the other derby-jars, then the test fails with a diff caused by a Run= timeException. If I change nothing else then moving that db2jcc.jar out of = that directory (and making the appropriate classpath change) then the test = succeeds. > The reason is that the test fails to get the permission for doing getProt= ectionDomain().getCodeSource() on class com.ibm.db2.jcc.DB2Driver. Below fo= llows relevant output from my system that might be useful to debug this: > --- > vo136787@khepri32:~/tmp/test> env |grep CLAS CLASSPATH=3D/home/vo136787/d= erby/tmp/testbuild/lib/derby.jar:/home/vo136787/derby/tmp/testbuild/lib/der= byTesting.jar:/home/vo136787/derby/tmp/testbuild/lib/derbytools.jar:/home/v= o136787/derby/tmp/testbuild/lib/derbynet.jar:/home/vo136787/derby/tmp/testb= uild/lib/derbyclient.jar:/home/vo136787/derby/tmp/testbuild/lib/derbyrun.ja= r:/home/vo136787/derby/tmp/testbuild/lib/junit.jar:/home/vo136787/derby/tmp= /testbuild/lib/db2jcc.jar:/home/vo136787/derby/tmp/testbuild/lib/db2jcc_lic= ense_c.jar:/home/vo136787/derby/tmp/testbuild/lib/jakarta-oro-2.0.8.jar:/ho= me/vo136787/derby/tmp/testbuild/lib/derbyLocale_de_DE.jar:/home/vo136787/de= rby/tmp/testbuild/lib/derbyLocale_es.jar:/home/vo136787/derby/tmp/testbuild= /lib/derbyLocale_fr.jar:/home/vo136787/derby/tmp/testbuild/lib/derbyLocale_= it.jar:/home/vo136787/derby/tmp/testbuild/lib/derbyLocale_ja_JP.jar:/home/v= o136787/derby/tmp/testbuild/lib/derbyLocale_ko_KR.jar:/home/vo136787/derby/= tmp/testbuild/lib/derbyLocale_pt_BR.jar:/home/vo136787/derby/tmp/testbuild/= lib/derbyLocale_zh_CN.jar:/home/vo136787/derby/tmp/testbuild/lib/derbyLocal= e_zh_TW.jar > vo136787@khepri32:~/tmp/test> java -Dframework=3DDerbyNetClient org.apach= e.derbyTesting.functionTests.harness.RunTest derbynet/sysinfo.java > *** Start: sysinfo jdk1.5.0_06 DerbyNetClient 2006-04-19 13:00:33 *** > Initialize for framework: DerbyNetClient > java -Dderby.system.home=3D/home/vo136787/tmp/test/DerbyNetClient/sysinfo= -Djava.security.manager -Djava.security.policy=3D/home/vo136787/tmp/test/d= erby_tests.policy -DderbyTesting.codejar=3Dfile:/home/vo136787/derby/tmp/te= stbuild/lib/ -DderbyTesting.codedir=3D/home/vo136787/derby/tmp/testbuild/li= b -DderbyTesting.serverhost=3Dlocalhost -DderbyTesting.clienthost=3Dlocalho= st -DderbyTesting.codeclasses=3Dfile://unused/ org.apache.derby.drda.Networ= kServerControl start > -- SecurityManager not installed -- > Attempt to shutdown framework: DerbyNetClient > 14a15 > > [Unable to access Protection Domain or Code Source for class class com.= ibm.db2.jcc.DB2Driver: access denied (java.lang.RuntimePermission getProtec= tionDomain)] 2.4 - (17) > 41a43 > > [Unable to access Protection Domain or Code Source for class class com.= ibm.db2.jcc.DB2Driver: access denied (java.lang.RuntimePermission getProtec= tionDomain)] 2.4 - (17) > 69a72 > > [Unable to access Protection Domain or Code Source for class class com.= ibm.db2.jcc.DB2Driver: access denied (java.lang.RuntimePermission getProtec= tionDomain)] 2.4 - (17) > Test Failed. > *** End: sysinfo jdk1.5.0_06 DerbyNetClient 2006-04-19 13:00:40 *** > vo136787@khepri32:~/tmp/test> java org.apache.derby.tools.sysinfo > ------------------ Java Information ------------------ > Java Version: 1.5.0_06 > Java Vendor: Sun Microsystems Inc. > Java home: /usr/jdk/instances/jdk1.5.0/jre > Java classpath: /home/vo136787/derby/tmp/testbuild/lib/derby.jar:/home/v= o136787/derby/tmp/testbuild/lib/derbyTesting.jar:/home/vo136787/derby/tmp/t= estbuild/lib/derbytools.jar:/home/vo136787/derby/tmp/testbuild/lib/derbynet= .jar:/home/vo136787/derby/tmp/testbuild/lib/derbyclient.jar:/home/vo136787/= derby/tmp/testbuild/lib/derbyrun.jar:/home/vo136787/derby/tmp/testbuild/lib= /junit.jar:/home/vo136787/derby/tmp/testbuild/lib/db2jcc.jar:/home/vo136787= /derby/tmp/testbuild/lib/db2jcc_license_c.jar:/home/vo136787/derby/tmp/test= build/lib/jakarta-oro-2.0.8.jar:/home/vo136787/derby/tmp/testbuild/lib/derb= yLocale_de_DE.jar:/home/vo136787/derby/tmp/testbuild/lib/derbyLocale_es.jar= :/home/vo136787/derby/tmp/testbuild/lib/derbyLocale_fr.jar:/home/vo136787/d= erby/tmp/testbuild/lib/derbyLocale_it.jar:/home/vo136787/derby/tmp/testbuil= d/lib/derbyLocale_ja_JP.jar:/home/vo136787/derby/tmp/testbuild/lib/derbyLoc= ale_ko_KR.jar:/home/vo136787/derby/tmp/testbuild/lib/derbyLocale_pt_BR.jar:= /home/vo136787/derby/tmp/testbuild/lib/derbyLocale_zh_CN.jar:/home/vo136787= /derby/tmp/testbuild/lib/derbyLocale_zh_TW.jar > OS name: SunOS > OS architecture: x86 > OS version: 5.10 > Java user name: vo136787 > Java user home: /home/vo136787 > Java user dir: /home/vo136787/tmp/test > java.specification.name: Java Platform API Specification > java.specification.version: 1.5 > --------- Derby Information -------- > JRE - JDBC: J2SE 5.0 - JDBC 3.0 > [/home/vo136787/derby/tmp/testbuild/lib/derby.jar] 10.2.0.0 alpha - (3949= 91) > [/home/vo136787/derby/tmp/testbuild/lib/derbytools.jar] 10.2.0.0 alpha - = (394991) > [/home/vo136787/derby/tmp/testbuild/lib/derbynet.jar] 10.2.0.0 alpha - (3= 94991) > [/home/vo136787/derby/tmp/testbuild/lib/derbyclient.jar] 10.2.0.0 alpha -= (394991) > [/home/vo136787/derby/tmp/testbuild/lib/db2jcc.jar] 2.4 - (17) > [/home/vo136787/derby/tmp/testbuild/lib/db2jcc_license_c.jar] 2.4 - (17) > ------------------------------------------------------ > ----------------- Locale Information ----------------- > Current Locale : [English/United States [en_US]] > Found support for locale: [de_DE] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [es] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [fr] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [it] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [ja_JP] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [ko_KR] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [pt_BR] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [zh_CN] > version: 10.2.0.0 alpha - (394991) > Found support for locale: [zh_TW] > version: 10.2.0.0 alpha - (394991) > ------------------------------------------------------ > vo136787@khepri32:~/tmp/test> java org.apache.derby.tools.sysinfo -cp > Testing for presence of all Derby-related libraries; typically, only some= are needed. > For a list of possible arguments, type java org.apache.derby.tools.sysinf= o -cp args > FOUND IN CLASS PATH: > Derby embedded engine library (derby.jar) > /home/vo136787/derby/tmp/testbuild/lib/derby.jar > Derby embedded engine library (derby.jar) > /home/vo136787/derby/tmp/testbuild/lib/derby.jar > Derby Network Server library (derbynet.jar) > /home/vo136787/derby/tmp/testbuild/lib/derbynet.jar > Derby Client libraries (db2jcc.jar) > /home/vo136787/derby/tmp/testbuild/lib/db2jcc.jar > Derby Client libraries (derbyclient.jar) > /home/vo136787/derby/tmp/testbuild/lib/derbyclient.jar > NOT FOUND IN CLASS PATH: > Derby tools library (derbytools.jar) > (org.apache.derby.tools.ij not found.) --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira