JRE version problem (XML Parsing)
Hi,
I posted a question earlier about an issue I'm having with an applet running in the Eclipse IDE but not in-browser. I have checked the JRE version for both and the browser is running 1.6.0_01 and the IDE is running 1.5.0_06. Now I could uninstall the former to force the browser to load the latter I believe but that doesn't solve the issue as I would need it to run on the newer JRE version.
So my question is, what would cause the following error to occur in a later version of the JRE?
Exception in thread "Thread-9" javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
Thanks in advance,
Dan
It has nothing to do with new or old version of jre it has to do that the explorer jre (5) can not find the jar file it needs. It is looking for the class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl but it can not find it.
In you Eclipse you do have this jar that's why it is running, just copy the jar to the lib or lib/ext folder in the jre 5 and everything should work.
Similar Messages
-
HPUX shared libraries versions of XML parser v2 for C++
Hi All,
Could somebody tell me whether Oracle have any plans to distribute shared versions of the xml libraries that ship with the C++ XML Parser for HPUX.
I am working on a project that uses shared libraries that in turn use the Oracle XML parser. I have managed to get the final executable to link to the xml static library (the symbols are unresolved when I link the sl, but sort themselves out on the final link) but HP do not recommend mixing static & shared libraries - and my code size increases by quite a bit using this method.
I would much prefer to use shared libaries as I do when I link the Oracle 8.1.6 libraries.
Thanks in advance,
Steve DaltonI was able to find out that the XDK libraries on HPUX for Oracle 8.1.7 are built with the +z compiler option (unlike the current versions on OTN for HPUX). So, that will give you position independent code and should allow you to build a shared library.
-
What Oracle version for XML Parser for java
Is the XML Parser for Java only available for use with
Oracle 8i? Is it possible to use with Oracle 8.05
nullThe XML Parser for Java can be used with any of the supported
version JavaVMs. The only difference with 8i is that you can
load it into the database and use JServer which is an internal
VM. For 8.0.5 you simple run it externally and connect through
JDBC.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Eddie SHipman (guest) wrote:
: Is the XML Parser for Java only available for use with
: Oracle 8i? Is it possible to use with Oracle 8.05
null -
This is the version of Java I used to compile my applet. I have used Sax parser in my applet.
C:\>java -version
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
This applet would not run in an environment that has JRE 1.3.1.
Will I have to recompile all the files that the applet used in order for this applet to work in JRE 1.3.1 ? Is there any other way to solve this issue
Thanks for your insite in advance.
peace out,
Kris.You may also have two different JREs on the same system.
A typical scenario is thus. You download Microsoft Internet Explorer. You download and install the Java plug-in for IE. Then you decide you want to develop your own Java application and download the JDK.
As a result, the browser will be associated with one JRE (typically in c:\Program Files\JavaSoft\JRE), and your JDK will have a seperate JRE (typically in c:\j2se_1.4.1\).
When you type Java -version at the command prompt, it checks the PATH environment variable which points it to the JDK. If you run the applet from within the web browser, the browser explictly calls the JavaSoft JRE that it knows about.
It looks like your applet is smart enough to realize that it will use the older version and it won't work properly on that version. However, it doesn't look like it's smart enough to find the newer version.
I would try upgrading the plug-in.
And of course, I could be wrong. You might not have Javasoft afterall. -
JRE Version Problem...Cannot find i386 version for windows
hello everyone,
i facing a problem regarding the version of jre installed...
m working on a business intelligence tool & one or two of its components work on a windows machine if jre6u13-windows-i386 is installed...the version 6 update 13 is not compulsory...but it being i386 is compulsory...the tools are working absolutely fine on pcs where 386 version is installed...(unluckily the setup is not available in those pcs)
on the net, especially sun's website, in the download section, i am able to get the i586 versions very easily for everything, jre, sdk, etc...
but i want i386 version...
can anyone help & let me know where i can find that version for download..
i even checked the archive on sun's website...there also i586 version available...
please help...
Regards,
AnupamHello
For drivers download use Toshiba download page - http://www.toshiba.eu/innovation/download_drivers_bios.jsp
There you can find your notebook model and all drivers, tools and utilities for it.
Can you find it?
If you need some help or assistance with installation and installation order please let me know. -
Version of XML parser WLS 5.1
I am looking to use the JAXP 1.1 parser
in web logic 5.1. This means upgrading the
package org.wc3.com. Will this create problems and what parser version does
WLS 5.1 come with now?Hi Denis,
I will try to give some suggestion to you.
1. errors in verifications of version mssql, reporting service tool and olap server version. but when i try to renew it it says that i have correct version.
==>
The first step you should do such as:
1. Check the SAP BPC error using SAP Server Manager, please read the help to do that.
2. If you was forgot install the SP2 for MS.SQL2005, you should uninstall the SAP BPC afterthat update the MS.SQL 2005 SP2 and install SAP BPC again.
2. errors in accounts of admin and user, and olap admin. I think i will have no this errors when i change passwords, or security settings. but I need to start my systm at first!!!!))
==>
If You want to change the username and password SAP BPC, you can change using SAP Server Manager.
3.
also I have both version of asp.net 1.1.4 and 2.0. they are "allowed" but on my properties of default web site i can choose only 2.0, and as I can see from my guide I have to choose 1.1.4. may be problem is in this????
==>
For SAP BPC using .NET 1.1 only and you can install .NET 1.1 and .NET 2.0 together. You can setting the default .NET through the .NET Configuration
Thanks,
Wandi Sutandi -
Hi Everyone,
With the release of 1.4.1 on OSX, I've been trying to test our product. I didn't have problems with one of the prior developer previews, but after installing the final, I can't get IE or Netscape to recognize 1.4.1 is installed. (Our product requires 1.3.1_03 as the minimum and the browser keeps trying to have us install this rather than use the 1.4.1 that's installed.)
I tried the latest Safari browser which DID properly launch 1.4.1, but errored out at some point during the load. Since I've gotten this working fine in the past with the developer previews, I'm certain it will launch fine under netscape - if only I can get it to recognize 1.4.1 and use it.
Any suggestions? Our class id is correct and not forcing 1.3.1_03, but I am at a loss as what to try next as Mac's are not my forte.Yeah, I gave up on IE on the mac long ago - what a piece of crap.
What's weird is while I was testing the developer preview versions of 1.4.1, it worked great under netscape. I just can't understand why the official release doesn't.
Thanks for your help. And Netscape, if you're reading this - get on the ball! -
XMl parser version problem for running struts project in jdeveloper 10.1.3
Dear All.
I am trying to run a struts (v 1.2.9) based project in Jdeveloper 10.1.3.1.0.The struts version in Jdeveloper is 1.1.
when i am trying to run the index.jsp i get an error:
org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/validation/dynamic
I think the XML parser version is a problem.Jdeveloper has OracleXMLParser v2 and i think the XML Parser apis used in building the project is different.I have placedcustiom xml parser apis and the xerces.jar in the jdevbin/jdev/lib folder and included these jar in the bootclasspath as follows:
AddVMOption -Xbootclasspath/p:../lib/xml-apis.jar
AddVMOption -Xbootclasspath/p:../lib/xerces-2.6.2.jar
But even then the Exception persists.Is the syntax for Xbootclasspath wrong or i need to place these custom api's in some other location of jdev.
I am not being able to figure out the XMl parser problem.
Any help wud be great.
Is it that i cant run the project in jdeveloper.Just to mention the application is deployed in OC4J on the server and runs fine..But its only that i kant run it locally through jdeveloperI am also facing the same issue on my laptop. I searched for forum but no luck.
appreciate if anybody can throw some light on this. -
Problem with parsing large XML files chunked over HTTP
I'm trying to isolate a bug that was introduced when upgrading the JRE in use from Java 7u51 to 7u71 without changing any code. The problem appears to be very similar to: Bug ID: JDK-8027359 XML parser returns incorrect parsing results.
Further investigation showed that it was also introduced in the same versions (7u71) where that fix was applied. Unlike that bug though, my XML is marked as version 1.0. It also appears to be with only large XML files, on the order of 10MB or so.
The closest I've been able to narrow it down to is the code is using JAXB to unmarshall a stream that the debugger tells me is a org.apache.http.com.EofSensorInputStream / org.apache.http.impl.io.ChunkedInputStream. The exception I get is not consistent, but typically appears to be from chunks being overwritten or shuffled, resulting in letters appearing in attributes that are actually numbers, or like the following where an attribute "testAttribute" gets partially overwritten by the end of a timestamp that was in a different section of the XML.
javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:421)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:357)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
... 6 more
Here's some code that seems to reproduce it if you can connect to an XML server that returns a large chunked XML file:
SchemeRegistry registry = new SchemeRegistry();
registry.register(
new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
HttpClient client = new DefaultHttpClient(new BasicClientConnectionManager(registry));
String url = "http://someUrlReturningAlargeChunkedXML";
HttpGet method = new HttpGet(url);
HttpResponse response = client.execute(method);
InputStream inputStream = response.getEntity().getContent();
XMLStreamReader responseReader = factory.createXMLStreamReader(inputStream);
JAXBElement<JaxBObjectOfResponse> wot = unmarshaller.unmarshal(responseReader, JaxBObjectOfResponse.class);
If you connect using URL.openStream() to the same service there is no error. If I read bytes directly and write to a file, there is no error. The error only happens when I try to unmarshal it, and it's large, and I'm using Java 7u71 (or later). It can be consistently repeated with the jsp webapp that I'm using, but didn't show the error when I used the same code with a Wikipedia dump XML file.
How can I unmarshal in a different way to avoid this problem? Or, how can I better isolate the bug so it can be posted to the appropriate bug system?Apparently, adding the Woodstox XML libraries avoids the bug. Is there anyone who can reproduce this on another system? Was there any changes to the Stax implementation between u67 and u71 that may have introduced a bug like this?
Edit: When setting the logging level to DEBUG, I once saw the overwritten buffer being logged as if that was what was received (as in the testAttribu00Z example above). I can't repeat that anymore though, and very rarely it does parses with no exception (though it may have still been corrupted). Now the error seems to be consistently on one of the buffer boundaries, as in:
17:08:09,705 DEBUG wire:63 - << "2000[\r][\n]"
17:08:09,705 DEBUG wire:77 - << "trend>....OTHER XML...<trend hours=""
17:08:09,705 DEBUG wire:77 - << "634.0972777777778" datetime="2013-05-21T00:43:48.350Z" t"
17:08:09,705 DEBUG wire:63 - << "[\r][\n]"
17:08:09,705 DEBUG wire:63 - << "2000[\r][\n]"
17:08:09,705 DEBUG wire:77 - << "rend-mode="0">
Exception in thread "main" java.lang.NumberFormatException: t34.0972777777778
at com.sun.xml.internal.bind.DatatypeConverterImpl._parseDouble(DatatypeConverterImpl.java:213)
at mypackage.Trend_JaxbXducedAccessor_hours.parse(TransducedAccessor_field_Double.java:48)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:194)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:486)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:465)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:60)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:231)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:165)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
Or:
17:19:12,563 DEBUG wire:63 - << "2000[\r][\n]"
17:19:12,563 DEBUG wire:77 - << ...OTHER XML...<trend index="5"
17:19:12,563 DEBUG wire:77 - << "" label="N"
17:19:12,563 DEBUG wire:63 - << "[\r][\n]"
Exception in thread "main" java.lang.NumberFormatException: Not a number: N
at com.sun.xml.internal.bind.DatatypeConverterImpl._parseInt(DatatypeConverterImpl.java:106)
at com.sun.xml.internal.bind.DatatypeConverterImpl._parseShort(DatatypeConverterImpl.java:118) -
Hi, my problem is :
In my Application i want to parse an XML file with DOM parser. The problem is that in my Project "MyProject -> Project Properties -> Libraries and Classpath"
I have included some 15 libraries which are useful for my Application: ADF Faces Runtime 11, ADF Web Runtime and etc.
Problems are causing the libraries: BC4J Runtime,ADF Model Runtime, MDS Runtime Dependencies
because when added my source which is parsing an XML file stops working.The source code is:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
File file =
new File("C:\\Documents and Settings\\ilia\\Desktop\\begin.xml");
Document doc = db.parse(file);
Element root = doc.getDocumentElement();
NodeList dots = root.getElementsByTagName("w:t");
Element firstDot = (Element)dots.item(0);
String textValue = firstDot.getFirstChild().getNodeValue();
I use DOM because i need to change some values in the XML file, but its not working neither for reading nor for writing.When debugging I see that it gets the root of the xml but " firstDot.getFirstChild().getNodeValue() " returns null and it breaks with NullPointerException. And that's only when the libraries mentioned above are added to the project. Without them it works just fine !
I don't know, it's like when added the parser validates my xml against some schema and returns null.
The xml file is very simple MS Word Document saved as .xml .But I don't think that's the problem.
Thanks in advance !
iliyaHi all,
I found the solution to my problem.The right way to parse and change an XML file with DOM parser using the Oracle XML Parser v2 should look like this:
JXDocumentBuilderFactory factory =
(JXDocumentBuilderFactory)JXDocumentBuilderFactory.newInstance();
JXDocumentBuilder documentBuilder =
(JXDocumentBuilder)factory.newDocumentBuilder();
File file = new File("c:/Documents and Settings/ilia/Desktop/begin.xml");
InputStream input =
new FileInputStream(file);
XMLDocument xmlDocument = (XMLDocument)(documentBuilder.parse(input));
System.out.println("Encoding: " + xmlDocument.getEncoding());
System.out.println("Version: " + xmlDocument.getVersion());
NodeList namespaceNodeList =
xmlDocument.getElementsByTagNameNS("http://schemas.microsoft.com/office/word/2003/wordml","t");
XMLElement namespaceElement17 = (XMLElement)namespaceNodeList.item(17);
namespaceElement17.getFirstChild().setNodeValue("someString"); -
WIJ 20002 xml Parser Problem - Rich Client
Hi,
I have a problem with the rich client on a new installation:
Business Objects Enterprise XI 3.1 SP3 on Windows 2008 Standard.
If I connect with the rich client "import document"is disabled.
if I try to create a new document from the rich client it returns the error below (I used the rich client on two workstations):
WIJ 20002
Version: null
Analisi dello stack:
java.lang.RuntimeException: java.lang.RuntimeException: XML parser problem:
XMLJaxpParser.parse(): Element type "ABOUT_Patentnumbers" must be followed by either attribute specification, ">" or "/>".
at com.businessobjects.wp.xml.jaxp.XMLJaxpParser.parse (Unknown Source)
at.com.businessobjects.webi.richclient.XMLviaOccaRC.getServerConfiguration (Unknown Source)
Have you any solution?The fixpack 3.5 client resolves the problem.
-
XML Parsing - problem with a value of an element if starting with space
Hi Experts,
I need your valuable guidence to get out of a problem in parsing an XML file.
An XML file is read into xstring variable and it is processed to be split into the corresponding itab.
Please find the code below
types: begin of ty-itab,
field(4096),
end of ty-itab.
Data:
g_ixml TYPE REF TO if_ixml,
g_ixmldocument TYPE REF TO if_ixml_document,
g_ixmlstreamfactory TYPE REF TO if_ixml_stream_factory,
g_ixmlstream TYPE REF TO if_ixml_istream,
g_ixmlparser TYPE REF TO if_ixml_parser,
g_ixmlnodemainlist TYPE REF TO if_ixml_node_list,
g_ixmlnodelistmainelement TYPE REF TO if_ixml_node_list,
g_sxmldata TYPE string,
g_ixmlnode TYPE REF TO if_ixml_node.
DATA: wa_xmltab TYPE xstring,
itab type table of ty-itab.
OPEN DATASET l_file IN BINARY MODE FOR INPUT MESSAGE v_msg.
READ DATASET l_file INTO wa_xmltab.
PERFORM f_create_xmltable USING wa_xmltab
CHANGING v_msg.
IF NOT v_msg IS INITIAL.
msg = v_msg.
EXIT.
ELSE.
itab[] = it_xmldata[].
ENDIF.
CLOSE DATASET l_file.
Subroutine to convert xstring to char type ITAB.
FORM f_create_xmltable USING value(pi_inputxmlstring) TYPE xstring
CHANGING v_msg.
*-- create the main factory
g_ixml = cl_ixml=>create( ).
*-- create the initial document
g_ixmldocument = g_ixml->create_document( ).
*-- create the stream factory
g_ixmlstreamfactory = g_ixml->create_stream_factory( ).
*create input stream
g_ixmlstream = g_ixmlstreamfactory->create_istream_xstring( string =
pi_inputxmlstring ).
*-- create the parser
g_ixmlparser = g_ixml->create_parser( stream_factory =
g_ixmlstreamfactory
istream = g_ixmlstream
document = g_ixmldocument ).
*-- parse the stream
IF g_ixmlparser->parse( ) NE 0.
*if parser cannot be created then give error exit
IF g_ixmlparser->num_errors( ) NE 0.
EXIT.
ENDIF.
ENDIF.
*-- we don't need the stream any more, so let's close it...
CALL METHOD g_ixmlstream->close( ).
CLEAR g_ixmlstream.
*get the number of main nodes of the XML document
g_ixmlnodemainlist = g_ixmldocument->get_children( ).
*set number of elemtns
g_inummainelements = 0.
g_imainelementsctr = 0.
g_inummainelements = g_ixmlnodemainlist->get_length( ).
g_ifirstlevelctr = 0.
*loop through the document till all have nodes have been covered.
WHILE g_ifirstlevelctr LT g_inummainelements.
*get the first node
g_ixmlnode = g_ixmlnodemainlist->get_item( g_ifirstlevelctr ).
*check the type of node
g_isnodeelement = g_ixmlnode->get_type( ).
*if node is not of type Element then continue
*because we have got to read only text from element nodes.
IF g_isnodeelement NE c_nodeelement.
g_ifirstlevelctr = g_ifirstlevelctr + 1.
CONTINUE.
ENDIF.
*get nodes of the element just found.
g_ixmlnodelistmainelement = g_ixmlnode->get_children( ).
*get number of children of main element
g_inumchildelements = g_ixmlnodelistmainelement->get_length( ).
*loop trhough the number of children
WHILE g_imainelementsctr LT g_inumchildelements.
g_ixmlnodemainelement = g_ixmlnodelistmainelement->get_item(
g_imainelementsctr ).
*get type of node
g_isnodeelement = g_ixmlnodemainelement->get_type( ).
IF g_isnodeelement NE c_nodeelement.
g_imainelementsctr = g_imainelementsctr + 1.
CONTINUE.
ENDIF.
*get name of the node.
g_selementvalue = g_ixmlnodemainelement->get_name( ).
*get children of node
g_childnodelist = g_ixmlnodemainelement->get_children( ).
g_inumchildren = g_childnodelist->get_length( ).
g_ichildelementcounter = 0.
*while there are number of children of node.loop through
WHILE g_ichildelementcounter LT g_inumchildren.
*get the child node
g_childnode = g_childnodelist->get_item(
g_ichildelementcounter ).
*check the type of node
g_isnodeelement = g_childnode->get_type( ).
*if node is not of element type continue
IF g_isnodeelement NE c_nodeelement.
g_ichildelementcounter = g_ichildelementcounter + 1.
CONTINUE.
ENDIF.
*otherwise get element name
g_selementname = g_childnode->get_name( ).
*get value stored in this node.
g_selementvalue = g_childnode->get_value( ).
g_numelem = g_inumchildren - 1.
IF g_ichildelementcounter EQ g_numelem.
CONCATENATE: g_slinedata g_selementvalue
INTO g_slinedata.
ELSE.
* store the value of noide in delimiter ~ line
* Check for Invalid characters in file
IF g_selementvalue CA '&'.
REPLACE ALL OCCURRENCES OF '&' IN g_selementvalue WITH
endif.
*if value contains delimiter then error
IF g_selementvalue CA '~'.
V_MSG = text-003.
EXIT.
ELSE.
CONCATENATE: g_slinedata g_selementvalue '~' .
INTO g_slinedata.
ENDIF.
ENDIF.
*continue
g_ichildelementcounter = g_ichildelementcounter + 1.
ENDWHILE.
g_ichildelementcounter = 0.
*increment the main element counter by one to go to the next node
g_imainelementsctr = g_imainelementsctr + 1.
*move the current delimiter line creted to internal table to be given
*back to the calling program
MOVE g_slinedata TO wa_xmldata-data.
APPEND wa_xmldata TO it_xmldata.
MOVE '' TO g_slinedata.
MOVE '' TO wa_xmldata-data.
ENDWHILE.
*increment counter to move to hte next node.
g_ifirstlevelctr = g_ifirstlevelctr + 1.
g_imainelementsctr = 0.
ENDWHILE.
ENDFORM. "f_create_xmltable
XML structure
<?xml version="1.0" encoding="utf-8"?>
<ABCInbound xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\XYZSchema\ABCInbound.xsd">
<HH>
<RecordType>HH</RecordType>
<Source>ABC</Source>
<Destination>XYZ</Destination>
<TimeStamp>20050909220546</TimeStamp>
</HH>
<BH>
<RecordType>BH</RecordType>
<DocType>AB</DocType>
<Reference>2205516125</Reference>
<DocumentDate>20080909</DocumentDate>
<PostingDate></PostingDate>
<CompanyCode>ABC</CompanyCode>
<Currency>INR</Currency>
<ExchangeRate>1.0000</ExchangeRate>
<Park></Park>
<ItemNumber>2</ItemNumber>
</BH>
<BL>
<RecordType>BL</RecordType>
<Reference>2205516125</Reference>
<RefLineItem>1</RefLineItem>
<AcctType>K</AcctType>
<DrCrIndicator>H</DrCrIndicator>
<Account>01000003</Account>
<Amount>364.00</Amount>
<VendorName-1>TOM & JERRY IS MY</VendorName-1>
<VendorName-2> NAME TO BE PAID</VendorName-2>
<VendorName-3>1987566Z</VendorName-3>
<VendorName-4>22</VendorName-4>
<Street>UCX STREET</Street>
<City>ROAD 4</City>
<PostalCode>515004</PostalCode>
<Country>IND</Country>
<ContactPerson></ContactPerson>
<AlternatePayeeCode></AlternatePayeeCode>
<AlternatePayeeName-1></AlternatePayeeName-1>
<AlternatePayeeName-2></AlternatePayeeName-2>
<AlternatePayeeName-3></AlternatePayeeName-3>
<PaymentTerms></PaymentTerms>
<BaselineDate></BaselineDate>
<PaymentMethods></PaymentMethods>
<Allocation></Allocation>
<LineItemText>item text</LineItemText>
<TaxCode></TaxCode>
<TaxAmount>0.00</TaxAmount>
<WHTaxCode></WHTaxCode>
<WHTaxbase>0.00</WHTaxbase>
<Fund></Fund>
<FundCenter></FundCenter>
<CostCenter></CostCenter>
<InternalOrder></InternalOrder>
<TaxAutomatically></TaxAutomatically>
<SpecialGLIndicator></SpecialGLIndicator>
</BL>
<TT>
<RecordType>TT</RecordType>
<TotalRecords>1</TotalRecords>
<TotalValue>222</TotalValue>
</TT>
</ABCInbound>
when the above xml file is read and populated into ITAB, for element vendorname-2 which has a space in first position , that space is ignored.
This is being used for a FB01 posting and vendor is paid based on Name1+Name2 printed on cheque and due to the space ignoring problem, the vendor name is displayed wrongly thus causing problems.
I appreciate if someone could guide me thru and help me in solving this problem.
How to preserve the leading or trailing space.
g_selementvalue = g_childnode->get_value( ).
when i check g_selementvalue, space is ignored.
i will be greateful if someone could guide me through.
Regards,
Simha
Edited by: Simha on Dec 11, 2008 10:49 AM0.02: A C C E P T: Request="NEXT"
0.06: Fetch session state from database
0.08: ...Check session ... owner
0.08: ...Metadata: Fetch Page, Computation, Process, and Branch
0.08: Session: Fetch session header information
0.08: ...Metadata: Fetch page attributes for application ..., page 330
0.08: ...Validate item page affinity.
0.08: ...Validate hidden_protected items.
0.08: ...Check authorization security schemes
0.08: Session State: Save form items and p_arg_values
0.08: ...Session State: Save "P330_PROJECT" - saving same value: ""
0.09: ...Session State: Saved Item "P330_SHUTTLE" New Value=""
0.09: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
0.09: Branch point: BEFORE_COMPUTATION
0.09: Computation point: AFTER_SUBMIT
0.09: Tabs: Perform Branching for Tab Requests
0.09: Branch point: BEFORE_VALIDATION
0.09: ...Evaluating Branch: BEFORE_VALIDATION type: "REDIRECT_URL" button: 12904321314585385 branch: (Unconditional)
0.09: Perform validations:
0.09: ...Item Not Null Validation: P330_SHUTTLE
0.09: ...Validation did NOT pass
This is from debugging, what does the point "0.09: ...Session State: Saved Item "P330_SHUTTLE" New Value="" "
mean ? I think it means, that the Shuttle somehow sets itself to null ?! but i dont understand why...
There is no computation or anything that deletes the shuttle, the page is quite small, there is not much more than the shuttle and the validations and computations to give default value and transforming the shuttle items into a collection to continue working with the IDs.
I dont check whats the problem
Edited by: user12154443 on 21.07.2010 09:47 -
Problem in XML Parsing via oracle procedure...
Hi,
I wrote one oracle procedure for xml parsing.
I have one valid xml file which has "encode UTF-8". The XML file contains some comments also. While we are parsing the xml file at that time it is not parse successfully and also it is not giving any error. After the following line it is skip rest of the codes(lines).
dbms_xmlparser.parseclob(l_parser, l_clob);
At the end of the xml file there are some comments which is like "<!-- abc --> ".
When I am changing the "encode UTF-8 to ISO-88596-1" & removing the comments which wrote on bottom of the file then its working fine, but the files which we are getting from the system is contains the encode UTF-8 and we don't want to preprocess on that xml files. Even if we will do that via shell script or perl script then it will be overhead to the system and in a single stroke our system will parse more than 5k xml files, so if we will do some preprocess on it, it will take some more time approx 1-2 minutes extra.
So, If someone knows any solution of this problem, then please guide & help me on this.
My xml file structure is as follows:-
<?xml version="1.0" encoding="UTF-8"?>
<mcd xmlns:HTML="http://www.w3.org/TR/REC-xml">
<child>
<child1>32.401 V5.5</child1>
<child2>ZoneGate</child2>
</child>
<mc>
<newid>
<id>12</id>
</newid>
<mindex>
<date>20111102180000</date>
<mt>abc1</mt>
<mt>abc2</mt>
<mvalue>
<r>val_1</r>
<r>val_2</r>
</mvalue>
</mindex>
</mc>
</mcd>
<!--
ALARM STATUS
morning 10
afternoon 14
evening 18
night 22
-->
<!--
PARAM:EID = 1
PARAM:GId = 3
PARAM:GSId = 0
--!>
And my oracle procedure is as follows:-
create or replace procedure loadXMLtotable(dir_name IN varchar2, xmlfile IN varchar2) AS
-- Defining the variables
ecode NUMBER;
emesg VARCHAR2(200);
l_bfile BFILE;
l_clob CLOB;
l_dest_offset INTEGER:=1;
l_src_offset INTEGER:=1;
l_Char_set_id NUMBER := NLS_CHARSET_ID('UTF8');
l_lang_context INTEGER := dbms_lob.default_lang_ctx;
l_warning INTEGER;
l_parser dbms_xmlparser.Parser;
l_doc dbms_xmldom.DOMDocument;
l_nl1 dbms_xmldom.DOMNodeList;
l_nl2 dbms_xmldom.DOMNodeList;
l_n dbms_xmldom.DOMNode;
node1 dbms_xmldom.DOMNode;
colid integer ; -- column id used for identifying which column it belongs.
l_xmltype XMLTYPE;
sub_xmltype XMLTYPE;
num_nodes number;
l_index PLS_INTEGER;
l_subIndex PLS_INTEGER;
starttime Date;
temp_datatime VARCHAR(25);
columnname varchar2(300);
columnvalue varchar2(300);
-- creating a Type which is a type of "test_hem" table RowType, which I created in SVN server
TYPE tab_type IS TABLE OF test_hem%ROWTYPE;
t_tab tab_type := tab_type();
BEGIN
-- Passing the xmlfile and virtual directory name which we gave at the time of directory creation
l_bfile := BFileName('MY_FILES', xmlfile);
dbms_lob.createtemporary(l_clob, cache=>FALSE);
dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
--dbms_lob.loadFromFile(dest_lob => l_clob,
-- src_lob => l_bfile,
-- amount => dbms_lob.getLength(l_bfile));
dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile),
l_dest_offset, l_src_offset, l_Char_set_id, l_lang_context, l_warning);
dbms_lob.close(l_bfile);
-- make sure implicit date conversions are performed correctly
dbms_session.set_nls('NLS_DATE_FORMAT','''YYYY-MON-DD HH24:MI:SS''');
dbms_output.put_line('Date format set');
-- Create a parser.
l_parser := dbms_xmlparser.newParser;
dbms_output.put_line('output 1');
-- Parse the document and create a new DOM document.
dbms_xmlparser.parseclob(l_parser, l_clob);
dbms_output.put_line(' passed parsing');
l_doc := dbms_xmlparser.getDocument(l_parser);
dbms_output.put_line(' passed getdocument');
-- Free resources associated with the CLOB and Parser now they are no longer needed.
dbms_lob.freetemporary(l_clob);
dbms_xmlparser.freeParser(l_parser);
-- Get a list of all the EMP nodes in the document using the XPATH syntax.
l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/child');
-- Loop through the list and create a new record in a tble collection
FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
l_n := dbms_xmldom.item(l_nl1, cur_sel);
t_tab.extend;
-- Use XPATH syntax to assign values to he elements of the collection.
dbms_xslprocessor.valueOf(l_n,'child1/text()',t_tab(t_tab.last).country);
-- putting the state and vendorname into the table rowtype
dbms_xslprocessor.valueOf(l_n,'child2/text()',t_tab(t_tab.last).state);
END LOOP;
-- getting the version and putting into the table rowtype
l_n := dbms_xslprocessor.selectSingleNode(dbms_xmldom.makeNode(l_doc),'//mcd/mc/newid/id');
dbms_xslprocessor.valueOf(l_n,'id/text()',t_tab(t_tab.last).id);
-- selecting the nodes whose starting tag is "mindex"
l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/mc/mindex');
-- checking the total number of nodes whose starting through "mi"
num_nodes := dbms_xmldom.getLength(l_nl1);
l_index := 1;
-- For loop to iterate the nodes.
FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
-- whole current node is selected and storing into the node1 variable
node1 := dbms_xmldom.item(l_nl1, cur_sel);
-- setting the xmltype as AL32UTF8
l_xmltype := xmltype(l_bfile, nls_charset_id('AL32UTF8'));
-- if selecting parent node containing the mt child node then only proceed else skip that parent node.
IF (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r') > 0) Then
-- fetch the datatime, convert it into to_date format and store it into table rowtype
temp_datatime := dbms_xslprocessor.valueOf(node1, 'date/text()');
t_tab(t_tab.last).data_time := to_char(to_date(temp_datatime, 'YYYYMmcDHH24MISS'));
l_subIndex := 1;
while (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt[' || l_subIndex || ']') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r['|| l_subIndex || ']') > 0 ) LOOP
-- getting mt and corresponging mvalue/r values
dbms_xslprocessor.valueOf(node1,'mt[' || l_subIndex || ']/text()',columnname);
dbms_xslprocessor.valueOf(node1,'mvalue/r[' || l_subIndex || ']/text()',columnvalue);
l_subIndex := l_subIndex + 1;
-- getting the column to which this mapping belongs.
select columnid into colid from abc_table where columnname=name;
CASE colid
WHEN 1 THEN t_tab(t_tab.last).col1 := columnvalue;
WHEN 2 THEN t_tab(t_tab.last).col2 := columnvalue;
WHEN 3 THEN t_tab(t_tab.last).col3 := columnvalue;
ELSE dbms_output.put_line('No column mapping for counter ' || columnname) ;
END CASE; -- end of case statement.
END LOOP;
-- Insert data into the real table from the table collection.
FORALL i IN t_tab.first .. t_tab.last
INSERT INTO test_hem VALUES t_tab(i);
END IF;
l_index := l_index + 1;
COMMIT;
END LOOP;
commit;
EXCEPTION
WHEN OTHERS THEN
ecode := SQLCODE;
emesg := SQLERRM;
dbms_output.put_line(TO_CHAR(ecode) || '-' || emesg);
dbms_lob.freetemporary(l_clob);
dbms_xmlparser.freeParser(l_parser);
dbms_xmldom.freeDocument(l_doc);
END;Sorry Odie,
I am new to this site as well as PL/SQL. I am giving additional details which you had mentioned in your last comments.
our Oracle Database version is "10.2.0.4.0"
The structure of target table Instrument_Details is as follows:
Create table Instrument_Details (
instrument_id Integer Primary Key,
provider_name Varchar2(32),
version_number Varchar2(32),
location_id Integer,
installation_date Date,
granularity Integer,
time_out Integer );
Note:- Here test_hem is alias of Instrument_details.
Here instrument_id is a primary key.
provider_name contains the child2 xml tag value.
version_number contains the child1 xml tag value.
location_id contains the newid/id value which is map to other table which fetching the location name corresponding to the location_id.
installation_date contains the date xml tag value.
Now we have created one mapping tables where we mapped the xml tag values "mt" with table column name means "abc1 = granularity", "abc2 = time_out" in that table.
these table column value are written under mvalue xml tag.
_Our Database Character set is_:-
NLS_CHARACTERSET WE8ISO8859P1
Now as you suggest me to format your code. I am writing the xml code and procedure code again.
My xml file structure is as follows:-
<?xml version="1.0" encoding="UTF-8"?>
<mcd xmlns:HTML="http://www.w3.org/TR/REC-xml">
<child>
<child1>32.401 V5.5</child1>
<child2>ZoneGate</child2>
</child>
<mc>
<newid>
<id>12</id>
</newid>
<mindex>
<date>20111102180000</date>
<mt>abc1</mt>
<mt>abc2</mt>
<mvalue>
<r>val_1</r> -- here val_1 and val_2 are numeric values
<r>val_2</r>
</mvalue>
</mindex>
</mc>
</mcd>
<!--
ALARM STATUS
morning 10
afternoon 14
evening 18
night 22
-->
<!--
PARAM:EID = 1
PARAM:GId = 3
PARAM:GSId = 0
--!> And my oracle procedure is as follows:-
create or replace procedure loadXMLtotable(dir_name IN varchar2, xmlfile IN varchar2) AS
-- Defining the variables
ecode NUMBER;
emesg VARCHAR2(200);
l_bfile BFILE;
l_clob CLOB;
l_dest_offset INTEGER:=1;
l_src_offset INTEGER:=1;
l_Char_set_id NUMBER := NLS_CHARSET_ID('UTF8');
l_lang_context INTEGER := dbms_lob.default_lang_ctx;
l_warning INTEGER;
l_parser dbms_xmlparser.Parser;
l_doc dbms_xmldom.DOMDocument;
l_nl1 dbms_xmldom.DOMNodeList;
l_nl2 dbms_xmldom.DOMNodeList;
l_n dbms_xmldom.DOMNode;
node1 dbms_xmldom.DOMNode;
colid integer ; -- column id used for identifying which column it belongs.
l_xmltype XMLTYPE;
sub_xmltype XMLTYPE;
num_nodes number;
l_index PLS_INTEGER;
l_subIndex PLS_INTEGER;
starttime Date;
temp_datatime VARCHAR(25);
columnname varchar2(300);
columnvalue varchar2(300);
-- creating a Type which is a type of "Instrument_Details" table RowType, which I created in SVN server
TYPE tab_type IS TABLE OF Instrument_Details%ROWTYPE;
t_tab tab_type := tab_type();
BEGIN
-- Passing the xmlfile and virtual directory name which we gave at the time of directory creation
l_bfile := BFileName('MY_FILES', xmlfile);
dbms_lob.createtemporary(l_clob, cache=>FALSE);
dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
--dbms_lob.loadFromFile(dest_lob => l_clob,
-- src_lob => l_bfile,
-- amount => dbms_lob.getLength(l_bfile));
dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile),
l_dest_offset, l_src_offset, l_Char_set_id, l_lang_context, l_warning);
dbms_lob.close(l_bfile);
-- make sure implicit date conversions are performed correctly
dbms_session.set_nls('NLS_DATE_FORMAT','''YYYY-MON-DD HH24:MI:SS''');
dbms_output.put_line('Date format set');
-- Create a parser.
l_parser := dbms_xmlparser.newParser;
dbms_output.put_line('output 1');
-- Parse the document and create a new DOM document.
dbms_xmlparser.parseclob(l_parser, l_clob);
*-- Below lines are skipping....*
dbms_output.put_line(' passed parsing');
l_doc := dbms_xmlparser.getDocument(l_parser);
dbms_output.put_line(' passed getdocument');
-- Free resources associated with the CLOB and Parser now they are no longer needed.
dbms_lob.freetemporary(l_clob);
dbms_xmlparser.freeParser(l_parser);
-- Get a list of all the EMP nodes in the document using the XPATH syntax.
l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/child');
-- Loop through the list and create a new record in a tble collection
FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
l_n := dbms_xmldom.item(l_nl1, cur_sel);
t_tab.extend;
-- Use XPATH syntax to assign values to he elements of the collection.
dbms_xslprocessor.valueOf(l_n,'child1/text()',t_tab(t_tab.last).country);
-- putting the state and vendorname into the table rowtype
dbms_xslprocessor.valueOf(l_n,'child2/text()',t_tab(t_tab.last).state);
END LOOP;
-- getting the version and putting into the table rowtype
l_n := dbms_xslprocessor.selectSingleNode(dbms_xmldom.makeNode(l_doc),'//mcd/mc/newid/id');
dbms_xslprocessor.valueOf(l_n,'id/text()',t_tab(t_tab.last).id);
-- selecting the nodes whose starting tag is "mindex"
l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/mc/mindex');
-- checking the total number of nodes whose starting through "mi"
num_nodes := dbms_xmldom.getLength(l_nl1);
l_index := 1;
-- For loop to iterate the nodes.
FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
-- whole current node is selected and storing into the node1 variable
node1 := dbms_xmldom.item(l_nl1, cur_sel);
-- setting the xmltype as AL32UTF8
l_xmltype := xmltype(l_bfile, nls_charset_id('AL32UTF8'));
-- if selecting parent node containing the mt child node then only proceed else skip that parent node.
IF (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r') > 0) Then
-- fetch the datatime, convert it into to_date format and store it into table rowtype
temp_datatime := dbms_xslprocessor.valueOf(node1, 'date/text()');
t_tab(t_tab.last).data_time := to_char(to_date(temp_datatime, 'YYYYMmcDHH24MISS'));
l_subIndex := 1;
while (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt[' || l_subIndex || ']') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r['|| l_subIndex || ']') > 0 ) LOOP
-- getting mt and corresponging mvalue/r values
dbms_xslprocessor.valueOf(node1,'mt[' || l_subIndex || ']/text()',columnname);
dbms_xslprocessor.valueOf(node1,'mvalue/r[' || l_subIndex || ']/text()',columnvalue);
l_subIndex := l_subIndex + 1;
-- getting the column to which this mapping belongs.
select columnid into colid from abc_table where columnname=name;
CASE colid
WHEN 1 THEN t_tab(t_tab.last).col1 := columnvalue;
WHEN 2 THEN t_tab(t_tab.last).col2 := columnvalue;
WHEN 3 THEN t_tab(t_tab.last).col3 := columnvalue;
ELSE dbms_output.put_line('No column mapping for counter ' || columnname) ;
END CASE; -- end of case statement.
END LOOP;
-- Insert data into the real table from the table collection.
FORALL i IN t_tab.first .. t_tab.last
INSERT INTO test_hem VALUES t_tab(i);
END IF;
l_index := l_index + 1;
COMMIT;
END LOOP;
commit;
EXCEPTION
WHEN OTHERS THEN
ecode := SQLCODE;
emesg := SQLERRM;
dbms_output.put_line(TO_CHAR(ecode) || '-' || emesg);
dbms_lob.freetemporary(l_clob);
dbms_xmlparser.freeParser(l_parser);
dbms_xmldom.freeDocument(l_doc);
END;Thanks in advance for your help... -
Problem in IAS Server with generation of PDF with FOP and XML parsing
Dear co.forumers :
We are developing an application that generates a pdf document with FOP Apache utilities, and this PDf is stored in a folder of the server. Firts of all, a DDBB data is retrieved using java ( jdbc) middleware classes ( servlets ), and with these data, the pdf is generated using FOP. In these process, he data retrieved from the DDBB is converted in a XML file , and the with the XSL FOP utility, the pdf is generated.
In the other hand, we have another application that consults data from a java beans, using a JSP, generates a XML with the data of the beans, and with this XML, and with a XSL file generates and html , with the data and fixed text.
Both applications have been deployed as a separated WebApp in the IAS. Both use Xalan as XML parser amb Xerces is used aswell.
So, the problem is , after generating a pdf with the firts application, every html generated via JSP-XML-XSL transformation in the second application is shown completelly bad formated. All fixed text are wrongly composed, and the text that should appear in textFields and ComboBoxes is also bad formated. The XML with the data is well generated, so the problem is in the parsing of these XML and the conversion in html through XSL. We have to re-initiate the server and then everything goes well again. If no pdf is launched, no problem occurs with the other application.
How an a WEB APP pplication can affect to another, installed both in different folders of the IAS ? We tried to change Xalan version and FOP version, but no result.
Is this a Poltergeist ?? and X file , maybe ?
Has anyone had the same problem ?
Pleae, any help will be very wellcomed.A PDF document may be generated in the JDeveloper OC4J server.
http://www.oracle.com/technology/pub/notes/technote_vohra_fop.html -
XML parsing problems with Oracle XML parser for PL/SQL
I am using the Oracle XML parser for PL/SQL to transform XML into HTML usign XSL. The parser gives me sporadic errors trying to parse various XML documents. For the same XML source, the XMLPARSER will parse without errors one day and the next day will give me errors such as "invalid char in text", "Expected ';'.", or even Java null pointer exceptions.
I have verified that the XML sources are well formed, so I am pretty certain that the problems I am having are bugs in the XMLPARSER.
Is there going to be a XML parser for PL/SQL version 2 that will fix these bugs? If so, when??? If not, is there anything else I could do to fix these problems?
Thanks!You can use the latest version.
Maybe you are looking for
-
Hello , I have a developed a program which captures video and user can save images out of it. I have used .NET reference to handle the video part, and the VI is attached in this post. Now i have to make this VI as a sub VI and running this from Main
-
Photoshop Elements 5 in Windows 7 64 bit fails to load
If I click on the icon things happen (the spinning disk appears) then nothing opens up (and task manager seems ignorant of my actions). If however I click on a photograph and right click to select open with Photoshop everything works fine.Photoshop
-
F110 Auto. payment program ..Problem payment method not found
Hi, I done the configuration for automatic payment program.with payment method c. when i am running the program the proposal is created but it is with a error saying no valid payment method found. Please guide me. Thanks Micheal
-
Which syntax is more "trendy"? And what's so special about XML syntax? All the fuss about the <jsp:text> and CDATA when writing output... And what does the jsp:text do in the first place? I read it preservs whitespace, but I didn't see the difference
-
Totals text and currency sign in alv grid
Hi! How to display totals text and currency sign in the totals part of the alv grid?? Ex. 5 6 4 9 5 2 Totals: $14 $17