Jump to content
We've recently updated our Privacy Statement, available here ×

harry.clarkknovalent.com

Members
  • Posts

    19
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by harry.clarkknovalent.com

  1. Obviously the config info above was to be in brackets like xml, forgot to escape it; anyway the properties are connection.driver_class connection.url current_session_context_class dialect connection.username connection.password cache.provider_class
  2. I am trying to set up a Hibernate data source in iReport. My class path contains the hibernate.cfg.xml with the mappings and SessionFactory config info, and all the needed jars. I have developed the ORM of my database using annotations, have generated it as a jar, and use it in applications. I have three Hibernate jars in the path, for Hib 4.1.6: hibernate-commons-annotations-4.0.1.Final.jar, hibernate-core-4.1.6.Final.jar, hibernate-jpa-2.0-api-1.0.1.Final.jar. I use these in building the ORM and with it in other applications. The hibernate.cfg.xml is what I use in a web application, less the SessionFactory info, which is programmed in a class. When I test the Hibernate data source I get a very weird error dialog with one word: INSTANCE (screen shot in the attached file if you need it). Here is the start of hibernate.cfg.xml; thanks for any advice. com.ibm.as400.access.AS400JDBCDriver jdbc:AS400://192.168.1.21/KA403QDB;user=***;password=*** thread com.kve.vanguard.model.orm.util.KVESQLDialect *** *** org.hibernate.cache.internal.NoCacheProvider ...
  3. I have a class in a jar in my JasperServer lib which provides static methods called in expressions to process various things in a report. I did it this way to make the Java redistributable yet hide it from non-programmers. Is my class loaded once and forever by JasperServer? In which case do my static methods need to be thread-safe? And what impact would that have on performance with heavy usage? Suppose a method is called for a column in a report, i.e., every row, with the report run by >1 user at the same time. Or does JS batch the jobs and run them in sequence? Or is the class loaded with each session supported in JasperServer? If that were so I wouldn't need to restart JS (Tomcat) to pick up a new jar with changes to the class.
  4. I have a report that takes two parameters which I pass to the query. Both params are marked "mandatory" and both are text types, "locally defined", not referring to anything else in the repository. I cannot get the report to display from the iReports plugin. It prompts me for the parameters and shows the correct page count for the report, but says it cannot find the file. When I run the report from JasperServer directly, by clicking on the report in the repository listing, it doesn't prompt for the parameters, even though they are mandatory. It sends me to the results page which tells me the report is empty. When I click on "run again" on the result page it prompts me for the parameters and runs the report correctly. Puzzled in Podunk...
  5. It works in iReport but not in JasperServer. I've added a class to a package net.sf.jasperreports.engine.VanguardDateFormat and put the jar in the webapps/jasper/lib dir with the groovy jar. The class is found in iReport but not in JasperServer: 1 - Error evaluating expression : Source text : ((net.sf.jasperreports.engine.VanguardDateFormat).vanguardToString($F{T1_CAEJDT})
  6. I can call the Java from an expression, passing the field to be converted as an argument: ((net.sf.jasperreports.engine.VanguardDateFormat).vanguardToString($F{T1_CAEJDT})) The Java goes into a jar, which the user has to install, but otherwise needn't bother with it. Good boy, Jasper. Have a bone.
  7. Can I write a scriptlet in Groovy? I need to call some complicated Java in the iReport event model that scriptlets uses, at afterDetailEval and other spots. I want to make the Java available to non-programmers without having them write a Java scriptlet and make a jar. Can I put the Java call in a Groovy scriptlet? I need 3 lines, to get a field from a query, format it, and assign it to a report variable: date = (java.math.BigDecimal)getFieldValue("T1_CAEJDT") s1 = DateFormat.toString(date) setVariableValue("invoiceDate", s1) When I put this in the scriptlet editor it tries to compile it even if I set language=groovy Is there a way to use the first 2 lines in an expression, without the last line, which now is the expression value on the report? Again, i'm trying to provide Java code without burdening non-programmers. Thanks.
  8. That did it, thanks. I had to put it in the webapps/jasperserver/lib. I saw the doc page you mentioned. I had included a different jar, from the forum talk. jasperreports-2.0.1 I think. Not necessary apparently. I also had to rebuild my scriptlet jar. Apparently an inner class is not included if you name only the enclosing class; you need to specify both class files on the jar cmd.
  9. I've developed a report that has a scriptlet, which I can run okay in iReport. When I upload the report and the scriptlet jar to JasperServer it throws this exception: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: it/businesslogic/ireport/IReportScriptlet I'm using internal scriptlet support; my scriptlet is a subclass of IReportScriptlet. The scriptlet class in report.jrxml is reportScriptlet (doesn't seem to matter if it's fully qualified) I've looked through the forums and saw comments about putting the jar in the webapps/jasperserver/lib in the JS Tomcat, which I've done, no change. Any comments? Thanks.
  10. The compiler iReport uses can be changed by copying a different tools.jar from the JDK/lib to ireport/lib (as I'd done to compile reports in the first place, duh). However, I also had to set the JDK version in the registry in order to use jar.exe from that JDK on a scriptlet class file to make a jar for import into JasperServer, in effect roll my machine back to JDK 1.5. This is awkward to say the least. I can use the JasperServer plugin to export my report and the scriptlet jar from iReport to JS, and no longer get a class version skew exception, but it still won't run the report from JS, complains about not finding IReportScriptlet class (of which my scriptlet is a subclass). The iReport scriptlet setting is "internal support". I suppose one could write a plugin to use the Eclipse compiler and pass the JDK compliance level to it for compilation. IReport will use the Eclipse if it's in the lib I gather, but I can't see how to set the compliance level. A plugin could also use jar.exe or the jar API to put the scriptlet in a jar for JasperServer.
  11. The compiler iReport uses can be changed by copying a different tools.jar from the JDK/lib to ireport/lib (as I'd done to compile reports in the first place, duh). However, I also had to set the JDK version in the registry in order to use jar.exe from that JDK on a scriptlet class file to make a jar for import into JasperServer, in effect roll my machine back to JDK 1.5. This is awkward to say the least. I can use the JasperServer plugin to export my report and the scriptlet jar from iReport to JS, and no longer get a class version skew exception, but it still won't run the report from JS, complains about not finding IReportScriptlet class (of which my scriptlet is a subclass). The iReport scriptlet setting is "internal support". I suppose one could write a plugin to use the Eclipse compiler and pass the JDK compliance level to it for compilation. IReport will use the Eclipse if it's in the lib I gather, but I can't see how to set the compliance level. A plugin could also use jar.exe or the jar API to put the scriptlet in a jar for JasperServer.
  12. The plug-in hang problem can be fixed by reading the directions closely and copying *all* the plugin/lib jars to ireport/lib. The compiler skew problem betw Jasper Server and iReport, which affects report scriptlets, does not seem easily fixed. The JS install doc says it isn't certified with JDK>1.5. iReport uses the Eclipse compiler, which will target different compliance levels, but there seems no way of setting that level. Can I build JS from source and get compatiblity with my scriptlet despite the non-certification? Can I build my scriptlet in Eclipse with 1.5 compliance? Hard to distribute the scriptlet to non-programmers that way. There must be some straightforward answer.
  13. I tried changing the server URL in the properties and updating the plugin jar, but it didn't change the behavior, still hangs
  14. This is in the default.jasperserver_irplugin.properties in com.jaspersoft.jasperserver.irplugin package. It is referenced in ...gui.ServerDialog. This may not be the problem, but it's a start. #new connection defaults irplugin.server.url=http://localhost:8080/jasperserver/services/repository
  15. Somehow I needed flexdoc jar as well, from https://flexdock.dev.java.net/
  16. Got the plugin to build, just had to include all the lib jars.
  17. Here's the business about the server URL, from the howto.txt file that comes with the plug-in. It was yesterday, eons ago...as noted I am trying to rebuild the plugin but haven't collected all the bits and pieces yet. Another thing about Jasp Server. You are dependent on its JRE level for scriptlets. I need to import a jar for a scriptlet used in a report. iReport uses the JRE on my machine for the scriptlet compile; I have several JRE/JDKs, but it presumably uses the one that was current when iReport was installed, the current JAVA_HOME setting. Thus the scriptlet is compiled using 6.0x while Jasp Server uses 5.0x and throws incompatible class exception. Nor can you set the Java Compiler level in iReport, that I can find. These cannot be new problems. Can the experts comment? Thanks. 4) Note on Modifying the Server Connection String ------------------------------------------------- Currently, the iReport plugin has a hard-coded value used for the default URL string that makes the connection to JasperServer. This causes a problem because the Open Source and Pro versions of JasperServer have different URL paths ("jasperserver" vs "ji-pro"). The default is: http://localhost:8080/ji-pro/services/repository If you are building for the Open Source JasperServer release you will need to change "ji-pro" to "jasperserver". Like the following: http://localhost:8080/jasperserver/services/repository To do this you must edit the following java file and recompile: <js-os-src>/jasperserver-ireport-plugin/src/main/java /com/jaspersoft/jasperserver/irplugin/gui/ServerDialog.java
  18. I've just had this problem myself. I found a discussion of the server URL being hard-coded in the plugin as localhost---. Are you running Jasp Server locally? If not it might be hanging because it can't find the local server. Sounds incredible. I looked just now for the forum page, in my browser hist somewhere. I started trying to rebuild the plugin so I could fix this, but am having problems collecting everything to get it to build, haven't got around to fixing the URL, letting it be input. Maybe an expert can comment.
  19. Is there a plug-in that will generate a jar from a class file? I want a way to export a scriptlet class as a jar for import into JasperServer without generating the jar outside iReport. Mebbe I will write my own plug-in, never done it...
×
×
  • Create New...