Relatório em Applet

2 respostas
S

Boa tarde pessoal!

Tenho um relatório criado no IReport que é exibido normalmente pelo meu programa quando o uso como um aplicativo, porém quando tento gerar o relatório usando o programa como applet está dando erro.
Não deu pra ver, mas parece que o erro é alguma coisa relacionada com segurança.

Tem como exibir relatório do IReport em Applet?

Obrigado.

2 Respostas

S

Pessoal, me ajudem por favor.

Descobri qual é o erro:

java.security.AccessControlException: access denied (java.io.FilePermission RelatorioProducao.jasper read) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkRead(Unknown Source) at java.io.File.exists(Unknown Source) at dori.jasper.engine.util.JRLoader.loadObject(JRLoader.java:114) at dori.jasper.engine.util.JRLoader.loadObject(JRLoader.java:105) at dori.jasper.engine.JasperManager.loadReport(JasperManager.java:1035) at RelPrestador.jButton1ActionPerformed(RelPrestador.java:116) at RelPrestador.access$100(RelPrestador.java:23) at RelPrestador$2.actionPerformed(RelPrestador.java:78) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener$ReleasedAction.actionPerformed(Unknown Source) at javax.swing.SwingUtilities.notifyAction(Unknown Source) at javax.swing.JComponent.processKeyBinding(Unknown Source) at javax.swing.JComponent.processKeyBindings(Unknown Source) at javax.swing.JComponent.processKeyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

Gerei uma assinatura digital para a Applet e o meu .java.policy está assim:

/* AUTOMATICALLY GENERATED ON Wed Nov 10 11:31:23 BRST 2004*/
/* DO NOT EDIT */

keystore “file:/C:/WINDOWS/.keystore”;

grant signedBy mykey,  codeBase file:/C:/Windows/Desktop/Pcc/Automed.jar {

permission java.io.FilePermission “<<ALL FILES>>”, “read, write, delete, execute”;

};

Se alguém souber, por favor me ajude!!!

V

Tenta fazer um applet simples com um método que grava alguma coisa no disco, assina ele, e vê o que aconte.

Se não der esse erro, aí você começa a se preocupar com a sua aplicação, caso contrário é problema com a assinatura.

[]´s

Criado 9 de novembro de 2004
Ultima resposta 11 de nov. de 2004
Respostas 2
Participantes 2