Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » COSMOS » Instance Id Constraint and record type constraint in same template,not possible?
Instance Id Constraint and record type constraint in same template,not possible? [message #572464] Thu, 19 February 2009 14:01
arunachalam is currently offline arunachalamFriend
Messages: 15
Registered: July 2009
Junior Member
Hi ,

I am not able to run the query when I am having the instance id
constraint , record type constraint with in a same template. when I am
running the following query file ,

<?xml version="1.0" encoding="UTF-8"?>
<query xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
<itemTemplate id="template2">

<instanceIdConstraint>
<instanceId>
<mdrId>CCMDBMDR</mdrId>
<localId>Server1</localId>
</instanceId>
</instanceIdConstraint>

<recordConstraint>
<recordType localName="OS" namespace=""/>
</recordConstraint>
</itemTemplate>
</query>


I am getting the following exception.

"
Exception in thread "main" java.lang.NullPointerException
at
com.ibm.cmdbf.query.CMDBfQueryOperation.applyItemConstraints (CMDBfQueryOperation.java:485)
at
com.ibm.cmdbf.query.CMDBfQueryOperation.processItemTemplates (CMDBfQueryOperation.java:216)
at
com.ibm.cmdbf.query.CMDBfQueryOperation.execute(CMDBfQueryOp eration.java:139)
at
com.ibm.cmdbf.query.CMDBfQueryOperation.execute(CMDBfQueryOp eration.java:126)
at com.ibm.cmdbf.query.QueryLauncher.getResponse(QueryLauncher. java:93)
at com.ibm.cmdbf.query.QueryLauncher.main(QueryLauncher.java:64 )
"

I am getting the error on the applyItemConstraints method , Logically it
is wrong to have the instance id constraint record constraint with in the
same template , but the api is just throwing the null pointer exception.
Is this not possible to have the instance id constraint and record
constraint with in the same template ?

if this is not possible the API should inform the user by throwing the
custom exception something like "it is not possible to have the instance
id constraint and record constraint with in the same template"

Regards

Arunachalam.
Previous Topic:How to avoid the empty templates loading all the items?
Next Topic:Instance Id Constraint and record type constraint in same template,not possible?
Goto Forum:
  


Current Time: Fri Apr 26 16:36:48 GMT 2024

Powered by FUDForum. Page generated in 0.03020 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top