Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported reports cause "Duplicate declaration of field" compiler errors when run. #9

Open
tlammer opened this issue Sep 11, 2015 · 2 comments

Comments

@tlammer
Copy link
Contributor

tlammer commented Sep 11, 2015

example:
net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException; lineNumber: 62; columnNumber: 93; Error at line 62 char 93: Duplicate declaration of field : 52,54-loanPreparations,63,1,10,2,3.geography.State
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:301)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:284)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:273)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:193)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:184)
net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:250)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:551)
edu.ku.brc.specify.tasks.subpane.JasperCompilerRunnable.run(JasperCompilerRunnable.java:205)
java.lang.Thread.run(Unknown Source)

Solution:

  1. Delete the report and its query.
  2. Reimport the report. (This means edits since import will get lost.)
  3. Open the query, if you get any warnings about fields not being available, close it WITHOUT SAVING, and open the schema configalizer and un-hide the fields.
  4. Then open the query again, change anything - just to get the save button enabled - and then undo the change, and then save the query.
  5. Then you should be able to edit and save the report w/o getting the duplicate field errors.

If you don't get hidden field warnings, you should still do the save in Step 4.

@timo11
Copy link

timo11 commented Sep 11, 2015

Umm, the last line should actually say "Step 4."

On 09/11/2015 11:36 AM, Theresa Miller wrote:

example:
net.sf.jasperreports.engine.JRException:
org.xml.sax.SAXParseException; lineNumber: 62; columnNumber: 93; Error
at line 62 char 93: Duplicate declaration of field :
52,54-loanPreparations,63,1,10,2,3.geography.State
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:301)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:284)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:273)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:193)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:184)
net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:250)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:551)
edu.ku.brc.specify.tasks.subpane.JasperCompilerRunnable.run(JasperCompilerRunnable.java:205)
java.lang.Thread.run(Unknown Source)

Solution:

  1. Delete the report and its query.
  2. Reimport the report. (This means edits since import will get lost.)
  3. Open the query, if you get any warnings about fields not being
    available, close it WITHOUT SAVING, and open the schema configalizer
    and un-hide the fields.
  4. Then open the query again, change anything - just to get the save
    button enabled - and then undo the change, and then save the query.
  5. Then you should be able to edit and save the report w/o getting the
    duplicate field errors.

If you don't get hidden field warnings, you should still do the save
in Step 3.


Reply to this email directly or view it on GitHub
#9.

@tlammer
Copy link
Contributor Author

tlammer commented Sep 11, 2015

?thanks


From: timo11 [email protected]
Sent: Friday, September 11, 2015 11:55 AM
To: specify/Specify-6-Knowledge-Base
Cc: Miller, Theresa
Subject: Re: [Specify-6-Knowledge-Base] Imported reports cause "Duplicate declaration of field" compiler errors when run. (#9)

Umm, the last line should actually say "Step 4."

On 09/11/2015 11:36 AM, Theresa Miller wrote:

example:
net.sf.jasperreports.engine.JRException:
org.xml.sax.SAXParseException; lineNumber: 62; columnNumber: 93; Error
at line 62 char 93: Duplicate declaration of field :
52,54-loanPreparations,63,1,10,2,3.geography.State
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:301)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:284)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:273)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:193)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:184)
net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:250)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:551)
edu.ku.brc.specify.tasks.subpane.JasperCompilerRunnable.run(JasperCompilerRunnable.java:205)
java.lang.Thread.run(Unknown Source)

Solution:

  1. Delete the report and its query.
  2. Reimport the report. (This means edits since import will get lost.)
  3. Open the query, if you get any warnings about fields not being
    available, close it WITHOUT SAVING, and open the schema configalizer
    and un-hide the fields.
  4. Then open the query again, change anything - just to get the save
    button enabled - and then undo the change, and then save the query.
  5. Then you should be able to edit and save the report w/o getting the
    duplicate field errors.

If you don't get hidden field warnings, you should still do the save
in Step 3.

Reply to this email directly or view it on GitHub
#9.

Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-139598842.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants