How iReport can work in Sun Application Server?

I am success to use the iReport to show out the pdf file in Tomcat which i am using jsp code, but, when I run them in sun application server, it throws out the following exception.

//=====================

HTTP Status 500 -

- -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error compiling report design.

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:830)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:763)

org.apache.jsp.Report_005fJSP.payroll_005frec_005fstaff_jsp._jspService(payroll _005frec_005fstaff_jsp.java:165)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)

javax.servlet.http.HttpServlet.service(HttpServlet.java:860)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)

javax.servlet.http.HttpServlet.service(HttpServlet.java:860)

sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

java.lang.reflect.Method.invoke(Method.java:585)

org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)

java.security.AccessController.doPrivileged(Native Method)

javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)

root cause

net.sf.jasperreports.engine.JRException: Error compiling report design.

net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractC ompiler.java:231)

net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCom piler.java:131)

net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperComp ileManager.java:127)

net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperComp ileManager.java:86)

org.apache.jsp.Report_005fJSP.payroll_005frec_005fstaff_jsp._jspService(payroll _005frec_005fstaff_jsp.java:106)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)

javax.servlet.http.HttpServlet.service(HttpServlet.java:860)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)

javax.servlet.http.HttpServlet.service(HttpServlet.java:860)

sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

java.lang.reflect.Method.invoke(Method.java:585)

org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)

java.security.AccessController.doPrivileged(Native Method)

javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)

note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.

//==========================

Would someone can tell me why?This is urgent for me!!

[3708 byte] By [yeechenghoi] at [2007-11-14]
# 1
Is there more info about this error available in the server.log?It's hard to determine the cause of the problem from the stacktrace you provided.
jluehe at 2007-7-6 > top of java,Application & Integration Servers,Application Servers...
# 2

Here is the log file information I get from the sun application server, when i run my iReport file.

//==================

DetailsTimestamp: 2006-5-28 22:50:02.768

Log Level: INFO

Logger: javax.enterprise.system.stream.out

Name-Value Pairs: _ThreadID=11;

Record Number: 2808

Message ID: exception 3

Complete Message

java.lang.NullPointerException

Diagnostic Causes

Diagnostic Checks

//==================

Do you mean this server.log file message? and can you know why problem with me?

yeechenghoi at 2007-7-6 > top of java,Application & Integration Servers,Application Servers...
# 3
There should be a stack trace (with root cause) in your {S1AS_HOME}/domains/domain1/logs/server.log. Can you send me that?Otherwise, could you send me exact instructions on how to reproduce the error? Can I download iReport from somewhere?Thanks,Jan
jluehe at 2007-7-6 > top of java,Application & Integration Servers,Application Servers...
# 4
You can download the iReport from this link http://ireport.sourceforge.net/I am not sure that whether Sun Application Server can compatible with iReport. Can you try this?thanks a lot~~
yeechenghoi at 2007-7-6 > top of java,Application & Integration Servers,Application Servers...
# 5
I've downloaded iReport-1.2.3.zip. What do I need to do next? Please let me know the exact steps to reproduce the problem. Thanks!
jluehe at 2007-7-6 > top of java,Application & Integration Servers,Application Servers...
# 6

Maybe yo sould try to add the following lines to the server.policy

// Permissions to invoke CORBA objects in server

grant {

permission java.lang.RuntimePermission "createClassLoader";

permission java.security.AllPermission "createClassLoader";

};

this permits to load and use the classes that are needed for iReport to run under the application server.

by the way the server policy is located:

/domaindir/domainname/config/

the restart the server

bdfd at 2007-7-6 > top of java,Application & Integration Servers,Application Servers...