Hi,
I even tried using getIdentity() function from Test_MethodProviderClass and got
these results from cimcplclientsideprovider utility.
got new cim client
deleting client SPL policy
creating new client SPL policy
java.util.logging.ErrorManager: 5
java.lang.NullPointerException
at
java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:103)
at java.util.ResourceBundle.getObject(ResourceBundle.java:319)
at java.util.ResourceBundle.getString(ResourceBundle.java:285)
at java.util.logging.Formatter.formatMessage(Formatter.java:108)
at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:63)
at java.util.logging.StreamHandler.publish(StreamHandler.java:178)
at java.util.logging.FileHandler.publish(FileHandler.java:543)
at java.util.logging.Logger.log(Logger.java:448)
at java.util.logging.Logger.doLog(Logger.java:470)
at java.util.logging.Logger.log(Logger.java:493)
at org.apache.imperius.util.SPLLoggerClass.log(SPLLoggerClass.java:70)
at java.util.logging.Logger.severe(Logger.java:976)
at
org.apache.imperius.util.SPLLoggerClass.severe(SPLLoggerClass.java:82)
at
org.apache.imperius.spl.datastore.impl.PolicyParserImpl.parseFile(PolicyParserImpl.java:163)
at
org.apache.imperius.spl.datastore.impl.PolicyParserImpl.createInternalPolicyObject(PolicyParserImpl.java:94)
at
org.apache.imperius.spl.datastore.impl.PolicyDataStoreImpl.createPolicy(PolicyDataStoreImpl.java:114)
at
org.apache.imperius.spl.manager.impl.PolicyManagerImpl.createPolicy(PolicyManagerImpl.java:136)
at
org.apache.imperius.cimspl.client.CIM_SPLPolicyRuleClientProvider.createPolicy(CIM_SPLPolicyRuleClientProvider.java:121)
at
org.apache.imperius.javaspl.samples.simplepolicies.engine._test(engine.java:108)
at
org.apache.imperius.javaspl.samples.simplepolicies.engine.testPolicy(engine.java:173)
at
org.apache.imperius.javaspl.samples.simplepolicies.engine.main(engine.java:64)
org.apache.imperius.spl.parser.exceptions.SPLException
at
org.apache.imperius.spl.manager.impl.PolicyManagerImpl.createPolicy(PolicyManagerImpl.java:147)
at
org.apache.imperius.cimspl.client.CIM_SPLPolicyRuleClientProvider.createPolicy(CIM_SPLPolicyRuleClientProvider.java:121)
at
org.apache.imperius.javaspl.samples.simplepolicies.engine._test(engine.java:108)
at
org.apache.imperius.javaspl.samples.simplepolicies.engine.testPolicy(engine.java:173)
at
org.apache.imperius.javaspl.samples.simplepolicies.engine.main(engine.java:64)
-----------------------------------------------------------------------------------------------------------------
The policy I executed is..
//////////////////////////////////////////////////////////////////////////
// * Licensed to the Apache Software Foundation (ASF) under one
// * or more contributor license agreements. See the NOTICE file
// * distributed with this work for additional information
// * regarding copyright ownership. The ASF licenses this file
// * to you under the Apache License, Version 2.0 (the
// * "License"); you may not use this file except in compliance
// * with the License. You may obtain a copy of the License at
// *
// * http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing,
// * software distributed under the License is distributed on an
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// * KIND, either express or implied. See the License for the
// * specific language governing permissions and limitations
// * under the License.
// */
//%///////////////////////////////////////////////////////////////////////////
Import Qualifier test/TestProvider Class Test_MethodProviderClass;
Strategy Execute_All_Applicable;
/*cimcli ci -n test/TestProvider Test_MethodProviderClass Id=1*/
Policy
{
Declaration
{
excpectedReturnValue = 10;
}
Condition
{
true
}
Decision
{ /* InParam1 and InParam2 are formal parameter names and 10 is the
expected return value */
//Test_MethodProviderClass.Test1(InParam1=1,InParam2=2,OutParam1,OutParam2)
Test_MethodProviderClass.getIdentity()
}
}:1;
--------------------------------------------------------------------------------------------------------------
-Thanks
-----Original Message-----
From: kapil khanna [mailto:[email protected]]
Sent: Friday, July 01, 2011 6:13 PM
To: [email protected]
Subject: create policy failed
Hi,
i tried executing InvokeMethodSample policy provided in cim-spl samples.
i got a CIM_ERR_FAILED.
i used the utility provided as--
java -classpath /<my path>/sblimCIMClient.jar:/<my
path>/cimspl-client.jar org.apache.imperius.cimspl.client.TestClient
-s <my server host name> -p 5988 -u <username> -pwd <password> -c /<my
path>/cimspl-samples/resources/samples/policies InvokeMethodSample
result i got is----
Established Connection
create policy :InvokeMethodSample path <my
path>/cimspl-samples/resources/samples/policies
createPolicy** : /<my path>/cimspl-samples/resources/samples/policies
InvokeMethodSample
path=/<my path>/cimspl-samples/resources/samples/policies/InvokeMethodSample.spl
//////////////////////////////////////////////////////////////////////////
// * Licensed to the Apache Software Foundation (ASF) under one
// * or more contributor license agreements. See the NOTICE file
// * distributed with this work for additional information
// * regarding copyright ownership. The ASF licenses this file
// * to you under the Apache License, Version 2.0 (the
// * "License"); you may not use this file except in compliance
// * with the License. You may obtain a copy of the License at
// *
// * http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing,
// * software distributed under the License is distributed on an
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// * KIND, either express or implied. See the License for the
// * specific language governing permissions and limitations
// * under the License.
// */
//%///////////////////////////////////////////////////////////////////////////
Import Qualifier test/TestProvider Class Test_MethodProviderClass;
Strategy Execute_All_Applicable;
/*cimcli ci -n test/TestProvider Test_MethodProviderClass Id=1*/
Policy
{
Declaration
{
excpectedReturnValue = 10;
}
Condition
{
true
}
Decision
{ /* InParam1 and InParam2 are formal parameter names and 10
is the expected return value */
Test_MethodProviderClass.Test1(InParam1=1,InParam2=2,OutParam1,OutParam2)
}
}:1;
Error: CIM_ERR_FAILED
------------------------------------------------------------------------------------------------------------------------------
couldn't figure out the problem here.
-Thanks