PROPERTY FILE ADAPTER FAILS TO PARSE THE PROPERTIES FROM A FILE. (Doc ID 981223.1)

Last updated on AUGUST 13, 2013

Applies to:

Oracle Communications Order and Service Management - Version: 6.3 to 6.3.1 - Release: 6.3 to 6.3
Information in this document applies to any platform.

Symptoms


The customer was trying to use properties file adapter on a view framework rule to load some login data from simple properties file. This did not parse, and an exception was received.


Properties file:

ipsa.host.1=localhost
ipsa.port.1=2809
ipsa.user.1=jig
ipsa.password.1=orchestream123
ipsa.domain.1=BaneTele_Test

From the cartridge model:

<dataNode element="Login">
<viewRule enabled="true" xsi:type="informationRuleType">
<description>Login test</description>
<instance xsi:type="externalInstanceType" name="DataInstance">
<adapter>com.mslv.oms.view.rule.adapter.PropertyFileAdapter</adapter>
<parameter name="oms:url">'file:///C:/ipsa.properties'</parameter>
<cache>
<scope>SYSTEM</scope>
<timeout>1000</timeout>
<maxSize>50</maxSize>
</cache>
</instance>
</viewRule>
<dataNode element="mock">
<viewRule enabled="true" xsi:type="lookupRuleType">
<annotation>
<documentation>Properties</documentation>
</annotation>
<itemset>
<nodeset>instance('DataInstance')/entry</nodeset>
<value name="name" openSelectionSeverity="ERROR" sortDirection="ascending" hidden="false">
<description>property</description>
<node>@key</node>
</value>
<label name="path" hidden="true">
<description>Path</description>
<node>.</node>
</label>
</itemset>
</viewRule>
</dataNode>
</dataNode>


The outcome is:

[Fatal Error] :-1:-1: Premature end of file.
<05-Aug-2009 9:50:05,421 CEST AM>
org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.mslv.oms.util.xml.XMLHelper.parseText(Unknown Source)
at com.mslv.oms.util.xml.XMLHelper.parseText(Unknown Source)
at com.mslv.oms.view.rule.adapter.PropertyFileAdapter.retrieveInstance(Unknown Source)
at com.mslv.oms.view.rule.def.base.AbstractViewRule.getExternalInstance(Unknown Source)
at com.mslv.oms.view.rule.def.base.AbstractViewRule.findInstance(Unknown Source)
at com.mslv.oms.view.rule.def.base.AbstractViewRule$InstanceFunction.instanceFunction(Unknown Source)
at com.mslv.oms.view.rule.def.base.AbstractViewRule$InstanceFunction.call(Unknown Source)
at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:177)
at org.jaxen.expr.DefaultPathExpr.evaluate(DefaultPathExpr.java:137)
at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102)
at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:674)
at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:213)
at com.mslv.oms.view.rule.def.base.BaseLookupRule.evalLookupRule(Unknown Source)
at com.mslv.oms.view.rule.base.a.retrieveAllLookupResults(Unknown Source)
at com.mslv.oms.view.rule.base.BaseLookupRuleHandler.a(Unknown Source)
at com.mslv.oms.view.rule.base.BaseLookupRuleHandler.invokeRuleForValueNode(Unknown Source)
at com.mslv.oms.view.rule.base.BaseViewRuleRunner.visitValueNode(Unknown Source)
at com.mslv.oms.view.visitor.base.f.a(Unknown Source)
at com.mslv.oms.view.visitor.base.f.a(Unknown Source)
at com.mslv.oms.view.visitor.base.f.a(Unknown Source)
at com.mslv.oms.view.visitor.base.f.a(Unknown Source)
at com.mslv.oms.view.visitor.base.f.a(Unknown Source)
at com.mslv.oms.view.rule.base.BaseViewRuleRunner.a(Unk

-- Steps To Reproduce:
1. Create the VF InformationRule - DataInstance
2. Create the VF Lookup Rule which will use DataInstance
3. Run the work order.
4. You will get error; org.xml.sax.SAXParseException: Premature end of file.
5. You can check also in Javadoc - PropertyFileAdapter class.

-- Business Impact:
The customer needs to use two files, one being XML and second being the properties file in the design instead of only using one  properties file.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms