errorBalana error I'm working on eclipse Luna and I have added Maven to eclipse, and now I want to work with Balana to test some policies that I had written it.
I have edited pom file and added this dependency:
<dependencies>
<dependency>
<groupId>org.wso2.balana</groupId>
<artifactId>org.wso2.balana</artifactId>
<version>1.1.12</version>
</dependency>
</dependencies>
When I try to start w+orking with Balana, by writing this code:
private static Balana balana;
private static void initBalana() {
try{
// using file based policy repository. so set the policy location as system property
String policyLocation = (new File(".")).getCanonicalPath() + File.separator + "resources";
System.setProperty(FileBasedPolicyFinderModule.POLICY_DIR_PROPERTY, policyLocation);
} catch (IOException e) {
System.err.println("Can not locate policy repository");
}
// create default instance of Balana
balana = Balana.getInstance();
}
It gave so many errors on most of the code!
Edited: First, it gave as the picture... I had tried to solve it, but other errors had appeared. As this:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.wso2.balana.Balana.<clinit>(Balana.java:96)
at jar.AppTest.initBalana(AppTest.java:32)
at jar.AppTest.main(AppTest.java:14)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 3 more
Any help... and Thanks...