Glassfish中:am-configurator throws null pointer

这几天Glassfish启动时会报经典的Null pointer,

 

java.lang.NullPointerException
        at java.util.regex.Matcher.appendReplacement(Matcher.java:699)
        at java.util.regex.Matcher.replaceAll(Matcher.java:813)
        at java.lang.String.replaceAll(String.java:2190)
        at com.sun.am.AMConfigurator.replace(AMConfigurator.java:1574)
        at com.sun.am.AMConfigurator.updateAMConfig(AMConfigurator.java:569)
        at com.sun.am.AMConfigurator.main(AMConfigurator.java:399)
        at com.sun.am.AMConfigurator.configure(AMConfigurator.java:1879)
        at com.sun.enterprise.addons.AddonConfigurationController.invokeApi(AddonConfigurationController.java:270)
        at com.sun.enterprise.addons.AddonConfigurationController.configure(AddonConfigurationController.java:169)
        at com.sun.enterprise.addons.AddonConfigurationController.configureDAS(AddonConfigurationController.java:136)
        at com.sun.enterprise.addons.AddonFacade.configureDAS(AddonFacade.java:110)
        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 com.sun.enterprise.cli.commands.AddonControl.configureDAS(AddonControl.java:100)
        at com.sun.enterprise.cli.commands.StartDomainCommand.configureAddons(StartDomainCommand.java:486)
        at com.sun.enterprise.cli.commands.StartDomainCommand.init(StartDomainCommand.java:455)
        at com.sun.enterprise.cli.commands.StartDomainCommand.startDomain(StartDomainCommand.java:123)
        at com.sun.enterprise.cli.commands.StartDomainCommand.runCommand(StartDomainCommand.java:215)
        at com.sun.enterprise.cli.framework.CLIMain.invokeCommand(CLIMain.java:171)
        at com.sun.enterprise.cli.framework.CLIMain.main(CLIMain.java:79)
The operation CONFIGURE of addon am-configurator completed with an error. Error message : (java.lang.NullPointerException)

 

虽然不影响使用,但是超恶心,在gg上找了一边之后,在Sun java forum里面看到这两篇东西:

 

http://forums.sun.com/thread.jspa?threadID=5264683

 

http://forums.sun.com/thread.jspa?threadID=5270562&tstart=0

 

看了一遍也没什么帮助,好像都还没有解决掉,看到后面有人在源代码里面找,于是我也反编译吧,

找了一下AMConfiguration.java里面的replace(),

修改之后,重新编译放进com.sun.am中,启动,一切OK。

 

 

你可能感兴趣的:(java,thread,sun,Glassfish)