Closed bibhuduttaGitHub closed 3 years ago
Hi @bibhuduttaGitHub
HI Vishal, Thanks for the response. I am using JFrog as my central maven. So the "groupid" and 'artifactid" that you see in the POM, is autogenerated by JFrog upon uploading the jar to JFrog. I am copying the same dependency snippet from JFrog and adding to my POM. I could see the same jars are available in my m2 home as well. I have attached the debug log of the mvn clean package to check further. mvn_build_error.txt
Hi @bibhuduttaGitHub, Thanks for sharing debug logs. It seems the maven plugin was unable to parse MANIFEST.MF for one of the dependency jar file. Could you inspect those jars?
Any specific thing i need to look for? Any pointers will be helpful.
HI Vishal, Appreciate your response on this. As these jars were used in the BW 5.x and we never had issues. Just wondering how we mvn is finding issues with respect to MANIFEST.MF.. Is there any tool where we can validate the MANIFEST file? Even if it validates how do we ensure it does the validation correctly.
Hi @bibhuduttaGitHub, Maven plugin reads Manifest.mf file from each dependency jar to understand if it is a shared module or other library. Based on the debug logs shared by you, It was able to parse the manifest and add it as dependency for sqljdbc4.jar
file, but failed for the next one.
[DEBUG] Dependency added with name /usr2/<
>/.m2/repository/sqljdbc4/sqljdbc4/sqljdbc4/sqljdbc4-sqljdbc4.jar
You can check if jar file is not corrupted. Unzip the jars in a temporary folder and check if the manifest.mf file is located at META-INF\MANIFEST.MF
. Open the MANIFEST.MF file and check its contents. Also please share more details on plugins.jar
. Thanks.
HI Vishal, i could find the MANIFEST.MF file in the correct folder structure in the jar. However, i am not sure if anything wrng with the manifet file. I don't think jar is corrupted, because i can unzip the jar and it explodes correctly. I have attached all the 4 manifest. Please take a look and let me know if anything wrong. FYI: i .ve renamed them as .log. MANIFEST.log MANIFEST.log MANIFEST.log MANIFEST.log
HI Vishal, Did you get a chance to verify the manifest.
Hi @bibhuduttaGitHub, Please share the project and dependency jars to reproduce the issue. You can share the artifacts via TIBCO support case and mention the support case number here.
Case #01895887 . Please check.
Hi @bibhuduttaGitHub , The plugins.jar
has issues. You can verify the same by executing the command -
jar tf plugins.jar
.
The META-INF/MANIFEST.MF
is the last entry in the output. The JarInputStream.getManifest() expects the Manifest file entry at first or second line in the ouput. It returns null otherwise. Please refer below links for more details -
JDK Issue - JDK-4338238 JarInputStream.java (Line no. 79)
Please regenerate the plugins.jar. Thanks.
HI Vishal, thanks for the update. How i can make the Manifest entry to be the first/2nd entry? we don't build this jar. We get it from migration, we are not sure who created and how. Can you help.
Hi @bibhuduttaGitHub, This link may help. But it is always recommended to fix the issue while exporting the jar.
Thanks Vishal, I was able to resolve the issue after rebuilding the jar and packaging MANIFEST.MF as a first file to package. BTW, should it be reported as a BUG? As its not mandatory to include the MANIFEST.MF file as a first/second file in your jar packaging.
Hi @bibhuduttaGitHub, From the reference links shared in my earlier responses, MANIFEST.MF entry on first/second line is constraint required from JDK while packaging the jar. It is not an issue with bw6 maven plugin.
So, what is the way to identify which jar has the issue? Do we have to manually do a jar tf for each jar and see the output to identify the null pointer exception? The bw maven plugin output does not give much info at which its failing though.
Hi tibco team,
I'm having the same issue with a jar from maven repository, based on the description shared on this issue, seems the jar was not generated as per the JDK constraints hence the META-INF/MANIFEST.MF file is not comming on th first/second entry.
How can I fix this is the jar used I did not build it and it comes from the apache foundation pulsar project.
Maven Plugin version: 2.7.0
Maven version:3.6.3
Product : Either of TIBCO ActiveMatrix Businessworks 6 OR TIBCO Businessworks Container edition
Product version:TIBCO Businessworks Container edition 2.5.4
Component: Either of Maven Eclipse Plugin or Maven build plugin
Steps to reproduce the issue:
Additional environment details if any:
Describe the results you received: [INFO] Reactor Summary for <>.application.parent 1.0.12-SNAPSHOT:
[INFO]
[INFO] <>.application.parent ........... SUCCESS [ 0.946 s]
[INFO] <>.............................. FAILURE [ 23.219 s]
[INFO] <>.application .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:52 min
[INFO] Finished at: 2020-09-22T10:52:06-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.tibco.plugins:bw6-maven-plugin:2.7.0:bwmodule (default-bwmodule) on project <>: Execution default-bwmodule of goal com.tibco.plugins:bw6-maven-plugin:2.7.0:bwmodule failed.: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.tibco.plugins:bw6-maven-plugin:2.7.0:bwmodule (default-bwmodule) on project
Describe the results you expected: it should ideally build the package.
Additional information you deem important (e.g. issue happens only occasionally):