developerdude
Members-
Posts
55 -
Joined
-
Last visited
developerdude's Achievements
-
should not return a fully qualified class/field name. For example, in a test, before I call a webservice I set the resource type in the ResourceDescriptor I am sending to the web service using the constant static filed ResourceDescriptor.TYPE_CONTENT_RESOURCE which evaluates to "contentResource". The web service returns a ResourceDescriptor with its resource type set to "com.jaspersoft.jasperserver.api.metadata.common.domain.ContentResource" Not the same string. If, as I do, I have an assert on the return type to match what I asked for, it fails (unless I parse the string or call contains()). Suggestion: either use Java 5+ enums (preferable) or be consistent with the strings used as params and return values when describing the same value. It will make our life easier. Thanks.
-
Retrieving the 'message list' via web service??
developerdude replied to developerdude's topic in Products
Sherman, thanks for that info. I will explore that API and see if I want to go that route. The patch for sending an email if there is no data is kind of specialized, but I suppose it is generally useful. That is a fairly simple patch consisting of just maybe at most ten lines of code IIRC, although I think the actual sending via email uses a Spring mail sender. I'll look at that. As for the exporting of files to an FTP server, as I am sure you know this is a common request that a lot of people want. It isn't rocket science and I am kind of surprised it isn't in JS yet. There was that one patch that I have seen that modded the JS code to used CIFS to write reports out somewhere - I think that was even submitted. My plan is to totally refactor what I have done and put it out there as OSS somewhere. I will start with a simple blog entry somewhere that shows how to get the report from JS, then expand on that. I know that if a person digs a little they can find this info, because that is what I did - with some help from you on this forum, but I feel that it could use an example with docs (a blog article probably) rather than a few disjointed entries in a forum and the web service API docs. I was doing it somewhat wrong anyway, I started with downloading the report via HTTP, then got it via the web services, then just recently figured out that I was asking for the report template URI and not the report results URI, so when I moved the results to a sub-folder that broke my exporter. So anyway, yeah, eventually maybe it will be out there and you guys can use it to enhance JS. Post Edited by developerdude at 10/17/2009 16:24 -
Oh, okay, then it sounds appropriate if you have to use Acegi to intercept the method invocation. I thought you were just using it to validate a param to a report, like checking a date range or something. I haven't played with that area of JS much at all. My integration with it is limited to two things: an external process that grabs report results via the web services and puts them on an FTP server, and a tweak to the report filling code to send an email notification when no data is found for a report. We don't use JS as a 'public' BI solution, we use it to run automated reports we write and manage. Beyond that, all I have done is create a configuration for the Acegi beans that integrates with LDAP/Active Dir, so we can eventually have our internal users log into it. Post Edited by developerdude at 10/16/2009 08:48
-
From within a Jasper Report, you can call a 'Jar file Scriptlet', which could then maybe do what you want to do. I believe you can pass in params at that point if I remember correctly (I would have to go dig for it) - but that is where I suggest you start looking as it seems the most logical place to me to inject any Java logic within the report, not try to hook into the server itself or even the security layer. This is how I manipulated some params in one report I did. You can google this or you can find it in various docs/books (Heffelfinger's book has a section on it). If you want to hook into the JS web page where a user enters params and give them feedback there then maybe you are back to playing with the server code or intercepting the method call as you mentioned. http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/JRDefaultScriptlet.html Post Edited by developerdude at 10/15/2009 16:44
-
I am running JS 3.0.x Eventually we will upgrade to JS 3.5.x I think I have mentioned this before, but from time to time scheduled report jobs will get 'stuck' and we won't know until we notice a day or so later that the report didn't go through our export processor. What has happened at least once (maybe many of the times the job got 'stuck'), was there was some underlying error that prevented JS from completing the running of the report. By 'stuck' I mean the quartz job is now in a permanent 'executing' state. Usually that report will now not run again until I restart JasperServer. In the last case there was a deadlock in our datasource. This showed up in the logs, and it showed up in the 'Messages' page for JS as 'The job failed to execute', but this is all essentially 'hidden' from us unless we go spelunking for it once we notice something is wrong. We would like to be a bit more proactive. For example, I modified the JS code to send a warning when a report results in no output due to no data. I also have our export process (a separate servlet which gets scheduled reports and puts them on an FTP server) send status emails on its status. But sometimes thing fall through the cracks. I would like to get the messages that show in the 'Messages' page of JS and send them out as emails, but I see nothing in the web services guide that leads me to believe I can access these externally via the web service. I would guess I could go connect to the JS database, but I don't want to do that. Ideas? Thanks.
-
IIRC, one of the changes to 3.5 is to support password encryption in the URL. Beyond that, you could use the web services instead.
-
If it is a scheduled report, you can check if the job ran via the web services, then you can also check to see if the report is there via web services. Alternatively, you can get the job info via web services and construct a URL from that info (and a known base URL for the server and a path to the root of the repository view) and then look there (if security is on, you have to include the username and password in the URL). It is preferable to use the web services. How to do use web services can be found in the web service docs - although there aren't good examples to do exactly what you want to do, I have done it both ways by reading the docs and asking a few questions here. If you go back and look at some of my past posts here you can see some of what I did and learned.
-
Thanks Lucian, That is good to know. I used the DB dump instead to move the data to 3.5, and ran into some errors therealso - but I am betting they will not be fatal because I will be using LDAP/AD and the errors seemed to be on the adding of constraints to the users/roles tables if I interpreted them correctly. Post Edited by developerdude at 05/21/2009 16:37
-
I could not run the export script because it results in exceptions for me: http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=57132 So I did a dump, imported that into mysql without errors, then tried to run the 3.10 to 3.50 'WARNING' SQL script. I got two errors right at the end (see below). I am hoping these were for the last three SQL statements: alter table JIRole add index FK82724655E415AC2D (tenantId), add constraint FK82724655E415AC2D foreign key (tenantId) references JITenant (id); alter table JITenant add index FKB1D7B2C97803CC2D (parentId), add constraint FKB1D7B2C97803CC2D foreign key (parentId) references JITenant (id); alter table JIUser add index FK8273B1AAE415AC2D (tenantId), add constraint FK8273B1AAE415AC2D foreign key (tenantId) references JITenant (id); Because I am modifying the security config to talk to Active Directory instead of the mySQL datastore. Code:ERROR 1005 (HY000): Can't create table './jasperserver/#sql-39b9_8.frm' (errno: 150)Query OK, 1 row affected (0.00 sec)Records: 1 Duplicates: 0 Warnings: 0ERROR 1005 (HY000): Can't create table './jasperserver/#sql-39b9_8.frm' (errno: 150)
-
Env: Linux Centos 5.2 Tomcat 5.5 JasperServer 3.0 mySQL 5 I am trying to upgrade to 3.5. But first I wanted to migrate the production system to a 3.0 testbed, and then test the upgrade procedure to 3.5 there. I tried the following command from the scripts folder: js-export.sh --everything --output-zip js-3.0-export.zip And that resulted in a large exception stack trace, much of which seemed to be a java.io.CharConversionException, but there were a number of others. Without digging and some knowledge of the logic, it is hard to tell what the cause is, or if there is more than one problem. I have attached a text file with the stack trace. Post Edited by developerdude at 05/20/2009 21:43
-
Scheduled Report not running after server inactive
developerdude replied to djsiders's topic in Products
I changed various config files to get around the stale connection problem (I have complained her http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=53600 that these setting should be the default config because this is a common mySQL problem). in META-INF/jasperserverDS-jdbc-jdbc.xml, I changed the connection URL to: <url>jdbc:mysql://localhost:3306/jasperserver?autoReconnect=true&autoReconnectForPools=true&useUnicode=true&characterEncoding=UTF-8</url> I added: <jdbc-connection-pool-params> <test-table-name>SQL SELECT 1</test-table-name> <property name="validationQuery" value="select 1"> <property name="testOnBorrow" value="true"> <property name="testOnReturn" value="false"> </jdbc-connection-pool-params> the META-INF/context.xml file has a connection URL of: url="jdbc:mysql://localhost/jasperserver?autoReconnect=true&autoReconnectForPools=true&useUnicode=true&characterEncoding=UTF-8" /> Once I made these changes then the pool does the validation test on the connection before using it and this refreshes the connection (or gets a new one) and the problem goes away. -
Nagesh, You could read whatever data you want to archive directly from the default JS datastore, or whatever datastore config you choose to use, and then put it where you want it. You can also use the supplied web services to retrieve the data and then do whatever you want with it (I use them to get the report results and export them to an FTP server for our clients who don't want them emailed). Or, you could just plugin your own version of the datastore if you prefer to not read from mySQL or the other database versions that are supported (which includes DB2 IIRC). Or you could have each report emailed to some daemon that would then archive them as they are received, then have some other process (manual or auto) that periodically removes them from JS as they grow older than desired. Or you could just manually archive each individual report and delete it manually after it has been archived. There are a number of different ways you could do what you want - it depends on your needs and capabilities. Post Edited by developerdude at 05/19/2009 20:23
-
I kept quiet on this suggestion until I saw 3.5 I had hoped that 3.5 would be different, but nope. Here is the suggestion: use fairly up to date version of libs. I have noticed a strong trend towards using out of date libs. For example, the Acegi security lib used is three years old. Use of such old libs makes it difficult on those people who need to modify either code or configuration. For example, I am trying to get the security config to work with Active Directory (yes, I know there are examples here and elsewhere - but every LDAP/AD install/config is different and it is not easy to take someone else's example and apply it to your own instance). I have my own working Spring Security app that talks to AD just fine with v 2.04, but I am struggling with Acegi because it is enough different that what works with Spring doesn't work with Acegi. There are problems with trying to get older libs working - just to name a few: 1) Much fewer examples online. 2) The older libs often have bugs that newer libs have fixed. 3) Newer libs are often refactored to be easier to use. 4) It is harder to find support for older versions of libs. As a developer, I understand that for various reasons, the libs used can't always be the latest and greatest, but using libs that are three years old? Come on!
-
I have the following setup: JasperServer v. 3.10 - default install. CentOS 5.2 in a VMWare session - 3 GB RAM All Tomcat/JVM settings bumped up from defaults by 4X or more (2 GB heap) Tomcat 5.5.27 Java 1.6_10 JasperServer and a small servlet which exports reports to the file system are the only apps running - both in the same Tomcat instance. We are using JS to run periodic reports using is scheduler (Quartz). Most of the reports are run daily, some every couple of days or once a week. We have between 10 to 20 reports. I have intentionally been very careful about the scheduling such that no report runs at the same time as another report - this makes it easier to handle any datasource contention/locking/etc. and I shouldn't have to worry about the number of Quartz threads or anything like that. Each report has at least one minute difference in its secheduled time from other reports, some have quite a bit of spacing - but most run the last hour of the workday (between 4PM and 5PM). Most of the time these reports run as scheduled. Every once in a while one or maybe two fail to run without errors or any logged info at all. At first, we had one report that just refused to run as scheduled period until I deleted the schedule and created a new one. I just took this in stride and didn't worry about it much. Monday, one job failed to run again as scheduled. No errors, nothing in the log. I ignored it and did the report manually. Yesterday, the first day in months I left early, so of course every single report scheduled for the PM of the day failed to run. No errors - nothing. Every one does a SQL query and that is logged in the log files when they run. No queries or anything in the log files (JS or Tomcat). Nada. Zippo. Zip. Nothing. They just did not run. My exporter app looks at the schedule via the web service API and complained that it could not find the Quartz job scheduled for when it expected it to have run. Looking at JasperServer, it said that the next time the job was to be ran was as expected, but at this point this time was in the past - well in the past. My exporter also uses Quartz and it has had no problems on this machine/VM - although it gets restarted more often than JS (it does not use mySQL to persist its jobs - just an XML file). Have others seen this problem? Any ideas as to why this is happening? Possible solutions? I shouldn't have to baby sit this like I do - we aren't stressing JS at all. The repository has maybe one to two hundred generated report results in it at best, and as I said maybe 20 total report templates at most, none of which are scheduled to run concurrently. The system should have plenty of memory and CPU juice. There are no real concurrent users - only us in the IT dept. creating/maintaining new reports - not public users logging in to see or run anything. Thanks.
-
It is interesting that this (the iReport option) overrides the explicit setting in the report. E.G., if I do not check the setting in the options but use the following in the report itself, the report setting is not respected in the IR preview (not sure about JasperServer yet). Code: Post Edited by Lauren Bish at 04/13/09 21:01