Bug 1070330 - running an invalid patch command results in an exception and exit of the CLI
Summary: running an invalid patch command results in an exception and exit of the CLI
Keywords:
Status: CLOSED DUPLICATE of bug 1032041
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Patching
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Emanuel Muckenhuber
QA Contact: Jan Martiska
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-26 15:45 UTC by Tom Fonteyne
Modified: 2018-12-04 17:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-27 10:46:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tom Fonteyne 2014-02-26 15:45:01 UTC
Run an invalid patch command like these for example:

patch apply /home/tom/bin/cli/customize-6.2/patches/jboss-eap-6.2.1.zip --preserve
patch apply /home/tom/bin/cli/customize-6.2/patches/jboss-eap-6.2.1.zip --override

results in

java.lang.NullPointerException
        at org.jboss.as.patching.cli.PatchHandler.createPatchOperationBuilder(PatchHandler.java:347)
        at org.jboss.as.patching.cli.PatchHandler.doHandle(PatchHandler.java:246)
        at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:86)
        at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:600)
        at org.jboss.as.cli.impl.CommandContextImpl.handleSafe(CommandContextImpl.java:616)
        at org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.java:1204)
        at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:263)
        at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.modules.Module.run(Module.java:292)
        at org.jboss.modules.Main.main(Main.java:455)

It would be better if invalid commands caused a message like

   Syntax Error - enter "patch --help" for more info

and not to simply crash the jvm

Comment 1 Emanuel Muckenhuber 2014-02-27 10:46:59 UTC

*** This bug has been marked as a duplicate of bug 1032041 ***


Note You need to log in before you can comment on or make changes to this bug.