-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Using patch-gen.sh, I am unable to generate a patch automatically through distribution diff.
I prepared an unzipped distribution (compiled from latest patches-master) and added a new file into module nu.xom. When I try to generate a patch for this change using patch-gen.sh, I get
INFO [org.jboss.modules] JBoss Modules version 1.3.0.Beta3 java.lang.NullPointerException at org.jboss.as.patching.generator.PatchConfigBuilder$PatchConfigImpl$1.modifyLayer(PatchConfigBuilder.java:205) at org.jboss.as.patching.generator.PatchBuilderWrapper.modifyLayer(PatchBuilderWrapper.java:67) at org.jboss.as.patching.generator.PatchBuilderWrapper.compare(PatchBuilderWrapper.java:109) at org.jboss.as.patching.generator.PatchBuilderWrapper.compare(PatchBuilderWrapper.java:58) at org.jboss.as.patching.generator.PatchGenerator.process(PatchGenerator.java:131) at org.jboss.as.patching.generator.PatchGenerator.main(PatchGenerator.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.modules.Module.run(Module.java:292) at org.jboss.modules.Main.main(Main.java:455)
The "elements" Map in PatchConfigBuilder instance is empty, so the PatchElementConfigBuilder instance is not found. Not sure where it is supposed to be added into the map.
The config.xml which I pass to patch-gen using --patch-config:
<patch-config xmlns="urn:jboss:patch-config:1.0"> <name>patch-12345</name> <description>patch description</description> <one-off name="WildFly" applies-to-version="8.0.0.Alpha4-SNAPSHOT" /> <generate-by-diff/> </patch-config>
When I use specified-content rather than generate-by-diff, it works correctly.