Barcode - local class incompatible: stream classdesc serialVersionUID



I'm work with one problematic report and he always throws a same exception when client JRE aren't equals of server. This is an RMI app and the exception only occours with this report. 


He is a simple report, however he have an barcode component, and I've used 2 implementations offerted by iReport 5.0.1 (Barbecue and Barcode4j) and both throwed the same exception:

java.rmi.UnmarshalException: error unmarshalling return; nested exception is: javax.swing.JComponent; local class incompatible: stream classdesc serialVersionUID = -2790168081368361182, local class serialVersionUID = 5670834184508236790
at sun.rmi.server.UnicastRef.invoke(
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(
at java.rmi.server.RemoteObjectInvocationHandler.invoke(
at $Proxy17.geraRelatorio(Unknown Source)
at base.gui.reports.ReportsPrinter.showReport(
at base.gui.reports.ReportsPrinter.showReport(
at jacad.gui.cadastros.curso.FrameCadastroPeriodoLetivo$30.executaAtividade(
at jdaap.gui.components.loader.Loader$1.doInBackground(
at jdaap.gui.components.loader.Loader$1.doInBackground(
at javax.swing.SwingWorker$
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: javax.swing.JComponent; local class incompatible: stream classdesc serialVersionUID = -2790168081368361182, local class serialVersionUID = 5670834184508236790


I'm don't know want do now, I've tryed all to fix this, I don't believe that error was caused by Java code because this app have +- 300 reports, and only this have a barcode. Follow a sample of Java code to call this report by RMI:


public JasperPrint executeReport(String reportFile,Map parameters) throws GenericException{,>
    FileInputStream is=(FileInputStream) getReportFile(reportFile);
    Connection conn=getConnection();
    JasperPrint print = null;
        try {
        parameters.put("P_REPORTS_PATH", Application.getInstance().getReportsPath());
        parameters.put(JRParameter.REPORT_LOCALE, new Locale("pt", "BR"));
print = JasperFillManager.fillReport(Application.getInstance().getReportsPath()+reportFile, parameters, conn);
} catch (JRException e1) {
throw new GenericException(e1);
        }catch (Exception e){
        return print;


Client side:


public void showReport(String reportFile, Map parameters) throws GenericException{
if (reportFile ==null)
throw new GenericException("Report file não pode ser nulo.");
ReportsManager rm;
try {
rm = (ReportsManager) FacadeFactoryLocal.newInstance(ReportsManager.class);
JasperPrint jasperPrint = rm.geraRelatorio(reportFile, parameters);  
} catch (RemoteException e1) {
throw new GenericException("Erro ao acessar o servidor para gerar o relatório.", e1.getStackTrace());
public static void view (final JasperPrint print) throws GenericException
if (print == null){
throw new GenericException("Nenhuma visualização do relatório foi informada.");
new SwingWorker() {,>
protected Void doInBackground() throws Exception {
JFrame viewer = new JFrame("Visualização do Relatório"); //$NON-NLS-1$
       viewer.setPreferredSize(new Dimension(800, 600));
       JasperViewer jrViewer = new JasperViewer(print, true);
       new FrameConfig(viewer);
       return null;


Someone have an solution for this ?

Thanks in advance.

carlos.spohr's picture
Joined: Jan 21 2013 - 11:29am
Last seen: 8 months 2 weeks ago

0 Answers:

No answers yet