Jump to content
Changes to the Jaspersoft community edition download ×

2005 IR Help

Recommended Posts

By: supportsib - supportsib

scriptlet

2004-07-11 00:38

Whats wrong with my xml,java code

 

here is my application

 

From Xml

------------

 

 

scriptletClass="smutils.Scriptlet"

<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement

mode="Opaque"

x="861"

y="3"

width="90"

height="26"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="SansSerif" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />

</textElement>

 

<textFieldExpression class="java.lang.Double"><![CDATA[((smutils.Scriptlet)$P{REPORT_SCRIPTLET}).Calculateamount()]]></textFieldExpression>

 

 

Method in scriptelet class

------------------------

public double Calculateamount()throws JRScriptletException

{ double a =100;

return a;

}

 

I got the following compilation error

 

 

 

 

 

at dori.jasper.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:154)

at dori.jasper.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:136)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:135)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:107)

 

please help me

 

how can i debug the error

 

 

 

 

 

 

By: supportsib - supportsib

RE: scriptlet

2004-07-12 01:58

please help me

 

 

 

 

 

By: Chuck Deal - cdeal

RE: scriptlet

2004-07-12 05:09

Was there more to that stackTrace? Particularly, a "Root Cause" section?

 

 

 

 

By: supportsib - supportsib

RE: scriptlet

2004-07-12 06:04

The full stacktrace is

dori.jasper.engine.JRException: Errors were encountered when compiling report expressions class file:

See error messages above.

at dori.jasper.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:154)

at dori.jasper.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:136)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:135)

at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:107)

at servlets.CompileServlet.service(CompileServlet.java:113)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:288)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2748)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:186)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:512)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:562)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1018)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:199)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:637)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:463)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:568)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:631)

at java.lang.Thread.run(Thread.java:536)

 

 

 

 

 

 

By: Chuck Deal - cdeal

RE: scriptlet

2004-07-12 06:27

Sorry, I use a web app, but I don't compile my reports inside the app. Maybe someone who does this would have more experience with the error.

 

My other suggestion would be to put a debugger on it and find out what is specifically causing the error.

 

 

 

 

By: supportsib - supportsib

RE: scriptlet

2004-07-12 08:57

Me too using webapp.

1)how can i compile outside the report

2)what debugger i have to use for it

3)how can i put debugger

 

 

 

 

By: Chuck Deal - cdeal

RE: scriptlet

2004-07-12 10:13

WOW... ok, I may not be able to help with all of that because debugging an app (particularly a web app) is not a trivial task.

 

In our app, all of the report designs are static, so we simply deploy the .jasper files. No need to compile on the server.

 

As for the debugging, it looked like you were using Tomcat. We use Eclipse IDE, TOmcat and the Sysdeo Tomcat plugin to debug our web app. In doing so, we can trace thru the execution of the source, and therefore get "into" the jasper source to see exactly where the problem is occuring.

 

I won't be able to talk you thru setting up Tomcat to be debugged. You should be able to google for some help.

 

Have you tried searching the forum for similar exceptions to your own?

 

 

 

 

By: supportsib - supportsib

RE: scriptlet

2004-07-12 23:06

i think the problem with the method

i Can compile

if i change the return type and local variable to string insted of double in the following method

 

public double Calculateamount()throws JRScriptletException

{ double a =100;

return a;

}

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