Xml parser issue
My xml is huge almost 6 mb in size. So it is not coming in one line and it is present in database as clob field
We are supposed to read/parse from an xml with the below sample data structure-<ns5:benefitComponent desc="A" level="1" name="a"> <ns5:childBenefits> <ns5:benefitComponent desc="B" level="2" name="b"> As shown above while parsing the xml , only two tags namely “desc” and “name” are present under benefitComponent(an XML object – as shown above). But when connected to the target ,only one record is coming through with the value ->desc='A', name='a' from Level =1 and not the other one (<ns5:benefitComponent desc="B" level="2" name="b">) from Level =2. This shouldn’t be the outcome ideally as the XSD properly defines the hierarchy .Bobj1 Contains à ChildBobjà Bobj1(again called from Child Bobj) How to get both the two records from level 1 as well as level 2 in same target table.
Similar Messages
-
XML Parse issues when using Network Data Model LOD with Springframework 3
Hello,
I am having issues with using using NDM in conjuction with Spring 3. The problem is that there is a dependency on the ConfigManager class in that it has to use Oracle's xml parser from xmlparserv2.jar, and this parser seems to have a history of problems with parsing Spring schemas.
My setup is as follows:
Spring Version: 3.0.1
Oracle: 11GR2 and corresponding spatial libraries
Note that when using the xerces parser, there is no issue here. It only while using Oracle's specific parser which appears to be hard-coded into the ConfigManager. Spring fortunately offers a workaround, where I can force it to use a specific parser when loading the spring configuration as follows:
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl But this is an extra deployment task we'd rather not have. Note that this issue has been brought up before in relation to OC4J. See the following link:
How to change the defaut xmlparser on OC4J Standalone 10.1.3.4 for Spring 3
My question is, is there any other way to configure LOD where it won't have the dependency on the oracle parser?
Also, fyi, here is the exception that is occurring as well as the header for my spring file.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 11 in XML document from URL [file:/C:/projects/lrs_network_domain/service/target/classes/META-INF/spring.xml] is invalid;
nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
[snip]
... 31 more
Caused by: oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:425)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:331)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:222)
at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)Here is my the header for my spring configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">Thanks, TomI ran into this exact issue while trying to get hibernate and spring working with an oracle XMLType column, and found a better solution than to use JVM arguments as you mentioned.
Why is it happening?
The xmlparserv2.jar uses the JAR Services API (Service Provider Mechanism) to change the default javax.xml classes used for the SAXParserFactory, DocumentBuilderFactory and TransformerFactory.
How did it happen?
The javax.xml.parsers.FactoryFinder looks for custom implementations by checking for, in this order, environment variables, %JAVA_HOME%/lib/jaxp.properties, then for config files under META-INF/services on the classpath, before using the default implementations included with the JDK (com.sun.org.*).
Inside xmlparserv2.jar exists a META-INF/services directory, which the javax.xml.parsers.FactoryFinder class picks up and uses:
META-INF/services/javax.xml.parsers.DocumentBuilderFactory (which defines oracle.xml.jaxp.JXDocumentBuilderFactory as the default)
META-INF/services/javax.xml.parsers.SAXParserFactory (which defines oracle.xml.jaxp.JXSAXParserFactory as the default)
META-INF/services/javax.xml.transform.TransformerFactory (which defines oracle.xml.jaxp.JXSAXTransformerFactory as the default)
Solution?
Switch all 3 back, otherwise you'll see weird errors. javax.xml.parsers.* fix the visible errors, while the javax.xml.transform.* fixes more subtle XML parsing (in my case, with apache commons configuration reading/writing).
QUICK SOLUTION to solve the application server startup errors:
JVM Arguments (not great)
To override the changes made by xmlparserv2.jar, add the following JVM properties to your application server startup arguments. The java.xml.parsers.FactoryFinder logic will check environment variables first.
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
However, if you run test cases using @RunWith(SpringJUnit4ClassRunner.class) or similar, you will still experience the error.
BETTER SOLUTION to the application server startup errors AND test case errors:
Option 1: Use JVM arguments for the app server and @BeforeClass statements for your test cases.
System.setProperty("javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
System.setProperty("javax.xml.parsers.SAXParserFactory","com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
System.setProperty("javax.xml.transform.TransformerFactory","com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
If you have a lot of test cases, this becomes painful.
Option 2: Create your own Service Provider definition files in the compile/runtime classpath for your project, which will override those included in xmlparserv2.jar.
In a maven spring project, override the xmlparserv2.jar settings by creating the following files in the %PROJECT_HOME%/src/main/resources directory:
%PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory (which defines com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl as the default)
%PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory (which defines com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl as the default)
%PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.transform.TransformerFactory (which defines com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl as the default)
These files are referenced by both the application server (no JVM arguments required), and solves any unit test issues without requiring any code changes.
This is a snippet of my longer solution for how to get hibernate and spring to work with an oracle XMLType column, found on stackoverflow. -
HTTP sender Adapter - XML parsing issue in SAP PI
Dear All,
We have a scenario where HTTP sends data to JDBC.
We shared the URL with Sender application and they are trying to send the data to PI using URL.
But when it comes to PI Integration Engine, we noticed the inbound payload in Plain text.
Sender Application showed their logs and data they are sending is in XML format.
Any pointers on this issue ? Do we need to do any settings from PI end?
Regards,
SriniHi,
Check the xml document having the code page UTF-8.
Regards,
Prakasu.M -
OES Client causes XML Parser Issue with Spring 3 Framework WAR
Dear All,
OES Client has been installed in the linux OS and configured JAVA SM in it. Have executed the sample webpage in the tomcat server which contains the 'PepResponse' of getting the authorization value (TRUE / FALSE) and it works fine.
Code snippet:-
PepResponse result = PepRequestFactoryImpl.getPepRequestFactory().newPepRequest(user, action, resourceString, null).decide();
out.println("Result: "+ result.allowed());
It returns the proper value if I mention the oes-client.jar classpath reference in the tomcat classpath settings, but at the same time the existing spring framework WAR file is not deployed in the tomcat. The same WAR file is deploying properly if I remove the classpath reference of oes-client.jar from the tomcat configuration.
The issue causes because of xmlparser2.jar(oracle.xdk11.1.1.1) in the oes client.
Have tried all the alternate approaches and failed to execute both the code together.
Note:- One of the approach, I have tried to copy xcersImpl.jar and xml-apis.jar in the WEB-INF/lib within the war file and also executed oes authorization sample web page simultaneously with referred oes-client.jar classpath reference. The WAR file is started deploy properly and OES Authorization sample webpage has thrown 'Null Pointer Exception'.
Anyone, please suggest how to resolve the JAR conflict issue between the OES Client and Spring Framework WAR.Hi, I got registered to this bea forms, can you help on where to go for posting new blog.
Weblogic Consultant -
Xml parsing issue with the existsnode function
Hi Friends,
I have a question as like below
We have the contacts and alternate contacts request as like below.
<TXLife>
<UserAuthRequest>
<UserLoginName>hqtest24</UserLoginName>
<UserDate>2012-07-11</UserDate>
<UserTime>12:42:55</UserTime>
</UserAuthRequest>
<TXLifeRequest>
<TransRefGUID>0c95642d-663a-455f-bd92-aca678538986</TransRefGUID>
<TransType tc="1204">OLI_TRANS_TRNPARTY</TransType>
<TransExeDate>2012-07-11</TransExeDate>
<TransExeTime>12:42:55</TransExeTime>
<InquiryLevel tc="3">OLI_INQUIRY_OBJRELOBJ</InquiryLevel>
<InquiryView>
<InquiryViewCode>INTERMEDIARYUPDATE-CHBM-1204A</InquiryViewCode>
</InquiryView>
<OLifE>
<SourceInfo>
<SourceInfoName>CHBM Admin Tool</SourceInfoName>
</SourceInfo>
<Party id="Intermediary1">
<PartyTypeCode tc="2">OLI_PT_ORG</PartyTypeCode>
<PartySysKey SystemCode="CHBM">111259</PartySysKey>
<FullName>Example Law Firm test</FullName>
<Organization>
<DBA>Example Law Firm test</DBA>
</Organization>
<Address>
<AddressTypeCode tc="2">OLI_ADTYPE_BUS</AddressTypeCode>
<Line1>20 Yellow Brick Rd</Line1>
<Line2>Suite 23</Line2>
<Line3>line 3</Line3>
<City>wonderland34</City>
<AddressState>NY</AddressState>
<Zip>229292</Zip>
<AddressCountry>US</AddressCountry>
</Address>
<Phone>
<PhoneTypeCode tc="2">OLI_PHONETYPE_BUS</PhoneTypeCode>
<DialNumber></DialNumber>
</Phone>
<Phone>
<PhoneTypeCode tc="19">OLI_PHONETYPE_FAX</PhoneTypeCode>
<DialNumber></DialNumber>
</Phone>
<Attachment id="Attachment1">
<DateCreated>2012-07-11</DateCreated>
<UserCode>hqtest24</UserCode>
<AttachmentBasicType tc="1">Text</AttachmentBasicType>
<AttachmentSource>ATTORNEY</AttachmentSource>
<Description>INTERMEDIARY TYPE UPDATED</Description>
<AttachmentData>Attorney</AttachmentData>
<AttachmentType tc="1009800001">Transaction Log</AttachmentType>
<AttachmentLocation tc="1">Inline</AttachmentLocation>
<OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
<AttachmentExtension>
<CreationTime>12:42:55</CreationTime>
<Sequence>1</Sequence>
</AttachmentExtension>
</OLifEExtension>
</Attachment>
<Attachment id="Attachment2">
<DateCreated>2012-07-11</DateCreated>
<UserCode>hqtest24</UserCode>
<AttachmentBasicType tc="1">Text</AttachmentBasicType>
<AttachmentSource>James</AttachmentSource>
<Description>ALTERNATE CONTACT FIRST NAME UPDATED</Description>
<AttachmentType tc="1009800001">Transaction Log</AttachmentType>
<AttachmentLocation tc="1">Inline</AttachmentLocation>
<OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
<AttachmentExtension>
<CreationTime>12:42:55</CreationTime>
<Sequence>2</Sequence>
</AttachmentExtension>
</OLifEExtension>
</Attachment>
<Attachment id="Attachment3">
<DateCreated>2012-07-11</DateCreated>
<UserCode>hqtest24</UserCode>
<AttachmentBasicType tc="1">Text</AttachmentBasicType>
<AttachmentSource>Mathew</AttachmentSource>
<Description>ALTERNATE CONTACT LAST NAME UPDATED</Description>
<AttachmentType tc="1009800001">Transaction Log</AttachmentType>
<AttachmentLocation tc="1">Inline</AttachmentLocation>
<OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
<AttachmentExtension>
<CreationTime>12:42:55</CreationTime>
<Sequence>3</Sequence>
</AttachmentExtension>
</OLifEExtension>
</Attachment>
<EMailAddress>
<EMailType tc="1">Business</EMailType>
<AddrLine></AddrLine>
</EMailAddress>
<URL>
<URLAddr>www.example.com</URLAddr>
<URLType tc="1">Home Page</URLType>
</URL>
</Party>
<Activity id="Activity1" HoldingID="Intermediary1">
<UserCode>hqtest24</UserCode>
<LastUpdate>2012-07-11</LastUpdate>
<ActivityCode>CHBM10004</ActivityCode>
<OLifEExtension VendorCode="0098" ExtensionCode="Activity">
<ActivityExtension>
<SubActivityCode>CHBM20002</SubActivityCode>
<LastUpdateTime>12:42:55</LastUpdateTime>
</ActivityExtension>
</OLifEExtension>
</Activity>
<Party id="Contact1">
<PartyTypeCode tc="1">OLI_PT_PERSON</PartyTypeCode>
<PartySysKey>555223</PartySysKey>
<Person>
<FirstName>Jack</FirstName>
<LastName>Scarecrow23</LastName>
</Person>
<Phone>
<PhoneTypeCode tc="2">OLI_PHONETYPE_BUS</PhoneTypeCode>
<DialNumber>2223993993</DialNumber>
</Phone>
<Phone>
<PhoneTypeCode tc="19">OLI_PHONETYPE_FAX</PhoneTypeCode>
<DialNumber>2223392020</DialNumber>
</Phone>
<EMailAddress>
<EMailType tc="1">Business</EMailType>
<AddrLine>[email protected]</AddrLine>
</EMailAddress>
</Party>
<Relation id="Relation1" OriginatingObjectID="Intermediary1" RelatedObjectID="Contact1">
<RelationRoleCode tc="150">Authorized Person</RelationRoleCode>
</Relation>
<Relation id="Relation1" OriginatingObjectID="Intermediary1">
<RelationRoleCode tc="104">Intermediary</RelationRoleCode>
<RelationDescription tc="42">Attorney</RelationDescription>
</Relation>
<Party id="Contact2">
<PartyTypeCode tc="1">OLI_PT_PERSON</PartyTypeCode>
<PartySysKey>556915</PartySysKey>
<Person>
<FirstName/>
<LastName/>
</Person>
<Phone>
<PhoneTypeCode tc="2">OLI_PHONETYPE_BUS</PhoneTypeCode>
<DialNumber>2343434</DialNumber>
</Phone>
<Phone>
<PhoneTypeCode tc="19">OLI_PHONETYPE_FAX</PhoneTypeCode>
<DialNumber>45345345</DialNumber>
</Phone>
<EMailAddress>
<EMailType tc="1">Business</EMailType>
<AddrLine>[email protected]</AddrLine>
</EMailAddress>
</Party>
<Relation id="Relation4" OriginatingObjectID="Intermediary1" RelatedObjectID="Contact2">
<OriginatingObjectType tc="6">Party</OriginatingObjectType>
<RelatedObjectType tc="6">Party</RelatedObjectType>
<RelationRoleCode tc="150">Authorized Person</RelationRoleCode>
<InterestPercent>-1.0</InterestPercent>
<Sequence>2</Sequence>
</Relation>
</OLifE>
</TXLifeRequest>
</TXLife>
From the above request we have to parse the alternate contact details.
In the procedure we are using as like below
FOR b IN (
SELECT t.vAltCntcity vAltCntcity,
t.Partysyskey Partysyskey,
t.vAltCntZip vAltCntZip,
t.vAltCntGovtID vAltCntGovtID,
t.vAltCntTelno vAltCntTelno,
t.vAltCntemailaddr vAltCntemailaddr,
t.vAltCntstats vAltCntstats,
t.vAltCntAdd1 vAltCntAdd1,
t.vAltCntAdd2 vAltCntAdd2,
t.vAltCntAdd3 vAltCntAdd3,
t.AltCntstate AltCntstate,
t.AltCntcntry AltCntcntry,
t.vAltCntBRTH_DT vAltCntBRTH_DT,
t.vAltCntGender vAltCntGender,
t.vAltCntFaxno vAltCntFaxno,
t.vAltCnturladdr vAltCnturladdr,
t.AltCntorgFST_NM AltCntorgFST_NM,
t.AltCntorgLST_NM AltCntorgLST_NM,
t.AltCntorgMID_NM AltCntorgMID_NM,
t.AltCntorgPFX_NM AltCntorgPFX_NM,
t.AltCntorgSUFX_NM AltCntorgSUFX_NM,
t.AltCntpartytypecode AltCntpartytypecode,
t.vAltCntdatarep vAltCntdatarep,
t1.vAltCntInterestPercent vAltCntInterestPercent,
t1.ROID ROID
FROM (
SELECT xData doc FROM dual ) temp_table,
XMLTable ( '/TXLife/TXLifeRequest/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]' passing doc
COLUMNS OOID varchar2(50) path '@OriginatingObjectID'
, ROID varchar2(50) path '@RelatedObjectID'
, vAltCntInterestpercent varchar2(100) path 'InterestPercent'
)t1,
XMLTable('/Party[@id=$roid]' passing vAltcnt, t1.roid as "roid"
COLUMNS
vAltCntcity VARCHAR2(20) path 'City',
Partysyskey VARCHAR2(100) path 'PartySysKey',
vAltCntZip VARCHAR2(20) path 'Address/Zip',
vAltCntGovtID VARCHAR2(20) path 'GovtID',
vAltCntTelno VARCHAR2(20) path 'Phone[PhoneTypeCode/@tc=2]/DialNumber',
vAltCntemailaddr VARCHAR2(200) path 'EMailAddress/AddrLine',
vAltCntstats varchar2(20) path 'Client/ClientStatus/@tc',
vAltCntAdd1 varchar2(1000) path 'Address/Line1',
vAltCntAdd2 varchar2(1000) path 'Address/Line2',
vAltCntAdd3 varchar2(1000) path 'Address/Line3',
AltCntstate varchar2(100) path 'Address/AddressState',
AltCntcntry varchar2(100) path 'Address/AddressCountry',
vAltCntBRTH_DT date path 'Person/BirthDate',
vAltCntGender char(1) path 'Person/Gender/@tc',
vAltCntFaxno varchar2(100) path 'Phone[PhoneTypeCode/@tc=19]/DialNumber',
vAltCnturladdr varchar2(100) path 'URL/URLAddr',
AltCntorgFST_NM varchar2(100) path 'Person/FirstName',
AltCntorgLST_NM varchar2(100) path 'Person/LastName',
AltCntorgMID_NM varchar2(100) path 'Person/MiddleName',
AltCntorgPFX_NM varchar2(100) path 'Person/Prefix',
AltCntorgSUFX_NM varchar2(100) path 'Person/Suffix',
AltCntpartytypecode varchar2(10) path 'PartyTypeCode/@tc',
vAltCntdatarep varchar2(100) path '@DataRep'
) t
LOOP
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName')
INTO vAltCntFirstnamechk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntFirstnamechkflag:='Y';
END;
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName')
INTO vAltCntLastNamechk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntLastNamechkflag:='Y';
END;
END LOOP;
Here while parsing the data for contact2(with the request provided) by using the above procedure its going to exception.
If the value is not there between the firstname then it should not go to the exception.
If the firstname tag is not there it should go to the exception.
But in the above procedure for the altcntfirstname and altcntlastname selectstatements its going to the exception part when there is no value for firstname(<FirstName></FirstName>).
Is there any way to resolve this issue?
Regards,
JyothirmaiHi Odie,
In the request more than one alternate contact used to come(that means contact1 is primary contact,contact2 is alternate contact1,contact3 is alternate contact2 etc).
We are retrieving the RelatedObjectID and named as ROID in the for loop.
That means in the for loop we are getting the RelatedObjectID,if that RelatedObjectID is equal to party id then that firstname we are checking by using the below select statement.
suppose when we used as like below in the loop the same RelatedObjectID(contact2) is repeating every time.
FOR b IN (
SELECT t.vAltCntcity vAltCntcity,
t.Partysyskey Partysyskey,
t.vAltCntZip vAltCntZip,
t.vAltCntGovtID vAltCntGovtID,
t.vAltCntTelno vAltCntTelno,
t.vAltCntemailaddr vAltCntemailaddr,
t.vAltCntstats vAltCntstats,
t.vAltCntAdd1 vAltCntAdd1,
t.vAltCntAdd2 vAltCntAdd2,
t.vAltCntAdd3 vAltCntAdd3,
t.AltCntstate AltCntstate,
t.AltCntcntry AltCntcntry,
t.vAltCntBRTH_DT vAltCntBRTH_DT,
t.vAltCntGender vAltCntGender,
t.vAltCntFaxno vAltCntFaxno,
t.vAltCnturladdr vAltCnturladdr,
t.AltCntorgFST_NM AltCntorgFST_NM,
t.AltCntorgLST_NM AltCntorgLST_NM,
t.AltCntorgMID_NM AltCntorgMID_NM,
t.AltCntorgPFX_NM AltCntorgPFX_NM,
t.AltCntorgSUFX_NM AltCntorgSUFX_NM,
t.AltCntpartytypecode AltCntpartytypecode,
t.vAltCntdatarep vAltCntdatarep,
t1.vAltCntInterestPercent vAltCntInterestPercent,
t1.ROID ROID
FROM (
SELECT xData doc FROM dual ) temp_table,
XMLTable ( '/TXLife/TXLifeRequest/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]' passing doc
COLUMNS OOID varchar2(50) path '@OriginatingObjectID'
, ROID varchar2(50) path '@RelatedObjectID'
, vAltCntInterestpercent varchar2(100) path 'InterestPercent'
)t1,
XMLTable('/Party[@id=$roid]' passing vAltcnt, t1.roid as "roid"
COLUMNS
vAltCntcity VARCHAR2(20) path 'City',
Partysyskey VARCHAR2(100) path 'PartySysKey',
vAltCntZip VARCHAR2(20) path 'Address/Zip',
vAltCntGovtID VARCHAR2(20) path 'GovtID',
vAltCntTelno VARCHAR2(20) path 'Phone[PhoneTypeCode/@tc=2]/DialNumber',
vAltCntemailaddr VARCHAR2(200) path 'EMailAddress/AddrLine',
vAltCntstats varchar2(20) path 'Client/ClientStatus/@tc',
vAltCntAdd1 varchar2(1000) path 'Address/Line1',
vAltCntAdd2 varchar2(1000) path 'Address/Line2',
vAltCntAdd3 varchar2(1000) path 'Address/Line3',
AltCntstate varchar2(100) path 'Address/AddressState',
AltCntcntry varchar2(100) path 'Address/AddressCountry',
vAltCntBRTH_DT date path 'Person/BirthDate',
vAltCntGender char(1) path 'Person/Gender/@tc',
vAltCntFaxno varchar2(100) path 'Phone[PhoneTypeCode/@tc=19]/DialNumber',
vAltCnturladdr varchar2(100) path 'URL/URLAddr',
AltCntorgFST_NM varchar2(100) path 'Person/FirstName',
AltCntorgLST_NM varchar2(100) path 'Person/LastName',
AltCntorgMID_NM varchar2(100) path 'Person/MiddleName',
AltCntorgPFX_NM varchar2(100) path 'Person/Prefix',
AltCntorgSUFX_NM varchar2(100) path 'Person/Suffix',
AltCntpartytypecode varchar2(10) path 'PartyTypeCode/@tc',
vAltCntdatarep varchar2(100) path '@DataRep'
) t
LOOP
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/@RelatedObjectID][PartyTypeCode/@tc=1]/Person/FirstName')
INTO vAltCntFirstnamechk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/@RelatedObjectID][PartyTypeCode/@tc=1]/Person/FirstName') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntFirstnamechkflag:='Y';
END;
end loop;
For this above code its not going to the exception.we are using this select statement to check whether that node existed or not.
If that node exists and value is not there, that time we are updating the table with the null value by using the vAltCntFirstnamechkflag value as like below in our procedure.
IF b.AltCntorgFST_NM IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||b.AltCntorgFST_NM||''''||',';
ELSIF vAltCntFirstnamechkflag='N' AND vAltCntFirstnamechk IS NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||NULL||''''||',';
END IF;
Please find the below procedure what we are using could you please let me know is there any possibility to resolve this issue(if the tag like <firstname></firstname> that
time also it should not go to the exception).
CREATE OR REPLACE PROCEDURE CHBM_QA1.PR_CUSTOMERUPDATE(PIN_XML_DATA IN CLOB,po_vResponse OUT clob )
IS
xData XMLTYPE:=NULL;
vActivityCode VARCHAR2(100):=NULL;
vSubActivityCode VARCHAR2(100):=NULL;
ncode NUMBER(2):=NULL;
nErrcode NUMBER(10):=0;
vInfodesc VARCHAR2(1000):=NULL;
vStatusinfo VARCHAR2(1000):=NULL;
vStatus VARCHAR2(100):=NULL;
vOrgid VARCHAR2(100):=NULL;
vcity VARCHAR2(100):=NULL;
vAltCntcity VARCHAR2(20):=NULL;
vorgcity VARCHAR2(100):=NULL;
vAddressState VARCHAR2(100):=NULL;
vZip VARCHAR2(100):=NULL;
vAltCntZip VARCHAR2(100):=NULL;
vorgZip VARCHAR2(100):=NULL;
vGovtID VARCHAR2(100):=NULL;
vAltCntGovtID VARCHAR2(100):=NULL;
vorgGovtID VARCHAR2(100):=NULL;
vFullname VARCHAR2(200):=NULL;
norgid NUMBER:=0;
vTelno VARCHAR2(100):=Null;
vAltCntTelno VARCHAR2(100):=Null;
vOrgTelno VARCHAR2(100):=null;
nOrgcnt NUMBER:=0;
vemailaddr VARCHAR2(200):=null;
vAltCntemailaddr VARCHAR2(200):=null;
vorgemailaddr VARCHAR2(200):=null;
vFISC_YEAR_END_DT VARCHAR2(100);
vFiscalYearEndMoDaychkflag CHAR(1):='N';
vFiscalYearEndMoDaychk VARCHAR2(100):=NULL;
vGovtIDchkflag CHAR(1):='N';
vGovtIDchk VARCHAR2(100):=NULL;
vEMailAddresschkflag CHAR(1):='N';
vEMailAddresschk VARCHAR2(1000):=NULL;
vDialNumberchkflag CHAR(1):='N';
vAltCntDialNumberchkflag CHAR(1):='N';
vDialNumberchk VARCHAR2(100):=NULL;
vAltCntDialNumberchk VARCHAR2(100):=NULL;
vFaxnochkflag CHAR(1):='N';
vAltCntFaxnochkflag CHAR(1):='N';
vFaxnochk VARCHAR2(100):=NULL;
vAltCntFaxnochk VARCHAR2(100):=NULL;
vEMailAddressPchkflag CHAR(1):=NULL;
vAltCntEMailAddressPchkflag CHAR(1):=NULL;
vEMailAddressPchk VARCHAR2(200):=NULL;
vAltCntEMailAddressPchk VARCHAR2(200):=NULL;
vLastNamechkflag CHAR(1):='N';
vAltCntLastNamechkflag CHAR(1):='N';
vFirstNamechkflag CHAR(1):='N';
vAltCntFirstNamechkflag CHAR(1):='N';
vTaxidPchkflag CHAR(1):='N';
vAltCntTaxidPchkflag CHAR(1):='N';
vBusinessDescchkflag CHAR(1):='N';
vBusinessDescchk VARCHAR2(2000):=NUll;
vTaxidPchk VARCHAR2(200):=NULL;
vAltCntTaxidPchk VARCHAR2(200):=NULL;
vLastNamechk VARCHAR2(2000):=NULL;
vAltCntLastNamechk VARCHAR2(2000):=NULL;
vFirstNamechk VARCHAR2(2000):=NULL;
vAltCntFirstnamechk VARCHAR2(2000):=NULL;
vattdate VARCHAR2(50):=NULL;
dattdate DATE;
vAdd3Pchkflag CHAR(1):='N';
vAltCntAdd3Pchkflag CHAR(1):='N';
vOrgAdd3chkflag CHAR(1):='N';
vOrgAdd2chkflag CHAR(1):='N';
vAdd2Pchkflag CHAR(1):='N';
vAltCntAdd2Pchkflag CHAR(1):='N';
vOrgAdd3chk VARCHAR2(2000):=NULL;
vOrgAdd2chk VARCHAR2(2000):=NULL;
vAdd2Pchk VARCHAR2(2000):=NULL;
vAltCntAdd2Pchk VARCHAR2(2000):=NULL;
vAdd3Pchk VARCHAR2(2000):=NULL;
vAltCntAdd3Pchk VARCHAR2(2000):=NULL;
nADDR_ID NUMBER:=0;
cntry VARCHAR2(100):=NULL;
AltCntcntry VARCHAR2(100):=NULL;
orgcntry VARCHAR2(100):=NULL;
vAdd1 VARCHAR2(1000):=NULL;
vAdd2 VARCHAR2(1000):=NULL;
vAdd3 VARCHAR2(1000):=NULL;
vAltCntAdd1 VARCHAR2(1000):=NULL;
vAltCntAdd2 VARCHAR2(1000):=NULL;
vAltCntAdd3 VARCHAR2(1000):=NULL;
vorgAdd1 VARCHAR2(1000):=NULL;
vorgAdd2 VARCHAR2(1000):=NULL;
vorgAdd3 VARCHAR2(1000):=NULL;
state VARCHAR2(100):=NULL;
AltCntstate VARCHAR2(100):=NULL;
nptycnt NUMBER:=0;
orgstate VARCHAR2(100):=NULL;
vstats VARCHAR2(100):=NULL;
vAltCntstats VARCHAR2(100):=NULL;
norgvalue NUMBER:=0;
nPtyrolCon NUMBER:=0;
npsnid NUMBER:=0;
npsn NUMBER:=0;
dFISC_YEAR_END_DT date:=NULL;
Gender char(1):=NULL;
vAltCntGender char(1):=NULL;
vBRTH_DT VARCHAR2(100):=NULL;
vAltCntBRTH_DT VARCHAR2(100):=NULL;
BusinessDesc VARCHAR2(200):=NULL;
dBRTH_DT date:=NULL;
dAltCntBRTH_DT date:=NULL;
prmycnt VARCHAR2(100):=NULL;
vpsnstats VARCHAR2(100):=NULL;
vAltCntpsnstats VARCHAR2(100):=NULL;
vPartySysKey VARCHAR2(100):=NULL;
vFaxno VARCHAR2(100):=NULL;
vAltCntFaxno VARCHAR2(100):=NULL;
vorgFaxno VARCHAR2(100):=NULL;
nRlplptyid CHBM_PARTY_RELATIONSHIP.ROLE_PLAYR_PRTY_ID%TYPE:=NULL;
vurladdr VARCHAR2(100):=NULL;
vAltCnturladdr VARCHAR2(100):=NULL;
FST_NM VARCHAR2(100):=NULL;
orgFST_NM VARCHAR2(100):=NULL;
AltCntorgFST_NM VARCHAR2(100):=NULL;
LST_NM VARCHAR2(100):=NULL;
orgLST_NM VARCHAR2(100):=NULL;
AltCntorgLST_NM VARCHAR2(100):=NULL;
MID_NM VARCHAR2(100):=NULL;
orgMID_NM VARCHAR2(100):=NULL;
AltCntorgMID_NM VARCHAR2(100):=NULL;
PFX_NM VARCHAR2(100):=NULL;
orgPFX_NM VARCHAR2(100):=NULL;
AltCntorgPFX_NM VARCHAR2(100):=NULL;
SUFX_NM VARCHAR2(100):=NULL;
orgSUFX_NM VARCHAR2(100):=NULL;
AltCntorgSUFX_NM VARCHAR2(100):=NULL;
naddcnt NUMBER:=0;
nAltaddcnt NUMBER:=0;
norgseq NUMBER:=NULL;
nADDR_IDseq NUMBER:=NULL;
npsnidseq NUMBER:=NULL;
nAltCntpsnidseq NUMBER:=NULL;
vTransrefguid VARCHAR2(1000):=NULL;
nRecfound NUMBER:=0;
partytypecode varchar2(100):=null;
AltCntpartytypecode varchar2(100):=null;
RelationRoleCode VARCHAR2(100):=NULL;
cUpdateflag CHAR(1):='N';
vupdatequery CLOB:=null;
plancode varchar2(100):=null;
usercreated VARCHAR2(200):=null;
openeddate VARCHAR2(100);
openedtime varchar2(100);
vopeneddate VARCHAR2(100);
dopeneddate date;
naddrcnt NUMBER:=0;
ncnt1 number:=0;
ncnt2 number:=0;
ncnt3 number:=0;
ncnt4 number:=0;
ncnt5 number:=0;
ncnt6 number:=0;
nDelCnt1 number:=0;
nDelCnt2 number:=0;
nDelCnt3 number:=0;
nAltcnt4 number:=0;
nAltcnt5 number:=0;
nAltcnt6 number:=0;
nRelcnt NUMBER:=0;
nAltRelcnt NUMBER:=0;
ncnt7 NUMBER:=0;
nprscnt NUMBER:=0;
nAltprscnt NUMBER:=0;
nPlncnt NUMBER:=0;
npsncnt NUMBER:=0;
vaddupdatequery VARCHAR2(4000);
caddUpdateflag CHAR(1):='N';
vaddrupdatequery VARCHAR2(4000);
vAltCntaddrupdatequery VARCHAR2(4000);
caddrUpdateflag CHAR(1):='N';
cAltCntaddrUpdateflag CHAR(1):='N';
vpsnupdatequery VARCHAR2(4000);
vAltCntpsnupdatequery VARCHAR2(4000);
cpsnUpdateflag CHAR(1):='N';
cAltCntpsnUpdateflag CHAR(1):='N';
vCntInterestPercent VARCHAR2(200);
vAltCntInterestPercent VARCHAR2(200);
vCntdatarep varchar2(100);
vAltCntdatarep varchar2(100);
vAltcnt XMLTYPE:=NULL;
eParsererror EXCEPTION;
PRAGMA EXCEPTION_INIT(eParsererror,-31011);
eUniqueexception EXCEPTION;
PRAGMA EXCEPTION_INIT(eUniqueexception,-00001);
eplanexception EXCEPTION;
PRAGMA EXCEPTION_INIT(eplanexception,-02291);
eEventexception EXCEPTION;
PRAGMA EXCEPTION_INIT(eEventexception,-01400);
BEGIN
BEGIN
xData := XMLTYPE.createxml(PIN_XML_DATA);
END;
BEGIN
SELECT extractvalue(value(t),'/TXLifeRequest/TransRefGUID')
INTO vTransrefguid
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest'))) t
WHERE existsnode(value(t),'/TXLifeRequest/TransRefGUID')=1
AND extractvalue(value(t),'/TXLifeRequest/TransRefGUID') IS NOT NULL;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ncode:=5;
nErrcode:=200;
vStatus:='FAILURE';
vStatusinfo:='General Data Error';
Raise_application_error(-20201,'Transrefguid does not exist');
END;
BEGIN
SELECT t.vActivityCode,
t.vSubActivityCode
INTO vActivityCode,
vSubActivityCode
FROM (
SELECT xData doc
FROM dual
) temp_table,
XMLTable ( '/TXLife/TXLifeRequest/OLifE' passing doc
COLUMNS
vActivityCode VARCHAR2(20) path 'Activity/ActivityCode',
vSubActivityCode VARCHAR2(20) path 'Activity/OLifEExtension/ActivityExtension/SubActivityCode'
) t;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ncode:=5;
nErrcode:=200;
vStatus:='FAILURE';
vStatusinfo:='RESULTINFO_DATA ';
Raise_application_error(-20201,'General Data Error');
END;
IF vActivityCode='CHBM10003' AND vSubActivityCode='CHBM20002' THEN
FOR b IN (
SELECT t.vAltCntcity vAltCntcity,
t.Partysyskey Partysyskey,
t.vAltCntZip vAltCntZip,
t.vAltCntGovtID vAltCntGovtID,
t.vAltCntTelno vAltCntTelno,
t.vAltCntemailaddr vAltCntemailaddr,
t.vAltCntstats vAltCntstats,
t.vAltCntAdd1 vAltCntAdd1,
t.vAltCntAdd2 vAltCntAdd2,
t.vAltCntAdd3 vAltCntAdd3,
t.AltCntstate AltCntstate,
t.AltCntcntry AltCntcntry,
t.vAltCntBRTH_DT vAltCntBRTH_DT,
t.vAltCntGender vAltCntGender,
t.vAltCntFaxno vAltCntFaxno,
t.vAltCnturladdr vAltCnturladdr,
t.AltCntorgFST_NM AltCntorgFST_NM,
t.AltCntorgLST_NM AltCntorgLST_NM,
t.AltCntorgMID_NM AltCntorgMID_NM,
t.AltCntorgPFX_NM AltCntorgPFX_NM,
t.AltCntorgSUFX_NM AltCntorgSUFX_NM,
t.AltCntpartytypecode AltCntpartytypecode,
t.vAltCntdatarep vAltCntdatarep,
t1.vAltCntInterestPercent vAltCntInterestPercent,
t1.ROID ROID
FROM (
SELECT xData doc FROM dual ) temp_table,
XMLTable ( '/TXLife/TXLifeRequest/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]' passing doc
COLUMNS OOID varchar2(50) path '@OriginatingObjectID'
, ROID varchar2(50) path '@RelatedObjectID'
, vAltCntInterestpercent varchar2(100) path 'InterestPercent'
)t1,
XMLTable('/Party[@id=$roid]' passing vAltcnt, t1.roid as "roid"
COLUMNS
vAltCntcity VARCHAR2(20) path 'City',
Partysyskey VARCHAR2(100) path 'PartySysKey',
vAltCntZip VARCHAR2(20) path 'Address/Zip',
vAltCntGovtID VARCHAR2(20) path 'GovtID',
vAltCntTelno VARCHAR2(20) path 'Phone[PhoneTypeCode/@tc=2]/DialNumber',
vAltCntemailaddr VARCHAR2(200) path 'EMailAddress/AddrLine',
vAltCntstats varchar2(20) path 'Client/ClientStatus/@tc',
vAltCntAdd1 varchar2(1000) path 'Address/Line1',
vAltCntAdd2 varchar2(1000) path 'Address/Line2',
vAltCntAdd3 varchar2(1000) path 'Address/Line3',
AltCntstate varchar2(100) path 'Address/AddressState',
AltCntcntry varchar2(100) path 'Address/AddressCountry',
vAltCntBRTH_DT date path 'Person/BirthDate',
vAltCntGender char(1) path 'Person/Gender/@tc',
vAltCntFaxno varchar2(100) path 'Phone[PhoneTypeCode/@tc=19]/DialNumber',
vAltCnturladdr varchar2(100) path 'URL/URLAddr',
AltCntorgFST_NM varchar2(100) path 'Person/FirstName',
AltCntorgLST_NM varchar2(100) path 'Person/LastName',
AltCntorgMID_NM varchar2(100) path 'Person/MiddleName',
AltCntorgPFX_NM varchar2(100) path 'Person/Prefix',
AltCntorgSUFX_NM varchar2(100) path 'Person/Suffix',
AltCntpartytypecode varchar2(10) path 'PartyTypeCode/@tc',
vAltCntdatarep varchar2(100) path '@DataRep'
) t
LOOP
IF b.vAltCntBRTH_DT IS NOT NULL THEN
dAltCntBRTH_DT:=to_date(b.vAltCntBRTH_DT,'yyyy-mm-dd');
END IF;
IF b.vAltCntdatarep != 'Removed' OR b.vAltCntdatarep IS NULL THEN
BEGIN
--------------Starting of CHBM_PERSON Table---------
IF b.vAltCntstats IS NOT NULL THEN
BEGIN
SELECT code_val_cd
INTO vAltCntpsnstats
FROM chbm_code_reference
WHERE tbl_nm='CHBM_PERSON'
AND col_nm='STAT_CD'
AND acord_cd =b.vAltCntstats;
EXCEPTION
WHEN OTHERS THEN
ncode :=5;
nErrcode :=2001;
vStatus :='FAILURE';
vStatusinfo :='RESULTINFO_DATA ';
vInfodesc :='Person status details are not available in code reference';
Raise_application_error(-20201,'Person status details are not available in code reference');
END;
END IF;
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=2]/DialNumber')
INTO vAltCntDialNumberchk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=2]/DialNumber') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntDialNumberchkflag:='Y';
END;
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=19]/DialNumber')
INTO vAltCntFaxnochk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=19]/DialNumber') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntFaxnochkflag:='Y';
END;
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName')
INTO vAltCntFirstnamechk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntFirstnamechkflag:='Y';
END;
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName')
INTO vAltCntLastNamechk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntLastNamechkflag:='Y';
END;
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/EMailAddress/AddrLine')
INTO vAltCntEMailAddressPchk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/EMailAddress/AddrLine') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntEMailAddressPchkflag:='Y';
END;
BEGIN
SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/GovtID')
INTO vAltCntTaxidPchk
FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/GovtID') =1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
vAltCntTaxidPchkflag:='Y';
END;
IF b.Partysyskey IS NOT NULL THEN
nAltCntpsnidseq:=b.Partysyskey;
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||'UPDATE CHBM_PERSON SET';
IF dAltCntBRTH_DT IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' brth_dt ='''||dAltCntBRTH_DT||''''||',';
END IF;
IF b.vAltCntGender IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' GEND_CD ='''||b.vAltCntGender||''''||',';
END IF;
IF b.vAltCntGovtID IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TAX_ID ='''||b.vAltCntGovtID||''''||',';
ELSIF vAltCntTaxidPchkflag='N' AND vAltCntTaxidPchk IS NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TAX_ID ='''||NULL||''''||',';
END IF;
IF b.vAltCntTelno IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TEL_NO ='''||b.vAltCntTelno||''''||',';
ELSIF vAltCntDialNumberchkflag='N' AND vAltCntDialNumberchk IS NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TEL_NO ='''||NULL||''''||',';
END IF;
IF b.vAltCntemailaddr IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' EMAIL_ADR ='''||b.vAltCntemailaddr||''''||',';
ELSIF vAltCntEMailAddressPchkflag='N' AND vAltCntEMailAddressPchk IS NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' EMAIL_ADR ='''||NULL||''''||',';
END IF;
IF b.vAltCntFaxno IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FAX_NO ='''||b.vAltCntFaxno||''''||',';
ELSIF vAltCntFaxnochkflag='N' AND vAltCntFaxnochk IS NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FAX_NO ='''||NULL||''''||',';
END IF;
IF vAltCntpsnstats IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' STAT_CD ='''||vAltCntpsnstats||''''||',';
END IF;
IF b.AltCntorgLST_NM IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_NM ='''||b.AltCntorgLST_NM||''''||',';
ELSIF vAltCntLastNamechkflag='N' AND vAltCntLastNamechk IS NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_NM ='''||NULL||''''||',';
END IF;
IF b.AltCntorgFST_NM IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||b.AltCntorgFST_NM||''''||',';
ELSIF vAltCntFirstnamechkflag='N' AND vAltCntFirstnamechk IS NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||NULL||''''||',';
END IF;
IF b.AltCntorgMID_NM IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' MID_NM ='''||b.AltCntorgMID_NM||''''||',';
END IF;
IF b.AltCntorgPFX_NM IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' PFX_NM ='''||b.AltCntorgPFX_NM||''''||',';
END IF;
IF b.AltCntorgSUFX_NM IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' SUFX_NM ='''||b.AltCntorgSUFX_NM||''''||',';
END IF;
IF b.vAltCnturladdr IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' WEB_SITE_ID ='''||b.vAltCnturladdr||''''||',';
END IF;
IF dopeneddate IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_UPDT_DT ='''||dopeneddate||''''||',';
END IF;
IF usercreated IS NOT NULL THEN
cAltCntpsnUpdateflag:='Y';
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_UPDT_BY_USER_ID ='''||usercreated||''''||',';
END IF;
vAltCntpsnupdatequery := SUBSTR(vAltCntpsnupdatequery,1,instr(vAltCntpsnupdatequery,',',-1,1)-1);
vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' WHERE psn_id='''||nAltCntpsnidseq||'''';
IF cAltCntpsnUpdateflag='Y' THEN
EXECUTE IMMEDIATE vAltCntpsnupdatequery;
vAltCntpsnupdatequery := NULL;
nAltcnt4:=Sql%rowcount;
END IF;
END IF;
END LOOP;
END IF;
END;
Regards,
Jyothirmai -
XML Parsing issue with same tag names at multiple levels.
My XML has the same tag name , ID at different levels in the XML.
<InventorySearch>
<*ID*>ID1</*ID*>
<interactionDate>2012-09-01T10:30:00Z</interactionDate>
<DescribedBy>
<value>Cycle Count extract</value>
<Characteristic>
<*ID*>ID2</*ID*>
</Characteristic>
</DescribedBy>
<type>Cycle Count</type>
<InventorySearchComprisedOf>
<*ID*>ID3</*ID*>
<quantity>
<amount>1</amount>
<units>EACH</units>
</quantity>
<itemDateComplete>2012-09-07T10:30:00Z</itemDateComplete>
<itemStatus>Open</itemStatus>
</InventorySearchComprisedOf>
</InventorySearch>
When I use the Extract function with XML Sequence, I am getting all the ID values concatenated.
select extract(value(d),'//ID/text()').getstringval() as id1,
extract(value(e),'//ID/text()'). getstringval() as id2
from xxnbn_cc_response_xml_stg x,
table(xmlsequence(extract(x.xml_column,'/InventorySearch'))) d,
table(XMLSEQUENCE(extract(D.column_value,'//InventorySearchComprisedOf')))(+) E;
Return values :
ID1 - ID1ID2ID3
ID2 - ID3
Is this the right way to parse this type of XML?The answer would depend upon your version of Oracle
select * from v$version
and the desired result set you want to see.
If you are 10.2 or later, than XMLTable would be easier to write, but I won't go that way until we know more about what you want to see. -
Xml parsing issue when xmlns present xquery sqlserver
Hi ,
I have this xml
declare @xml xml
set @xml ='<students xmlns="http://www.abcdef.com/pqrs/1.3.0" xsi:schemaLocation="http://www.abcdef.com/pqrs/1.3.0_f3">
<student>
<id>1</id>
<name>aaa</name>
</student>
</students>'
when I am xquering this data like below.
select
s.n.value('(id/text())[1]', 'varchar(50)') as id ,
s.n.value('(name/text())[1]','varchar(50)') as name
from
@XML.nodes('/students/student') as S(N)
Its not returning any rows. But when I remove the below lines in xml.
xmlns="http://www.abcdef.com/pqrs/1.3.0" xsi:schemaLocation="http://www.abcdef.com/pqrs/1.3.0_f3"
Its working fine.
can any one tell me what is the reason ? how to over come this ?
Thanks in advance.Hello,
It seems contain incorrect "schemaLocation" in the definition, please refer to the following T-SQL below:
declare @xml xml
set @xml ='<students xmlns="http://www.abcdef.com/pqrs/1.3.0">
<student>
<id>1</id>
<name>aaa</name>
</student>
</students>';
; with xmlnamespaces (default 'http://www.abcdef.com/pqrs/1.3.0')
select
s.n.value('(id/text())[1]', 'varchar(50)') as id ,
s.n.value('(name/text())[1]','varchar(50)') as name
from
@XML.nodes('/students/student') as S(N)
Regards,
Elvis Long
TechNet Community Support -
XML parsing issues - pls.help #1
Hi Everyone,
I have the following xml from which I need a particular output .
xml Syntax (Toggle Plain Text)
<items><item id="film"><category>entertainment </category><category>drama</category><category>music </category></item><item id="sitcom"><category>entertainment </category><category>tv</category></item> </items>
<items>
<item id="film">
<category>entertainment </category>
<category>drama</category>
<category>music </category>
</item>
<item id="sitcom">
<category>entertainment </category>
<category>tv</category>
</item>
</items>
Output I would like
film|entertainment
film|drama
film|music
sitcom|entertainment
sitcom|tv
But the code I have displays the output as
film|entertainment
film|drama
film|music
film|entertainment
film|tv
sitcom|entertainment
sitcom|drama
sitcom|music
sitcom|entertainment
sitcom|tv
And this is the code I have
java Syntax (Toggle Plain Text)
static void GetItem(Document doc){Element root = doc.getDocumentElement();Element[] items = getElementsByTagNameNR(root,"Item");for(int i=0;i<items.length;i++){String itemIDStr = items[i].getAttribute("ItemID");NodeList nl = doc.getElementsByTagName("Category");for (int j = 0; j < nl.getLength(); j++){Node n = nl.item(j);NodeList nll = n.getChildNodes();for(int k=0; k<nll.getLength(); k++){ Node nn = nll.item(k);streamItemCategory.println(itemIDStr + nn.getNodeValue() + columnSeparator);} }} static void GetItem(Document doc){
Element root = doc.getDocumentElement();
Element[] items = getElementsByTagNameNR(root,"Item");
for(int i=0;i<items.length;i++){
String itemIDStr = items.getAttribute("ItemID");
NodeList nl = doc.getElementsByTagName("Category");
for (int j = 0; j < nl.getLength(); j++){
Node n = nl.item(j);
NodeList nll = n.getChildNodes();
for(int k=0; k<nll.getLength(); k++){
Node nn = nll.item(k);
streamItemCategory.println(itemIDStr + nn.getNodeValue() + columnSeparator);
I have include a condition by which only the categories for that item should be displayed and when the itemid changes it no more should include the old categories
Can someone pls tell me how to do it.
Thanks
GI think the problem lies in this line of your code:
NodeList nl = doc.getElementsByTagName("Category");check out this link:
http://www.w3schools.com/dom/met_document_getelementsbytagname.asp
This method returns all the nodes with name as 'category' which includes the categories of the sitcom... -
Diacritic screwing up XML parsing
Hola -
I've got a procedure which chews through some database input & produces RSS feeds (as taken from a Tyler Muth posting). It started bailing and I traced it down to a particular entry in the table which has a diacritic, which won't be uncommon for me - the name Çınlar seems to cause XML parsing to fail w/the ff. error:
ORA-31011: XML parsing failed
ORA-06512: at "SUPERVISOR.RSSLOOP3", line 30
ORA-06512: at line 1
31011. 00000 - "XML parsing failed"
*Cause: XML parser returned an error while trying to parse the document.
*Action: Check if the document to be parsed is valid.
Questions are: 1) Why would this be, the data is all coming from the same 10gr2 instance; 2) How can I avoid this? The code for the procedure is below, although I assume this is simply a character set/XML parsing issue I'm unfamiliar with. Many, many thanks for any assistance here. I stand perplexed! I know I can scrub the data with translate but I'm hoping there's a better solution, ideally one which allows me to keep all the diacritics in place.
create or replace
procedure rssloop3 ( fund_in IN VARCHAR2)
is
-- customizable parameters
l_title varchar2(255) := ' New Titles Since ' || to_char(sysdate - 90, 'MM/DD/YYYY');
l_link varchar2(255) := 'replace this' || fund_in || '.rss';
l_description varchar2(255) := 'This is a feed of changes to items ' || fund_in;
l_language varchar2(255) := 'en-us';
-- end customizable parameters
l_version varchar2(10) := '2.0';
l_clob clob;
l_idx pls_integer := 1;
l_len pls_integer := 255;
l_defrows pls_integer := 100;
l_maxrows pls_integer := 100;
l_desclen pls_integer := 250;
-- for output to file
fh UTL_FILE.FILE_TYPE;
path VARCHAR2(30);
filename VARCHAR2(30);
begin
path := '/iiidb/http/live/screens/rss/';
filename := fund_in || '.rss';
fh := UTL_FILE.FOPEN(path, filename, 'w');
-- fund := fund_in;
for i in (
select xmlelement( "rss",
-- Begin XML Header Block
xmlattributes( l_version as "version"),
xmlelement( "channel",
xmlforest( l_title as "title",
l_link as "link",
l_description as "description",
l_language as "language"),
-- End XML Header Block
-- Begin List of Individual Articles or Items
xmlagg(
xmlelement( "item",
xmlelement("title", x.title),
xmlelement("link", x.link),
xmlelement("description", x.description),
xmlelement("callnum", x.callnum),
xmlelement("pubDate", to_char(x.updated_on,'Dy, DD Mon RRRR hh24:mi:ss')),
xmlelement("guid", XMLATTRIBUTES('false' as "isPermaLink"),x.id||to_char(x.updated_on,'JHH24MISS'))
-- End List of Individual Articles or Items
) as result
from ( -- Actual Database Query that populates the list of Items
select id,title,link,description,updated_on, callnum
from drx_rss_feeds
where (fund like fund_in||'%')
and rownum < (l_maxrows+1)) x)
loop
l_clob := xmltype.extract(i.result,'/').getclobval;
exit;
end loop; --i
--- OUTPUT RESULTS
for i in 1..ceil(dbms_lob.getlength(l_clob)/l_len) loop
UTL_FILE.PUT_LINE(fh,(substr(l_clob,l_idx,l_len)));
l_idx := l_idx + l_len;
end loop; --i
UTL_FILE.FCLOSE(fh);
end rssloop3;NLS is UTF8 btw.
-
XML Parser for PL/SQL and related issues
I need to have further information about some of the following
issues and XML features and make a determination useful for
evaluation and recommendation:
ISSUES
1) Is there a maximum size for an XML document to provide data
for PL/SQL(or SQL) across tables, provided that no CLOB are used?
2) How about from Oracle to an XML document ?
3) Is there a ratio between XML document size and main memory and
SGA size. What are Oracle's recommendations /
4) Can the Oracle Application Server run on a DHCP NT server when
using XML parsing ? Is it NT Service Pack 3 and 4 compatible ?
5) How parsers can interact with one another or related tools ?
For example, how the XML parser for c/c++ could be useful when
using Pro*C/C++ (programmer 2000) or OCI interfaces ? In other
words, what is the business logic in using these tools ?
nullAnthony D. Noriega (guest) wrote:
: I need to have further information about some of the following
: issues and XML features and make a determination useful for
: evaluation and recommendation:
: ISSUES
: 1) Is there a maximum size for an XML document to provide data
: for PL/SQL(or SQL) across tables, provided that no CLOB are
used?
The limit should be what can be inserted into an object view.
: 2) How about from Oracle to an XML document ?
The limit should be what can be retrieved from an object view.
: 3) Is there a ratio between XML document size and main memory
:and SGA size. What are Oracle's recommendations /
Not directly due to the relationship between XML metadata and
data not being constrained.
: 4) Can the Oracle Application Server run on a DHCP NT server
: when using XML parsing ?
If it can run a JavaVM with the correct permissions there are no
other special requirements.
:Is it NT Service Pack 3 and 4 compatible ?
No special requirements here.
: 5) How parsers can interact with one another or related tools ?
: For example, how the XML parser for c/c++ could be useful when
: using Pro*C/C++ (programmer 2000) or OCI interfaces ? In
other
: words, what is the business logic in using these tools ?
Not really sure of your question. The XML components are useful
in any application where I am processing documents or data with
an XML structure. The choice to use XML can be based on quite a
range of requirements due to its declarative syntax and open
standards. If you give me a specific application, I can perhaps
be more helpful.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null -
XML Parsing for one xml tag value we have issues
Hi All
We are getting XML file from External System using XML parser to decode and update Oracle Tables.
It's working ok for all fields for one field it's working i.e we are not getting any Value
l_n dbms_xmldom.DOMNode;
v_service_level VARCHAR2(240);
Begin
l_clob := p_clob;
BEGIN
-- Create a parser.
l_parser := dbms_xmlparser.newParser;
-- Parse the document and create a new DOM document.
dbms_xmlparser.parseClob(l_parser, l_clob);
l_doc := dbms_xmlparser.getDocument(l_parser);
-- Free resources associated with the CLOB and Parser now they are needed.
dbms_xmlparser.freeParser(l_parser);
-- Get a list of all the nodes in the document
l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc), '/response');
-- Loop through the list and create a new record
FOR rec IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP
l_n := dbms_xmldom.item(l_nl, rec);
-- assign values to the elements of the collection.
dbms_xslprocessor.valueOf(l_n,'awb/text()', v_awb);
dbms_xslprocessor.valueOf(l_n,'carrier/text()', v_carrier);
dbms_xslprocessor.valueOf(l_n,'pieces/text()', v_pieces);
dbms_xslprocessor.valueOf(l_n,'weight/text()', v_weight);
dbms_xslprocessor.valueOf(l_n,'weight_uom/text()', v_weight_uom);
dbms_xslprocessor.valueOf(l_n,'price/text()', v_price);
dbms_xslprocessor.valueOf(l_n,'code_currency/text()', v_code_currency);
dbms_xslprocessor.valueOf(l_n,'date_pickup/text()', v_date_pickup);
dbms_xslprocessor.valueOf(l_n,'account/text()', v_account);
dbms_xslprocessor.valueOf(l_n,'reference/text()', v_reference);
dbms_xslprocessor.valueOf(l_n,'instruction/text()', v_instruction);
dbms_xslprocessor.valueOf(l_n,'delivery_condition/text()', v_freight_terms);
dbms_xslprocessor.valueOf(l_n,'service_level/text()', v_service_level);
end;
for v_service_level we are having issues though external system is sending value but we are not getting any value
If any fix for this it will be of great help
Thanks
Kamalakar.GThanks for the details.
The following works for me :
DECLARE
l_clob clob := '<?xml version="1.0" encoding="UTF-8" ?>
<response>
<status>OK</status>
<code_shipment>9387073</code_shipment>
<reference>22263480</reference>
<awb>GE466503605NL</awb>
<carrier>TNT</carrier>
<service_level>STANDARD</service_level>
<pieces>1</pieces>
<weight>0.32</weight>
<weight_uom>kg</weight_uom>
<delivery_condition>CPT</delivery_condition>
<price>4.92</price>
<code_currency>EUR</code_currency>
<date_delivery>17-Feb-2011</date_delivery>
<time_delivery>13:41</time_delivery>
<accepted_by>HEEZEN</accepted_by>
<date_pickup>29-Mar-2011</date_pickup>
<status_shipment>PLAN</status_shipment>
<tracking_url>
<form ACTION="http://www.tnt.com/webtracker/tracking.do?respLang=en&respCountry=US&genericSiteIdent=" target="_new" METHOD="POST">
<input name="cons" type="hidden" value="GE466503605NL" />
<INPUT TYPE="hidden" NAME="page" VALUE="0" />
<INPUT TYPE="hidden" NAME="resplang" VALUE="EN" />
<INPUT TYPE="hidden" NAME="plazakey" VALUE="" />
<INPUT TYPE="hidden" NAME="SaformName" VALUE="TRACKER__Finput_html" />
<INPUT type="submit" name="track" value="Track" />
</form>
</tracking_url>
<date_scan />
<time_scan />
<type1 />
<type2 />
<scan_location1 />
<scan_location2 />
<scan_text />
<scanned_by />
<shipment_package>
<sequence>1</sequence>
<awb />
<date_delivery>17-Feb-2011</date_delivery>
<time_delivery>13:41</time_delivery>
<accepted_by>HEEZEN</accepted_by>
<reference />
</shipment_package>
</response>';
l_n dbms_xmldom.DOMNode;
l_nl dbms_xmldom.DOMNodeList;
l_parser dbms_xmlparser.Parser;
l_doc dbms_xmldom.DOMDocument;
v_awb VARCHAR2(240);
v_carrier VARCHAR2(240);
v_pieces VARCHAR2(240);
v_weight VARCHAR2(240);
v_weight_uom VARCHAR2(240);
v_price VARCHAR2(240);
v_code_currency VARCHAR2(240);
v_date_pickup VARCHAR2(240);
v_account VARCHAR2(240);
v_reference VARCHAR2(240);
v_instruction VARCHAR2(240);
v_freight_terms VARCHAR2(240);
v_service_level VARCHAR2(240);
BEGIN
-- Create a parser.
l_parser := dbms_xmlparser.newParser;
-- Parse the document and create a new DOM document.
dbms_xmlparser.parseClob(l_parser, l_clob);
l_doc := dbms_xmlparser.getDocument(l_parser);
-- Free resources associated with the CLOB and Parser now they are needed.
dbms_xmlparser.freeParser(l_parser);
-- Get a list of all the nodes in the document
l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc), '/response');
-- Loop through the list and create a new record
FOR rec IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP
l_n := dbms_xmldom.item(l_nl, rec);
-- assign values to the elements of the collection.
dbms_xslprocessor.valueOf(l_n,'awb/text()', v_awb);
dbms_xslprocessor.valueOf(l_n,'carrier/text()', v_carrier);
dbms_xslprocessor.valueOf(l_n,'pieces/text()', v_pieces);
dbms_xslprocessor.valueOf(l_n,'weight/text()', v_weight);
dbms_xslprocessor.valueOf(l_n,'weight_uom/text()', v_weight_uom);
dbms_xslprocessor.valueOf(l_n,'price/text()', v_price);
dbms_xslprocessor.valueOf(l_n,'code_currency/text()', v_code_currency);
dbms_xslprocessor.valueOf(l_n,'date_pickup/text()', v_date_pickup);
dbms_xslprocessor.valueOf(l_n,'account/text()', v_account);
dbms_xslprocessor.valueOf(l_n,'reference/text()', v_reference);
dbms_xslprocessor.valueOf(l_n,'instruction/text()', v_instruction);
dbms_xslprocessor.valueOf(l_n,'delivery_condition/text()', v_freight_terms);
dbms_xslprocessor.valueOf(l_n,'service_level/text()', v_service_level);
dbms_output.put_line(v_awb);
dbms_output.put_line(v_carrier);
dbms_output.put_line(v_pieces );
dbms_output.put_line(v_weight);
dbms_output.put_line(v_weight_uom);
dbms_output.put_line(v_price);
dbms_output.put_line(v_code_currency);
dbms_output.put_line(v_date_pickup);
dbms_output.put_line(v_account);
dbms_output.put_line(v_reference);
dbms_output.put_line(v_instruction);
dbms_output.put_line(v_freight_terms);
dbms_output.put_line(v_service_level);
END LOOP;
END;
/ -
this is regarding using oracle xml parser on WAS. we are facing the same issue as was posted on this forum
xmlparserv2.jar cause IBM WebSphere v5.1 down.
what i need to know is has there been any other issue even after implementing those solution? plz do reply
Best Regadrsthe error that we get on the server is : -
SystemErr R java.lang.IncompatibleClassChangeError\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.tree.AbstractElement.setAttributes(AbstractElement.java:505)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXContentHandler.addAttributes(SAXContentHandler.java:916)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXContentHandler.startElement(SAXContentHandler.java:249)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:465)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.imf.dmfs.dal.util.dao.HibernateUtil.<clinit>(HibernateUtil.java:34)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at java.lang.J9VMInternals.initializeImpl(Native Method)\par
12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)\par
2. the applications is being depl in WAR.
3. ClassLoader Policy : parent last
deleting META-INF/services folder in oracle parser jar file has no effect.
PLZ HELP ME OUT -
How can I use a 3rd party XML parser such as xerces with OC4J ?
Hi all tech experts,
I am using Oracle Application Server 10g Release 2 (10.1.2) and i have
installed Portal and Wireless and OracleAS Infrastructure on the same
computer.
i tried all the solutions on this thread
Use of Xerces Parser in out application with Oracle App Server 9.0.4
but still fighting.
I have also posted this query on OTN on following thread
How can I use a 3rd party XML parser such as xerces with OC4J?
but no reply....
Please help me on this issue.
Since OC4J is preconfigured to use the Oracle XML parser which is xmlparserv2.jar.
i have read the following article which states that
OC4J is preconfigured to use the Oracle XML parser. The Oracle XML parser is fully JAXP 1.1 compatible and will serve the needs of applications which require JAXP functionality. This approach does not require the download, installation, and configuration of additional XML parsers.
The Oracle XML parser (xmlparserv2.jar) is configured to load as a system level library of OC4J through it's inclusion as an entry in the Class-Path entry of the oc4j.jar Manifest.mf file. This results in the Oracle XML parser being used for all common deployment and packaging situations. You are not permitted to modify the Manifest.mf file of oc4j.jar.
It must be noted that configuring OC4J to run with any additional XML parser or JDBC library is not a supported configuration. We do know customers who have managed to successfully replace the system level XML parser and the Oracle JDBC drivers that ship with the product, but we do not support this type of configuration due to the possibility of unexpected system behavior and system errors that might occur from replacing the tested and certified libraries.
If you absolutely must use an additional XML parser such as xerces, then you have to start OC4J such that the xerces.jar file is loaded at a level above the OC4J system classpath. This can be accomplished using the -Xbootclasspath flag of the JRE.
i have also run the following command
java -Xbootclasspath/a:d:\xerces\xerces.jar -jar oc4j.jar
but no success.
How could i utilize my jar's like xerces.jar and xalan.jar for parsing instead of OC4J in-built parser ?
All reply will be highly appreciated.
Thnx in advance to all.
Neeraj Sidhaye
try_catch_finally @ Y !Hi Neeraj Sidhaye,
I am trying to deploy a sample xform application to the Oracle Application Server (10.1.3). However, I encountered the class loader issue that is similar to your stuation. I tried all the three solutions but the application is still use the Oracle xml paser class. I am wondering if you have any insight about this?
Thanks for your help.
Xingsheng Qian
iPass Inc.
Here is the error message I got.
Message:
java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
Stack Trace:
org.chiba.xml.xforms.exception.XFormsException: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
at org.chiba.xml.xforms.Container.initModels(Unknown Source)
at org.chiba.xml.xforms.Container.init(Unknown Source)
at org.chiba.xml.xforms.ChibaBean.init(Unknown Source)
at org.chiba.adapter.servlet.ServletAdapter.init(ServletAdapter.java:153)
at org.chiba.adapter.servlet.ChibaServlet.doGet(ChibaServlet.java:303)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
at org.chiba.xml.xforms.Instance.iterateModelItems(Unknown Source)
at org.chiba.xml.xforms.Bind.initializeModelItems(Unknown Source)
at org.chiba.xml.xforms.Bind.init(Unknown Source)
at org.chiba.xml.xforms.Initializer.initializeBindElements(Unknown Source)
at org.chiba.xml.xforms.Model.modelConstruct(Unknown Source)
at org.chiba.xml.xforms.Model.performDefault(Unknown Source)
at org.chiba.xml.xforms.XFormsDocument.performDefault(Unknown Source)
at org.chiba.xml.xforms.XFormsDocument.dispatchEvent(Unknown Source)
at org.apache.xerces.dom.NodeImpl.dispatchEvent(Unknown Source)
... 18 more -
XML Parse error while loading an XML file
HI Folks,
I was trying to load and XML file into BODS.. The XML file is well-formed and the same when tested in other tools is getting loaded without any issues..
I have created a XML-File format with the corresponding XSD..
But here in BODS it is giving - Parse error
1) when i try to view the data of the source XML in my dataflow ..it is giving "XML Parser Failed".. and not able to show data..
2) When I run my job i get the same pares error - with details as under..
---> Error here is "Unable to recognize element 'TAB' " or some time is say " Element TAB should be qualified"
Please guide with this if you have any info..thanks
I'm pasting the XML source file format here for your reference:--
<?xml version="1.0" encoding="iso-8859-1" ?>
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
- <asx:values>
- <TAB>
- <items>
+ <CUSTOMER_RECORD>
<CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
<NAME_1>ABC</NAME_1>
<NAME_2>OFM/COMMERCIAL ACCOUNTS</NAME_2>
<STREET_1>31 CENTER DRIVE MCS2045</STREET_1>
<STREET_2 />
<CITY>BETHESDA</CITY>
<STATE_CODE>MD</STATE_CODE>
<POSTAL_CODE>20892-2045</POSTAL_CODE>
<COUNTRY_CODE>US</COUNTRY_CODE>
<ORDER_BLOCK />
<ERP_CREATE_DATE>20040610</ERP_CREATE_DATE>
<ERP_CREATED_BY>DGUPTA</ERP_CREATED_BY>
<ERP_MODIFY_DATE>20120201</ERP_MODIFY_DATE>
<ERP_MODIFIED_BY>LWOHLFEI</ERP_MODIFIED_BY>
<INDUSTRY_CODE>0103</INDUSTRY_CODE>
<ACCOUNT_GROUP_ID>0001</ACCOUNT_GROUP_ID>
<SALES_NOTE />
<ADDRESS_NOTE />
<CUSTOMER_CLASSIFICATION_CODE>02</CUSTOMER_CLASSIFICATION_CODE>
<GLN_NUMBER />
<PREVIOUS_ACCT_NO />
<ACCOUNT_TYPE />
<GAG />
<SDI_ID />
<HOSP_ID />
<HIN />
<DUNS />
<PO_BOX />
<POB_CITY />
<POB_ZIP />
<PHONE_NUMBER>77777</PHONE_NUMBER>
<EMAIL_DOMAIN />
<REQUESTER />
<ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
</CUSTOMER_RECORD>
- <SALES_ORG_DATA>
+ <item>
<CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
<SALES_ORG>0130</SALES_ORG>
<CUSTOMER_GROUP>03</CUSTOMER_GROUP>
<ORDER_BLOCK_CODE />
<ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
</item>
+ <item>
<CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
<SALES_ORG>0120</SALES_ORG>
<CUSTOMER_GROUP>11</CUSTOMER_GROUP>
<ORDER_BLOCK_CODE />
<ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
</item>
</SALES_ORG_DATA>
</items>
</TAB>
</asx:values>
</asx:abap>Pierre,
Depending on the object "myLastFile", the method openDlg might not even exist (if the myLastFile object is not a File object, for instance). And I do not see any need for the myLastFile anyhow, as you are presenting a dialog to select a file to open. I recommend using the global ChooseFile( ) method instead. This will give you a filename as string in full path notation, or null when no file was selected in the dialog. I am not sure what your ExtendScript documentation states about the return value for ChooseFile, but if that differs from what I am telling you here, the documentation is wrong. So, if you replace the first lines of your code with the following it should work:
function openXMLFile ( ) {
var filename = ChooseFile ( "Choose XML file ...", "", "*.xml", Constants.FV_ChooseSelect );
While writing this, I see that Russ has already given you the same advice. Use the symbolic constant value I indicated to use the ChooseFile dialog to select a single file (it can also be used to select a directory or open a file - but you want to control the opening process yourself). Note that this method allows you to set a start directory for the dialog (second parameter). The ESTK autocompletion also gives you a fifth parameter "helplink" which is undocumented and can safely be ignored.
Good luck
Jang -
XML Parsing Error: XML or text declaration not at start of entity
Location: https://evalue.internationaldelivers.com/service/SVCDOCS/Navistar/isisxsl.xsl
Line Number 2, Column 1:<?xml version='1.0'?>
^
That is the error I receive the page loads and half the content appears but the other half is blank and I receive that instead. I can attach a screenshot if needed.May be cookies issue try this
Reload the webpage while bypassing the cache
*Hold down the ''Shift'' key and click the ''Reload'' button with a left click.
*Press ''Ctrl'' + ''F5'' or ''Ctrl'' + ''Shift'' + ''R'' (Windows and Linux)
*Press ''Command'' + ''Shift'' + ''R'' (Mac)
Clear the cache and the cookies from sites that cause problems.
'''Clear the Cache''': Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
'''Remove Cookies''' from sites causing problems:
*Tools > Options > Privacy > Cookies: "Show Cookies"
*https://support.mozilla.org/en-US/kb/websites-say-cookies-are-blocked-unblock-them
Maybe you are looking for
-
Performance issues with BAPI_PROJECT_MAINTAIN
Hi, We are facing Performance issues with BAPI_PROJECT_MAINTAIN.Would like to know any suggestions for improving performance. I would also like to know statistics regarding how much time is required to create a project with 3000 activities, 100 WBS e
-
Macbook Pro Retina crashes with thunderbolt display
Whenver I plug the thunderbolt display into my macbook pro retina both displays black out and the computer becomes semi-unrespsonsive (ie I can hear the volume controls however that is all. I need to force shutdown. I've noticed this problem happenin
-
Can somebody explain to me how JSP, servlets, ASP work within Sun's server
Ok, I'm only beginning to get a grip of how all this works. And I have a lot of questions and confusion. 1.) The server that comes with J2EE, what is that server? Is it an app server that runs only servlets and JSP, with some Web server stuff so it c
-
HT204587 I can't use touch id for purchasing app from iTunes in India
I can't use touch id for purchasing app from iTunes in India
-
HT5517 When I try to watch a Webinar I suddenly loose airplay.
AirPlay works just fine until I try to watch a Webinar. As soon as the there's sound, AirPlay disapears off of my IPad or IPhone and it goes back to Apple TV home page. I even went to the Apple store and had them update the Apple TV thinking their up