This code is falling at runtime. I believe it's the multi-exception syntax in the catch is the issue. If I changed it to catch(Exception e) it works. Here is my proguard config,source code and exception
-dontwarn
-verbose
-dontshrink
-dontoptimize
-keepattributes Signature, Annotation, !LocalVariableTable,!LocalVariableTypeTable
-keep class com.coreinformatics.**{
public protected <fields>;
public protected <methods>;
}</methods></fields>
public MSExcelFileProcessor(InputStream in, String delimiter, boolean singleQuotedData)
throws FileProcessorException {
this.delimiter = delimiter;
data = new HashMap<>();
singledQuotedData = singleQuotedData;
try {
workbook = WorkbookFactory.create(in);
workbook.setMissingCellPolicy(Row.CREATE_NULL_AS_BLANK);
} **catch (IOException | InvalidFormatException e)** {
LOG.error(e);
throw new FileProcessorException(e);
}
}
Exception in thread "Thread-23" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/coreinformatics/fileprocessor/processors/file/MSExcelFileProcessor.<init>(Ljava/io/InputStream;Ljava/lang/String;Z)V @66: invokespecial
Reason:
Type 'java/lang/Object' (current frame, stack[2]) is not assignable to 'java/lang/Throwable'
Current Frame:
bci: @66
flags: { }
locals: { top, 'java/lang/Object' }
stack: { uninitialized 61, uninitialized 61, 'java/lang/Object' }
Bytecode:
0x0000000: 2ab7 002a 2a01 b500 262a 2cb5 0027 2abb
0x0000010: 0016 59b7 0038 b500 242a 1db5 0028 2a2b
0x0000020: b800 3db5 0026 2ab4 0026 b200 29b9 0049
0x0000030: 0200 b14c b200 252b b900 4002 00bb 000a
0x0000040: 592b b700 2cbf
Exception Handler Table:
bci [30, 50] => handler: 51
bci [30, 50] => handler: 51
Stackmap Table:
full_frame(@51,{},{Object[#15]})</init>
Thanks for your report. I can't seem to reproduce the problem yet. Which compiler are you using? Do you have a small sample class that I can build and run?
Eric,
Thank you for getting back to me. I'm compiling and running with Java 1.8. The constructor takes an MSExcel file as an input stream and the remaining arguments can be "," and false. Attached is a file in case you don't have MSExcel. The exception happens in the construction of this class.
Thanks,
Vico
/*
*/
package com.coreinformatics.fileprocessor.processors.file;
import com.coreinformatics.fileprocessor.mapping.MappingType;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
The type Ms excel file processor.
*/
class MSExcelFileProcessor extends FileProcessor
{
private static final Logger LOG = LogManager.getLogger(MSExcelFileProcessor.class);
private Workbook workbook = null;
/**
*
@throws FileProcessorException the file processor exception
*/
public MSExcelFileProcessor(InputStream in, String delimiter, boolean singleQuotedData)
throws FileProcessorException
{
this.delimiter = delimiter;
data = new HashMap<>();
singledQuotedData = singleQuotedData;
try
{
workbook = WorkbookFactory.create(in);
workbook.setMissingCellPolicy(Row.CREATE_NULL_AS_BLANK);
}
catch (IOException | InvalidFormatException e)
{
LOG.error(e);
}
}
/**
*
@return
*/
@Override
public List<inputstream> chunkStream(MappingType map, InputStream stream)
{
List<inputstream> result = new ArrayList<>();</inputstream></inputstream>
result.add(stream);
return result;
}
/**
*/
@Override
public void close()
{
try
{
data.clear();
data = null;
workbook = null;
}
catch (Exception e)
{
LOG.error(e);
}
}
/**
*
@throws FileProcessorException
*/
@Override
public String getCellValue(int sheetNumber, int row, int column) throws FileProcessorException, BlankRowException
{
String result = null;
Sheet sheet = workbook.getSheetAt(sheetNumber - 1);
if (sheet != null && sheet.getRow(row - 1) != null)
{
if (!checkIfRowIsEmpty(sheet.getRow(row - 1)))
{
Cell c = sheet.getRow(row - 1).getCell(column - 1);
if (c != null)
{
result = getCellValue(c);
}
else
{
throw new FileProcessorException("Column number " + column + " not found.");
}
}
else
{
throw new BlankRowException("Row number " + row + " in blank.");
}
}
else
{
throw new FileProcessorException("Row number " + row + " not found.");
}
return result;
}
/**
*
@throws FileProcessorException
*/
@Override
public int getColumnNumberByHeader(int sheetNumber, int row, String columnName) throws FileProcessorException
{
final int[] result = { -1 };
Sheet sheet = workbook.getSheetAt(sheetNumber - 1);
if (sheet != null)
{
Row r = sheet.getRow(row - 1);
}
else
{
throw new FileProcessorException("Sheet number " + sheetNumber + " not found.");
}
return result[0];
}
/**
*
*/
@Override
public int getNumberOfRecords(int sheet)
{
return workbook.getSheetAt(sheet - 1).getLastRowNum() + 1;
}
private String getCellValue(Cell c)
{
String result;
}
private boolean checkIfRowIsEmpty(Row row)
{
boolean isEmptyRow = true;
}
}
From: Eric Lafortune [mailto:lafortune@users.sf.net]
Sent: Saturday, June 11, 2016 4:49 PM
To: [proguard:bugs] 607@bugs.proguard.p.re.sf.net
Subject: [proguard:bugs] #607 java.lang.VerifyError: Bad type on operand stack
Thanks for your report. I can't seem to reproduce the problem yet. Which compiler are you using? Do you have a small sample class that I can build and run?
[bugs:#607]https://sourceforge.net/p/proguard/bugs/607/ java.lang.VerifyError: Bad type on operand stack
Status: open
Group: v5.2
Created: Wed May 25, 2016 05:58 PM UTC by Vico Minnocci
Last Updated: Wed May 25, 2016 05:58 PM UTC
Owner: nobody
This code is falling at runtime. I believe it's the multi-exception syntax in the catch is the issue. If I changed it to catch(Exception e) it works. Here is my proguard config,source code and exception
-dontwarn
-verbose
-dontshrink
-dontoptimize
-keepattributes Signature, Annotation, !LocalVariableTable,!LocalVariableTypeTable
-keep class com.coreinformatics.**{
public protected <fields>;
public protected <methods>;
}</methods></fields>
public MSExcelFileProcessor(InputStream in, String delimiter, boolean singleQuotedData)
throws FileProcessorException {
this.delimiter = delimiter;
data = new HashMap<>();
singledQuotedData = singleQuotedData;
}
Exception in thread "Thread-23" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/coreinformatics/fileprocessor/processors/file/MSExcelFileProcessor.<init>(Ljava/io/InputStream;Ljava/lang/String;Z)V @66: invokespecial
Reason:
Type 'java/lang/Object' (current frame, stack[2]) is not assignable to 'java/lang/Throwable'
Current Frame:
bci: @66
flags: { }
locals: { top, 'java/lang/Object' }
stack: { uninitialized 61, uninitialized 61, 'java/lang/Object' }
Bytecode:
0x0000000: 2ab7 002a 2a01 b500 262a 2cb5 0027 2abb
0x0000010: 0016 59b7 0038 b500 242a 1db5 0028 2a2b
0x0000020: b800 3db5 0026 2ab4 0026 b200 29b9 0049
0x0000030: 0200 b14c b200 252b b900 4002 00bb 000a
0x0000040: 592b b700 2cbf
Exception Handler Table:
bci [30, 50] => handler: 51
bci [30, 50] => handler: 51
Stackmap Table:
full_frame(@51,{},{Object[#15]https://sourceforge.net/p/proguard/bugs/15/})</init>
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/proguard/bugs/607/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Confidentiality Notice: The information transmitted in this email, including attachments, is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the designated recipient of this email, any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error, please contact the sender and destroy all copies of this information.
Core Informatics, LLC, 36 East Industrial Road, Branford, Connecticut, USA 06405
Related
Bugs:
#15Bugs: #607
I've also run into a "VerifyError: Bad type on operand stack" problem. I am not using multi-catch. I am compiling with JDK 1.7.0_45 and tried both Proguard 5.2.1 and 5.3.1. I will email you a JAR and Proguard settings that consistently reproduce the problem, hopefully that helps!
I'm also running into this issue. The simplest case to reproduce is below. The catch block catches multiple exceptions and gives "Exception in thread "main" java.lang.VerifyError: Bad type on operand stack".
As previously mentioned, changing the catch to just catch Exception, or having separate catch blocks for each exception both work. I'm compiling with jdk 1.8.0_91 and using proguard 5.3.2
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/doug/test/App.main([Ljava/lang/String;)V @47: invokevirtual
Reason:
Type 'java/lang/Object' (current frame, stack[1]) is not assignable to 'java/security/GeneralSecurityException'
Current Frame:
bci: @47
flags: { }
locals: { top, top, top, 'java/lang/Object' }
stack: { 'java/io/PrintStream', 'java/lang/Object' }
Bytecode:
0x0000000: b200 0b12 01b6 000c bb00 0959 b700 104c
0x0000010: 2b04 b600 113d 1c9e 000b bb00 0859 b700
0x0000020: 0fbf bb00 0a59 b700 12bf 4eb2 000b 2db6
0x0000030: 000e b600 0cb1
Exception Handler Table:
bci [22, 42] => handler: 42
bci [22, 42] => handler: 42
Stackmap Table:
chop_frame(@34,1)
same_locals_1_stack_item_frame(@42,Object[#5])
Proguard configuration file is below
Related
Bugs:
#5Hi Eric,
Has this bug been fixed in v5.3.2? I am getting this "java.lang.VerifyError: Bad type on operand stack" error at run time. I feel i too have a similiar problem in my code.
I am getting the similiar error. Below is the error stack. I have a source java class that has multi exception syntax in it. I am using ProGuard v5.3.2, Maven Proguard Plugin with plugin version 2.0.14.
My proguard configuration is after the error stack trace.
Error Stack:
ERROR org.apache.storm.util - Async loop died!
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/mycompany/dmip/procjobstep/formatter/a.a(Lcom/mycompany/dmip/jobstep/f/c;Lcom/mycompany/dmip/jobstep/strategy/w;)Ljava/util/Map; @185: invokevirtual
Reason:
Type 'java/lang/Object' (current frame, stack[3]) is not assignable to 'java/lang/Exception'
Current Frame:
bci: @185
flags: { }
locals: { top, top, top, top, top, top, top, 'java/lang/Object' }
stack: { uninitialized 170, uninitialized 170, 'java/lang/StringBuilder', 'java/lang/Object' }
Bytecode:
0x0000000: 2ab4 002f 2cb6 003a b800 44b9 004e 0200
0x0000010: c000 1d4e 2dc7 0024 2cb6 0038 3a04 2a19
0x0000020: 0412 08b6 003b 4e2a b400 2f2c b600 3ab8
0x0000030: 0044 2db9 004f 0300 572b 120a b900 4c02
0x0000040: 003a 0519 05c1 002a 9900 0d19 05c0 002a
0x0000050: 3a04 a700 252c b600 3912 0ab6 0032 b600
0x0000060: 3303 b900 4d02 00c0 000f b600 3119 05b8
0x0000070: 003c b800 3d3a 04bb 0021 59b7 0042 3a06
0x0000080: b200 303a 0719 0412 0719 07b9 004f 0300
0x0000090: 57b2 002e 120c 1904 b900 5003 002d 1904
0x00000a0: 1906 b600 40a7 0023 3a07 bb00 1259 bb00
0x00000b0: 2659 1205 b700 4619 07b6 0043 b600 47b6
0x00000c0: 0048 1907 b700 34bf 1906 b600 453a 07b2
0x00000d0: 002e 1202 1907 b900 5003 0012 0b19 07b8
0x00000e0: 003c b0
Exception Handler Table:
bci [128, 165] => handler: 168
bci [128, 165] => handler: 168
Stackmap Table:
full_frame(@57,{Top,Object[#20],Object[#23],Object[#29]},{})
full_frame(@85,{Top,Top,Object[#23],Object[#29],Top,Object[#36]},{})
full_frame(@119,{Top,Top,Top,Object[#29],Object[#42]},{})
full_frame(@168,{},{Object[#36]})
full_frame(@200,{Top,Top,Top,Top,Top,Top,Object[#33]},{})
2017-04-13 16:25:45.188 [Thread-6-formatter-executor[2 2]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} ERROR org.apache.storm.daemon.executor -
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/mycompany/dmip/procjobstep/formatter/a.a(Lcom/mycompany/dmip/jobstep/f/c;Lcom/mycompany/dmip/jobstep/strategy/w;)Ljava/util/Map; @185: invokevirtual
Reason:
Type 'java/lang/Object' (current frame, stack[3]) is not assignable to 'java/lang/Exception'
Current Frame:
bci: @185
flags: { }
locals: { top, top, top, top, top, top, top, 'java/lang/Object' }
stack: { uninitialized 170, uninitialized 170, 'java/lang/StringBuilder', 'java/lang/Object' }
Bytecode:
0x0000000: 2ab4 002f 2cb6 003a b800 44b9 004e 0200
0x0000010: c000 1d4e 2dc7 0024 2cb6 0038 3a04 2a19
0x0000020: 0412 08b6 003b 4e2a b400 2f2c b600 3ab8
0x0000030: 0044 2db9 004f 0300 572b 120a b900 4c02
0x0000040: 003a 0519 05c1 002a 9900 0d19 05c0 002a
0x0000050: 3a04 a700 252c b600 3912 0ab6 0032 b600
0x0000060: 3303 b900 4d02 00c0 000f b600 3119 05b8
0x0000070: 003c b800 3d3a 04bb 0021 59b7 0042 3a06
0x0000080: b200 303a 0719 0412 0719 07b9 004f 0300
0x0000090: 57b2 002e 120c 1904 b900 5003 002d 1904
0x00000a0: 1906 b600 40a7 0023 3a07 bb00 1259 bb00
0x00000b0: 2659 1205 b700 4619 07b6 0043 b600 47b6
0x00000c0: 0048 1907 b700 34bf 1906 b600 453a 07b2
0x00000d0: 002e 1202 1907 b900 5003 0012 0b19 07b8
0x00000e0: 003c b0
Exception Handler Table:
bci [128, 165] => handler: 168
bci [128, 165] => handler: 168
Stackmap Table:
full_frame(@57,{Top,Object[#20],Object[#23],Object[#29]},{})
full_frame(@85,{Top,Top,Object[#23],Object[#29],Top,Object[#36]},{})
full_frame(@119,{Top,Top,Top,Object[#29],Object[#42]},{})
full_frame(@168,{},{Object[#36]})
full_frame(@200,{Top,Top,Top,Top,Top,Top,Object[#33]},{})
2017-04-13 16:25:45.198 [Thread-10-SourceInbound-executor[1 1]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} INFO com.mycompany.dmip.g - ++ loading software version information: {MAJOR_RELEASE=3, SVN_REVISION=10932, MINOR_RELEASE=0, DMIP_RELEASE=3.0.0.0.2-SNAPSHOT}
2017-04-13 16:25:45.200 [Thread-10-SourceInbound-executor[1 1]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} INFO com.mycompany.dmip.g - Creating Version instance (should be once per JVM on DPC)
2017-04-13 16:25:45.323 [Thread-6-formatter-executor[2 2]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} ERROR org.apache.storm.util - Halting process: ("Worker died")
java.lang.RuntimeException: ("Worker died")
at org.apache.storm.util$exit_process_BANG_.doInvoke(util.clj:341) [storm-core-1.0.2.jar:1.0.2]
at clojure.lang.RestFn.invoke(RestFn.java:423) [clojure-1.7.0.jar:?]
at org.apache.storm.daemon.worker$fn8663$fn8664.invoke(worker.clj:765) [storm-core-1.0.2.jar:1.0.2]
at org.apache.storm.daemon.executor$mk_executor_data$fn7875$fn7876.invoke(executor.clj:274) [storm-core-1.0.2.jar:1.0.2]
at org.apache.storm.util$async_loop$fn**624.invoke(util.clj:494) [storm-core-1.0.2.jar:1.0.2]
at clojure.lang.AFn.run(AFn.java:22) [clojure-1.7.0.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
2017-04-13 16:26:03.077 [Thread-10-SourceInbound-executor[1 1]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} INFO STDIO - loading software version information: {}{MAJOR_RELEASE=3, SVN_REVISION=10932, MINOR_RELEASE=0, DMIP_RELEASE=3.0.0.0.2-SNAPSHOT}
2017-04-13 16:26:03.084 [Thread-6-formatter-executor[2 2]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} ERROR org.apache.storm.util - Async loop died!
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/mycompany/dmip/procjobstep/formatter/a.a(Lcom/mycompany/dmip/jobstep/f/c;Lcom/mycompany/dmip/jobstep/strategy/w;)Ljava/util/Map; @185: invokevirtual
Reason:
Type 'java/lang/Object' (current frame, stack[3]) is not assignable to 'java/lang/Exception'
Current Frame:
bci: @185
flags: { }
locals: { top, top, top, top, top, top, top, 'java/lang/Object' }
stack: { uninitialized 170, uninitialized 170, 'java/lang/StringBuilder', 'java/lang/Object' }
Bytecode:
0x0000000: 2ab4 002f 2cb6 003a b800 44b9 004e 0200
0x0000010: c000 1d4e 2dc7 0024 2cb6 0038 3a04 2a19
0x0000020: 0412 08b6 003b 4e2a b400 2f2c b600 3ab8
0x0000030: 0044 2db9 004f 0300 572b 120a b900 4c02
0x0000040: 003a 0519 05c1 002a 9900 0d19 05c0 002a
0x0000050: 3a04 a700 252c b600 3912 0ab6 0032 b600
0x0000060: 3303 b900 4d02 00c0 000f b600 3119 05b8
0x0000070: 003c b800 3d3a 04bb 0021 59b7 0042 3a06
0x0000080: b200 303a 0719 0412 0719 07b9 004f 0300
0x0000090: 57b2 002e 120c 1904 b900 5003 002d 1904
0x00000a0: 1906 b600 40a7 0023 3a07 bb00 1259 bb00
0x00000b0: 2659 1205 b700 4619 07b6 0043 b600 47b6
0x00000c0: 0048 1907 b700 34bf 1906 b600 453a 07b2
0x00000d0: 002e 1202 1907 b900 5003 0012 0b19 07b8
0x00000e0: 003c b0
Exception Handler Table:
bci [128, 165] => handler: 168
bci [128, 165] => handler: 168
Stackmap Table:
full_frame(@57,{Top,Object[#20],Object[#23],Object[#29]},{})
full_frame(@85,{Top,Top,Object[#23],Object[#29],Top,Object[#36]},{})
full_frame(@119,{Top,Top,Top,Object[#29],Object[#42]},{})
full_frame(@168,{},{Object[#36]})
full_frame(@200,{Top,Top,Top,Top,Top,Top,Object[#33]},{})
2017-04-13 16:26:03.101 [Thread-6-formatter-executor[2 2]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} ERROR org.apache.storm.daemon.executor -
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/mycompany/dmip/procjobstep/formatter/a.a(Lcom/mycompany/dmip/jobstep/f/c;Lcom/mycompany/dmip/jobstep/strategy/w;)Ljava/util/Map; @185: invokevirtual
Reason:
Type 'java/lang/Object' (current frame, stack[3]) is not assignable to 'java/lang/Exception'
Current Frame:
bci: @185
flags: { }
locals: { top, top, top, top, top, top, top, 'java/lang/Object' }
stack: { uninitialized 170, uninitialized 170, 'java/lang/StringBuilder', 'java/lang/Object' }
Bytecode:
0x0000000: 2ab4 002f 2cb6 003a b800 44b9 004e 0200
0x0000010: c000 1d4e 2dc7 0024 2cb6 0038 3a04 2a19
0x0000020: 0412 08b6 003b 4e2a b400 2f2c b600 3ab8
0x0000030: 0044 2db9 004f 0300 572b 120a b900 4c02
0x0000040: 003a 0519 05c1 002a 9900 0d19 05c0 002a
0x0000050: 3a04 a700 252c b600 3912 0ab6 0032 b600
0x0000060: 3303 b900 4d02 00c0 000f b600 3119 05b8
0x0000070: 003c b800 3d3a 04bb 0021 59b7 0042 3a06
0x0000080: b200 303a 0719 0412 0719 07b9 004f 0300
0x0000090: 57b2 002e 120c 1904 b900 5003 002d 1904
0x00000a0: 1906 b600 40a7 0023 3a07 bb00 1259 bb00
0x00000b0: 2659 1205 b700 4619 07b6 0043 b600 47b6
0x00000c0: 0048 1907 b700 34bf 1906 b600 453a 07b2
0x00000d0: 002e 1202 1907 b900 5003 0012 0b19 07b8
0x00000e0: 003c b0
Exception Handler Table:
bci [128, 165] => handler: 168
bci [128, 165] => handler: 168
Stackmap Table:
full_frame(@57,{Top,Object[#20],Object[#23],Object[#29]},{})
full_frame(@85,{Top,Top,Object[#23],Object[#29],Top,Object[#36]},{})
full_frame(@119,{Top,Top,Top,Object[#29],Object[#42]},{})
full_frame(@168,{},{Object[#36]})
full_frame(@200,{Top,Top,Top,Top,Top,Top,Object[#33]},{})
2017-04-13 16:26:03.107 [Thread-10-SourceInbound-executor[1 1]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} INFO com.mycompany.dmip.g - ++ loading software version information: {MAJOR_RELEASE=3, SVN_REVISION=10932, MINOR_RELEASE=0, DMIP_RELEASE=3.0.0.0.2-SNAPSHOT}
2017-04-13 16:26:03.113 [Thread-10-SourceInbound-executor[1 1]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} INFO com.mycompany.dmip.g - Creating Version instance (should be once per JVM on DPC)
2017-04-13 16:26:03.430 [Thread-6-formatter-executor[2 2]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} ERROR org.apache.storm.util - Halting process: ("Worker died")
java.lang.RuntimeException: ("Worker died")
at org.apache.storm.util$exit_process_BANG_.doInvoke(util.clj:341) [storm-core-1.0.2.jar:1.0.2]
at clojure.lang.RestFn.invoke(RestFn.java:423) [clojure-1.7.0.jar:?]
at org.apache.storm.daemon.worker$fn__8663$fn__8664.invoke(worker.clj:765) [storm-core-1.0.2.jar:1.0.2]
at org.apache.storm.daemon.executor$mk_executor_data$fn__7875$fn__7876.invoke(executor.clj:274) [storm-core-1.0.2.jar:1.0.2]
at org.apache.storm.util$async_loop$fn__624.invoke(util.clj:494) [storm-core-1.0.2.jar:1.0.2]
at clojure.lang.AFn.run(AFn.java:22) [clojure-1.7.0.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
2017-04-13 16:26:20.548 [Thread-10-SourceInbound-executor[1 1]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} INFO STDIO - loading software version information: {}{MAJOR_RELEASE=3, SVN_REVISION=10932, MINOR_RELEASE=0, DMIP_RELEASE=3.0.0.0.2-SNAPSHOT}
2017-04-13 16:26:20.544 [Thread-6-formatter-executor[2 2]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} ERROR org.apache.storm.util - Async loop died!
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/mycompany/dmip/procjobstep/formatter/a.a(Lcom/mycompany/dmip/jobstep/f/c;Lcom/mycompany/dmip/jobstep/strategy/w;)Ljava/util/Map; @185: invokevirtual
Reason:
Type 'java/lang/Object' (current frame, stack[3]) is not assignable to 'java/lang/Exception'
Current Frame:
bci: @185
flags: { }
locals: { top, top, top, top, top, top, top, 'java/lang/Object' }
stack: { uninitialized 170, uninitialized 170, 'java/lang/StringBuilder', 'java/lang/Object' }
Bytecode:
0x0000000: 2ab4 002f 2cb6 003a b800 44b9 004e 0200
0x0000010: c000 1d4e 2dc7 0024 2cb6 0038 3a04 2a19
0x0000020: 0412 08b6 003b 4e2a b400 2f2c b600 3ab8
0x0000030: 0044 2db9 004f 0300 572b 120a b900 4c02
0x0000040: 003a 0519 05c1 002a 9900 0d19 05c0 002a
0x0000050: 3a04 a700 252c b600 3912 0ab6 0032 b600
0x0000060: 3303 b900 4d02 00c0 000f b600 3119 05b8
0x0000070: 003c b800 3d3a 04bb 0021 59b7 0042 3a06
0x0000080: b200 303a 0719 0412 0719 07b9 004f 0300
0x0000090: 57b2 002e 120c 1904 b900 5003 002d 1904
0x00000a0: 1906 b600 40a7 0023 3a07 bb00 1259 bb00
0x00000b0: 2659 1205 b700 4619 07b6 0043 b600 47b6
0x00000c0: 0048 1907 b700 34bf 1906 b600 453a 07b2
0x00000d0: 002e 1202 1907 b900 5003 0012 0b19 07b8
0x00000e0: 003c b0
Exception Handler Table:
bci [128, 165] => handler: 168
bci [128, 165] => handler: 168
Stackmap Table:
full_frame(@57,{Top,Object[#20],Object[#23],Object[#29]},{})
full_frame(@85,{Top,Top,Object[#23],Object[#29],Top,Object[#36]},{})
full_frame(@119,{Top,Top,Top,Object[#29],Object[#42]},{})
full_frame(@168,{},{Object[#36]})
full_frame(@200,{Top,Top,Top,Top,Top,Top,Object[#33]},{})
2017-04-13 16:26:20.554 [Thread-6-formatter-executor[2 2]] itemId= { jobName="FormatterPH1PU1" ,jobTemplateId="test" ,userOrAppId="1" ,tenantId="1", jobStep=""} ERROR org.apache.storm.daemon.executor -
java.lang.VerifyError: Bad type on operand stack
Exception Details:
ProGuard Configuration.
<option>-injars ${work.folder}/rt-repo-jars-${project.version}.jar(!org/springframework/integration/gateway/MessagingGatewaySupport.class)</option> <option>-outjars ${project.build.directory}/dmpstreaming/modules/dpc/files/dmipDPC.jar</option> <option>-injars ${work.folder}/job-builder-${project.version}-jar.jar(!org/springframework/integration/gateway/MessagingGatewaySupport.class)</option> <option>-outjars ${project.build.directory}/dmpstreaming/modules/job_builder/files/job-builder.jar</option> <option>-injars ${work.folder}/formatter-jobstep/formatter-jobstep-${project.version}/lib/formatter-jobstep-${project.version}.jar</option> <option>-outjars ${work.folder}/formatter-jobstep/formatter-jobstep-${project.version}/lib/formatter-jobstep-${project.version}-obfuscate.jar</option> <option>-libraryjars ${work.folder}/spring-integration-core-4.3.0.RELEASE.jar(!org/springframework/integration/gateway/MessagingGatewaySupport.class)</option> <option>-libraryjars ${work.folder}/storm-core-1.0.2.jar</option> <option>-libraryjars ${work.folder}/jdom2-2.0.6.jar</option> <option>-libraryjars ${work.folder}/AdvCommon-7.3.0.jar</option> <option>-libraryjars ${work.folder}/Advisor-7.3.0.jar</option> <option>-libraryjars ${work.folder}/AdvisorSvr-7.3.0.jar</option> <option>-libraryjars ${work.folder}/InnovatorRT-7.3.0.jar</option> <option>-libraryjars ${work.folder}/OROMatcher-7.3.0.jar</option> <option>-libraryjars ${work.folder}/quartz-2.1.0.jar</option> <option>-keep class !com.mycompany.** { *; }</option> <option>-keep,includedescriptorclasses public class com.mycompany.dmip.common.builder.manager.JobBuilderManager { public static void main(java.lang.String[]); }</option> <option>-keep class com.mycompany.dmip.jobstep.strategy.AbstractBaseInJobStepStrategyBuilder { ]]>(...); ]]>; ]]>; } </option> <option>-keep class com.mycompany.dmip.cache.manager.CacheManagerFactory { ]]>(...); ]]>; ]]>; } </option> <option>-keep class org.apache.storm.topology.OutputFieldsDeclarer { *; }</option> <option>-keep class com.mycompany.dmip.procjobstep.formatter.FormatterStrategyBuilder { *; }option> </option><option>-dontusemixedcaseclassnames</option> <option>-dontskipnonpubliclibraryclasses</option> <option>-dontskipnonpubliclibraryclassmembers</option> <option>-useuniqueclassmembernames</option> <option>-dontoptimize</option> <option>-dontshrink</option> <option>-dontnote</option> <option>-dontwarn</option> <option>-keepattributes SourceFile,LineNumberTable</option> <option>-renamesourcefileattribute SourceFile</option> <option>-keepattributes *Annotation*,Signature,RuntimeVisible</option> <option>-keepattributes InnerClasses,Deprecated,EnclosingMethod</option> <option>-keepclassmembers enum * { *; }</option> <option>-keepclassmembers class * implements java.io.Serializable { static final long serialVersionUID; private static final java.io.ObjectStreamField[] serialPersistentFields; !static !transient ]]>; private void writeObject(java.io.ObjectOutputStream); private void readObject(java.io.ObjectInputStream); java.lang.Object writeReplace(); java.lang.Object readResolve(); } </option> <option>-keepclasseswithmembernames,includedescriptorclasses class * { native ]]>; } </option> <option>-printmapping ${project.build.directory}/mycompany_map.map</option> <option>-verbose</option> ***Java Class:***<plugin>
<dependencies>
<dependency>
<groupid>net.sf.proguard</groupid>
<artifactid>proguard-base</artifactid>
<version>5.3.2</version>
</dependency>
</dependencies>
<groupid>com.github.wvengen</groupid>
<artifactid>proguard-maven-plugin</artifactid>
<version>2.0.14</version>
<executions>
<execution>
<id>obfuscate-jobstep-framework</id>
<phase>compile</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<proguardversion>5.3.2</proguardversion>
<obfuscate>true</obfuscate>
<options></options></configuration></plugin>
Related
Bugs:
#20Bugs:
#23Bugs:
#29Bugs:
#33Bugs:
#36Bugs:
#42I am also receiving this error when running progaurd6.0.3 on any code using multi-catch.
Simply changing my multi-catch blocks to single catch blocks, and duplicating the code resolves the issue, but it is a serious hinderance.
Why has this not been fixed? And still on "works for me" status.
Last edit: Justis R 2018-06-21
Do you have a reproduction? I was trying to reproduce this one to narrow it down, but I used one of the other examples above, and couldn't get it to happen.
Reviewing the issue again, I can reproduce it with the sample of Doug Duthie (higher up). Sorry about the delay. I'll look into it.
The problem in Doug's sample is masked by
-ignorewarnings. Specifying-libraryjarswith the Java 9 runtimejmods/java.base.jmodinstead of the Java 8 runtimelib/rt.jarsolves the issue. ProGuard can then find the referencedjavax.crypto.NoSuchPaddingExceptionand its class hierarchy.Hey Eric, what you pointed out was helpful. It seems Doug was referencing the java rt.jar as though it were located on MacOS (I use Mac), rather than Windows, and given the rest of his library references, I'm certain he's using windows, so his rt.jar reference was likely pointing to something nonexistent.
Doug try C:\Program Files\Java..etc ensure your library reference is correct.
I also realized I was improperly referencing rt.jar; I fixed my reference to 1.8's rt.jar and all of my problems were gone.
However, I couldn't find any documentation on migrating from 1.8 to 1.9 and above. I've tried referencing java.base.jmod as you've suggested:
However, doing this results in the exact same problem as previously existed, ProGaurd couldn't find any of the java class references from this.
Any ideas why this would be working for you and not me?
EDIT: Just found a bug report regarding this, it's still open but as priority 7: https://sourceforge.net/p/proguard/bugs/551/
Last edit: Justis R 2018-08-10
PgoGuard 6.0 is out, so issue #551 should have been closed. If you still see a similar problem, make sure that you specify the runtime libraries and other external libraries that your application requires:
java.base.jmod. ProGuard doesn't automatically load additional jmod files based on any metadata that might be present.The console output lists any classes that are missing and that may lead to corrupt output. Avoid
-ignorewarningsor-dontwarnunless you know why it's applicable.You can currently find some documentation in the examples, e.g.
examples/standalone/applications.proUsing "(!.jar;!module-info.class)" at the end of the jmod path as suggested in the examples resulted in the library not being able to be read. Not sure why the example uses that. However, I did get it to work without the "(!.jar;!module-info.class)".
Thanks for all of your help Eric.
I believe you can close this request. Since the OP didn't specify any libraryjar at all, and Dough and I both incorrectly referrenced our java librarys, I believe it's safe to conclude that the output jars being broken upon usage of a multi exception catch line as reported in this bug is only a direct result of not properly specifying our java runtime libs.