• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java.lang.veryifyerror in JDK6  RSS feed

 
Simon Ruddleston
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been using JBuilder 8 with JDK1.4 and have recently changed to JDK1.6. When building the software everything is OK apart from a few deprication warning for using Java.Uil.Logging.Logger.

When running the application (which ran OK under JDK1.4) I get

Exception in thread "main" java.lang.VerifyError: (class: bestFit/BestFitControllerImpl, method: showMakeSurveyFailureDialog signature: (LbestFit/mvc/dataPanelMvc/SurveyException;)V) Incompatible object argument for function call

Through experimenting with code it appears to be that the verifyer doesn't like String concatenation of more than 2 string. That is if I use a StringBuffer or concatenate the strings one by one, the verifyer error moves to the next string concatenation problem ie

private void showMakeSurveyFailureDialog(SurveyException e) {
JOptionPane.showMessageDialog(view,
"Problem computing the coords from survey records.\n\n" +
e.getMessage() + "\nRefer to log for detailed errors.",
"BestFit Dimensional Application", JOptionPane.WARNING_MESSAGE);
}

causes the error but

private void showMakeSurveyFailureDialog(SurveyException e) {
StringBuffer buffer = new StringBuffer("Problem computing the coords from survey records.\n\n");
buffer.append(e.getMessage());
buffer.append("\nRefer to log for detailed errors.");
JOptionPane.showMessageDialog(view, buffer.toString,
"BestFit Dimensional Application", JOptionPane.WARNING_MESSAGE);
}

doesn't.

Is multiple string addition at a single go a problem in JDK1.5 / JDK1.6 or is there some other problem I'm not aware of?

Any help would be greatly appreciated. Thinking of using Eclipse and would like to sort out this problem first.

Best regards

Simon
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there is no problem with concating multiple Strings (though that looks ugly to me, and produces a lot of un-necessary Strings so I would prefer a StringBuilder). The API for VerifyError says it is caused when there is some inconsistency or security errors in a class. I would start by deleting all the .class files associated with the project and re-building the whole thing from scratch.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!