I've seen this error when I don't have the right xmlbeans jars on my
classpath. I usually add xbean.jar, etc. Are these jar on your
applications path?
-Jacob Danner

On 4/22/07, Jacob Danner <[EMAIL PROTECTED]> wrote:




Forwarding to the xmlbeans-user list.





 ________________________________


From: tuan nguyen [mailto:[EMAIL PROTECTED]
 Sent: Saturday, April 21, 2007 3:03 PM
 To: [EMAIL PROTECTED]
 Subject: java.lang.ExceptionInInitializerError




I am trying to use XMLBeans version 2.2.0 to generate xml files from an
application system that running on oracle database.


I was able to generate the xml files using a standalone program with (public
static void main(String[] args)) class. However, when I try to implement my
(xmltypes.jar) that scomp from a XSD file in my application package below, I
receive a java.lang.ExceptionInInitializerError. I was able
to succesfully compile my program inside my package, so I would think that I
am not missing any .jar files or CLASSPATH configuration.


My guess is that I am having a problem with calling the object
(actualAnalysis.olefins.lyo.AnalysisReportDocument$Factory).


I'll appreciate If anyone have any suggestions or comments about this issue.





Thank you,








package sapphire.custom.itscb;





import java.io.*;
 import java.util.*;
 import java.sql.*;
 import java.lang.*;
 import java.text.*;
 import java.util.Calendar;
 import sapphire.accessor.*;
 import actualAnalysis.olefins.lyo.AnalysisReportDocument;
 import
actualAnalysis.olefins.lyo.AnalysisReportDocument.AnalysisReport;
 import
actualAnalysis.olefins.lyo.AnalysisReportDocument.AnalysisReport.AnalysisResults.AnalysisResult;


private void genData(String sdcid, String keyid1) {
         StringBuffer sqlResult = new StringBuffer(2048);
         try {
               ....


                   << Query dataset >>


              ....


              strFileName.append("C:/Lyon/output/");
               strFileName.append(keyid1);
               strFileName.append(".xml");
               System.out.println("Output file is: " + strFileName);

               File fo = new File(strFileName.toString());

               XmlOptions opts = new XmlOptions();
               opts.setSavePrettyPrintIndent(3);
               opts.setSavePrettyPrint();


              FileOutputStream fos = new FileOutputStream(fo);

               // populated report header from queryData sub-routine
               System.out.println("New Report creation: ");
               AnalysisReportDocument newReport =
AnalysisReportDocument.Factory.newInstance();
               System.out.println("New Header creation: ");

AnalysisReportDocument.AnalysisReport.ReportHeader
newHeader = newReport.addNewAnalysisReport().addNewReportHeader();





<< Error below throw after this line, trying to create a new empty xml doc
>>


Output file is: C:/Lyon/output/HO-2006-1007805-008.xml
 Apr 08 13:14:28 2007: SPID: 37 New Report creation:
 Apr 08 13:14:29 2007: SPID: 37
java.lang.ExceptionInInitializerError
 Apr 08 13:14:29 2007: SPID: 37  at
actualAnalysis.olefins.lyo.AnalysisReportDocument$Factory.newInstance(Unknown
Source)


...













 Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated entities,
that may be confidential, proprietary, copyrighted and/or legally
privileged, and is intended solely for the use of the individual or entity
named in this message. If you are not the intended recipient, and have
received this message in error, please immediately return this by email and
then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to