You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by cnoelle <gi...@git.apache.org> on 2016/06/01 10:32:52 UTC

[GitHub] wicket pull request: modified class resolution to account for OSGi classload...

GitHub user cnoelle opened a pull request:

    https://github.com/apache/wicket/pull/171

    modified class resolution to account for OSGi classloader handling

    The commit fixes a ClassNotFoundException that occurs when using Wicket with the Felix OSGi framework and Pax Wicket (https://github.com/ops4j/org.ops4j.pax.wicket) as OSGi-wrapper. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cnoelle/wicket wicket-6.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/wicket/pull/171.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #171
    
----
commit 570441f079ecb5de36ce032c4edb6c6cdf9887f4
Author: cnoelle <ch...@web.de>
Date:   2016-06-01T10:21:41Z

    modified class resolution to account for OSGi classloader handling

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket issue #171: modified class resolution to account for OSGi classloader...

Posted by cnoelle <gi...@git.apache.org>.
Github user cnoelle commented on the issue:

    https://github.com/apache/wicket/pull/171
  
    Ok, that does solve it. Thanks a lot!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request #171: modified class resolution to account for OSGi clas...

Posted by cnoelle <gi...@git.apache.org>.
Github user cnoelle closed the pull request at:

    https://github.com/apache/wicket/pull/171


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket issue #171: modified class resolution to account for OSGi classloader...

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the issue:

    https://github.com/apache/wicket/pull/171
  
    Hi,
    
    Thank you for the Pull Request!
    Could you please provide more information why this change is needed ?
    For OSGi environment the application is supposed to use custom IClassResolver.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket issue #171: modified class resolution to account for OSGi classloader...

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the issue:

    https://github.com/apache/wicket/pull/171
  
    I see.
    There was a discussion recently about this at dev@wicket.apache.org.
    You have to use `Application#internalInit()` instead of `#init()` in that case.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket issue #171: modified class resolution to account for OSGi classloader...

Posted by cnoelle <gi...@git.apache.org>.
Github user cnoelle commented on the issue:

    https://github.com/apache/wicket/pull/171
  
    Hi,
    
    I tried using a custom class resolver (one provided by Pax Wicket), but it doesn't help.
    Below is the stack trace that causes the problem... there is no IClassResolver involved, instead the class is loaded via WicketObject.resolveClass() (called by WicketObject.newInstance() in the stack trace). I suspect this is due to the fact that the Application#initializeComponents() is called before the Application#init() method, where one would normally register the class loader? 
    
    Caused by: org.apache.wicket.WicketRuntimeException: Unable to create org.ops4j.pax.wicket.internal.Initializer
    	at org.apache.wicket.core.util.lang.WicketObjects.newInstance(WicketObjects.java:385)
    	at org.apache.wicket.Application.addInitializer(Application.java:587)
    	at org.apache.wicket.Application.load(Application.java:633)
    	at org.apache.wicket.Application.initializeComponents(Application.java:511)
    	at org.apache.wicket.Application.initApplication(Application.java:829)
    	at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:427)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---