XMLEncoder usage for Java to XML Serialization

I have recently started using XMLEncoder and XMLDecoder to perform Java Bean to XML Serialization and Deserialization. It seems to break when multiple threads are using XMLEncoder, even if each Thread is using a separate instance of XMLEncoder. I was initially seeing NullPointer exception and after obtaining a fix for that IBM Support, we are seeing various other exceptions like this.
java.lang.IllegalAccessException: Can not call newInstance() on the Class for java.lang.Class
java.lang.Exception: discarding statement XMLEncoder0.writeObject(TestObject0);
java.lang.Exception: discarding statement XMLEncoder0.writeObject(TestObject0);
     at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:352)
     at java.beans.XMLEncoder.writeObject(XMLEncoder.java:266)
     at test.XMLEncoderIssue.run(XMLEncoderIssue.java:59)
     at java.lang.Thread.run(Thread.java:570)
Caused by: java.lang.RuntimeException: failed to evaluate: <unbound>=Class.new();
java.lang.ArrayIndexOutOfBoundsException: 0
at java.beans.ObjectHandler.dequeueResult(XMLDecoder.java:285)
at java.beans.XMLDecoder.readObject(XMLDecoder.java:163)
at test.XMLEncoderIssue.run(XMLEncoderIssue.java:75)
at java.lang.Thread.run(Thread.java:570)
What am i missing here?

Just add an empty constructor in your class

Similar Messages

  • How to specify maximum memory usage for Java VM in Tomcat?

    Does any one know how to setup memory usage for Java VM, such as "-Xmx256m" parameter, in Tomcat?
    I'm using Tomcat 3.x in Apache web server on Sun Solaris platform. I already tried to add the following line into tomcat.properties, like:
    wrapper.bin.parameters=-Xmx512m
    However, it seems to me that this doesn't work. So, how about if my servlet will consume a large amount of memory that exceeds the default 64M memory boundary of Java VM?
    Any idea will be appreciated.
    Haohua

    With some help we found the fix. You have to set the -Xms and -Xmx at installation time when you install Tomcat 4.x as a service. Services do not read system variables. Go to the command prompt in windows, and in the directory where tomcat.exe resides, type "tomcat.exe /?". You will see jvm_options as part of the installation. Put the -Xms and -Xmx variables in the proper place during the install and it will work.
    If you can't uninstall and reinstall, you can apply this registry hack that dfortae sent to me on another thread.
    =-=-=-=-=-=
    You can change the parameters in the Windows registry. If your service name is "Apache Tomcat" The location is:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat\Parameters
    Change the JVM Option Count value to the new value with the number of parameters it will now have. In my case, I added two parameters -Xms100m and -Xmx256m and it was 3 before so I bumped it to 5.
    Then I created two more String values. I called the first one I added 'JVM Option Number 4' and the second 'JVM Option Number 5'. Then I set the value inside each. The first one I set to '-Xms100m' and the second I set to '-Xmx256m'. Then I restarted Tomcat and observed when I did big processing the memory limit was now 256 MB, so it worked. Hope this helps!
    =-=-=-=-=
    I tried this and it worked. I did not want to have to go through the whole reinstallation process, so this was best for me.
    Thanks to all who helped on this.

  • Help on jar file for org.apache.xml.serialize.OutputFormat

    Hi all, I need help regarding on org.apache.xml.serialize.OutputFormat
    and org.apache.xml.serialize.XMLSerializer. May I know which jar files
    contain these? Thanks

    After installing jdk 1.5 the problem is now resolved and after prefexing a few of the import statements with com.sun.
    There are however some more classes as part of the Xerces 2.7.1 jar file as compared to the JWSDP 1.6 installed and this requires the xercesimpl.jar to be included in the classpath.
    Rgds,
    Seetesh

  • Challenging issue for Java and XML Gurus.Please advise

    An extremely tricky and challenging code.
    I have been able to add 2 XML documents together
    using importNode().
    xmlDoc1
    <?xml version="1.0" encoding="UTF-8"?>
    <i:Interest xmlns:i="common">
    <i:Details xsi.type="i:vanilla.details.stock">
      <i:Strategy xsi.type="strategies:call">
         <strategies.Expiry>2009-12-01</strategies.Expiry>
      </i:Strategy>
    <i:Ref/>
    </i:Details>
    </i:Interest>
    xmlDoc2
    <?xml version="1.0" encoding="UTF-8"?>
    <i:Underlying value="KGF">
    <common:Currency>GBP</common:Currency>
    </i:Underlying>
    My Java Code to append them together
    NodeList list = xmlDoc2.getChildNodes();
    for (int i=0; i< list .getLength(); i++) {
         Element element = (Element)list.item(i);
         Node dup = xmlDoc1.importNode(element, true);
         xmlDoc1.getDocumentElement().appendChild(dup);
    Output:
    <?xml version="1.0" encoding="UTF-8"?>
    <i:Interest xmlns:i="common">
    <i:Details xsi.type="i:vanilla.details.stock">
         <strategies.Description>Call</strategies.Description>
         <strategies.Expiry>2009-12-01</strategies.Expiry>
       </i:Strategy>
    <i:Ref/>
    </i:Details>
    <i:Underlying value="KGF">
    <common:Currency>GBP</common:Currency>
    </i:Underlying>
    </i:Interest>     Query:
    I would like to add the 2nd XML Document after element <i:Ref> . How to do this? I dont want the 2nd XML doc after <i:details> but before it.
    Please help.

    Well. You say you want to insert a node as a child of another node, and it needs to be inserted before a certain other child node.
    There's an insertBefore() method in the Node interface. Use that.
    And if you thought that was a challenging issue then you might as well give up writing DOM code right now.

  • OracleHelp for Java from XML - Possible?

    Has anyone successfully authored an OHJ system by using an XML tool such as Epic ArborText? If so, I would love to know the process you used and whether you accomplished this by using the HelpSet wizard or some other means.

    This is primarily a question for authors using Oracle Help, but as a member of the team that develops Oracle Help Technologies I've heard about many customers using XML centric tools with Oracle Help.
    An Oracle Help system consists of XML control files (.hs, toc, keyword index, map files, etc), HTML content files, and a generated search index. Since you can use the search index generator that comes with OHJ to generate the search index, that file is taken care of.
    I know that a small number of authors have used XML editors to create the control files, in fact, we were thinking about distributing XML Schemas for these file formats that could be used with XML Schema aware XML editors.
    I know that a large number of Oracle Help systems have been developed recently using Adobe Framemaker's XML support and converters that generate the output HTML and XML control files.
    I also heard a while ago about someone building an open source DocBook to Oracle Help converter.
    I'm not aware of any customers using ArborText to generate Oracle Help systems, but that doesn't mean they don't exist. Certainly the idea of storing the documentation in XML format and then generating the help system from that has merit.
    Jeffrey Stephenson
    Oracle Help Technologies

  • Java and xml option necessary?

    Hi,
    first when i build the repository database, i choose java and xml option, is this necessary or i waste my time.
    When i read Building a Help Desk Connector, i'm not sure, do i need the Diagnostic Pack.
    Best regards
    Thomas
    (Narri, Narro)

    This is the defacto site for xpath stuff for java
    http://xml.apache.org/xalan-j/

  • Java and XML Doc

    I am new to Java and XML, I want to know the steps i should follow to work with XML document using XPATH. also the APIs and Technologies i shoud work. If possible guide me any examples or tutorials for that.

    This is the defacto site for xpath stuff for java
    http://xml.apache.org/xalan-j/

  • What's the best XML for JAVA?

    Hi There,
    My big question is what should I use for develop a normal XML document, that can:
    - contain BASE64 strings
    - support UTF-8 add attributes, etc.
    I then want to pick this document and:
    - do it's parsing (walk trough)
    - apply a xsl to this document.
    I've made this in C using libxml2 for WIN32/HP-UX, and also in VB using msxml4, now I must make the same document in Java, I see a lot of alternatives but really don't know what to choose...
    In these languages I pick a structure that we support (similar to a tree) and serialize it to XML, send it as a string and then rebuild the initial structure with flaws. Each client can have a xsl file to show the information in the way he wants to.
    So, I ask your opinion what's the best for JAVA (a fast learning curve is preferable, but speed of processing is very, very important)?
    Thanks in advance for all the replies,
    Lu�s Pinho

    Have you looked at Apache's XML Beans?
    http://xml.apache.org/xmlbeans/

  • ANN: XML Parser for Java v2.0.2.6

    The v2.0.2.6 of the XML Parser for Java is now available for download. The following features and bug fixes are included:
    Changes:
    Conformance to the XSLT/XPATH October REC.
    New API in XSLStylesheet class:
    removeParam(String param)
    resetParams()
    Bug fixes:
    Bug #1111423: OutOfMemory exception, if multiple calls made to document()
    Bug #1101028: Unexpected character error in DTD parsing document using Docbook DTD
    Bug #1101021: #default not supported in exclude-result-prefixes
    Bug #1099830: Extra characters inserted into output using the XML Parser
    Bug #1099663: HTML output does not allow only doctype-public to be specified
    Bug #1099536: HTML output does not disable escaping for script, style unless lowercase
    Bug #1098738: ArrayOutOfBoundsException xsl:if test="not(@a)'"
    Bug #1095047: XSLProcessor NPE'S on named templates with non-empty namespaces
    Bug #1094971: XSLStylesheet needs methods for removing parameters
    Bug #1092351: Using valueof() shuffles order of elements in my source document
    Bug #1086663: xsl:sort data-type attribute can now be a namespace-prefixed name
    Bug #1086661: xsl:version attribute now required on literal result element
    Bug #1064692: Default xml-serialization should use empty-element syntax
    Bug #1064689: Current() function doesn't work correctly
    This is the sixth production patch release for v2.
    Oracle XML Team http://technet.oracle.com
    Oracle Technology Network
    null

    The link has been fixed. You will go to the v2 download page
    now. Sorry for the inconvience.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Renilton Oliveira (guest) wrote:
    : I didn't find the file for version 2.0.0.0 as well.
    : Renilton
    : Andrei Filimonov (guest) wrote:
    : : I tried to download XML Parser for Java v2 it seems that
    only
    : v
    : : 1.0.1.4 is available. Could you please give an exact URL for
    : v2
    : : download?
    : : Andrei Filimonov
    : : Oracle XML Team wrote:
    : : : The Oracle XML v2 parser is now available for download
    here
    : as
    : : : an early beta release and is written in Java. It features
    : an
    : : : improved architecture over the Oracle XML v1 parser and
    has
    : : : shown better performance on small to large XML documents.
    : It
    : : : will also be able to format the XML document according to
    a
    : : : stylesheet, having integrated an XSLT processor.
    : : : Version 2 of the XML Parser for Java, besides
    incorporating
    : an
    : : : XSLT processor, has been re-architected from version 1.
    This
    : : has
    : : : resulted in a number of changes to the class names
    : especially
    : : : those that support Namespaces. See v2changes.txt and
    : the .diff
    : : : difference files in the sample directory.
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    null

  • XML Schema for Java Bugs

    I've just downloaded your XML Schema for Java software are have been systematically testing it with a relatively simple document. A few bugs:
    1. the use="required" attribute of the attribute element doesn't have any effect (doesn't show any error message or throw any exceptions) when the required attribute is omitted.
    2. If I declare an element like:
    <element name="age">
    <simpleType>
    <restriction base="positiveInteger">
    <maxInclusive value="100"/>
    </restriction>
    </simpleType>
    </element>
    Then, if I modify my xml document instance to say:
    <age pointless="true">26</age>
    This will throw a non-parser exception with a message of null, instead of saying "Attribute 'pointless' not expected", as it does if I redefine the schema declaration as:
    <element name="age">
    <complexType>
    <simpleContent>
    <extension base="my:ageType"/>
    </simpleContent>
    </complexType>
    </element>
    Will Allan
    null

    I'm glad someone else has noticed that unique keyref and key don't seem to be working with the Dom Parser. If they don't work WHY ARE THEY (key, keyref, unique) IN THE EXAMPLE'S THAT ARE DOWNLOADED WITH THE SCHEMA PARSER. In report.xsd, a file downloaded with the example, it makes clear usage of unique, key, and key ref. But if you violate the schema definitions in the corresponding file report.xml the parser doesn't complain whatsoever. The only time it barfs is if you change the keyref refer attribute to something other than "pNumKey". It obviously has to work. No bone head would send example files along with their product that didn't work.
    So, if anyone at ORACLE or elsewhere has figured out how to use unique, key, or keyref please respond with an explination of how to correctly use them with the parser. Your name will be blessed throughout the ages as a most kind and venerable person. You will be a hallmark, a standard, a shining light for all future generations of what a human being should be! Okay maybe I'm going a little overboard but I'm DESPERATE. With no books or collateral on how this stupid thing works all I can do is hack.
    -Thanks

  • ANN: XML Class Generator for Java Available

    The Oracle XMCL Class Generator for Java is now available as an
    initial beta release on the Oracle Technology Network at
    http://technet.oracle.com. Select 'xml' from the Technology menu.
    The XML Class Generator will generate a set of Java source files
    based on an input DTD. The generated Java source files can then
    be used to construct, optionally validate, and print a XML
    document that is compliant to the DTD specified. This is an early
    beta release and has the following features:
    * Creates Java Classes from DTDs to enable the programmatic
    construction of XML documents.
    * Supports validation mode to assist debugging.
    * Works with the Oracle XML Parser in Java.
    * Creates documents conforming to the W3C XML 1.0
    Recommendation.
    * Supports creating documents in the following encodings:
    UTF-8
    UTF-16
    ISO-10646-UCS-2
    ISO-10646-UCS-4
    US-ASCII
    EBCDIC-CP-US
    ISO-8859-1
    Shift_SJIS
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    Thanks,
    Rob
    Oracle XML Team wrote:
    : First, the link has been fixed. As to your access exception,
    we
    : have traced it to a difference between JDK 1.1.x and JDK 1.2.
    : You can solve it by using a 1.1.x version of the JDK or wait
    till
    : our production version of our XML Parser becomes available
    within
    : a week which will work with 1.2.
    : Oracle XML Team
    : http://technet.oracle.com
    : Rob Edagr (guest) wrote:
    : : 1) The HREF on the download page for the NT version points
    to
    : : the version 102 parser not the classgen.
    : : 2) After downloading and installing the classgen (by
    guessing
    : : what the url was) I ran it and get the following
    : : C:\jdk1.2\xml\ora\classgen\sample>java SampleMain -root
    : : wddxPacket wddx_0090.dtd
    : : Exception in thread "main" java.lang.IllegalAccessError: try
    to
    : : access class oracle/xml/parser/XMLNode from class
    : : oracle/xml/classgen/ClassGenerator
    : : at oracle.xml.classgen.ClassGenerator.generate
    (Compiled
    : : Code)
    : : at SampleMain.main(SampleMain.java:65)
    : : Any idea on what the problem is (same error with sample dtd)
    : : Rob
    : : Oracle XML Team wrote:
    : : : The Oracle XMCL Class Generator for Java is now available
    as
    : : an
    : : : initial beta release on the Oracle Technology Network at
    : : : http://technet.oracle.com. Select 'xml' from the
    Technology
    : : menu.
    : : : The XML Class Generator will generate a set of Java source
    : : files
    : : : based on an input DTD. The generated Java source files can
    : : then
    : : : be used to construct, optionally validate, and print a XML
    : : : document that is compliant to the DTD specified. This is
    an
    : : early
    : : : beta release and has the following features:
    : : : * Creates Java Classes from DTDs to enable the
    programmatic
    : : : construction of XML documents.
    : : : * Supports validation mode to assist debugging.
    : : : * Works with the Oracle XML Parser in Java.
    : : : * Creates documents conforming to the W3C XML 1.0
    : : : Recommendation.
    : : : * Supports creating documents in the following
    encodings:
    : : : UTF-8
    : : : UTF-16
    : : : ISO-10646-UCS-2
    : : : ISO-10646-UCS-4
    : : : US-ASCII
    : : : EBCDIC-CP-US
    : : : ISO-8859-1
    : : : Shift_SJIS
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    : Oracle Technology Network
    null

  • Where to download java jar file with org.apache.xml.serialize.OutputFormat?

    Dear Friends,
    I try one program, it import org.apache.xml.serialize.OutputFormat;
    but I cannot fine it after I google a while.
    where can I find and download jar file that contain this:
    org.apache.xml.serialize.OutputFormat
    I use JDK1.6
    Thanks
    sunny

    So, to clear things up, there is no org.apache.xml.serialize.OutputFormat.JAR
    OutputFormat is a class.
    As I said in my previous post if you go at the xerces project home page (here) you will find a compiled version of xerces [here - direct link -> (fool proof)|http://archive.apache.org/dist/xml/xerces-j/Xerces-J-bin.1.4.4.zip]. If you extract the archive you will find a compiled jar called xerces.jar. Open that one with winrar/winzip or whatever, browse to org\apache\xml\serialize\OutputFormat.class and there you go, you have it, just link this xerces library to your project...
    PS. Try searching on Google for "Google tutorial"

  • ANN: Oracle XML Parser for Java v2.0.0.1

    A new maintenance release of the Oracle Parser for Java is
    available for download. It has the following fixes and changes:
    Bug fixes for #920536, i.e. Cannot access element attributes via
    XSLT; #898423. i.e. ElementDecl's in DTDs; #774774, i.e. DOM
    extensions using XSL pattern matching; #863890 i.e. SAX
    IOException not thrown.
    New APIs in the following new interface:
    1. oracle.xml.parser.v2.NSResolver
    - resolveNamespacePrefix( find the namespace definition in scope
    for a given namespace prefix )
    New APIs in the following classes:
    1. oracle.xml.parser.v2.XMLNode
    - selectNodes( Selects nodes from the tree which match the given
    pattern; client can provide an NSResolver implementation to
    resolve namespace prefixes in the pattern ).
    2. oracle.xml.parser.v2.ElementDecl
    - getParseTree( Returns the root Node of Content Model parse
    tree, which could then be traversed node by node using
    getFirstChild() and getLastChild(). The Node types are: PLUS,
    COMMA, ASTERISK, ELEMENT, QMARK ).
    This is the first beta patch release for v2.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    unzip -l appsborg2.zip | grep 9.0.4
    0 04-18-03 20:10 .xdkjava_version_9.0.4.0.0_production
    do i still need to do that step?No, you do not have to since "XML Parser for Java v9.0.4" is already installed as part of appsborg2.zip

  • ORACLE XML PARSER FOR JAVA FOR AIX

    Hi people!
    I'm looking for the Oracle XML Parser for Java 9.0.2.0.0C, my 9iAS is BI Installation 9.0.2.3, where can I get it? In the Downloads Section there is only the version for 10g, and the existing versions for 9i are not for AIX (my OS is AIX 5.2L).
    Thanks.

    Thanks for your help, I navigate through this link and, even it shows a table where appears the release for AIX (9.2.0.6.0), when I get to http://www.oracle.com/technology/tech/xml/xdk/software/prod/utilsoft_java.htm
    it shows me only downloads for Sun, Linux and HP-UX, but not for AIX.
    Has the version for AIX being deprecated or something like that?

  • Creating a custom java module for excel to xml conversion.

    Hi Gurus,
    I am creating a custom java module in sap nwds 7.3 for Excel to XML Conversion. But I am getting following error
    Classpath dependency validator message.
    Classpath entry  will not be exported or published. Runtime ClassNotFoundExceptions may result. 
    I imported the Jars from a different PI system and i am using NWDS in local PC with creating a separate folder with all JARs and also imported them using build path option.
    This issue is occuring for all the jars imported.
    I am using following code.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import java.util.HashMap;
    import jxl.Cell;
    import jxl.Workbook;
    public class JavaMappingExcelToXML implements StreamTransformation{
    private Map map = null;
    private AbstractTrace trace = null;
    public void setParameter(Map arg0) {
    map = arg0; // Store reference to the mapping parameters
    if (map == null) {
    this.map = new HashMap();
    public static void main(String args[]) { //FOR EXTERNAL STANDALONE TESTING
    try {
    FileInputStream fin = new FileInputStream ("c:/ashu.xls"); //INPUT FILE (PAYLOAD)
    FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML2.xml"); //OUTPUT FILE (PAYLOAD)
    JavaMappingXLStoXML mapping = new JavaMappingXLStoXML ();
    mapping.execute(fin, fout);
    catch (Exception e1) {
    e1.printStackTrace();
    public void execute(InputStream inputstream, OutputStream outputstream) {
    String msgType = "Message Type name will come here";
    String nameSpace = "Namespace Name will come here";
    String xmldata = "";
    try {
    Workbook wb = Workbook.getWorkbook(inputstream);
    xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+ "<ns0:"+msgType+" "+"xmlns:ns0=\""+nameSpace+"\n">";
    Cell[] cells ;
    Cell[] cellNames ;
    cellNames = wb.getSheet(0).getRow(0);
    for(int j=1;j<wb.getSheet(0).getRows();j++){
    xmldata = xmldata+"\n<Record>\n";
    cells = wb.getSheet(0).getRow(j);
    for(int i=0;i<wb.getSheet(0).getColumns();i++){
    xmldata = xmldata+"\t<"+cellNames[i].getContents()+">"+cells[i].getContents()+"</"+cellNames[i].getContents()+">\n";
    xmldata = xmldata+"</Record>";
    xmldata = xmldata+"\n</ns0:"+msgType+">";
    System.out.print(xmldata);
    xmldata.getBytes();
    wb.close();
    byte by[] = xmldata.getBytes();
    outputstream.write(by);
    inputstream.close();
    outputstream.close();
    System.out.println("\n"+"File processed");
    catch (Exception e) {
    e.printStackTrace();
    Request you to guide how to resolve this issue.
    Thanks  in advance

    Hi Gurus,
    I am creating a custom java module in sap nwds 7.3 for Excel to XML Conversion. But I am getting following error
    Classpath dependency validator message.
    Classpath entry  will not be exported or published. Runtime ClassNotFoundExceptions may result. 
    I imported the Jars from a different PI system and i am using NWDS in local PC with creating a separate folder with all JARs and also imported them using build path option.
    This issue is occuring for all the jars imported.
    I am using following code.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import java.util.HashMap;
    import jxl.Cell;
    import jxl.Workbook;
    public class JavaMappingExcelToXML implements StreamTransformation{
    private Map map = null;
    private AbstractTrace trace = null;
    public void setParameter(Map arg0) {
    map = arg0; // Store reference to the mapping parameters
    if (map == null) {
    this.map = new HashMap();
    public static void main(String args[]) { //FOR EXTERNAL STANDALONE TESTING
    try {
    FileInputStream fin = new FileInputStream ("c:/ashu.xls"); //INPUT FILE (PAYLOAD)
    FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML2.xml"); //OUTPUT FILE (PAYLOAD)
    JavaMappingXLStoXML mapping = new JavaMappingXLStoXML ();
    mapping.execute(fin, fout);
    catch (Exception e1) {
    e1.printStackTrace();
    public void execute(InputStream inputstream, OutputStream outputstream) {
    String msgType = "Message Type name will come here";
    String nameSpace = "Namespace Name will come here";
    String xmldata = "";
    try {
    Workbook wb = Workbook.getWorkbook(inputstream);
    xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+ "<ns0:"+msgType+" "+"xmlns:ns0=\""+nameSpace+"\n">";
    Cell[] cells ;
    Cell[] cellNames ;
    cellNames = wb.getSheet(0).getRow(0);
    for(int j=1;j<wb.getSheet(0).getRows();j++){
    xmldata = xmldata+"\n<Record>\n";
    cells = wb.getSheet(0).getRow(j);
    for(int i=0;i<wb.getSheet(0).getColumns();i++){
    xmldata = xmldata+"\t<"+cellNames[i].getContents()+">"+cells[i].getContents()+"</"+cellNames[i].getContents()+">\n";
    xmldata = xmldata+"</Record>";
    xmldata = xmldata+"\n</ns0:"+msgType+">";
    System.out.print(xmldata);
    xmldata.getBytes();
    wb.close();
    byte by[] = xmldata.getBytes();
    outputstream.write(by);
    inputstream.close();
    outputstream.close();
    System.out.println("\n"+"File processed");
    catch (Exception e) {
    e.printStackTrace();
    Request you to guide how to resolve this issue.
    Thanks  in advance

Maybe you are looking for

  • About proxy communcation in XI

    Where we develop inbound proxy and Outbound Proxy ,where proxys will exist? How proxys will be executed? what is the target URL of inbound proxy and Outbound proxy? How data is moved from source system to target system , as we dont,t have any communi

  • Configuring Airport Express to enable ether port while connected to Extreme

    I have an AE (Express) & APE (Extreme). Right now I have them joined, and I can listen to music through my home receiver via optical from the AE. Tonight I thought I would try to use the Ethernet port on the AE and I'm not having any luck. My PS3 wil

  • Is it possible to see what time a message was opened?

    We are running GW2012 and have a querie from a user asking if we can get a timestamp on when a message was opened? for example I receive a mail message from an external person into my mailbox and I open it. Is there a record of when I opened it that

  • Java enabled screen for IT0581,IT0584,IT0585 & IT0586 as Payroll services

    Can we have java-web dynpro enabled screen for IT0581,IT0584,IT0585 & IT0586 as a Payroll services for Indian client . If not , how can we add the ITS version for the same infotypes in ESS making it in change mode where employee's can update their am

  • Cd skipping after "burning cd" does burning a slow copy really prevent ...

    I know I asked this question before but I wanted to bring it up again just 2 double check. Cd skipping after "burning cd" does burning a slow copy really prevent your cd from skipping in lets just say "Denon" cd players? Recently we have burned some