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

Circular dependency found for template at..


jsturla

Recommended Posts

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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 time

Jony

Post edited by: jsturla, at: 2008/04/25 15:57

Link to comment
Share on other sites

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

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