jsturla Posted April 25, 2008 Share Posted April 25, 2008 Hi, I am trying to use a jasper template of styles (jrtx) file that uses anoteh jrtx file (ttt...ttt). The idea is that the report (jrxml) and both template files are saved in the jasperserver repository. I have a report that references a template file and that template file references other template file. Something like this: rpt->template A->template B In the repository of jasperserver I have a resource at root level named "estilos_basicos" that corresponds to template B. In the report unit published in the jasperserver I have a resource named "estilos" that corresponds to template A in the above example. In the report (jrxml) I have a tag: "repo:estilos", again template A in the above example. In the template file identified as "estilos" resource in the report unit there are a tag: repo:/estilos_basicos. That is, a reference to the template B in the above example. All this gives me the error: net.sf.jasperreports.engine.JRRuntimeException: Circular dependency found for template at location repo:/estilos_basicos... Any sugestion ? Tanks Link to comment Share on other sites More sharing options...
lucianc Posted April 25, 2008 Share Posted April 25, 2008 Could you post some files to reproduce this issue? I've tried to replicate the behaviour by using the files from the JasperReports "templates" sample (modified to use repo:/... jrtx locations), and everything worked fine. Regards,Lucian Link to comment Share on other sites More sharing options...
jsturla Posted April 25, 2008 Author Share Posted April 25, 2008 I have tried combinations of references to "repo" resources and some works fine. The combination that is not working for me is when the "linked" resources (templates) are both defined as resources in the report unit. For the 3 files that I am attaching I defined the folowing in JasperServer: A report unit named test created uploading the file test.jrxml (attached). This report unit has 2 resources defined:1) "estilos" a resource type style template that was created uploading the file estilo.jrtx (attached) 2) "estilos_basicos" a resource type style template that was created uploading the file estilos_basicos.jrtx As you can see in the file estilos.jrtx there are a reference to estilos_basicos resource (<template><![CDATA[repo:estilos_basicos]]></template>) in the repository of Jasperserver When I try to run the report unit test I get the folowing error:net.sf.jasperreports.engine.JRRuntimeException: Circular dependency found for template at location repo:estilos_basicos Tanks for your timeJonyPost edited by: jsturla, at: 2008/04/25 15:57 Link to comment Share on other sites More sharing options...
jsturla Posted April 25, 2008 Author Share Posted April 25, 2008 The files... [file name=jasper-16ccf3aefd080ddf5606e645f725ae57.zip size=1960] Link to comment Share on other sites More sharing options...
lucianc Posted April 26, 2008 Share Posted April 26, 2008 This is indeed a bug. Please log it so that we can track it properly. There are two ways to workaround it: Remove the references from the report JRXML, since jrtx resources local to the report unit are automatically registered when the report is executed. Switch to external jrtx resources. This makes more sense since jrtx files should be reusable stlye libraries, but if they are added as report unit local resources they are not actually shareable. [/ul] Regards, Lucian Link to comment Share on other sites More sharing options...
jsturla Posted April 26, 2008 Author Share Posted April 26, 2008 Ok, published (Artifact artf3194)Tanks again!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now