incubator-imperius-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayakarthik Jayabalan <jjaya...@in.ibm.com>
Subject Not able to run the samples in imperius-javaspl1.0.0-bin
Date Wed, 18 May 2011 12:18:20 GMT
Hi,

Tried running the samples in the JavaSPL,but I face the following issue.

F:\CloudGovernance\imperius-javaspl-1.0.0\imperius-javaspl1.0.0-bin\imperius-javaspl1.0.0\samples\simple>runsamples.bat

SimplePolicy
...
...

F:\CloudGovernance\imperius-javaspl-1.0.0\imperius-javaspl1.0.0-bin\imperius-javaspl1.0.0\samples\simple>echo

"Running Test policies..."
"Running Test policies..."

F:\CloudGovernance\imperius-javaspl-1.0.0\imperius-javaspl1.0.0-bin\imperius-javaspl1.0.0\samples\simple>set

CP=F:\CloudGovernance\antlr-2.7.7\antlr-2.7.7\antlr
.jar;..\..\lib\imperius-javaspl-1.0.0.jar;..\..\lib\imperius-splcore-1.0.0.jar;.
.\..\lib\javaspl-samples-1.0.0.jar

F:\CloudGovernance\imperius-javaspl-1.0.0\imperius-javaspl1.0.0-bin\imperius-javaspl1.0.0\samples\simple>java

-classpath F:\CloudGovernance\antlr-2.7.7\antlr-2.
7.7\antlr.jar;..\..\lib\imperius-javaspl-1.0.0.jar;..\..\lib\imperius-splcore-1.0.0.jar;..\..\lib\javaspl-samples-1.0.0.jar

org.apache.imperius.javaspl.samples.simplepolicies.RunSamples SimplePolicy
java.io.FileNotFoundException: 
resources\samples\simple\policies\SimplePolicy.spl (The system cannot find 
the path specified.)
        at java.io.FileInputStream.<init>(FileInputStream.java:112)
        at java.io.FileInputStream.<init>(FileInputStream.java:72)
        at java.io.FileReader.<init>(FileReader.java:41)
        at 
org.apache.imperius.javaspl.samples.simplepolicies.RunSamples._test(RunSamples.java:63)
        at 
org.apache.imperius.javaspl.samples.simplepolicies.RunSamples.testPolicy(RunSamples.java:108)
        at 
org.apache.imperius.javaspl.samples.simplepolicies.RunSamples.main(RunSamples.java:46)
SimplePolicy:1:1: unexpected token: null
org.apache.imperius.spl.parser.exceptions.SPLException: Error encountered 
while parsing PolicyString
        at 
org.apache.imperius.spl.manager.impl.PolicyManagerImpl.createPolicy(PolicyManagerImpl.java:147)
        at 
org.apache.imperius.javaspl.Java_SPLPolicyRuleProvider.createPolicy(Java_SPLPolicyRuleProvider.java:81)
        at 
org.apache.imperius.javaspl.samples.simplepolicies.RunSamples._test(RunSamples.java:89)
        at 
org.apache.imperius.javaspl.samples.simplepolicies.RunSamples.testPolicy(RunSamples.java:108)
        at 
org.apache.imperius.javaspl.samples.simplepolicies.RunSamples.main(RunSamples.java:46)

F:\CloudGovernance\imperius-javaspl-1.0.0\imperius-javaspl1.0.0-bin\imperius-javaspl1.0.0\samples\simple>

Based on the above error,I modified the "public static String 
policyFolder"  from  "resources/samples/simple/policies/" to 
"F:/CloudGovernance/imperius-javaspl-1.0.0/imperius-javaspl1.0.0-bin/imperius-javaspl1.0.0/samples/simple/policies/"

in org.apache.imperius.javaspl.samples.simplepolicies.RunSamples class to 
point to the eact location of policy file.
After this modification,I get the following output.
..
..
F:\CloudGovernance\imperius-javaspl-1.0.0\imperius-javaspl1.0.0-bin\imperius-javaspl1.0.0\samples\simple>set

CP=F:\CloudGovernance\antlr-2.7.7\antlr-2.7.7\antlr
.jar;..\..\lib\imperius-javaspl-1.0.0.jar;..\..\lib\imperius-splcore-1.0.0.jar;..\..\lib\javaspl-samples-1.0.0.jar

F:\CloudGovernance\imperius-javaspl-1.0.0\imperius-javaspl1.0.0-bin\imperius-javaspl1.0.0\samples\simple>java

-classpath F:\CloudGovernance\antlr-2.7.7\antlr-2.
7.7\antlr.jar;..\..\lib\imperius-javaspl-1.0.0.jar;..\..\lib\imperius-splcore-1.0.0.jar;..\..\lib\javaspl-samples-1.0.0.jar

org.apache.imperius.javaspl.samples.
simplepolicies.RunSamples SimplePolicy
Policy Created : SimplePolicytrue

Result is 1

Not sure if it has executed the policy becuase as per the snapshots in the 
 link http://incubator.apache.org/imperius/docs/getting_started.html it 
should show the execution/evaluation messages of the policy,here I get 
none.
even if I change the condition in the spl file to make it false,I get the 
same (above result).

I think am doing something wrong here.Could you please help me.

Thanks&Regards
J.JayaKarthik
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message