Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
couldn't instantiate DesignEngine running Tomcat with security enabled
CBR
Hi,<br />
<br />
i m running Tomcat with security settings enabled which means that i use a catalina.policy to restrict permissions of my webapp. My webapp uses the design engine API to open and modify reports which are then generated to PDF using the Report Engine API.<br />
I simply added following line to my catalina.policy:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
grant codeBase "file:${catalina.base}/webapps/MyApp/-" {
permission java.security.AllPermission;
};
</pre>
<br />
After adding this line the report engine runs just fine and i can generate reports without any problems. But instantiating the design engine causes massive problems. At first it failed cause the design engine API would like to access C:\Documents and Settings\<MyUsername>\My Documents\eclipse\workspace (???). After giving my webapp appropriate rights to read and write this folder code below causes engine to be null.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
DesignConfig config = new DesignConfig( );
config.setBIRTHome(pathToBIRT)
Platform.startup( config );
IDesignEngineFactory factory = (IDesignEngineFactory) Platform
.createFactoryObject( IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY );
engine = factory.createDesignEngine( config );
</pre>
Find more posts tagged with
Comments
JasonW
Can you try setting a different tmp directory and applying permission to it? Try:
config.setProperty("tmpDir", "c:/temp");
Before creating design engine.
Jason
CBR
Thank you so much Jason. It's working now :-)