You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2009/12/03 10:18:21 UTC

[jira] Created: (FELIX-1914) Add a development subshell to ease troubleshooting classloading/resolution issues

Add a development subshell to ease troubleshooting classloading/resolution issues
---------------------------------------------------------------------------------

                 Key: FELIX-1914
                 URL: https://issues.apache.org/jira/browse/FELIX-1914
             Project: Felix
          Issue Type: Improvement
          Components: Karaf
    Affects Versions: karaf-1.2.0
            Reporter: Gert Vanthienen
            Assignee: Gert Vanthienen
             Fix For: karaf-1.4.0


At development time, people sometimes bump into classloading or bundle resolution issues.  Proposing to add a subshell with a few development tools that can be used to troubleshoot these issues:

- To solve the "unable to resolve due to constraint violation", we could build a tool that discovers multiple bundles exporting the same package that are needed to resolve the given bundle to give people a clue which uses-constraints might be involved
- To solve a CNFE, we could build a tool that takes a snapshot of imports, enabled dynamic imports and refreshes the bundle and then checks the imported packages again to see which imports were added by the dynamic import

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1914) Add a development subshell to ease troubleshooting classloading/resolution issues

Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786473#action_12786473 ] 

Gert Vanthienen commented on FELIX-1914:
----------------------------------------

Added a *{{dev:framework}}* to enable/disable debug logging on the underlying OSGi framework in http://svn.apache.org/viewvc?view=revision&revision=887538.
* dev:framework -debug enables debug logging
* dev:framework -nodebug disables debug logging

> Add a development subshell to ease troubleshooting classloading/resolution issues
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-1914
>                 URL: https://issues.apache.org/jira/browse/FELIX-1914
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.2.0
>            Reporter: Gert Vanthienen
>            Assignee: Gert Vanthienen
>             Fix For: karaf-1.4.0
>
>
> At development time, people sometimes bump into classloading or bundle resolution issues.  Proposing to add a subshell with a few development tools that can be used to troubleshoot these issues:
> - To solve the "unable to resolve due to constraint violation", we could build a tool that discovers multiple bundles exporting the same package that are needed to resolve the given bundle to give people a clue which uses-constraints might be involved
> - To solve a CNFE, we could build a tool that takes a snapshot of imports, enabled dynamic imports and refreshes the bundle and then checks the imported packages again to see which imports were added by the dynamic import

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1914) Add a development subshell to ease troubleshooting classloading/resolution issues

Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786674#action_12786674 ] 

Gert Vanthienen commented on FELIX-1914:
----------------------------------------

Add a *{{dev:dynamic-import}}* to enable/disable dynamic imports on a bundle in http://svn.apache.org/viewvc?view=revision&revision=887748
When disabling the bundle, the command will determine what packages have been added.

Example:
{noformat}
karaf@root> osgi:update 32 
...
Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
	at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:738)
	at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
	at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1650)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
	... 26 more

karaf@root> dev:dynamic-import 35
Enabling dynamic imports on bundle org.apache.servicemix.bundles.commons-dbcp [35]

karaf@root> osgi:update 32

karaf@root> dev:dynamic-import 35
Disabling dynamic imports on bundle org.apache.servicemix.bundles.commons-dbcp [35]

Additional packages wired since dynamic import was enabled:
- org.hsqldb
{noformat}

> Add a development subshell to ease troubleshooting classloading/resolution issues
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-1914
>                 URL: https://issues.apache.org/jira/browse/FELIX-1914
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.2.0
>            Reporter: Gert Vanthienen
>            Assignee: Gert Vanthienen
>             Fix For: karaf-1.4.0
>
>
> At development time, people sometimes bump into classloading or bundle resolution issues.  Proposing to add a subshell with a few development tools that can be used to troubleshoot these issues:
> - To solve the "unable to resolve due to constraint violation", we could build a tool that discovers multiple bundles exporting the same package that are needed to resolve the given bundle to give people a clue which uses-constraints might be involved
> - To solve a CNFE, we could build a tool that takes a snapshot of imports, enabled dynamic imports and refreshes the bundle and then checks the imported packages again to see which imports were added by the dynamic import

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-1914) Add a development subshell to ease troubleshooting classloading/resolution issues

Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gert Vanthienen closed FELIX-1914.
----------------------------------

    Resolution: Fixed

An initial set of 3 commands has been added to the dev: shell:
- dev:show-tree <id> to show bundle wiring as dependency tree
- dev:framework -(no)debug to enable/disable OSGi framework debug logging
- dev:dynamic-import to enable/disable dynamic import on the fly

Closing this issue - we can always create new issues if we think of new commands to add to the shell.

> Add a development subshell to ease troubleshooting classloading/resolution issues
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-1914
>                 URL: https://issues.apache.org/jira/browse/FELIX-1914
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.2.0
>            Reporter: Gert Vanthienen
>            Assignee: Gert Vanthienen
>             Fix For: karaf-1.4.0
>
>
> At development time, people sometimes bump into classloading or bundle resolution issues.  Proposing to add a subshell with a few development tools that can be used to troubleshoot these issues:
> - To solve the "unable to resolve due to constraint violation", we could build a tool that discovers multiple bundles exporting the same package that are needed to resolve the given bundle to give people a clue which uses-constraints might be involved
> - To solve a CNFE, we could build a tool that takes a snapshot of imports, enabled dynamic imports and refreshes the bundle and then checks the imported packages again to see which imports were added by the dynamic import

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1914) Add a development subshell to ease troubleshooting classloading/resolution issues

Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785971#action_12785971 ] 

Gert Vanthienen commented on FELIX-1914:
----------------------------------------

Added a *{{dev:show-tree}}* in http://svn.apache.org/viewvc?view=revision&revision=887233

This can be used to represent bundle dependencies 'graphically' and it will also warn users if multiple bundles in the dependency graph are exporting the same packages.

{noformat}
karaf@root> dev:show-tree 36
Bundle wip.foobar [36] is currently INSTALLED
- using wip.bar2 [34] to resolve import org.wip.bar;version="2.0.0"
- using wip.foo [35] to resolve import org.wip.foo

wip.foobar [36]
+- wip.bar2 [34]
+- wip.foo [35]
   +- wip.bar1 [33]

WARNING: multiple bundles are exporting package org.wip.bar
- wip.bar1 [33]
- wip.bar2 [34]
{noformat}

> Add a development subshell to ease troubleshooting classloading/resolution issues
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-1914
>                 URL: https://issues.apache.org/jira/browse/FELIX-1914
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.2.0
>            Reporter: Gert Vanthienen
>            Assignee: Gert Vanthienen
>             Fix For: karaf-1.4.0
>
>
> At development time, people sometimes bump into classloading or bundle resolution issues.  Proposing to add a subshell with a few development tools that can be used to troubleshoot these issues:
> - To solve the "unable to resolve due to constraint violation", we could build a tool that discovers multiple bundles exporting the same package that are needed to resolve the given bundle to give people a clue which uses-constraints might be involved
> - To solve a CNFE, we could build a tool that takes a snapshot of imports, enabled dynamic imports and refreshes the bundle and then checks the imported packages again to see which imports were added by the dynamic import

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.