Jump to content
We've recently updated our Privacy Statement, available here ×

Class Loader Problem


ktrinad

Recommended Posts

By: baddar - mbaddar

Class Loader Problem

2004-05-24 03:51

Hi All,

 

I'm facing a problem with Jasper Reports 0.5.3. I'm developing a Web application running on Sun ONE A/S 7.0; JDK 1.4. My problem is in the security policy: Jasper reports engine must inistanciate a new class Loader ( dori.jasper.engine.util.JRClassLoader) in some step before filling the report. Which unfortunately could be impossible to allow in my production environment. The sample code I've tried is not working unless the permission : "createClassLoader" is granted in the policy.

 

I've been tracing around in the Jasper code in the last few days. And I guess the reason behind using this technique is the report file need to be transformed into a java class before it can be used (filled).

 

My proposed solution for this problem is :

 

The JRClassLoader extends the default class loader and uses a protected method defineClass(). If I can omit this method, a new instance of ClassLoader will no longer be needed. But this will be useful only if I managed to get the java class precompiled in the class path so I can get an instance of it using Class.forName().

 

 

Is there a better solution for this problem, am I missing some other technique to do the whole job?

 

Thanks in advance

Mohamed Baddar

 

 

 

By: Teodor Danciu - teodord

RE: Class Loader Problem

2004-05-24 07:08

 

Hi,

 

Use the JRBshCompiler.

It will produce a BeanShell script instead of trying

to compile the Java class.

 

Check the docs and the samples.

 

I hope this helps.

Teodor

 

 

 

By: wuwenlee - wuwenlee

RE: Class Loader Problem

2004-06-03 19:06

Hi,mbaddar:

I face the same problem with you. Do you get any solution? I have try JRBshCompiler with samples of Jasper Reports 0.5.3. but failed. Thanks.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...