Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » NoClassDefFoundError for IBM's SimpleDataFormat when integrating(Integrating with existing Java web application including only BIRT runtime API)
NoClassDefFoundError for IBM's SimpleDataFormat when integrating [message #523407] Fri, 26 March 2010 10:43 Go to next message
Ed is currently offline EdFriend
Messages: 13
Registered: March 2010
Junior Member
Hi,

I am attempting to integrate the reporting engine into my existing web application (currently deployed on Tomcat 5.5.).

My project is a maven project and as far as I understand BIRT is still not 'mavenised'...so I followed the instructions on another post in this forum and manually added to our repository the following artifacts:


  • core-api (jar)
  • engine-api (jar)
  • model-api (jar)
  • Report Engine (directory zipped up and extracted when added to my WEB-INF dir)


The BIRT versions I have tried with each of these artifacts are 2.5.1 and 2.5.2.

I added some code (that depended on the first 3 artifact's to compile) to my project that started up the platform, instantiated the IReportEngine and then attempted to call IReportEngine.openReportDesign(String rptDesign).

The platform is told that the ReportEngine directory is in the WEB-INF directory and starts up successfully. Then the report engine object is also successfully initialised. All the jar artifacts are correctly placed in the WEB-INF/lib directory.

The exception (below) is thrown on the line calling openReportDesign()...I have found this bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=299718
Is it exactly the same? Is there anyway of getting this to work?

Attempting to follow the work around mentioned in the bug report didn't help...things I tried:


  • Deleting anything, except config.ini, in the config directory (in ReportEngine) whenever I restarted the webapp.
  • Deleting com.ibm.icu_4.0.1.v20090822.jar from the lib directory and on a separate attempt, from the plugins directory
  • Ensuring the com.ibm.icu_4.0.1.v20090822.jar was identical in both directories, i.e. copying jar from lib directory and overwritting one in plugins directory
  • Deleting the org.eclipse.birt.api jar from the plugins directory (failed to then instantiate the IReportEngine object)
  • Modifying the manifest file of the org.eclipse.birt.api jar numerous times - deleted any IBM jar listed in the export packages, removed just the IBM text jar, ...

Any ideas?

The exception:

java.lang.NoClassDefFoundError: com/ibm/icu/text/SimpleDateFormat
	at org.eclipse.birt.report.model.metadata.DateTimePropertyType.<clinit>(DateTimePropertyType.java:62)
	at org.eclipse.birt.report.model.metadata.MetaDataDictionary.<init>(MetaDataDictionary.java:237)
	at org.eclipse.birt.report.model.metadata.MetaDataDictionary.<clinit>(MetaDataDictionary.java:111)
	at org.eclipse.birt.report.model.api.impl.DesignEngineImpl.newSessionHandle(DesignEngineImpl.java:143)
	at org.eclipse.birt.report.model.api.DesignEngine.newSessionHandle(DesignEngine.java:108)
	at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:143)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.getReportDesignHandle(ReportEngineHelper.java:254)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:273)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:195)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:129)
	at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:294)
	at com.test.reporting.servlet.TestReportServlet.doGet(TestReportServlet.java:58)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
...


Thanks in advance.
Re: NoClassDefFoundError for IBM's SimpleDataFormat when integrating [message #523716 is a reply to message #523407] Sun, 28 March 2010 19:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Ed,

I worked with Shaun on this issue in the bug you referred to. Can you
download the all in one and replace icu plugin in your runtime with the
one that is in the all in one?

Jason

Ed Slocombe wrote:
> Hi,
>
> I am attempting to integrate the reporting engine into my existing web
> application (currently deployed on Tomcat 5.5.).
>
> My project is a maven project and as far as I understand BIRT is still
> not 'mavenised'...so I followed the instructions on another post in this
> forum and manually added to our repository the following artifacts:
>
>
> core-api (jar)
> engine-api (jar)
> model-api (jar)
> Report Engine (directory zipped up and extracted when added to my
> WEB-INF dir)
>
>
> The BIRT versions I have tried with each of these artifacts are 2.5.1
> and 2.5.2.
>
> I added some code (that depended on the first 3 artifact's to compile)
> to my project that started up the platform, instantiated the
> IReportEngine and then attempted to call
> IReportEngine.openReportDesign(String rptDesign).
>
> The platform is told that the ReportEngine directory is in the WEB-INF
> directory and starts up successfully. Then the report engine object is
> also successfully initialised. All the jar artifacts are correctly
> placed in the WEB-INF/lib directory.
>
> The exception (below) is thrown on the line calling
> openReportDesign()...I have found this bug report:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=299718
> Is it exactly the same? Is there anyway of getting this to work?
>
> Attempting to follow the work around mentioned in the bug report didn't
> help...things I tried:
>
>
> Deleting anything, except config.ini, in the config directory (in
> ReportEngine) whenever I restarted the webapp.
> Deleting com.ibm.icu_4.0.1.v20090822.jar from the lib directory and on
> a separate attempt, from the plugins directory
> Ensuring the com.ibm.icu_4.0.1.v20090822.jar was identical in both
> directories, i.e. copying jar from lib directory and overwritting one in
> plugins directory
> Deleting the org.eclipse.birt.api jar from the plugins directory (failed
> to then instantiate the IReportEngine object)
> Modifying the manifest file of the org.eclipse.birt.api jar numerous
> times - deleted any IBM jar listed in the export packages, removed just
> the IBM text jar, ...
>
> Any ideas?
>
> The exception:
>
>
> java.lang.NoClassDefFoundError: com/ibm/icu/text/SimpleDateFormat
> at
> org.eclipse.birt.report.model.metadata.DateTimePropertyType. <clinit>(DateTimePropertyType.java:62)
>
> at
> org.eclipse.birt.report.model.metadata.MetaDataDictionary.<init >(MetaDataDictionary.java:237)
>
> at
> org.eclipse.birt.report.model.metadata.MetaDataDictionary.<clinit >(MetaDataDictionary.java:111)
>
> at
> org.eclipse.birt.report.model.api.impl.DesignEngineImpl.newS essionHandle(DesignEngineImpl.java:143)
>
> at
> org.eclipse.birt.report.model.api.DesignEngine.newSessionHan dle(DesignEngine.java:108)
>
> at
> org.eclipse.birt.report.engine.parser.ReportParser.getDesign Handle(ReportParser.java:143)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.g etReportDesignHandle(ReportEngineHelper.java:254)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:273)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:195)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:129)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngine.openRep ortDesign(ReportEngine.java:294)
>
> at
> com.test.reporting.servlet.TestReportServlet.doGet(TestRepor tServlet.java:58)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:269)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:188)
>
> ..
>
>
> Thanks in advance.
Re: NoClassDefFoundError for IBM's SimpleDataFormat when integrating [message #523756 is a reply to message #523716] Mon, 29 March 2010 08:28 Go to previous messageGo to next message
Ed is currently offline EdFriend
Messages: 13
Registered: March 2010
Junior Member
Thanks for your response...and have managed to get a little further.

However, I now get a new exception:

2010-03-29 08:53:30,138 [Logger] SEVERE Exception passed to error.jsp:  java.lang.NoClassDefFoundError
	at org.eclipse.birt.report.model.api.impl.DesignEngineImpl.newSessionHandle(DesignEngineImpl.java:143)
	at org.eclipse.birt.report.model.api.DesignEngine.newSessionHandle(DesignEngine.java:108)
	at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:143)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.getReportDesignHandle(ReportEngineHelper.java:254)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:273)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:195)
	at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:129)
	at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:294)
	at com.test.reporting.servlet.TestReportServlet.doGet(TestReportServlet.java:57)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
...


I have been attempting to find out what the missing class is, and having viewed the src here I am thinking it is not finding MetaDataDictionary...any thoughts or ideas?

Thanks.
Re: NoClassDefFoundError for IBM's SimpleDataFormat when integrating [message #523948 is a reply to message #523756] Tue, 30 March 2010 00:30 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Ed,

Can you email me the list of plugins you are using and what jars are in
the web-inf/lib?

jasonweathersby at windstream dot net.

Jason

Ed wrote:
> Thanks for your response...and have managed to get a little further.
>
> However, I now get a new exception:
>
>
> 2010-03-29 08:53:30,138 [Logger] SEVERE Exception passed to error.jsp:
> java.lang.NoClassDefFoundError
> at
> org.eclipse.birt.report.model.api.impl.DesignEngineImpl.newS essionHandle(DesignEngineImpl.java:143)
>
> at
> org.eclipse.birt.report.model.api.DesignEngine.newSessionHan dle(DesignEngine.java:108)
>
> at
> org.eclipse.birt.report.engine.parser.ReportParser.getDesign Handle(ReportParser.java:143)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.g etReportDesignHandle(ReportEngineHelper.java:254)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:273)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:195)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:129)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngine.openRep ortDesign(ReportEngine.java:294)
>
> at
> com.test.reporting.servlet.TestReportServlet.doGet(TestRepor tServlet.java:57)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> ..
>
>
> I have been attempting to find out what the missing class is, and having
> viewed the src
> http://dev.eclipse.org/viewcvs/index.cgi/source/org.eclipse. birt.report.model/src/org/eclipse/birt/report/model/api/impl /DesignEngineImpl.java?revision=1.10&root=BIRT_Project&a mp;view=markup
> I am thinking it is not finding MetaDataDictionary...any thoughts or ideas?
>
> Thanks.
Re: NoClassDefFoundError for IBM's SimpleDataFormat when integrating [message #525304 is a reply to message #523948] Tue, 06 April 2010 03:34 Go to previous messageGo to next message
Ed is currently offline EdFriend
Messages: 13
Registered: March 2010
Junior Member
Hi Jason,

Thanks for the help...yes my stupidity - I had not realised the contents of the ReportEngine's lib directory should be moved into my WEB-INF/lib directory. Done that now and it is almost all working!

Just got a small problem with images but will look into that.

Many thanks.
Re: NoClassDefFoundError for IBM's SimpleDataFormat when integrating [message #1738640 is a reply to message #523407] Thu, 21 July 2016 15:28 Go to previous message
ness info is currently offline ness infoFriend
Messages: 3
Registered: May 2016
Junior Member
Hi

I am attempting to integrate the reporting engine into my desktop application
i'am using eclipse Version: Mars.2 Release (4.5.2) , and i manually added to our repository the following artifacts:

core-api (jar)
engine-api (jar)
model-api (jar)


The BIRT versions I have tried with each of these artifacts are 4.5.0 . i did use
this code to integrate my repport to my application.
// code//
public static void main(String[] args) {
try {
System.out.println("Lancement du moteur de génération"); // Lancement du moteur de génération
EngineConfig config = new EngineConfig();
config.setBIRTHome("C://Program Files//birt-runtime-2_3_1//ReportEngine");
// config.setBIRTHome("C://Program Files//birt-runtime-2_1_1//ReportEngine");
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
IReportEngine engine = factory.createReportEngine(config);

System.out.println("Récupération du report (.rptdesign)");
// Chemin ou se trouve le report
String chemin = "C://Users//MH//workspace2//SID//new_report";
//String chemin2 = "C://Users//MH//workspace2//P//src//new_report_1";

// Récupération du rptDesign
IReportRunnable design = engine.openReportDesign(chemin+".rptdesign");
//IReportRunnable design = engine.openReportDesign(chemin+".rptdesign");

System.out.println("Exécution et génération du report en reporting document (.rptdocument)");
// Exécution
IRunTask runTask = engine.createRunTask(design);
runTask.run(chemin+".rptdocument");

System.out.println("Récupération du reporting document");
// Récupération du rptDocument
IReportDocument doc = engine.openReportDocument(chemin+".rptdocument");

System.out.println("Génération du fichier pdf ");
// Rendu
IRenderTask renderTask = engine.createRenderTask(doc);

IRenderOption option = new RenderOption();
option.setOutputFileName(chemin+".pdf"); // Nom du fichier de sortie
option.setOutputFormat("pdf"); // Format du fichier de sortie

renderTask.setRenderOption(option) ; // Chargement du fichier
//renderTask.render(); // Création du fichier
//renderTask.run();
//process = runtime.exec(new String[]{"open", chemin +".html"});
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
/* Fin de la préparation */

/* Création PDF */
//option.setOutputFileName("Chemin C"); //Nom du fichier de sortie
task.setRenderOption(option); //Chargement du fichier
/* Fin création PDF */
((IRunAndRenderTask) renderTask).run(); //Déclenchement de l'édition

}
catch(BirtException ex)
{
ex.printStackTrace();
}
}


but The exception (below) is thrown on the line IReportRunnable design = engine.openReportDesign(chemin+".rptdesign");
//Exception//
Lancement du moteur de génération
Récupération du report (.rptdesign)
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/icu/text/SimpleDateFormat
at org.eclipse.birt.report.model.metadata.DateTimePropertyType.<clinit>(DateTimePropertyType.java:63)
at org.eclipse.birt.report.model.metadata.MetaDataDictionary.<init>(MetaDataDictionary.java:258)
at org.eclipse.birt.report.model.metadata.MetaDataDictionary.<clinit>(MetaDataDictionary.java:122)
at org.eclipse.birt.report.model.api.impl.DesignEngineImpl.newSessionHandle(DesignEngineImpl.java:151)
at org.eclipse.birt.report.model.api.DesignEngine.newSessionHandle(DesignEngine.java:120)
at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:143)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:253)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:193)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:127)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:327)
at sid.main(sid.java:35)
Caused by: java.lang.ClassNotFoundException: com.ibm.icu.text.SimpleDateFormat
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 11 more


Is there anyway of getting this to work?

[Updated on: Thu, 21 July 2016 15:33]

Report message to a moderator

Previous Topic:Splitting and putting in boxes in BIRT
Next Topic:Birt 4.4.2 Excel image changed table column with
Goto Forum:
  


Current Time: Sat Apr 20 04:22:00 GMT 2024

Powered by FUDForum. Page generated in 0.03983 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top