[ 
https://issues.apache.org/jira/browse/FELIX-5105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15011603#comment-15011603
 ] 

Miroslav Šulc commented on FELIX-5105:
--------------------------------------

i forgot to mention that i run my app in apache tomcat but i don't know whether 
that makes any difference.

i just manually edited start level of web console to 2 to run it after all 
other bundles and restarted tomcat and the configuration displays now. after 
changing it back to 1 (which makes it start before metatype) and restarting 
tomcat the configuration disappeared again. so it seems it's as you wrote, that 
web console must be started after metatype and not before.

here is my list of bundles:

com.fordfrog.osgi.dataobject (1.5.0) "FordFrog's OSGi Data Object" [active, 12] 
com.fordfrog.osgi.datawriter (1.0.3) "FordFrog's OSGi Data Writer" [active, 1] 
com.fordfrog.osgi.exceptions (1.2.0) "FordFrog's OSGi Exceptions" [active, 10] 
com.fordfrog.osgi.http.service (1.18.1) "FordFrog's OSGi HTTP Service" [active, 
15] 
com.fordfrog.osgi.mime (1.1.1) "FordFrog's OSGi MIME Helper" [active, 14] 
com.fordfrog.osgi.org.json.json (20150729.0.0.1) "FordFrog's OSGi Bundle of 
org.json JSON Library" [active, 8] 
javax.mail (1.5.0.b01) "JavaMail API (compat)" [active, 7] 
javax.ws.rs-osgi (2.0.0.1) "FordFrog's OSGi Implementation of JSR311" [active, 
13] 
org.apache.commons.fileupload (1.3.1) "Apache Commons FileUpload" [active, 5] 
org.apache.commons.io (2.4.0) "Commons IO" [active, 9] 
org.apache.felix.configadmin (1.8.8) "Apache Felix Configuration Admin Service" 
[active, 11] 
org.apache.felix.framework (5.4.0) "System Bundle" [active, 0] 
org.apache.felix.inventory (1.0.4) "Apache Felix Inventory" [active, 2] 
org.apache.felix.log (1.0.1) "Apache Felix Log Service" [active, 3] 
org.apache.felix.metatype (1.1.2) "Apache Felix Metatype Service" [active, 6] 
org.apache.felix.webconsole (4.2.14) "Apache Felix Web Management Console" 
[active, 4]

if you need some more info from me or you want me to debug something, it's not 
problem for me, i do java development daily so it's more about figuring out how 
it should work. i already tried to debug it before but what i found was just 
that the configuration is not picked up.

btw, i just did another test, in the scenario where web console has start level 
2 and where configuration is displayed. i stopped just metatype bundle and then 
started it again and the configuration is gone. so in my opinion it's obvious 
that web console does not listen for metatype service and hence does not 
register the metatype provider.

> Web Console configuration does not appear in configurations
> -----------------------------------------------------------
>
>                 Key: FELIX-5105
>                 URL: https://issues.apache.org/jira/browse/FELIX-5105
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-4.2.14
>            Reporter: Miroslav Šulc
>              Labels: patch
>         Attachments: metatype.xml.patch
>
>
> since some time web console configuration is more and more broken it seems. 
> there is for example bug related to lost localization of the configuration 
> which i encountered on my installations too. in some cases it also happens 
> that the web console configuration is not displayed at all. in fact i was not 
> able to display it (and so edit it) at all. i tried to debug the issue but 
> the only thing i found is that for some (to me) unknown reason the 
> configuration from java class is not picked up.
> in version 4.2.15-SNAPSHOT and older versions the metatype provider is 
> implemented as java class 
> org.apache.felix.webconsole.internal.servlet.ConfigurationMetatypeSupport. 
> that is probably the cause of the problem that the configuration usually does 
> not load, maybe because of some synchronization issue. i noticed some 
> information about attempts to fix it in previous versions of web console but 
> these were just attempts as the issue persists.
> i have no idea why the metatype provider is implemented using 
> ConfigurationMetatypeSupport class instead of using metatype.xml file which 
> would be more transparent and easier to manage, maybe it's for historical 
> reason when metatype implementation was not that capable as it is now.
> so i created metatype.xml file that defines the same configuration as is done 
> using ConfigurationMetatypeSupport and it seems to work fine. i did not 
> remove the ConfigurationMetatypeSupport and related code though as i guess it 
> would be better done by someone who better understands the code.
> i will try to attach the patch i have if i find out how.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to