Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Birt.war not getting imported in Eclipse
info_js
Hi all,<br />
<br />
I am new to eclipse and tomcat.. I am trying to deploy the example BIRT viewer application. I tried both the ways. I am using the latest BIRT 4.2.2 and Tomcat 7.0 versions.<br />
<br />
1) WebViewerExample<br />
I copied this entire folder onto my apache/webapps folder. I am not finding a way to list this application in the Project explorer..<br />
2) birt.war<br />
<br />
I thought of deploying the viewer by importing the war file. First I copied the file war file from BIRT runtime folder to apache/webapps folder. I clicked on File ->Import->Web->WAR File-> and I successfully choose the path to the WAR file. <br />
<br />
Then when I click on next, I get another window that says - "Select the web library jars from the list below to be imported as web library projects. Unselected web libraries will be imported as jars in the WEB-INF/lib directory." I didn't select any, I get this error message when I click on the Finish button.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>org.eclipse.core.commands.ExecutionException: Error importing Module File
at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactImportOperation.doExecute(J2EEArtifactImportOperation.java:89)
at org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentImportOperation.doExecute(WebComponentImportOperation.java:70)
at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactImportOperation.execute(J2EEArtifactImportOperation.java:57)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:385)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:410)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:360)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:247)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:219)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:207)
at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard$1CatchThrowableRunnableWithProgress.run(DataModelWizard.java:220)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.wst.common.frameworks.internal.enablement.nonui.WFTWrappedException: Error importing Module File
at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactImportOperation.importModuleFile(J2EEArtifactImportOperation.java:127)
at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactImportOperation.doExecute(J2EEArtifactImportOperation.java:87)
... 12 more
Caused by: java.lang.NullPointerException
at org.eclipse.jst.j2ee.internal.archive.ComponentArchiveSaveAdapter.<init>(ComponentArchiveSaveAdapter.java:73)
at org.eclipse.jst.j2ee.internal.archive.J2EEComponentArchiveSaveAdapter.<init>(J2EEComponentArchiveSaveAdapter.java:43)
at org.eclipse.jst.j2ee.internal.archive.WebComponentArchiveSaveAdapter.<init>(WebComponentArchiveSaveAdapter.java:35)
at org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentImportOperation.getArchiveSaveAdapter(WebComponentImportOperation.java:130)
at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactImportOperation.importModuleFile(J2EEArtifactImportOperation.java:120)
... 13 more
</pre>
<br />
I am basically unable to deploy the webviewer example application. What am I doing wrong? I installed tomcat and made it work with eclipse. I downloaded some test app and I am using eclipse and tomcat and the test app works fine. do I have to set any environment variable for BIRT? I simply want to deploy the viewer and run the test rptdesign files<br />
<br />
Could you please help me?..Thanks.<br />
<br />
J
Find more posts tagged with
Comments
mwilliams
<p>Sorry for the delay. Did you try just renaming the WebViewerExample folder to "birt" and place it in your webapps folder? Then use localhost:8080/birt to access it?</p>
Jordan Ben
<p>Hi..
I'm just renaming the WebViewerExample folder to "birt" and place it in your webapps folder.
And it works and run for sample report which is included.
But how about the plugins for putting jdbc drivers ?
I can't found it on birt_runtime_4.2.2.
Where we can put it on ?
could you help me please ?
</p>
mwilliams
<p>The driver jars simply need to go in the classpath / build path as long as you're using the POJO runtime (main runtime download).</p>
Jordan Ben
<p>Hi mwilliams,
I have successfully view my reports by using birt runtime 4.2.2 in deployed tomcat.
I just put jdbc driver .jar file into folder libs. Like you said it simply.
Everything runs well and the data can retrived from database.
Thank you mwilliams..
</p>
mwilliams
<p>Great! Glad it's working. I put a better explanation in your other post, but it seems that you no longer need it!
Let us know whenever you have questions.</p>
Jordan Ben
<p>Thank you mwilliams,<br />
<br />
I have read your other answer, great ! Thank you for replay me.<br />
<br />
Previously, I have integrated birt and PHP script. My reports called from PHP code. I found out that there are two ways to consume the php code - one via Birt Viewer, other directly via JavaBridge. Via Birt Viewer I consume the report via http, and the result is the report and the options to print, export... as usual birt viewer can do, however I must be aware of security concerns since I will have to be able to access the URL of the report from the web. Via Javabridge, I access the file directly (not via http), so what is rendered is simple HTML and I can make other functions in PHP code for exporting the reports into some formats such .pdf, .doc, and .xls. And it works.<br />
Before, I used this <a data-ipb='nomediaparse' href='
http://ncu.dl.sourceforge.net/project/php-java-bridge/Binary package/php-java-bridge_6.2.1/php-java-bridge_6.2.1_documentation.zip'>[color=#0000cd;]php-java-bridge_6.2.1_documentation[/color]</a>
. I put the <strong>JavaBridge.war</strong> on ..tomcat/webapps/.<br />
Birt engine in JavaBridge.war was not the latest version of birt. Latest, my reports designed on birt 4.2.2, and when I trying to export the report via JavaBridge the problem occurs. The problem is the same as problem before, about birt version.<br />
Can we upgrade birt engine version on JavaBridge to the latest version ?<br />
<br />
Could you help me please mwilliams ?<br />
<br />
Thank you.<br />
<br />
<br />
</p>
mwilliams
<p>What version of Java are you using? Have you tried with the OSGi runtime? Possibly there are some conflicts within the POJO runtime that are causing issues. This would have been a change if you were using a version prior to 3.7 before.</p>
Jordan Ben
<p>Version of Java that I used is Java JRE 1.7.0_25, before I have successfully rendered the reports by using my simple web application (built with PHP). I change the version of my reports which designed in eclipse Juno <span><span>appropriate with the birt version</span></span> in JavaBridge.</p><pre class="_prettyXprint _lang-xml">"<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1"> <property name="createdBy">Eclipse BIRT Designer Version 4.2.2.v201301221637 Build <4.2.2.v20130206-1509></property>"</pre><p>And it works for some reports, but for other reports which contain some different report items is not work. Later I try to view the report by using birt runtime 4.2.2 (it was the same version with birt designer that I used in eclipse Juno) deployed in tomcat, and there is no problem. It works.
So I think the problems occurs because version of birt engine in JavaBridge not support.</p>
mwilliams
<p>I thought before you were saying that you had successfully used an older version of BIRT. Maybe I am misreading. If you've used an older version of BIRT with the phpJavaBridge and it worked, could you try the OSGi version of 4.2.2's runtime? If I'm misunderstanding your post above and you've not successfully used an older version, could you set up a simple app that I can run where I can see your issue so I can do some testing?</p><p> </p><p>Also, do you get any type of error when the reports fail?</p>
Jordan Ben
<p>Hi mwilliams.<br />
<br />
Thank you for your reply.<br />
<br />
My problems with JavaBridge have solved. These the steps :</p><ul class='bbcol decimal'><li>Enter into JavaBridge directory : <strong>JavaBridge/WEB-INF</strong> </li><li>Delete directory <strong>platform</strong> </li><li>Enter into folder <strong>lib</strong> and delete all files except :<br />
<strong>birtEngine.jar, JavaBridge.jar, lucene.jar, php-script.jar, php-servlet.jar, script-api.jar</strong> </li><li>Copy all files from newest version of Birt Runtime (In this case I use BIRT Runtime 4.2.2) => "<strong>birtruntime/WEB-INF/lib</strong>" into <strong>webapps/JavaBridge/WEB-INF/lib</strong> </li><li>And I put <strong>Postgresql.jar</strong> into <strong>/JavaBridge/WEB-INF/lib </strong>because I need JDBC driver for retrieving data. </li><li>And the last restart the tomcat</li></ul><p>After do all these steps, birt version on JavaBridge will be updated to the newest version as same as birt runtime version.</p><p>Everything runs well after I do these steps.I thinks these steps can help and useful for anyone who have the same problems with me.<br />
<br />
<br />
Thank you mwilliams.</p>
mwilliams
<p>Great! Thanks for the update!
</p>