Jump to content

chsam27

Members
  • Posts

    1
  • Joined

  • Last visited

chsam27's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I am new to Jasper reporting and I have a report with a simple scriplet that only return a string. When previewing it with Jasper studio 6.5.0, I was able to see the results but when I try deploy the same report on my local jasper server, it throws the error: Caused by: java.lang.ClassCastException: <class> cannot be cast to net.sf.jasperreports.engine.JRAbstractScriptlet at net.sf.jasperreports.engine.scriptlets.DefaultScriptletFactory.getScriptlet(DefaultScriptletFactory.java:109) ... 178 more]] I am running the server on Glassfish 4.1.1, included the scriplet jar file in the lib folder and changed the import in the scriplet according to https://community.jaspersoft.com/wiki/classcast-exception-when-running-report-containing-scriptlet Below is the scriplet: import net.sf.jasperreports.engine.*;public class DemoScriplet extends JRDefaultScriptlet{ public String getHello() throws JRScriptletException{ return "This is from a scriplet!"; }}[/code]Has anyone encountered this issue?
×
×
  • Create New...