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

Jasper Fill in an Applet PROBLEM


2004 IR Help

Recommended Posts

By: Zeek - zeekage

Jasper Fill in an Applet PROBLEM

2004-10-19 07:16

Hi,

 

I am trying to use jasper to render reports in an applet and I'm having a problem. I have used jasper in our application server to render reports and convert them to HTML to stream back to a client. However, for performance reasons I need to transfer the work of filling the report off the server and to the client, namely an applet. I have got this working up to the point where the applet needs to fill the report. The report filler calls the JRClassLoader.loadClassForName(String className) method. This gives me an AccessControlException saying the applet doesnt have permission to use the method Thread.currentThread().getContextClassLoader().

 

Is there any way anyone can think of to get around this other than signing the applet? I know signing it is an option, but I would like to see if there are any other options available. Is there some way I can extend or reimplement this part of jasper to not use/need the class loader? Does someone know of a way to give the applet permission to use getContextClassLoader()? Everything I have tried has failed so far.

 

 

Any help is greatly appreciated.

-Josh

 

 

 

 

 

 

 

 

By: captnveg - captnveg

RE: Jasper Fill in an Applet PROBLEM

2005-08-19 07:35

I am attempting to do the same and am searching for a solution to this problem. The primary application that I am adding jasper reports to is contained in a signed jar, and therefore has its own secure class loader. For the most part, the fillManager in Jasper retrieves the Thread's current classLoader, which doesn't cause a problem. It is when it makes a call to

JRClassLoader.loadClassFromBytes(); from the

JRAbstractJavaCompiler.loadCalculator method which is called from the JRBaseFiller, that a problem occurs. Jasper all of a sudden just tries to use its own custom secure class loader, which throws the security exception.

 

Nat

Link to comment
Share on other sites

  • 5 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 Hi there,

 

Is it possible to fill the data in a jasper report using an applet? The datasource is XML. 

Currently I could fill data using a servlet with my XML datasource and view the report using a print/viewer applet. I refered to the webapp sample in the source.

I was wondering if I could move the filling of data to the client side (ie. an applet) as well.

Appreciate the help,

Thanks,

Shruti

Link to comment
Share on other sites

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...