Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
Generating a report within an EJB.
Migrateduser
<p>I have an EJB module which generates Birt Reports. The module contains the code to invoke the Report Engine and a couple of folders for the .rptdesign end resource files.</p>
<p> </p>
<p>Everything works fine when the module is deployed exploded, but when it is deployed as a jar (which is the most common case) I have a problem in providing the resource path to the engine.</p>
<p>I use the following code:</p>
<p><span style="font-family:'courier new', courier, monospace;">URL url = this.getClass.getResource("/" + BIRT_LIBRARIES);</span></p>
<div><span style="font-family:'courier new', courier, monospace;">config.setResourcePath(url.getPath());</span></div>
<div>The path that I get (something like C:/Oracle/Middleware/user_projects/.../.../.../.../BirtEJB.jar!/reports/libraries) doesn't make any sense to the engine, and I get the error "Resource not accessible" (of course).</div>
<div> </div>
<div>Is there any way to access a resource folder when this is embedded in a jar?</div>
<div> </div>
<div> </div>
<div>Any help is appreciated.</div>
<div>Regards,</div>
<div>Livio</div>
Find more posts tagged with
Comments
There are no comments yet