Bug 109299

Summary: missing BebopConfig_parameter.properties causes a semi-cryptic exception
Product: [Retired] Red Hat Web Application Framework Reporter: Vadim Nasardinov <vnasardinov>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: high Docs Contact:
Priority: high    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-07 21:22:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 106597    

Description Vadim Nasardinov 2003-11-06 17:45:06 UTC
I blew away my setup by doing

$ cdweb
$ cd conf/
$ rm -rf ccm-core registry.properties 
$ cddev
$ ant clean deploy
$ ccm load ccm-core --file my.defaults


This results in the following exception:

Exception in thread "main" com.arsdigita.util.UncheckedWrapperException:
class = class com.arsdigita.bebop.BebopConfig, params = [], values = []
(root cause: java.lang.reflect.InvocationTargetException)
...at_com.arsdigita.util.Classes.newInstance(Classes.java:86)
...at_com.arsdigita.util.Classes.newInstance(Classes.java:134)
...at_com.arsdigita.packaging.Config.<init>(Config.java:27)
...at_com.arsdigita.packaging.Load.run(Load.java:178)
...at_com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)
Root cause: java.lang.reflect.InvocationTargetException:
java.lang.NullPointerException
...at_com.arsdigita.util.parameter.AbstractParameterContext.findInfo(AbstractParameterContext.java:165)
...at_com.arsdigita.util.parameter.AbstractParameterContext.findInfo(AbstractParameterContext.java:168)
...at_com.arsdigita.util.parameter.AbstractParameterContext.findInfo(AbstractParameterContext.java:168)
...at_com.arsdigita.util.parameter.AbstractParameterContext.findInfo(AbstractParameterContext.java:168)
...at_com.arsdigita.util.parameter.AbstractParameterContext.loadInfo(AbstractParameterContext.java:180)
...at_com.arsdigita.bebop.BebopConfig.<init>(BebopConfig.java:60)
...at_java.lang.reflect.Constructor.newInstance(Native Method)
...at_com.arsdigita.util.Classes.newInstance(Classes.java:78)
...at_com.arsdigita.util.Classes.newInstance(Classes.java:134)
...at_com.arsdigita.packaging.Config.<init>(Config.java:27)
...at_com.arsdigita.packaging.Load.run(Load.java:178)
...at_com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)


As far as I can tell, this is because there is no
//core-platform/dev/src/com/arsdigita/bebop/BebopConfig_parameter.properties.

At the very least, we may want to make the exception more informative.

Comment 1 Vadim Nasardinov 2003-11-06 17:50:31 UTC
I added an empty BebopConfig_parameter.properties at change 37762.
This prevents the exception from being raised, but doesn't
supply the required properties.


Comment 2 Jon Orris 2003-11-06 20:17:32 UTC
Making APLAWS blocking & moving to high severity.

This error occurs when trying to install CCM.
Follow the install guide, and get to:
ccm load --interactive ccm-core 

You will get this error.

Comment 3 Vadim Nasardinov 2003-11-06 20:19:04 UTC
Jon, have you synced to 37762 or greater?


Comment 4 Jon Orris 2003-11-06 20:19:46 UTC
To clarify a bit:
This occurs installing production CCM @37765

[root@ccm-installer ccm]# rpm -qa |grep ccm
ccm-tools-servlet-resin-0.9.0-1
ccm-tools-0.9.0-1
ccm-core-6.1.0.AUTO.37765-1
ccm-config-libs-1.2.0-1


Comment 5 Vadim Nasardinov 2003-11-06 20:22:26 UTC
Can you 
p4 sync -f \
//core-platform/dev/src/com/arsdigita/bebop/BebopConfig_parameter.properties



Comment 6 Jon Orris 2003-11-06 20:27:38 UTC
Well, that's not the problem. The problem is with the RPMS. Although
they are ahead of your change, this problem seems to exist.

I can't just sync or copy the file over, as this is a test of
installing the production rpms. The file appears to exist in the core jar




[root@ccm-installer java]# jar tf ccm-core-6.1.0.jar  | grep
properties | grep -i bebop
com/arsdigita/bebop/parameters/ParameterResources_fr.properties
com/arsdigita/bebop/parameters/ParameterResources_en.properties
com/arsdigita/bebop/parameters/tidy.properties
com/arsdigita/bebop/parameters/ParameterResources_es.properties
com/arsdigita/bebop/BebopConfig_parameter.properties
com/arsdigita/bebop/ui/BebopResources_fr.properties
com/arsdigita/bebop/ui/BebopResources.properties


Comment 7 Jon Orris 2003-11-06 20:50:08 UTC
Vadim:
Nevermind, this appears to be a bug with a similar stack trace. I
didn't look closely enough at the root cause.


Comment 8 Vadim Nasardinov 2003-11-06 23:43:44 UTC
At change , I fixed an NPE and added a better exception message
for the case of of a missing BebopConfig_parameter.properties file.

The new exception looks like so:

$ ccm load ccm-core --file my.defaults 
Exception in thread "main" com.arsdigita.util.UncheckedWrapperException:
class = class com.arsdigita.bebop.BebopConfig, params = [], values = []
(root cause: java.lang.reflect.InvocationTargetException)
        at com.arsdigita.util.Classes.newInstance(Classes.java:86)
        at com.arsdigita.util.Classes.newInstance(Classes.java:134)
        at com.arsdigita.packaging.Config.<init>(Config.java:27)
        at com.arsdigita.packaging.Load.run(Load.java:178)
        at com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)
Root cause: java.lang.reflect.InvocationTargetException:
java.lang.IllegalStateException:
Could not find any of the following files:
[com/arsdigita/bebop/BebopConfig_parameter.properties
 com/arsdigita/runtime/AbstractConfig_parameter.properties
 com/arsdigita/util/parameter/AbstractParameterContext_parameter.properties
 java/lang/Object_parameter.properties]
        at
com.arsdigita.util.parameter.AbstractParameterContext.findInfo(AbstractParameterContext.java:169)
        at
com.arsdigita.util.parameter.AbstractParameterContext.loadInfo(AbstractParameterContext.java:198)
        at com.arsdigita.bebop.BebopConfig.<init>(BebopConfig.java:60)
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at com.arsdigita.util.Classes.newInstance(Classes.java:78)
        at com.arsdigita.util.Classes.newInstance(Classes.java:134)
        at com.arsdigita.packaging.Config.<init>(Config.java:27)
        at com.arsdigita.packaging.Load.run(Load.java:178)
        at com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)


Comment 9 Vadim Nasardinov 2003-11-06 23:45:06 UTC
Jon,

I tried to set up my server instance from scratch and am running
into the same exception that you saw this morning:

$ ccm load ccm-core --file my.defaults 
Exception in thread "main" com.arsdigita.util.UncheckedWrapperException:
class = class com.arsdigita.dispatcher.DispatcherConfig, params = [],
values = []
(root cause: java.lang.reflect.InvocationTargetException)
        at com.arsdigita.util.Classes.newInstance(Classes.java:86)
        at com.arsdigita.util.Classes.newInstance(Classes.java:134)
        at com.arsdigita.packaging.Config.<init>(Config.java:27)
        at com.arsdigita.packaging.Load.run(Load.java:178)
        at com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)
Root cause:
java.lang.reflect.InvocationTargetException:
java.lang.IllegalArgumentException:
no such context: class com.arsdigita.dispatcher.DispatcherConfig
        at
com.arsdigita.packaging.ConfigRegistry.getStorage(ConfigRegistry.java:219)
        at
com.arsdigita.packaging.ConfigRegistry.load(ConfigRegistry.java:289)
        at
com.arsdigita.packaging.ConfigRegistry.load(ConfigRegistry.java:260)
        at
com.arsdigita.runtime.AbstractConfig.load(AbstractConfig.java:104)
        at
com.arsdigita.runtime.AbstractConfig.load(AbstractConfig.java:128)
        at
com.arsdigita.dispatcher.DispatcherConfig.<init>(DispatcherConfig.java:58)
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at com.arsdigita.util.Classes.newInstance(Classes.java:78)
        at com.arsdigita.util.Classes.newInstance(Classes.java:134)
        at com.arsdigita.packaging.Config.<init>(Config.java:27)
        at com.arsdigita.packaging.Load.run(Load.java:178)
        at com.arsdigita.packaging.MasterTool.main(MasterTool.java:100)


Comment 10 Vadim Nasardinov 2003-11-06 23:46:08 UTC
Forgot to copy and paste the change number into my post above
that says "I fixed an NPE".  The change number is 37786.


Comment 11 Vadim Nasardinov 2003-11-07 21:13:04 UTC
This ticket reported a number of problems, all of them fixed by now:

1. There was no BebopConfig_parameter.properties.
   Fixed in 37762.

2. AbstractParameterContext had an NPE.
   Fixed in 37786.
   
3. DispatcherConfig had a call to load(), causing a runtime error.
   Fixed in 37779.

Marking as QA_READY.