Jump to content
Changes to the Jaspersoft community edition download ×

Duplicate case label


Recommended Posts

By: Henrik S. Larsen - skafsgaard

Duplicate case label

2003-03-05 02:51

I get this error sometimes.

I have searched the bug database without results.

The version is 0.4.1

 

mvh / regards

Henrik S. Larsen

 

 

 

 

By: Teodor Danciu - teodord

RE: Duplicate case label

2003-03-05 09:29

 

Hi,

 

What do you mean by "duplicate case label"?

 

Thank you,

Teodor

 

 

 

 

 

By: Henrik S. Larsen - skafsgaard

RE: Duplicate case label

2003-03-05 23:53

Yes sorry - should have been more clear.

It is a compilation error in the generated java code.

I manage to capture the code before it was deleted, and found a rarther large switch {} sentence with a lot of case labels. And sometimes the same case label is generated more than once.

 

It looks like it is related to the use of printWhenExpression.

 

mvh / regards

Henrik S. Larsen

 

 

 

 

By: Teodor Danciu - teodord

RE: Duplicate case label

2003-03-13 13:53

 

Hi,

 

It will help to see the XML and the java file.

Note that you can suppress the removal of the

temporary java file by setting the

"jasper.reports.compile.keep.java.file"

system property to true.

 

teodord@hotmail.com

 

Thank you,

Teodor

 

 

 

 

 

By: olivier bregeas - bregeras

RE: Duplicate case label

2003-05-30 06:12

Hi,

I have got the same problem.

 

Have you find something in the skafsgaard's code which could cause this ?

 

Thanks in advance,

Olivier

 

 

 

 

By: Dave Gray - dgray

RE: Duplicate case label

2003-06-25 12:36

We are now getting the same problem. Any ideas?

 

 

 

 

By: Ryan Johnson - delscovich

RE: Duplicate case label

2003-06-25 12:59

Hi everyone,

 

I found this as well, and posted a message in the help (#2054941) forum - it's caused by a hashcode collision. I've only ever gotten it with the JR ant task on multiple reports

 

When JR is creating the report template, it uses the hashcodes of the objects used to store the information about each report element to create a big switch statement (in three places) in the intermediate .java file.

 

It seems that objects are created in the same memory space every time, and if conditions are right (due to the number of reports being compiled, what else the ant script has already done, etc), their hashcodes can collide. It's usually not the same report element every time, because it's the actual memory address of the object that causes the problem.

 

I get around it either by calling the ant script from Netbeans, so it runs in Netbean's memory space, or by calling a different ant script (regrettably a longer one).

 

 

 

 

By: Teodor Danciu - teodord

RE: Duplicate case label

2003-07-07 13:17

 

Hi,

 

The patch is now part of the new 0.5.0 version.

 

Thank you,

Teodor

 

 

 

 

 

By: Ryan Johnson - delscovich

RE: Duplicate case label

2003-06-25 13:21

OK,

 

I submitted a patch that will fix the problem

 

Ryan

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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