db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohamed Nufail <nufai...@gmail.com>
Subject Running junit tests with Intellij Idea
Date Thu, 05 Apr 2012 07:10:52 GMT
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/

Mime
View raw message