Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9A839613 for ; Thu, 5 Apr 2012 12:19:05 +0000 (UTC) Received: (qmail 88914 invoked by uid 500); 5 Apr 2012 12:19:05 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 88870 invoked by uid 500); 5 Apr 2012 12:19:05 -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 88862 invoked by uid 99); 5 Apr 2012 12:19:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 12:19:04 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rick.hillegas@oracle.com designates 148.87.113.117 as permitted sender) Received: from [148.87.113.117] (HELO rcsinet15.oracle.com) (148.87.113.117) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 12:18:54 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q35CIW3v003608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 5 Apr 2012 12:18:33 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q35CIWKc020179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 5 Apr 2012 12:18:32 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q35CIWos008717 for ; Thu, 5 Apr 2012 07:18:32 -0500 Received: from dhcp-rmdc-twvpn-1-vpnpool-10-159-5-117.vpn.oracle.com (/10.159.5.117) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 05 Apr 2012 05:18:31 -0700 Message-ID: <4F7D8D8C.9090905@oracle.com> Date: Thu, 05 Apr 2012 05:18:20 -0700 From: Rick Hillegas User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Running junit tests with Intellij Idea References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-CT-RefId: str=0001.0A090202.4F7D8D99.00A1,ss=1,re=0.000,fgs=0 Hi Mohamed, I don't have any experience using Intellij. However, the stack trace indicates that Intellij is trying to change the location of System.out after the security manager has been installed. java.lang.RuntimePermission setIO) needs to be granted to the Intellij jar file. Hope this is helpful, -Rick On 4/5/12 12:10 AM, Mohamed Nufail wrote: > Hi, > > I am trying to run the junit tests using Intellij Idea, but I keep > getting errors. For example with the > org.apache.derbyTesting.unitTests.junit.DerbyVersionTest I keep > getting the following exception. > > Exception in thread "main" java.security.AccessControlException: > access denied (java.lang.RuntimePermission setIO) > at > java.security.AccessControlContext.checkPermission(AccessControlContext.java:374) > at > java.security.AccessController.checkPermission(AccessController.java:546) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) > at java.lang.System.checkIO(System.java:225) > at java.lang.System.setOut(System.java:147) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:189) > at > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) > 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 > com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) > > > The classpath does include junit.jar and the classes folder. > > I can run the tests without any problem in command line and using > eclipse as described in [1]. > > [1] http://wiki.apache.org/db-derby/DerbyJUnitTesting > > > -- > > Mohamed Nufail > Undergraduate, > Department of Computer Science & Engineering, > University of Moratuwa. > Blog: http://www.nufailm.blogspot.com/ >