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

rossi_jeff

Members
  • Posts

    31
  • Joined

  • Last visited

rossi_jeff's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. this is ruby, but hopefully it applies to whatever you are using data[:trigger] = {} data[:trigger][:calendarTrigger] = {} data[:trigger][:calendarTrigger][:timezone] = user_time_zone data[:trigger][:calendarTrigger][:hours] = scheduled_report.hour data[:trigger][:calendarTrigger][:minutes] = scheduled_report.minutes data[:trigger][:calendarTrigger][:startType] = 1 if ScheduledReport::FREQUENCIES[scheduled_report.frequency] == "Monthly" data[:trigger][:calendarTrigger][:daysType] = 'MONTH' data[:trigger][:calendarTrigger][:monthDays] = scheduled_report.month_day elsif ScheduledReport::FREQUENCIES[scheduled_report.frequency] == "Quarterly" data[:trigger][:calendarTrigger][:daysType] = 'ALL' data[:trigger][:calendarTrigger][:monthDays] = 1 else data[:trigger][:calendarTrigger][:daysType] = 'WEEK' data[:trigger][:calendarTrigger][:weekDays] = {} data[:trigger][:calendarTrigger][:weekDays][:day] = [] CALENDAR_TRIGGER_DAYS.each do |weekday,number| if scheduled_report.on?(weekday) data[:trigger][:calendarTrigger][:weekDays][:day] << number.to_s end end end data[:trigger][:calendarTrigger][:months] = {} data[:trigger][:calendarTrigger][:months][:month] = [] if ScheduledReport::FREQUENCIES[scheduled_report.frequency] == "Quarterly" [1,4,7,10].each do |month| data[:trigger][:calendarTrigger][:months][:month] << month.to_s end else for month in (1..12).to_a data[:trigger][:calendarTrigger][:months][:month] << month.to_s end end
  2. I have been using jasper server for a few years. We have several hundred reports and several thousand users all using older version of api with soap scheduling that has been deprecated. Basically every single scheduled report uses calendarTrigger. I have been trying to migrate our reports to use a new version of jasper server and do the scheduling with rest using json data. I have seen nearly all the errors the server can generate. Does anyone have a application/job+json sample of a job description using calendarTrigger with multiple weekDays and months Thanks, A very desperate developer
  3. We have around 1B records in our readings table and have reached a point where we might have to shard our databse, where accounts would be separated between shards. Accounts have many devices, each of which has many readings. I currently have hundreds of existing jasper reports all accessing the single database. Once i shard the database all thos reports will be broken, how do i pass the shard to use to the report. Does anyone have any relevent experience?
  4. I have several hundred reports with names like geofence-multi and stops-jobs, the new version of jaspersoft studio has started removing the - which is COMPLETELY UNACCEPTIBLE how do i revert to the old and proper behavior of keeping wht I typed.
  5. Anybody? I'd really like to use the scheduling on the jasper server instead of requesting at specific times from a rails daemon. This is something that really SHOULD be documented in the guides. Thanks, Jeff
  6. I have webservices running on my server connecting to jasper server but scheduled reports are sent at the wrong time. <calendarTrigger xsi:type="ns1:JobCalendarTrigger"> <timezone>Eastern Time (US & Canada)</timezone> <hours>8</hours> <minutes>0</minutes> <daysType>WEEK</daysType> <weekDays xsi:type="ns1:ArrayOf_xsd_int"> <weekDays xsi:type="xsd:int">2</weekDays> </weekDays> <months xsi:type="ns1:ArrayOf_xsd_int"> <months xsi:type="xsd:int">0</months> <months xsi:type="xsd:int">1</months> <months xsi:type="xsd:int">2</months> <months xsi:type="xsd:int">3</months> <months xsi:type="xsd:int">4</months> <months xsi:type="xsd:int">5</months> <months xsi:type="xsd:int">6</months> <months xsi:type="xsd:int">7</months> <months xsi:type="xsd:int">8</months> <months xsi:type="xsd:int">9</months> <months xsi:type="xsd:int">10</months> <months xsi:type="xsd:int">11</months> </months> </calendarTrigger> Can anyone tell if ther is an issue in my xml or if I am just missing a setting on my jasper server.
  7. I used the soap interface and scheduled a job, then fetched a job descriptor using rest. The xml is quite different. The parameters prortion is below <source> <parameters> <parameterValues> <entry> <key>time_zone</key> <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">Eastern Time (US & Canada)</value> </entry> <entry> <key>duration</key> <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">One Day</value> </entry> <entry> <key>device_id</key> <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:int">7</value> </entry> </parameterValues> </parameters> <reportUnitURI>/Consumer/test-readings</reportUnitURI> </source> Using that in generating a rest request resulted in the follwing error 2012-09-14 07:28:37,778 ERROR JobsServiceCallTemplate,http-8080-6:80 - Unexpected error occurs com.jaspersoft.jasperserver.api.JSExceptionWrapper: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into JIReportJobParameter (job_id, parameter_name, parameter_value) values (?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update Does anyone have working parameter xml?
  8. By putting the xml as the body of the put request I got a folder created, but it returned an empty document code 201 instead of the xml resource descriptor it says I should receive in the manual.
  9. I'm having trouble scheduling a job though the rest v2 interface. Could really use an xml sample with calendar trigger and parameters My xml <job> <baseOutputFilename>test-readings</baseOutputFilename> <repositoryDestination> <folderURI>/Scheduled/e986aa60-dfe6-012f-d7dd-38ac6fdf26f8</folderURI> <overwriteFiles>false</overwriteFiles> <sequentialFilenames>true</sequentialFilenames> </repositoryDestination> <label>test readings from new server</label> <outputFormats> <outputFormat>PDF</outputFormat> </outputFormats> <reportUnitURI>/Consumer/test-readings</reportUnitURI> <jobMailNotification> <subject>Scheduled Report</subject> <resultSendType>SEND_ATTACHMENT</resultSendType> <toAddresses>spamme@spam.com</toAddresses> <toAddresses>removed@toprotectme.com</toAddresses> </jobMailNotification> <calendarTrigger> <startDate>2012-09-13T11:50:39-0400</startDate> <timezone>Eastern Time (US & Canada)</timezone> <hours>8</hours> <minutes>0</minutes> <daysType> <value>WEEK</value> </daysType> <weekDays>2</weekDays> <weekDays>3</weekDays> <weekDays>4</weekDays> <weekDays>5</weekDays> <weekDays>6</weekDays> <months>0</months> <months>1</months> <months>2</months> <months>3</months> <months>4</months> <months>5</months> <months>6</months> <months>7</months> <months>8</months> <months>9</months> <months>10</months> <months>11</months> </calendarTrigger> <parameters> <parameter> <name>duration</name> <value>One Day</value> </parameter> <parameter> <name>device_id</name> <value>7</value> </parameter> </parameters> </job> the response xml <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><errorDescriptor><errorCode>unexpected.error</errorCode><parameters><parameter>java.lang.NullPointerException</parameter></parameters></errorDescriptor> The error trace 2012-09-13 08:50:39,401 ERROR JobsServiceCallTemplate,http-8080-5:80 - Unexpected error occurs java.lang.NullPointerException at com.jaspersoft.jasperserver.api.engine.scheduling.domain.ReportJobCalendarTrigger.getDaysType(ReportJobCalendarTrigger.java:189) at com.jaspersoft.jasperserver.api.engine.scheduling.DefaultReportJobValidator.validateJobCalendarTrigger(DefaultReportJobValidator.java:209) at com.jaspersoft.jasperserver.api.engine.scheduling.DefaultReportJobValidator.validateJobTrigger(DefaultReportJobValidator.java:177) at com.jaspersoft.jasperserver.api.engine.scheduling.DefaultReportJobValidator.validateJob(DefaultReportJobValidator.java:104) at com.jaspersoft.jasperserver.api.engine.scheduling.ReportSchedulingFacade.validate(ReportSchedulingFacade.java:630) at com.jaspersoft.jasperserver.api.engine.scheduling.ReportSchedulingFacade.scheduleJob(ReportSchedulingFacade.java:487) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy21.scheduleJob(Unknown Source)
  10. I'm using multipart-post gem in a rails 3 app opening connection to reports.intouchgps.com... opened <- "PUT /jasperserver/rest/resource HTTP/1.1\r\nAccept: */*\r\nUser-Agent: Ruby\r\nContent-Type: multipart/form-data; boundary=-----------RubyMultipartPost\r\nContent-Length: 457\r\nAuthorization: Basic d2Vic2VydmljZXM6d2Vic2VydmljZXM=\r\nConnection: close\r\nHost: reports.intouchgps.com:8080\r\n\r\n" <- "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"ResourceDescriptor\"\r\n\r\n<resourceDescriptor name=\"75a425c0-de74-012f-d7d6-38ac6fdf26f8\" wsType=\"folder\" uriString=\"/Scheduled/75a425c0-de74-012f-d7d6-38ac6fdf26f8\" isNew=\"false\"><label>User Folder 75a425c0-de74-012f-d7d6-38ac6fdf26f8</label><resourceProperty name=\"PROP_PARENT_FOLDER\"><value>/Scheduled</value></resourceProperty></resourceDescriptor>\r\n-------------RubyMultipartPost--\r\n\r\n" -> "HTTP/1.1 400 Bad Request\r\n" -> "Server: Apache-Coyote/1.1\r\n" -> "Pragma: No-cache\r\n" -> "Cache-Control: no-cache\r\n" -> "Expires: Wed, 31 Dec 1969 16:00:00 PST\r\n" -> "P3P: CP=\"ALL\"\r\n" -> "Set-Cookie: JSESSIONID=BE57A2C851D02CB1CB448052D9246DB3; Path=/jasperserver\r\n" -> "Content-Type: text/xml;charset=UTF-8\r\n" -> "Content-Length: 27\r\n" -> "Date: Tue, 11 Sep 2012 20:14:48 GMT\r\n" -> "Connection: close\r\n" -> "\r\n" reading 27 bytes... -> "Invalid resource descriptor" read 27 bytes Conn close This was in the log 2012-09-11 12:45:48,673 DEBUG RESTServlet,http-8080-7:131 - request params: Path: /resource Requested Service: resource Service from registry: class com.jaspersoft.jasperserver.rest.services.RESTResource$$EnhancerByCGLIB$$79dc9457 2012-09-11 12:45:48,676 DEBUG RESTAbstractService,http-8080-7:100 - execute: Resource=/resource Method=put 2012-09-11 12:45:48,815 DEBUG Utils,http-8080-7:158 - 0 attachments were extracted from the POST 2012-09-11 12:45:48,817 ERROR RESTResource,http-8080-7:237 - Unexpected error during resource descriptor marshaling: Premature end of file. org.xml.sax.SAXParseException: Premature end of file.
  11. Was my error I had put /jasperserver in the base url that was being parsed and it wasn't part of the requests
  12. Has anybody got rest v2 api working? I'm using net/http in a rails 3 app. opening connection to reports.intouchgps.com... opened <- "GET /rest_v2/reports/Consumer/test-readings.pdf?time_zone=Eastern+Time+%28US+%26+Canada%29&time_zone_offset=0&include=true&start_date=2012-09-04+00%3A00&end_date=2012-09-11+00%3A00&device_id=7 HTTP/1.1\r\nAccept: */*\r\nUser-Agent: Ruby\r\nAuthorization: Basic cmVwb3J0cnVubmVyOnJlcG9ydHJ1bm5lcg==\r\nConnection: close\r\nHost: reports.intouchgps.com:8080\r\n\r\n" -> "HTTP/1.1 404 Not Found\r\n" -> "Server: Apache-Coyote/1.1\r\n" -> "Content-Type: text/html;charset=utf-8\r\n" -> "Content-Length: 1081\r\n" -> "Date: Tue, 11 Sep 2012 13:57:51 GMT\r\n" -> "Connection: close\r\n" -> "\r\n" reading 1081 bytes... -> "<html><head><title>Apache Tomcat/6.0.35 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /rest_v2/reports/Consumer/test-readings.pdf</h1><HR size=\"1\" noshade=\"noshade\"><p><b>type</b> Status report</p><p><b>message</b> <u>/rest_v2/reports/Consumer/test-readings.pdf</u></p><p><b>description</b> <u>The requested resource (/rest_v2/reports/Consumer/test-readings.pdf) is not available.</u></p><HR size=\"1\" noshade=\"noshade\"><h3>Apache Tomcat/6.0.35</h3></body></html>" read 1081 bytes Conn close Basic auth doesn't seem to work at all I log the url generated and if i visit it while logged in it works.
  13. I removed openjdk-7-jdk and installed sun-java6-jdk and it worked. However the query designer will not open using openjdk-7
  14. If I send the data with a different parameter name as a comma separated string how would I use that parameter to populate the original parameter that is used in an $X{IN} in my query?
×
×
  • Create New...