Jump to content
Changes to the Jaspersoft community edition download ×

Publish To JasperReports Server Exception: Invalid JRXML


mhamilton_1

Recommended Posts

If ANYONE has ANY idea what is going on with this Exception, your response/help would be GREATLY appreciated.



I have been searching the Jaspersoft Community and related sites (WIKI, docops, StackOverflow) for solutions for days!  No success.



A lot of the solution recommendations say to make the Jaspersoft Studio and the JasperReports Server the same version.  However, there are prior users with this Exception that have done as recommended and still have the problem.



Another point to make is that this report has been published successfully in the past to JasperResports Server.  Some modifications were made to Source code.  I have checked the source code changes and nothing looks wrong.



There is no problem with Preview of this report in Jaspersoft Studio.  Preview is good.



I am using Community Edition: 



  • TIBCO Jaspersoft Studio Designer version 6.5.1
  • JasperReports Library version 6.5.1
  • TIBCO JasperReports Server version 6.0.1


Settings related to the Jaspersoft Studio Report are:



  • Report Properties Language - mine has Language set to 'java'
  • Dataset and Query Dialog Language - mine is 'sql'


Here is the Exception received when trying to publish from Jaspersoft Studio to JasperReports Server....



org.apache.http.client.HttpResponseException: Invalid JRXML

at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleErrorDescriptorList(RESTv2ExceptionHandler.java:107)
at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleErrorDescriptor(RESTv2ExceptionHandler.java:126)
at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleException(RESTv2ExceptionHandler.java:53)
at com.jaspersoft.studio.server.protocol.restv2.ARestV2ConnectionJersey.toObj(ARestV2ConnectionJersey.java:49)
at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.addOrModifyResource(RestV2ConnectionJersey.java:606)
at com.jaspersoft.studio.server.protocol.ProxyConnection.addOrModifyResource(ProxyConnection.java:332)
at com.jaspersoft.studio.server.publish.Publish.publishResources(Publish.java:191)
at com.jaspersoft.studio.server.publish.Publish.publish(Publish.java:65)
at com.jaspersoft.studio.server.publish.wizard.Publish2ServerWizard$3.run(Publish2ServerWizard.java:309)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)[/code]

Here is the main portion of my source code for this report.



<parameter name="P_RecordNo" class="java.math.BigDecimal">
<parameterDescription><![CDATA[Photo Record Number to provide detail on.]]></parameterDescription>
</parameter>
<queryString language="SQL">
<![CDATA[sELECT s.state_nmbr_code,
s.country_alpha_code,
s.state_alpha_code,
s.state_equivalent_name,
c.cnty_id_nmbr,
c.cnty_name,
p.record_no,
p.last_action,
p.last_action_date,
p.agency_code,
co.agency_code,
co.name,
p.record_type,
p.project_code,
p.photo_year,
p.photo_month,
p.photo_day,
p.film_type,
alov.code_descr as the_film_type,
p.focal_length,
p.sensor,
alov2.code_descr as the_sensor,
p.cloud_cover,
p.scale_num,
p.scale,
p.camera_to_specs,
p.remarks,
p.se_lat,
p.se_long,
p.sw_lat,
p.sw_long,
p.ne_lat,
p.ne_long,
p.nw_lat,
p.nw_long,
p.source_id,
p.source_date,
p.data_type,
p.create_date,
p.change_date
FROM apsrs.state s
inner join apsrs.county c ON
c.state_nmbr_code = s.state_nmbr_code
AND s.country_alpha_code = 'US'
right join apsrs.photo p ON
p.cnty_id_nmbr = c.cnty_id_nmbr
left join apsrs.contrib co ON
co.agency_code = p.agency_code
left join apsrs.apsrs_lov alov ON
alov.code_value = cast(P.film_type as int)
AND alov.code_type = 'FILM_TYPE'
left join apsrs.apsrs_lov alov2 ON
alov2.code_value = cast(P.sensor as int)
AND alov2.code_type = 'SENSOR'
WHERE
p.record_no = $P{P_RecordNo}
ORDER BY p.photo_year DESC]]>
</queryString>
[/code]

Thank you in advance for any guidance/help with this problem.



M



 


Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I fixed it.  Not a problem with Source code. Surprise!

Problem was with the Jaspersoft Studio Design layout.

Title was set with property to ElementGroupHeight.  Needed to be No Stretch.

Had to do a Run Report Unit from Repository Explorer in Jaspersoft Studio to get more explanation and find this out.

Thanks to all.

M

Link to comment
Share on other sites

Compiling with a newer version of JR Library and asking it to work in an older version of JasperReports Server sounds like a recipe for heartache to me. The server runs on JR Library underneath it all and it runs on a specific version.  You don't have to install an older version of JSS/JR, or a newer version of the server.  You just have to set the compile version in JSS:

https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v71/setting-compatibility-earlier-versions-0

It may not solve it, but it's worth a shot.  Note that if your report has features that are specific to the newer version, those features won't work on an old JRS under any circumstances.

Link to comment
Share on other sites

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