Jump to content
Changes to the Jaspersoft community edition download ×

Error in compiling scriptlet


2004 IR Help

Recommended Posts

By: LBridge - lbridge

Error in compiling scriptlet

2005-06-10 01:26

Hi ,

 

I have a added a formula to the formula Field of the "Text Editor", through

the ExpressionEditor.java file.

 

My formula expression is as :

 

( (DefaultListModel)jList1.getModel()).addElement( "((net.sf.jasperreports.engine.JRAbstractScriptlet)$P{REPORT_SCRIPTLET}).resetName(<enterName>)" );

 

I have created my own Scriptlet class and added the method mentioned below , to it.

 

public String resetName(String enterName)

{

String name = enterName;

return name;

}

 

Now when I try to compile the .jrxml file it gives me the following errors:

 

Compiling file... C:Documents and SettingsrashmiDesktopFromLeelaDiscoverEnglish.jrxmScriptlet.java -> C:Documents and SettingsrashmiDesktopFromLeelaDiscoverEnglishScriptlet.java Error compiling the Scriptlet java source! java.lang.ClassNotFoundException:?com.sun.tools.javac.Main ????at?java.net.URLClassLoader$1.run(Unknown?Source) ????at?java.security.AccessController.doPrivileged(Native?Method) ????at?java.net.URLClassLoader.findClass(Unknown?Source) ????at?java.lang.ClassLoader.loadClass(Unknown?Source) ????at?sun.misc.Launcher$AppClassLoader.loadClass(Unknown?Source) ????at?java.lang.ClassLoader.loadClass(Unknown?Source) ????at?java.lang.ClassLoader.loadClassInternal(Unknown?Source) ????at?java.lang.Class.forName0(Native?Method) ????at?java.lang.Class.forName(Unknown?Source) ????at?net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:77) ????at?net.sf.jasperreports.engine.design.JRJdk13Compiler.compileClass(JRJdk13Compiler.java:67) ????at?it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:257) ????at?java.lang.Thread.run(Unknown?Source) NESTED?BY?: net.sf.jasperreports.engine.JRException:?Error?compiling?report?java?source?file?:?C:Documents?and?SettingsrashmiDesktopFromLeelaDiscoverEnglishScriptlet.java ????at?net.sf.jasperreports.engine.design.JRJdk13Compiler.compileClass(JRJdk13Compiler.java:80) ????at?it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:257) ????at?java.lang.Thread.run(Unknown?Source) Caused?by:?java.lang.ClassNotFoundException:?com.sun.tools.javac.Main ????at?java.net.URLClassLoader$1.run(Unknown?Source) ????at?java.security.AccessController.doPrivileged(Native?Method) ????at?java.net.URLClassLoader.findClass(Unknown?Source) ????at?java.lang.ClassLoader.loadClass(Unknown?Source) ????at?sun.misc.Launcher$AppClassLoader.loadClass(Unknown?Source) ????at?java.lang.ClassLoader.loadClass(Unknown?Source) ????at?java.lang.ClassLoader.loadClassInternal(Unknown?Source) ????at?java.lang.Class.forName0(Native?Method) ????at?java.lang.Class.forName(Unknown?Source) ????at?net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:77) ????at?net.sf.jasperreports.engine.design.JRJdk13Compiler.compileClass(JRJdk13Compiler.java:67) ????...?2?more

 

Pls Help Urgent !!

 

Rgds,

LBridge

 

 

 

 

By: Mike Warne - mwarne

RE: Error in compiling scriptlet

2005-06-16 18:15

Do you have the tools.jar in your class path. tools.jar has the javac compiler implementation. tools.jar is Part of Sun Java SDK.

 

Mike

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