Memory Utilization during XML Parsing
We have a slow response time during XML Parsing.
Description of the problem:
During XML parsing, memory is used and discarded so frequently that garbage collection
is occurring multiple times per minute, impacting performance. In order to better
understand the source of the memory usage issue, we used JProbe Memory Debugger.
JProbe Memory Debugger was run in Aggregate mode in order to determine which classes
were using the most total or aggregate memory (the sum of the memory required
to instantiate not just a given object, but all the objects it uses.) The result
was that weblogic.apache. xerces.impl.xs.dom.DocumentImpl and weblogic.apache.xerces.jaxp
comprise 23.8% and 15.4%, respectively, of total memory on a heap of 121MB. In
additional tests, the larger the heap, the greater these percentages were.
This results in slow response time.
The following are the details of software and Hardware configurations used:
Server: weblogic 8.1
OS: Solaris 8
System Configuration: Sun Microsystems sun4u Sun Fire 6800
System clock frequency: 150 MHz
Memory size: 8192 Megabytes
Please let me know if there is any work around or patches available.
We have a slow response time during XML Parsing.
Description of the problem:
During XML parsing, memory is used and discarded so frequently that garbage collection
is occurring multiple times per minute, impacting performance. In order to better
understand the source of the memory usage issue, we used JProbe Memory Debugger.
JProbe Memory Debugger was run in Aggregate mode in order to determine which classes
were using the most total or aggregate memory (the sum of the memory required
to instantiate not just a given object, but all the objects it uses.) The result
was that weblogic.apache. xerces.impl.xs.dom.DocumentImpl and weblogic.apache.xerces.jaxp
comprise 23.8% and 15.4%, respectively, of total memory on a heap of 121MB. In
additional tests, the larger the heap, the greater these percentages were.
This results in slow response time.
The following are the details of software and Hardware configurations used:
Server: weblogic 8.1
OS: Solaris 8
System Configuration: Sun Microsystems sun4u Sun Fire 6800
System clock frequency: 150 MHz
Memory size: 8192 Megabytes
Please let me know if there is any work around or patches available.
Similar Messages
-
Memory Utilization during XML Parsing - Response time is high
Slow response time while xml parsing is done.
Description of the problem:
During XML parsing, memory is used and discarded so frequently that garbage collection
is occurring multiple times per minute, impacting performance. In order to better
understand the source of the memory usage issue, we used JProbe Memory Debugger.
JProbe Memory Debugger was run in Aggregate mode in order to determine which classes
were using the most total or aggregate memory (the sum of the memory required
to instantiate not just a given object, but all the objects it uses.) The result
was that weblogic.apache. xerces.impl.xs.dom.DocumentImpl and weblogic.apache.xerces.jaxp
comprise 23.8% and 15.4%, respectively, of total memory on a heap of 121MB. In
additional tests, the larger the heap, the greater these percentages were.
This results in slow response time.
The following are the details of software and Hardware configurations used:
Server: weblogic 8.1
OS: Solaris 8
System Configuration: Sun Microsystems sun4u Sun Fire 6800
System clock frequency: 150 MHz
Memory size: 8192 Megabytes"Kris" <[email protected]> wrote in message news:40f2fcda$1@mktnews1...
Sorry, I overlooked it.
yes we do have 8 GB RAM. And as far as xml usage, we are parsing the xml to DOM
(including validation) and then applying transformation. But its the parsing stuff
which is eating the memory.1. Can you run JProbe to find out real CPU utilization/bottlenecks?
2. Apache Xerses implementation that is used in weblogic has a design
flaw that results in serialization of memory allocation by the transformer,
that makes it impossible to use for intense multithreaded transformations.
Consider using other transformers.
Regards,
Slava Imeshev
>
>
"Slava Imeshev" <[email protected]> wrote:
Please answer my questions.
Regards,
Slava Imeshev
"Krisna" <[email protected]> wrote in message news:40f299ae$1@mktnews1...
Thanks Slava for youe response. Coming back to response time, thisprocess is part
of a big task. So i cant really tell what response time i can allocatejust for
this piece alone. Might be, roughly it should be less than 0.4 seconds.what the
major concenr is the memory utilization by these packages. So whatmakes it to
use this kind of memory and whether its a known issue ?
"Slava Imeshev" <[email protected]> wrote:
"kris" <[email protected]> wrote in message news:40eaddce$1@mktnews1...
Slow response time while xml parsing is done.
Description of the problem:
During XML parsing, memory is used and discarded so frequently thatgarbage collection
is occurring multiple times per minute, impacting performance. In
order
to better
understand the source of the memory usage issue, we used JProbe
Memory
Debugger.
JProbe Memory Debugger was run in Aggregate mode in order to determinewhich classes
were using the most total or aggregate memory (the sum of the memoryrequired
to instantiate not just a given object, but all the objects it uses.)The result
was that weblogic.apache. xerces.impl.xs.dom.DocumentImpl and weblogic.apache.xerces.jaxp
comprise 23.8% and 15.4%, respectively, of total memory on a heap
of
121MB. In
additional tests, the larger the heap, the greater these percentageswere.
Large heap means longer garbage collections. Anyway, DOM is very heavy
on memory and you can not escape it. What's is your usage patternfor
XML
processing? Do you use XSL?
This results in slow response time.What do you consider as acceptable/inacceptable responce time?
The following are the details of software and Hardware configurationsused:
Server: weblogic 8.1
OS: Solaris 8
System Configuration: Sun Microsystems sun4u Sun Fire 6800
System clock frequency: 150 MHz
Memory size: 8192 MegabytesDoes this mean you got 8GB RAM on 150Mhz box?
Regards,
Slava Imeshev -
Error during XML Parser Sample building.
I tried to build your sample for XML Parser for C++ v.2 for Solaris.
I had some errors :
c++ -o DOMSample -I../include DOMSample.cpp -L../lib -lxml8 -lcore8 -lnls8 -lcore8 -lnls8 -lcore8 -lnsl -lsocket
Undefined first referenced
symbol in file
Node::getFirstChild void) /var/tmp/ccxhDPf2.o
Node::getValue(void) /var/tmp/ccxhDPf2.o
Node::hasChildNodes(void) /var/tmp/ccxhDPf2.o
Node::getChildNode(unsigned int) /var/tmp/ccxhDPf2.o
Node::getName(void) /var/tmp/ccxhDPf2.o
Node::numChildNodes(void) /var/tmp/ccxhDPf2.o
Node::getType(void) /var/tmp/ccxhDPf2.o
ld: fatal: Symbol referencing errors. No output written to DOMSample
collect2: ld returned 1 exit status
make: *** [DOMSample] Error 1
I use Solaris version 2.7 and c++ (gcc)version 2.95.
I tried with the -G compilation option.(for comptability with other compilers.
It compiled but the executable doesnot run.
Please, could you give the right compilation options.
nullI think url in XML is creating problem here.
<FileLocator
url="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=search&db=PubMed&term=23-95-0[ECNO]+OR+"~"[MH]">MEDLINE</FileLocator>
Is there any way to parse this XML using <fx:XML/> ??
Thanks. -
Character skips during XML Parsing
Hi,
I am SAX Parser for parsing XML files.
During parsing some times it skips the character.
e.g. if date come as 20091201 then it takes it as 091201.
During parsing in character I am storing this date into string variable
please do the helpful.
ThanksPlain old programming, basic ordinary logic. If you want to collect all character data for an element:
(1) at the start of the element create an empty StringBuilder
(2) for each chunk of character data, append that to the StringBuilder (there's a convenient form of the append method whose parameters match the parameters of the characters method)
(3) at the end of the element, the StringBuilder contains all of the character data. -
hi,
i need to parse an xml file.
when i used an xml file of encoding type encoding="UTF-8", i could parse the file with the following syntax..
DocumentBuilder docBuilder = new DocumentBUilder();
Document doc = docBuilder.parse( path of the file name );
when i used an xml file of encoding type encoding="UTF-16" and encoding="ISO..", i could not parse the file with the above syntax..
i got the following exception
Wrong XML file structure: Character conversion error: "UTF-8 encoding of character 0x001acba4 can't be converted to Unicode." (line number may be too low).
java.lang.NullPointerException
at packageName.XMLParse.main(XMLParse.java:48)
Exception in thread "main"
Thanks in advance...hi,
i need to parse an xml file.
when i used an xml file of encoding type encoding="UTF-8", i could parse the file with the following syntax..
DocumentBuilder docBuilder = new DocumentBUilder();
Document doc = docBuilder.parse( path of the file name );
when i used an xml file of encoding type encoding="UTF-16" and encoding="ISO..", i could not parse the file with the above syntax..
i got the following exception
Wrong XML file structure: Character conversion error: "UTF-8 encoding of character 0x001acba4 can't be converted to Unicode." (line number may be too low).
java.lang.NullPointerException
at packageName.XMLParse.main(XMLParse.java:48)
Exception in thread "main"
Thanks in advance... -
OS: Oracle Database 11.1.0.7.0 on Windows XP
Analytic Workspace Manager: 11.1.0.7.0A
When expanding the Analytic Workspace in AWM I am getting the error below. I was able to create and populate the dimensions/cubes using XML Template and did not come across any errors during that process.
I tried deleting the schema and recreated the AW but still get the same error. Are there any solutions to fix this problem?
Errors have occurred during xml parse
<Line 105, Column 22>: Encountered "(" at line 1, column 175.
Was expecting one of:
"DIMENSION" ...
at oracle.olapi.xml.TagHandler.createRootException(Unknown Source)
at oracle.olapi.xml.TagHandler.getRootException(Unknown Source)
at oracle.olapi.xml.TagHandler.reportException(Unknown Source)
at oracle.olapi.xml.TagHandler.processException(Unknown Source)
at oracle.olapi.metadata.BaseMetadataXMLReader.resolveDeferredProperties(Unknown Source)
at oracle.olapi.metadata.MetadataXMLReaderMetadataInitialState.exit(Unknown Source)
at oracle.olapi.metadata.MetadataXMLReaderMetadataInitialState.exit(Unknown Source)
at oracle.olapi.xml.TagHandler.endElement(Unknown Source)
at org.xml.sax.helpers.ParserAdapter.endElement(ParserAdapter.java:626)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:211)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1326)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:340)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:307)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405)
at oracle.olapi.xml.XMLProcessor.parse(Unknown Source)
at oracle.olapi.metadata.MetadataFetcher.processXML(Unknown Source)
at oracle.olapi.metadata.MetadataFetcher.fetchBaseMetadataObjects(Unknown Source)
at oracle.olapi.metadata.BaseMetadataProvider.fetchMetadataObjects(Unknown Source)
at oracle.olapi.metadata.MetadataListProperty.getObjects(Unknown Source)
at oracle.olapi.metadata.BaseMetadataObjectState.getPropertyListValues(Unknown Source)
at oracle.olapi.metadata.BaseMetadataObject.getPropertyListValues(Unknown Source)
at oracle.olapi.metadata.mdm.MdmSchema.getCubes(Unknown Source)
at oracle.olapi.metadata.deployment.AW.getCubes(Unknown Source)
at oracle.olapi.metadata.deployment.AW.getPersistentLanguages(Unknown Source)
at oracle.olap.awm.dataobject.aw.WorkspaceDO.getULanguages(Unknown Source)
at oracle.olap.awm.dataobject.olapi.ULanguageDO.<init>(Unknown Source)
at oracle.olap.awm.navigator.node.WorkspaceNode.getUnifiedChildren(Unknown Source)
at oracle.olap.awm.navigator.node.WorkspaceNode.getChildren(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNodeModel.refreshData(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNodeModel.dTreeItemExpanding(Unknown Source)
at oracle.bali.ewt.dTree.DTreeDeferredParent.__fireExpansionChanging(Unknown Source)
at oracle.bali.ewt.dTree.DTreeDeferredParent.setExpanded(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNode.expandHelper(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNode.access$400(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNode$ExpansionThread.run(Unknown Source)I am also experiencing this error when attaching an AW:
Errors have occurred during xml parse
<Line 43, Column 47>: Error during parse: "java.lang.NullPointerException"
<Line 159, Column 19>: Error during parse: "Errors have occurred during xml parse
<Line 41, Column 34>: Error during parse: "java.lang.NullPointerException"
<Line 44, Column 55>: Error during parse: "java.lang.NullPointerException"
<Line 50, Column 55>: Error during parse: "java.lang.NullPointerException"
<Line 60, Column 34>: Error during parse: "java.lang.NullPointerException"
<Line 63, Column 55>: Error during parse: "java.lang.NullPointerException"
<Line 69, Column 55>: Error during parse: "java.lang.NullPointerException"
<Line 79, Column 34>: Error during parse: "java.lang.NullPointerException"
<Line 82, Column 55>: Error during parse: "java.lang.NullPointerException"
<Line 88, Column 55>: Error during parse: "java.lang.NullPointerException"
<Line 98, Column 34>: Error during parse: "java.lang.NullPointerException"
<Line 101, Column 55>: Error during parse: "java.lang.NullPointerException"
<Line 107, Column 55>: Error during parse: "java.lang.NullPointerException""
<Line 396, Column 47>: Error during parse: "java.lang.NullPointerException"
<Line 694, Column 47>: Error during parse: "java.lang.NullPointerException"
at oracle.olapi.xml.TagHandler.createRootException(Unknown Source)
at oracle.olapi.xml.TagHandler.getRootException(Unknown Source)
at oracle.olapi.xml.TagHandler.reportException(Unknown Source)
at oracle.olapi.xml.TagHandler.processException(Unknown Source)
at oracle.olapi.metadata.BaseMetadataXMLReader.resolveDeferredProperties(Unknown Source)
at oracle.olapi.metadata.MetadataXMLReaderMetadataInitialState.exit(Unknown Source)
at oracle.olapi.metadata.MetadataXMLReaderMetadataInitialState.exit(Unknown Source)
at oracle.olapi.xml.TagHandler.endElement(Unknown Source)
at org.xml.sax.helpers.ParserAdapter.endElement(Unknown Source)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:211)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1326)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:340)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:307)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
at org.xml.sax.helpers.ParserAdapter.parse(Unknown Source)
at oracle.olapi.xml.XMLProcessor.parse(Unknown Source)
at oracle.olapi.metadata.MetadataFetcher.processXML(Unknown Source)
at oracle.olapi.metadata.MetadataFetcher.fetchBaseMetadataObjects(Unknown Source)
at oracle.olapi.metadata.BaseMetadataProvider.fetchMetadataObjects(Unknown Source)
at oracle.olapi.metadata.MetadataListProperty.getObjects(Unknown Source)
at oracle.olapi.metadata.BaseMetadataObjectState.getPropertyListValues(Unknown Source)
at oracle.olapi.metadata.BaseMetadataObject.getPropertyListValues(Unknown Source)
at oracle.olapi.metadata.mdm.MdmSchema.getCubes(Unknown Source)
at oracle.olapi.metadata.deployment.AW.getCubes(Unknown Source)
at oracle.olapi.metadata.deployment.AW.getPersistentLanguages(Unknown Source)
at oracle.olap.awm.dataobject.aw.WorkspaceDO.getULanguages(Unknown Source)
at oracle.olap.awm.dataobject.olapi.ULanguageDO.<init>(Unknown Source)
at oracle.olap.awm.navigator.node.WorkspaceNode.getUnifiedChildren(Unknown Source)
at oracle.olap.awm.navigator.node.WorkspaceNode.getChildren(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNodeModel.refreshData(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNodeModel.dTreeItemExpanding(Unknown Source)
at oracle.bali.ewt.dTree.DTreeDeferredParent.__fireExpansionChanging(Unknown Source)
at oracle.bali.ewt.dTree.DTreeDeferredParent.setExpanded(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNode.expandHelper(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNode.access$400(Unknown Source)
at oracle.olap.awm.navigator.node.BaseNode$ExpansionThread.run(Unknown Source)
This is on DB 11.1.0.7.0 with CPU 25 (9392335) using AWM 11.1.0.7.0B with all components VALID
Oracle Enterprise Manager 11.1.0.7.0 VALID
OWB 11.1.0.7.0 VALID
Oracle Application Express 3.0.1.00.12 VALID
Oracle Ultra Search 11.1.0.7.0 VALID
OLAP Catalog 11.1.0.7.0 VALID
Spatial 11.1.0.7.0 VALID
Oracle Multimedia 11.1.0.7.0 VALID
Oracle XML Database 11.1.0.7.0 VALID
Oracle Text 11.1.0.7.0 VALID
Oracle Expression Filter 11.1.0.7.0 VALID
Oracle Rules Manager 11.1.0.7.0 VALID
Oracle Workspace Manager 11.1.0.7.0 VALID
Oracle Database Catalog Views 11.1.0.7.0 VALID
Oracle Database Packages and Types 11.1.0.7.0 VALID
JServer JAVA Virtual Machine 11.1.0.7.0 VALID
Oracle XDK 11.1.0.7.0 VALID
Oracle Database Java Packages 11.1.0.7.0 VALID
OLAP Analytic Workspace 11.1.0.7.0 VALID
Oracle OLAP API 11.1.0.7.0 VALID -
XML parser causes memory leakage, help!
I have the following function which called by other package to transfer xml. But every time it is called oracle will consume 600 to 700k memory and never release them. Any thought about it?
Function Transform(xml Clob,xsl Clob) Return Clob is
p xmlparser.Parser;
xmldoc xmldom.DOMDocument;
xsldoc xmldom.DOMDocument;
proc xslprocessor.Processor;
ss xslprocessor.Stylesheet;
cl Clob;
begin
p := xmlparser.newParser;
xmlparser.setValidationMode(p, FALSE);
xmlparser.setPreserveWhiteSpace(p, TRUE);
xmlparser.parseClob(p, xml); -- parse xml
xmldoc := xmlparser.getDocument(p);
xmlparser.parseClob(p, xsl); -- parse xsl
xsldoc := xmlparser.getDocument(p);
proc := xslprocessor.newProcessor;
ss := xslprocessor.newStylesheet(xsldoc, '');
dbms_lob.createtemporary(cl, TRUE);
xslprocessor.processXSL(proc, ss, xmldoc,cl);
xslprocessor.freeProcessor(proc);
xslprocessor.freeStyleSheet(ss);
xmlparser.freeParser(p);
return cl;
exception -- deal with exceptions
when xmldom.INDEX_SIZE_ERR then
raise_application_error(-20120, 'Index Size error');
when xmldom.DOMSTRING_SIZE_ERR then
raise_application_error(-20120, 'String Size error');
when xmldom.HIERARCHY_REQUEST_ERR then
raise_application_error(-20120, 'Hierarchy request error');
when xmldom.WRONG_DOCUMENT_ERR then
raise_application_error(-20120, 'Wrong doc error');
when xmldom.INVALID_CHARACTER_ERR then
raise_application_error(-20120, 'Invalid Char error');
when xmldom.NO_DATA_ALLOWED_ERR then
raise_application_error(-20120, 'Nod data allowed error');
when xmldom.NO_MODIFICATION_ALLOWED_ERR then
raise_application_error(-20120, 'No mod allowed error');
when xmldom.NOT_FOUND_ERR then
raise_application_error(-20120, 'Not found error');
when xmldom.NOT_SUPPORTED_ERR then
raise_application_error(-20120, 'Not supported error');
when xmldom.INUSE_ATTRIBUTE_ERR then
raise_application_error(-20120, 'In use attr error');
end Transform;
nullWould you try to free the alloced temporary lob whenever get Exception and try?
dbms_lob.createtemporary(cl, TRUE);
dbms_lob.freetemporary(cl);
Thanks.
null -
I'm working on developing a new style of XML parser. I've created an initial proof of concept implementation, and I'd be grateful for feedback on it.
The idea is to create a high level, DOM-like API which is suitable for both streaming and in-memory parsers. This provides several advantages over existing parsers:
-It's much easier to use than other streaming parsers like SAX or StAX.
-Switching from an in-memory parser to a streaming parser (or vice versa) is much easier than with any other parsers, because they use exactly the same API. You can even support both, then decide which parser to use at runtime (based on the file size, for example, or how many passes you need to make through it).
-Many useful utilities can be written once, then used with either parser.
The current implementation is available at
http://drizzle.stanford.edu/~peastman/pax.zip
All source code is in the public domain. Feedback would be gratefully appreciated!
PeterThanks for the pointers! I hadn't encountered lazy-DOM before. It sounds like an interesting idea, although I think its goal is quite different from PAX. I found the following quote in a description of it on the Xerces website: "This shortens the time it takes to parse an XML file and create a DOM tree at the expense of requiring more memory during parsing and traversing the document." So it takes even more memory than a standard DOM parser.
I'll definitely check out the xml.org discussion list. I've been looking for a good place to get feedback, and this board seemed like a likely candidate.
Peter -
Possible "Out of memory" error during XSLT ?
Hi ,
I am working on 11gR1.
In my project I am reading a file in batches of ten thousand messages.
The file is getting read and archived and I can see expected number of instances getting created in the console.
But nothing useful is visible inside the instance as the link for BPEL process is not appearing.
(I have kept audit level as production but even in this case, atleast link should appear)
When I checked the logs , it indicated that transaction was rolled back due to out of memory error.
Just before this error, there is a reference to the xsl file which I am using :
[2010-12-13T08:42:33.994-05:00] [soa_server1] [NOTIFICATION] [] [oracle.soa.bpel.engine.xml] [tid: pool-5-thread-3] [userId: xxxx] [ecid: 0000InVxneH5AhCmvCECVH1D1XvN00002J,0:6:100000005] [APP: soa-infra] [composite_name: xxxx] [component_name: xxxx] [component_instance_id: 560005] [composite_instance_id: 570005] registered the bpel uri resolver [File-based Repository]oramds:/deployed-composites/xxxx_rev1.0/ base uri xsl/ABCD.xsl
[2010-12-13T08:46:12.900-05:00] [soa_server1] [ERROR] [] [oracle.soa.mediator.dispatch.db] [tid: oracle.integration.platform.blocks.executor.WorkManagerExecutor$1@e01a3a] [userId: <anonymous>] [ecid: 0000InVuNCt5AhCmvCECVH1D1XvN000005,0] [APP: soa-infra] DBContainerIdManager:run() failed with error.Rolling back the txn[[
java.lang.OutOfMemoryError
My question is , is there any limit on how much payload can oracle's xslt parser handle in one go ?
Is decreasing the batch size only possible solution for this ?
Please share your valuable inputs ,
Ketan
Is there any limit on how many number of the elements xslt parser can handle ?
I am reading a file in batch of 10 thousand messages per file. (Each recordsa has some 6-8 fields)
The file is getting picked up but the instance does not show anything.> I'm getting out of memory errro during system copy import for Dual stack system (ABAP & JAVA).
>
> FJS-00003 out of memory (in script NW_Doublestack_CI|ind|ind|ind|ind, line 6293
> 6: ???)
Is this a 32bit instance? How much memory do you have (physically) in that machine?
Markus -
Follow up on an old thread about memory utilization
This thread was active a few months ago, unfortunately its taken me until now
for me to have enough spare time to craft a response.
From: SMTP%"[email protected]" 3-SEP-1996 16:52:00.72
To: [email protected]
CC:
Subj: Re: memory utilization
As a general rule, I would agree that memory utilzation problems tend to be
developer-induced. I believe that is generally true for most development
environments. However, this developer was having a little trouble finding
out how NOT to induce them. After scouring the documentation for any
references to object destructors, or clearing memory, or garbage collection,
or freeing objects, or anything else we could think of, all we found was how
to clear the rows from an Array object. We did find some reference to
setting the object to NIL, but no indication that this was necessary for the
memory to be freed.
I believe the documentation, and probably some Tech-Notes, address the issue of
freeing memory.
Automatic memory management frees a memory object when no references to the
memory
object exist. Since references are the reason that a memory object lives,
removing
the references is the only way that memory objects can be freed. This is why the
manuals and Tech-Notes talk about setting references to NIL (I.E. freeing memory
in an automatic system is done by NILing references and not by calling freeing
routines.) This is not an absolute requirement (as you have probably noticed
that
most things are freed even without setting references to NIL) but it accelerates
the freeing of 'dead' objects and reduces the memory utilization because it
tends
to carry around less 'dead' objects.
It is my understanding that in this environment, the development tool
(Forte') claims to handle memory utilization and garbage collection for you.
If that is the case, then it is my opinion that it shoud be nearly
impossible for the developer to create memory-leakage problems without going
outside the tool and allocating the memory directly. If that is not the
case, then we should have destructor methods available to us so that we can
handle them correctly. I know when I am finished with an object, and I
would have no problem calling a "destroy" or "cleanup" method. In fact, I
would prefer that to just wondering if Forte' will take care of it for me.
It is actually quite easy to create memory leaks. Here are some examples:
Have a heap attribute in a service object. Keep inserting things into
the heap and never take them out (I.E. forgot to take them out). Since
service objects are always live, everything in the heap is also live.
Have an exception handler that catches exceptions and doesn't do
anything
with the error manager stack (I.E. it doesn't call task.ErrMgr.Clear).
If the handler is activated repeatedly in the same task, the stack of
exceptions will grow until you run out of memory or the task terminates
(task termination empties the error manager stack.)
It seems to me that this is a weakness in the tool that should be addressed.
Does anyone else have any opinions on this subject?
Actually, the implementation of the advanced features supported by the Forte
product
results in some complications in areas that can be hard to explain. Memory
management
happens to be one of the areas most effected. A precise explanation to a
non-deterministic process is not possible, but the following attempts to
explain the
source of the non-determinism.
o The ability to call from compiled C++ to interpreted TOOL and back
to compiled C++.
This single ability causes most of the strange effects mentioned in
this thread.
For C++ code the location of all variables local to a method is not
know
(I.E. C++ compilers can't tell you at run-time what is a variable
and what
isn't.) We use the pessimistic assumption that anything that looks
like a
reference to a memory object is a reference to a memory object. For
interpreted
TOOL code the interpreter has exact knowledge of what is a reference
and what
isn't. But the TOOL interpreter is itself a C++ method. This means
that any
any memory objects referenced by the interpreter during the
execution of TOOL
code could be stored in local variables in the interpreter. The TOOL
interpreter
runs until the TOOL code returns or the TOOL code calls into C++.
This means
that many levels of nested TOOL code can be the source of values
assigned to
local variables in the TOOL interpreter.
This is the complicated reason that answers the question: Why doesn't a
variable that is created and only used in a TOOL method that has
returned
get freed? It is likely that the variable is referenced by local
variables
in the TOOL interpreter method. This is also why setting the
variable to NIL
before returning doesn't seem to help. If the variable in question is a
Array than invoke Clear() on the Array seems to help, because even
though the
Array is still live the objects referenced by the Array have less
references.
The other common occurrence of this effect is in a TextData that
contains a
large string. In this case, invoking SetAllocatedSize(0) can be used
to NIL
the reference to the memory object that actually holds the sequence of
characters. Compositions of Arrays and TextData's (I.E. a Array of
TextData's
that all have large TextDatas.) can lead to even more problems.
When the TOOL code is turned into a compiled partition this effect
is not
noticed because the TOOL interpreter doesn't come into play and
things execute
the way most people expect. This is one area that we try to improve
upon, but it is complicated by the 15 different platforms, and thus
C++ compilers,
that we support. Changes that work on some machines behave
differently on other
machines. At this point in time, it occasionally still requires that
a TOOL
programmer actively address problems. Obviously we try to reduce
this need over
time.
o Automatic memory management for C++ with support for multi-processor
threads.
Supporting automatic memory management for C++ is something that is
not a very
common feature. It requires a coding standard that defines what is
acceptable and
what isn't. Additionally, supporting multi-processor threads adds
its own set of
complications. Luckily TOOL users are insulated from this because
the TOOL to C++
code generator knows the coding standard. In the end you are
impacted by the C++
compiler and possibly the differences that occur between different
compilers and/or
different processors (I.E. Intel X86 versus Alpha.) We have seen
applications that
had memory utilization differences of up to 2:1.
There are two primary sources of differences.
The first source is how compilers deal with dead assignments. The
typical TOOL
fragment that is being memory manager friendly might perform the
following:
temp : SomeObject = new;
... // Use someObject
temp = NIL;
return;
When this is translated to C++ it looks very similar in that temp
will be assigned the
value NULL. Most compilers are smart enough to notice that 'temp' is
never used again
because the method is going to return immediately. So they skip
setting 'temp' to NULL.
In this case it should be harmless that the statement was ignored
(see next example for a different variation.) In more
complicated examples that involve loops (especially long
lived event loops) a missed NIL assignment can lead to leaking the
memory object whose
reference didn't get set to NIL (incidentally this is the type of
problem that causes
the TOOL interpreter to leak references.)
The second source is a complicated interaction caused by history of
method invocations.
Consider the following:
Method A() invokes method B() which invokes method C().
Method C() allocates a temporary TextData, invokes
SetAllocatedSize(1000000)
does some more work and then returns.
Method B() returns.
Method A() now invokes method D().
Method D() allocates something that cause the memory manager to look
for memory objects to free.
Now, even though we have returned out of method C() we have starting
invoking
methods. This causes us to use re-use portions of the C++ stack used to
maintain the history of method invocation and space for local variables.
There is some probability that the reference to the 'temporary' TextData
will now be visible to the memory manager because it was not overwritten
by the invocation of D() or anything invoked by method D().
This example answers questions of the form: Why does setting a local
variable to
NIL and returning and then invoking task.Part.Os.RecoverMemory not
cause the
object referenced by the local variable to be freed?
In most cases these effects cause memory utilization to be slightly
higher
than expected (in well behaved cases it's less than 5%.) This is a small
price to pay for the advantages of automatic memory management.
An object-oriented programming style supported by automatic memory
management makes it
easy to extended existing objects or sets of objects by composition.
For example:
Method A() calls method B() to get the next record from the
database. Method B()
is used because we always get records, objects, of a certain
type from
method B() so that we can reuse code.
Method A() enters each row into a hash table so that it can
implement a cache
of the last N records seen.
Method A() returns the record to its caller.
With manual memory management there would have to be some interface
that allows
Method A() and/or the caller of A() to free the record. This
requires
that the programmer have a lot more knowledge about the
various projects
and classes that make up the application. If freeing doesn'
happen you
have a memory leak, if you free something while its still
being used the
results are unpredictable and most often fatal.
With automatic memory management, method A() can 'free' its
reference by removing
the reference from the hash table. The caller can 'free' its
reference by
either setting the reference to NIL or getting another
record and referring
to the new record instead of the old record.
Unfortunately, this convenience and power doesn't come for free. Consider
the following,
which comes from the Forte' run-time system:
A Window-class object is a very complex beast. It is composed of two
primary parts:
the UserWindow object which contains the variables declared by the
user, and the
Window object which contains the object representation of the window
created in
the window workshop. The UserWindow and the Window reference each
other. The Window
references the Menu and each Widget placed on the Window directly. A
compound Window
object, like a Panel, can also have objects place in itself. These
are typically
called the children. Each of the children also has to know the
identity of it's
Mom so they refer to there parent object. It should be reasonably
obvious that
starting from any object that make up the window any other object
can be found.
This means that if the memory manager finds a reference to any
object in the Window
it can also find all other objects in the window. Now if a reference
to any object
in the Window can be found on the program stack, all objects in the
window can
also be found. Since there are so many objects and the work involved
in displaying
a window can be very complicated (I.E. the automatic geometry
management that
layouts the window when it is first opened or resized.) there are
potentially many
different reference that would cause the same problem. This leads to
a higher than
normal probability that a reference exists that can cause the whole
set of Window
objects to not be freed.
We solved this problem in the following fashion:
Added a new Method called RecycleMemory() on UserWindow.
Documented that when a window is not going to be used again
that it is
preferably that RecycleMemory() is invoked instead
of Close().
The RecycleMemory() method basically sets all references
from parent to
child to NIL and sets all references from child to
parent to NIL.
Thus all objects are isolated from other objects
that make up
the window.
Changed a few methods on UserWindow, like Open(), to check
if the caller
is trying to open a recycled window and throw an
exception.
This was feasible because the code to traverse the parent/child
relationship
ready existed and was being used at close time to perform other
bookkeeping
operations on each of the Widgets.
To summarize:
Automatic memory management is less error prone and more productive but
doesn't come totally for free.
There are things that the programmer can do that assists the memory
manager:
o Set object reference to NIL when known to be correct (this
is the
way the memory is deallocated in an automatic system.)
o Use methods like Clear() on Array and SetAllocatedSize()
on TextData to
that allow these objects to set their internal
references to NIL
when known to be correct.
o Use the RecycleMemory() method on windows, especially very
complicated
windows.
o Build similar type of methods into your own objects when
needed.
o If you build highly connected structures that are very
large in the
number of object involved think that how it might be
broken
apart gracefully (it defeats some of the purpose of
automatic
management to go to great lengths to deal with the
problem.)
o Since program stacks are the source of the 'noise'
references, try
and do things with less tasks (this was one of the
reasons that
we implemented event handlers so that a single task
can control
many different windows.)
Even after doing all this its easy to still have a problem.
Internally we have
access to special tools that can help point at the problem so that
it can be
solved. We are attempting to give users UNSUPPORTED access to these
tools for
Release 3. This should allow users to more easily diagnose problems.
It also
tends to enlighten one about how things are structured and/or point out
inconsistencies that are the source of known/unknown bugs.
Derek
Derek Frankforth [email protected]
Forte Software Inc. [email protected]
1800 Harrison St. +510.869.3407
Oakland CA, 94612I beleive he means to reformat it like a floppy disk.
Go into My Computer, Locate the drive letter associated with your iPod(normally says iPod in it, and shows under removable storage).
Right click on it and choose format - make sure to not have the "quick format" option checked. Then let it format.
If that doesnt work, There are steps somewhere in the 5th gen forum( dont have the link off hand) to try to use the usbstor.sys to update the USB drivers for the Nano/5th gen. -
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 -
Hi-
I'm trying to use the latest Xercies/Xalan classes in OC4J 10.1.3 as described in the How-To swap XML Parsers document:
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
What I can see happening is that the oracle.xml shared library is successfully 'turned off', but the xalan libraries are not added. Instead, the default xml classes that are distributed with the JDK become visible. For instance, using a slightly modified version of the index.jsp page from the how-to, I get this result:
------ Output from JSP page ----------------
TransformerFactory Instance: org.apache.xalan.processor.TransformerFactoryImpl
Transformer Instance: org.apache.xalan.transformer.TransformerIdentityImpl
Transformer Version: Xalan Java 2.4.1 (!!)
What I expect is for that last line to say version 2.7.0, which is the version of the xalan.jar included in my shared library (code to add that line to the how-to shown below).
I suspect what is happening is that the class loader is simply not letting a shared library override a system library - to do that you probably need to place the jar files in system endorsed directory.
Has anyone gotten this how-to to work - actually replacing the XML parser/transform classes with the latest Xalan classes? Are you sure it is seeing the current version you placed in the shared library?
Thanks,
Eric Everman
---- My modified getXSLTDetails() method in the index.jsp page of the how-to -------
<!-- Additional Import -->
<%@ page import="org.apache.xalan.Version" %>
public static String getXSLTDetails()
Transformer transformer=null;
TransformerFactory transformerfactory = TransformerFactory.newInstance();
Version ver = null;
String br = "<" + "br" + ">"; //otherwise the otn forum chocks on the break.
try
transformer = transformerfactory.newTransformer();
ver = (Version) transformer.getClass().forName("org.apache.xalan.Version").newInstance();
String ret_val =
"TransformerFactory Instance: "+transformerfactory.getClass().getName() + br +
"Transformer Instance: "+transformer.getClass().getName() + br;
if (ver != null) {
ret_val = ret_val + "Transformer Version: " + ver.getVersion() + br;
} else {
ret_val = ret_val + "Transformer Version not Available" + br;
return ret_val;
catch (Exception e)
e.printStackTrace();
return e.getMessage();
}--------------------------------------------------------------------Steve - Thanks for responding on this.
The Xalan SQL extension is built into Xalan. The most painless way to try it out is to run it via JEdit: www.jedit.org
JEdit a OS Java application with a fairly painless install process (I'm assuming you already have a current JRE installed). Once its installed, you'll need to install the XSLT plugin - in JEdit goto Plugins | Plugin Manager | Install and pick the XSLT plugin. You'll need the Oracle JDBC classes on your classpath - this can be done by copying the oracle_jdbc4.jar into the [JEdit install directory]/jars directory.
Restart to load that jar and you should be all set.
I included a sample XSLT page at the bottom of this post that is somewhat of a template transform for the SQL extension - its more complicated then it needs to be, but it does some nice things with the results of the query. Save it as a file and make the appropriate changes to the 'datasource' parameter near the top of the file.
Then in JEdit, open the file and make sure the XSLT plugin is visible (Plugins | XSLT | XSLT Processor Toggle - or alternately dock it in the window via global prefs). In the XSLT plugin: Allow the current buffer to be used as the source, Add that same file as a stylesheet via the '+' button, and pick a result file at the bottom. Then click the 'Transform XML' button.
Troubleshooting: I seem to remember having some classpath errors when I tried this on windows, but others have had it work w/o issues. I do remeber that the XSLT plugin had a popup window that gave a pretty good explaintion of the problem, if it occurs. Also, for some reason the XSLT plugin will not create a new file for the output, so its often best to create a file first, then choose it as the output. Of course, you can always run a transformation from the command line or w/in an applicatoin. Full docs on the Xalan SQL extension can be found at: http://xml.apache.org/xalan-j/extensionslib.html#sql
Here is my sample XSLT transform using the SQL extension:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://xml.apache.org/xalan/sql"
xmlns:str="http://exslt.org/strings"
xmlns:xalan="http://xml.apache.org/xalan"
extension-element-prefixes="sql str xalan">
<xsl:output indent="yes"/>
<xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param>
<xsl:param name="datasource">jdbc:oracle:thin:jqpublic/jqpublic@server_name:1521:dbname</xsl:param>
<xsl:param name="jndiDatasource"><!-- jndi source for production use w/in enterprise environment --></xsl:param>
<xsl:param name="debug">true</xsl:param>
<xsl:variable name="connection" select="sql:new()"/>
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/>
<!--
The query: You could pass parameters in to this query to build a where clause, but here is a simple example.
Also, its nice to wrap the query with a max row number to prevent huge results.
-->
<xsl:param name="query">
select * from (
SELECT
'One' FIELD_1,
'Two' FIELD_2
FROM DUAL
) where rownum < 100
</xsl:param>
<!-- Essentially, create a XConnection object -->
<xsl:variable name="connection" select="sql:new()"/>
<xsl:template match="/">
<xsl:choose><!-- Connect using JNDI -->
<xsl:when test="$jndiDatasource != ''">
<xsl:if test="not(sql:connect($connection, $jndiDatasource))">
<xsl:message>Failed to connect to db via jndi connection</xsl:message>
<xsl:comment>Failed to connect to db via jndi connection</xsl:comment>
<xsl:if test="$debug = 'true'">
<xsl:copy-of select="sql:getError($connection)/ext-error"/>
</xsl:if>
</xsl:if>
</xsl:when>
<xsl:otherwise><!-- Connect using connection string -->
<xsl:if test="not(sql:connect($connection, $driver, $datasource))">
<xsl:message>Failed to connect to db via driver/url connection</xsl:message>
<xsl:comment>Failed to connect to db via driver/url connection</xsl:comment>
<xsl:if test="$debug = 'true'">
<xsl:copy-of select="sql:getError($connection)/ext-error"/>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<!--
The results of the query. The rowset is brought back in 'streaming' mode,
so its not possible to ask it for the number of rows, or to check for zero
rows. There is a switch to disable streaming mode, but this requires all
rows to be brought into memory.
-->
<xsl:variable name="table" select="sql:query($connection, $query)"/>
<xsl:if test="not($table)">
<xsl:message>Error in Query</xsl:message>
<xsl:copy-of select="sql:getError($connection)/ext-error"/>
</xsl:if>
<page>
<!-- Your xalan environment -->
<xsl:copy-of select="xalan:checkEnvironment()"/>
<!-- Build a bunch of metadata about the rows -->
<meta>
<cols>
<xsl:apply-templates select="$table/sql/metadata/column-header"/>
</cols>
</meta>
<rowset>
<!--
With streaming results, you must use the apply-temmplates contruct,
not for-each, since for-each seems to attempt to count the rows, which
returns zero.
-->
<xsl:apply-templates select="$table/sql/row-set"/>
</rowset>
</page>
<xsl:value-of select="sql:close($connection)"/><!-- Always close -->
</xsl:template>
<xsl:template match="row">
<row>
<xsl:apply-templates select="col"/>
</row>
</xsl:template>
<xsl:template match="column-header">
<col>
<xsl:attribute name="type">
<xsl:value-of select="@column-typename"/>
</xsl:attribute>
<xsl:attribute name="display-name">
<xsl:call-template name="create-display-name"/>
</xsl:attribute>
<xsl:value-of select="@column-name"/>
</col>
</xsl:template>
<!-- Convert column names to proper caps: MY_FIELD becomes My Field -->
<xsl:template name="create-display-name">
<xsl:variable name="col-name">
<xsl:for-each select="str:tokenize(@column-name, '_')">
<xsl:value-of
select="concat(translate(substring(., 1, 1), $lowercase, $uppercase), translate(substring(.,2), $uppercase, $lowercase), ' ')"/>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="substring($col-name, 1, string-length($col-name) - 1)"/>
</xsl:template>
<!-- Creates data columns named 'col' with a column-name attribute -->
<xsl:template match="col">
<col>
<xsl:attribute name="column-name"><xsl:value-of select="@column-name"/></xsl:attribute>
<xsl:value-of select="."/>
</col>
</xsl:template>
</xsl:stylesheet> -
Attempt to process file failed with Exception in XML Parser-format problem
Hi all,
Iam getting an unusual error in the J2EE stack in XI.
And the message is:
006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.
This means that error occured during content conversion of XML to the prescribed file format.
Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.
Thanks in advance...
karunHi Bhavesh,
Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.
The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.
2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -
2006-11-30 17:30:50 Success Start converting XML document content to plain text
2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'
2006-11-30 17:31:07 Error Exception caught by adapter framework: null
2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.
2006-11-30 17:31:07 Success The message status set to WAIT.
2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck
2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck
2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1 -
[ANN] VTD-XML Version 1.5 Released
Eight years after the invention of XML, DOM and SAX,
despite their respective issues, are still the mainstays
of application developers.
So is it the end of road for XML parsing innovation?
The VTD-XML project team think not. We are proud to
announce the availability of both C and Java version
1.5 of VTD-XML, the next generation open-source XML
parser that goes beyond DOM and SAX in terms of
performance, memory usage and ease of use.
The technical highlights of VTD-XML are:
* Performance: the world's fastest XML parser,
between 5x~10x faster than DOM
* Memory Usage: 3x to 5x less than DOM, 1.3x~1.5x
XML document size
* Random access with built-in XPath support
* A simple and intuitive API
Other advanced features include:
* Buffer reuse
* Large document support (2GByte)
* Incremental update
* Hardware acceleration
* Native XML indexing.
For demos, latest benchmarks, related articles and software
downloads, please visit http://vtd-xml.sf.net. Also let us
know your thoughts and suggestions and help us improve
VTD-XML.Don't crosspost.
http://forum.java.sun.com/thread.jspa?threadID=707987&tstart=20
It should be noted that this parser is not a full implementation, and ignores some xml constructs, which perhaps helps it's performance numbers in comparison to compliant parsers. -
Hi ,
I am facing issue while building composite in jdeveloper.It is showing below error.Please Suggest how to proceed further.
Error: XML parsing failed because ""
Buildfile: C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml
scac:
[scac] Validating composite "C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\composite.xml"
[scac] Setting BPELC option 'classpath' to C:\Oracle\Middleware\modules\com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar;C:\Oracle\Middleware\modules\org.eclipse.persistence_1.1.0.0_2-1.jar;C:\Oracle\Middleware\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\Oracle\Middleware\modules\javax.persistence_1.0.0.0_2-0-0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\Oracle\Middleware\jdeveloper\jdev\extensions\oracle.sca.modeler.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator_client.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;;C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\SCA-INF\classes
[scac] java.lang.NullPointerException
[scac] at com.collaxa.cube.lang.compiler.map.bpel.BPELProcess.lookupInitiationInfo(BPELProcess.java:1010)
[scac] at com.collaxa.cube.lang.compiler.map.bpel.BPELProcess.addOnMessage(BPELProcess.java:903)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseOnMessage(BpelParser.java:1597)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.startElement(BpelParser.java:587)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:492)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parse(BpelParser.java:455)
[scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parse(BpelParser.java:402)
[scac] at com.collaxa.cube.lang.compiler.bpel.BPELValidator.validate(BPELValidator.java:65)
[scac] at com.collaxa.cube.lang.compiler.BPEL1Processor.validate(BPEL1Processor.java:329)
[scac] at com.collaxa.cube.lang.compiler.BPEL1Processor.process(BPEL1Processor.java:153)
[scac] at com.collaxa.cube.lang.compiler.CubeParserHelper.compile(CubeParserHelper.java:47)
[scac] at oracle.fabric.bpel.bpelc.BPELComponentValidator.validate(BPELComponentValidator.java:40)
[scac] at oracle.soa.scac.ValidateComposite.validateComponentTypeServicesReferences(ValidateComposite.java:1051)
[scac] at oracle.soa.scac.ValidateComposite.doValidation0(ValidateComposite.java:502)
[scac] at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:481)
[scac] at oracle.soa.scac.ValidateComposite.run0(ValidateComposite.java:206)
[scac] at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:187)
[scac] at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:179)
[scac] AddComponentProcess.bpel: error: XML parsing failed because ""
BUILD FAILED
C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml:278: Java returned: 1 Check log file : C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\SCA-INF\classes\scac.log for errors
Total time: 1 minute 27 seconds
ThanksHi,
Please give a try to this:(Take back up before doing this)
1. Download PATCH 11066656 .
2. Go to your JDEV_HOME/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/
and make a backup copy of orabpel.jar.
3. Copy the file orabpel.jar from patch 11066656 to JDEV_HOME/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/.
4. Restart JDeveloper.
5. Now the project should compile without the SCAC error.
This was fixed in 11.7 but since you are getting SCAC so asked the above action plan.
If it did not resolves see below steps:
=============================================================
File will be there but a class is missing which might cause this.
If you have same soa version 11.1.1.7.0 can you check that fabricruntime.jar from soa home and jdev home size is same?
In soa home it will be under Oracle_SOA/soa/modules directory.
If size is not same replace jdev fabricruntime.jar from soa home.
Also can you confirm on:
Please let me know whether you are able to deploy from EM or getting same error during deployment also? or from ant script.
Maybe you are looking for
-
Restoring edited info in iBooks
I download all my bank and credit card statements to iBook on my iPad mini. I edit the names of the documents as not all financial institutions provide the date of the document with the download. I went from IOS 7 to IOS 8.1.1 and all the edited inf
-
Unable to install flash player on Windows XP
Unable to install XP using both browsers: IE and firefox. Getting error message: Error: General installation error Removed temporary internet files also. still unable to install.
-
Hi, I want to purchase one stock/non stock item for my order immediately.I did local purchase on urgent basis without any pr/po. So how can i book this against the order? Regards ebin <a href="http://www.isohunt.name/">isohunt</a>, <a href="http://ww
-
Posted this query several times but no reply. Please help me out
Hi all, How to know whether a servlet had completely sent its response to the request. The problem what i am facing is, I send response to a client's request as a file. The byte by byte transfer happens, now if the client interrupts or cancels the op
-
In pricing we have scales setup by Material Family (material price group) so if you enter three different materials from the same family it accumulates the prices on all three line items and each line item has the same price according to the family s