Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paranamer error due to missing debug information in compiled class files

I am trying to run a spring batch on application deployed on WebSphere. When I run the batch using Eclipse all runs fine but when I run the same batch in deployed application on WebSphere it gives error

com.thoughtworks.paranamer.ParameterNamesNotFoundException: Parameter names  not found for executeMethod
    at com.thoughtworks.paranamer.BytecodeReadingParanamer$TypeCollector.getParameterNamesForMethod(BytecodeReadingParanamer.java:209)

I checked source code of paranamer BytecodeReadingParanamer class and it says

if (!collector.isDebugInfoPresent()) {
    if (throwExceptionIfMissing) {
        throw new ParameterNamesNotFoundException("Parameter names not found for " + methodName);
    } else {
        return Paranamer.EMPTY_NAMES;
    }
}

I believe it means that the Java class was not compiled with debug information (-g flag?) on WebSphere whereas in Eclipse, I have this information.

How can I correct this error on WebSphere? Do we have a add debug information in Java compiled classes flag?

like image 296
Aiden Avatar asked Feb 10 '17 16:02

Aiden


1 Answers

Thank @minus the issue was indeed with the compiler as there was some bug in the compiler server. There was not anything wrong with paranamer or code itself. The bug of compiler had to be fixed.

like image 79
Aiden Avatar answered Sep 19 '22 19:09

Aiden