[jira] Closed: (FELIX-624) Wrong classloader is used to detect bind/unbind methods

2008-07-07 Thread Carsten Ziegeler (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler closed FELIX-624. -- Resolution: Fixed Fix Version/s: scr-1.0.4 > Wrong classloader is used to detect bind/unb

[jira] Commented: (FELIX-620) manifest goal of maven-bundle-plugin ignores _include instruction

2008-07-07 Thread Sahoo (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611436#action_12611436 ] Sahoo commented on FELIX-620: - Thanks for fixing the bug so quickly. When is the next version o

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Karl Pauls
You would have to do the following around all calls into the framework: ClassLoader tccl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(null); // call into the framework } finally { Thread.currentThread().setContextClassLoader(tccl); }

RE: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Craig Phillips
Hi, - I can't use Equinox because I discovered a Null Pointer Exception when attempting to restart it (in the same "context" loosely speaking -- embedded); Also, equinox as embedded is not really "instance" based out of the box; I logged a bug on the NPE and it's probably fixed by now, but it'

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Niclas Hedhman
On Tue, Jul 8, 2008 at 4:40 AM, Karl Pauls <[EMAIL PROTECTED]> wrote: >> So, depending on how you are setting this up, you need to do >> "something", like either replicate the ContextFinder approach, or >> plainly set the TCL to null prior to loading up Felix. > > Is that something pax logging can

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Karl Pauls
On Mon, Jul 7, 2008 at 10:27 PM, Niclas Hedhman <[EMAIL PROTECTED]> wrote: > On Tue, Jul 8, 2008 at 3:26 AM, Niclas Hedhman <[EMAIL PROTECTED]> wrote: >> On Tue, Jul 8, 2008 at 1:31 AM, Karl Pauls <[EMAIL PROTECTED]> wrote: >>> Is it somehow possible that log4j is >>> doing some classloader magic i

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Niclas Hedhman
On Tue, Jul 8, 2008 at 3:26 AM, Niclas Hedhman <[EMAIL PROTECTED]> wrote: > On Tue, Jul 8, 2008 at 1:31 AM, Karl Pauls <[EMAIL PROTECTED]> wrote: >> Is it somehow possible that log4j is >> doing some classloader magic itself and maybe is using the context >> classloader? The context classloader wou

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Niclas Hedhman
On Tue, Jul 8, 2008 at 1:31 AM, Karl Pauls <[EMAIL PROTECTED]> wrote: > Is it somehow possible that log4j is > doing some classloader magic itself and maybe is using the context > classloader? The context classloader would be the WebAppClassloader I > think ... Good Suggestion. Will investigate th

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Karl Pauls
On Mon, Jul 7, 2008 at 7:17 PM, Niclas Hedhman <[EMAIL PROTECTED]> wrote: > On Tue, Jul 8, 2008 at 12:22 AM, Stuart McCulloch > <[EMAIL PROTECTED]> wrote: > >> again, this wouldn't solve the Pax-Logging issue because >> then the application will have all it's logging calls bound to >> the original

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Niclas Hedhman
On Tue, Jul 8, 2008 at 12:22 AM, Stuart McCulloch <[EMAIL PROTECTED]> wrote: > again, this wouldn't solve the Pax-Logging issue because > then the application will have all it's logging calls bound to > the original Log4J jar, which lacks the OSGi support that > Pax-Logging provides (various other

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Stuart McCulloch
2008/7/8 Sahoo <[EMAIL PROTECTED]>: > Karl Pauls wrote: > >> Since Felix is started by the web app, Felix would use that web app's >>> class >>> loader for any delegation. By having this property, both OSGi bundles >>> should >>> see same log4j classes as the web app. >>> >>> >> >> Right. I'll try

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Sahoo
Karl Pauls wrote: Since Felix is started by the web app, Felix would use that web app's class loader for any delegation. By having this property, both OSGi bundles should see same log4j classes as the web app. Right. I'll try to investigate this a bit more. Since the parent class loader

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Niclas Hedhman
On Mon, Jul 7, 2008 at 11:24 PM, Stuart McCulloch <[EMAIL PROTECTED]> wrote: > however, setting this would break Pax-Logging, because then the application > would load the Log4J public API classes from the standard Log4J jar - rather > than the custom classes from Pax-Logging that fix Log4J logging

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Stuart McCulloch
2008/7/7 Sahoo <[EMAIL PROTECTED]>: > Karl Pauls wrote: > >> On Mon, Jul 7, 2008 at 4:08 PM, Sahoo <[EMAIL PROTECTED]> wrote: >> >> >>> log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a " org.apache.log4j.Appender" variable. log4j:ERROR The cla

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Karl Pauls
On Mon, Jul 7, 2008 at 4:50 PM, Sahoo <[EMAIL PROTECTED]> wrote: > Karl Pauls wrote: >> >> On Mon, Jul 7, 2008 at 4:08 PM, Sahoo <[EMAIL PROTECTED]> wrote: >> log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a " org.apache.log4j.Appender" variabl

Re: Question about class loading and SCR (see FELIX-624)

2008-07-07 Thread Carsten Ziegeler
Stuart McCulloch wrote: looking at the current code that trawls the super-classes, I believe the problem could be solved by changing 'DependencyManager.java:734' so a ClassNotFoundException will drop down to the exhaustive search of declared methods (this code would need to be refactored out, so

[jira] Updated: (FELIX-624) Wrong classloader is used to detect bind/unbind methods

2008-07-07 Thread Carsten Ziegeler (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated FELIX-624: --- Summary: Wrong classloader is used to detect bind/unbind methods (was: Import statement incom

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Sahoo
Karl Pauls wrote: On Mon, Jul 7, 2008 at 4:08 PM, Sahoo <[EMAIL PROTECTED]> wrote: log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a " org.apache.log4j.Appender" variable. log4j:ERROR The class "org.apache.log4j.Appender" was loaded by log4j:ERROR [7.0] whereas

[jira] Resolved: (FELIX-625) Temporal Dependency improvements

2008-07-07 Thread Clement Escoffier (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Clement Escoffier resolved FELIX-625. - Resolution: Fixed Add the onTimeout support to the temporal dependencies (revision 674506)

RE: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Craig Phillips
Karl, I can send you a zip in a few... Re: strange... yeah... I want to believe that I should not have any class loader issues in OSGi in that I simply rely on the manifests and then "world is good"... Of course, I rely on the BND tool, which I couldn't live without, incidentally (I avoid maven l

[jira] Updated: (FELIX-625) Temporal Dependency improvements

2008-07-07 Thread Clement Escoffier (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Clement Escoffier updated FELIX-625: Summary: Temporal Dependency improvements (was: Temporal Dependency improvement) > Tempora

[jira] Created: (FELIX-625) Temporal Dependency improvement

2008-07-07 Thread Clement Escoffier (JIRA)
Temporal Dependency improvement --- Key: FELIX-625 URL: https://issues.apache.org/jira/browse/FELIX-625 Project: Felix Issue Type: Improvement Components: iPOJO Affects Versions: iPOJO-0.8.0

RE: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Craig Phillips
Hi, This seemed to work, sort of: > org.osgi.framework.bootdelegation=sun.*,com.sun.*, org.apache.log4j.* There was a class cast exception, as follows: > ERROR: EventDispatcher: Error during dispatch. (java.lang.ClassCastException: org.ops4j.pax.logging.internal.PaxLoggingServiceImpl$1ManagedPa

Re: Question about class loading and SCR (see FELIX-624)

2008-07-07 Thread Carsten Ziegeler
Richard S. Hall wrote: It probably makes sense to change this in some fashion. We have the same issue inside the framework when we are trying to figure out how if a class is visible to a given bundle (in Util.loadClassUsingClass()). So, it makes sense that SCR might have to do something simil

Re: Question about class loading and SCR (see FELIX-624)

2008-07-07 Thread Stuart McCulloch
2008/7/7 Carsten Ziegeler <[EMAIL PROTECTED]>: > Stuart McCulloch wrote: > >> >> imho SCR should be using the classloader of the class that declared the >> bind/unbind method, ie: >> >> method.getDeclaringClass().getClassLoader() >> >> when loading parameter classes - always using B's classloade

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Karl Pauls
On Mon, Jul 7, 2008 at 4:08 PM, Sahoo <[EMAIL PROTECTED]> wrote: > >> log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not >> assignable to a " >> >> org.apache.log4j.Appender" variable. >> >> log4j:ERROR The class "org.apache.log4j.Appender" was loaded by >> >> log4j:ERROR [7.0] whereas

Re: Question about class loading and SCR (see FELIX-624)

2008-07-07 Thread Richard S. Hall
Carsten Ziegeler wrote: Stuart McCulloch wrote: imho SCR should be using the classloader of the class that declared the bind/unbind method, ie: method.getDeclaringClass().getClassLoader() when loading parameter classes - always using B's classloader doesn't sound right to me Yes, I agre

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Karl Pauls
Strange. Somehow a class is loaded from the outside and then used inside a bundle... Are you maybe bridging something from the outside to the inside (maybe via the list parameter in the felix constructor)? Can you make an example that fails available to me (either send it to me directly or create

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Sahoo
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a " org.apache.log4j.Appender" variable. log4j:ERROR The class "org.apache.log4j.Appender" was loaded by log4j:ERROR [7.0] whereas object of type log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebappC

Re: Question about class loading and SCR (see FELIX-624)

2008-07-07 Thread Carsten Ziegeler
Stuart McCulloch wrote: imho SCR should be using the classloader of the class that declared the bind/unbind method, ie: method.getDeclaringClass().getClassLoader() when loading parameter classes - always using B's classloader doesn't sound right to me Yes, I agree - now, the current implem

[jira] Resolved: (FELIX-620) manifest goal of maven-bundle-plugin ignores _include instruction

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stuart McCulloch resolved FELIX-620. Resolution: Fixed Fixed in trunk - manifest goal now follows export instructions from includ

[jira] Assigned: (FELIX-620) manifest goal of maven-bundle-plugin ignores _include instruction

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stuart McCulloch reassigned FELIX-620: -- Assignee: Stuart McCulloch > manifest goal of maven-bundle-plugin ignores _include instr

Re: OBR

2008-07-07 Thread Guillaume Sauthier
Clement Escoffier a écrit : Hi, Providing "automatic" OBR bundle descriptions is on the iPOJO roadmap (and is currently under development). It should describe service requirements / capabilities as well as provided and required handlers. The complex stuff comes from the differentiation between f

Re: Question about class loading and SCR (see FELIX-624)

2008-07-07 Thread Stuart McCulloch
2008/7/7 Carsten Ziegeler <[EMAIL PROTECTED]>: > Hi, > > I came across a problem related to class loading in SCR and before trying > to fix this I would get some feedback if this is really a bug (see > FELX-624). > > Now, the problem is as follows - we have three bundles. > Bundle C : Provides a s

RE: OBR

2008-07-07 Thread Clement Escoffier
Hi, Providing "automatic" OBR bundle descriptions is on the iPOJO roadmap (and is currently under development). It should describe service requirements / capabilities as well as provided and required handlers. The complex stuff comes from the differentiation between factories and instances (only i

Question about class loading and SCR (see FELIX-624)

2008-07-07 Thread Carsten Ziegeler
Hi, I came across a problem related to class loading in SCR and before trying to fix this I would get some feedback if this is really a bug (see FELX-624). Now, the problem is as follows - we have three bundles. Bundle C : Provides a service for SERVICE_X which is registered through SCR. Bun

[jira] Commented: (FELIX-620) manifest goal of maven-bundle-plugin ignores _include instruction

2008-07-07 Thread Sahoo (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611146#action_12611146 ] Sahoo commented on FELIX-620: - Thanks for pointing out the typo in osgi.bundl2. Will the merge b

[jira] Updated: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Carsten Ziegeler (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated FELIX-624: --- Attachment: Archiv.zip Updated test case with three bundles > Import statement incomplete whe

[jira] Commented: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Carsten Ziegeler (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611141#action_12611141 ] Carsten Ziegeler commented on FELIX-624: Ok, i've updated my test case and it seems

[jira] Updated: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Carsten Ziegeler (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated FELIX-624: --- Attachment: (was: test.zip) > Import statement incomplete when inheriting from an abstract

RE: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Craig Phillips
Hi, Hmmm... looks like the dev mailing list doesn't like attachments... OK, I'll copy/paste the thing in... again, this would work if you run felix.jar standalone... I'm not going to do all the jre entries, they go on forever... Craig org.osgi.framework.system.packages=org.osgi.framework; versi

RE: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Craig Phillips
Hi, Attached... Craig PS - Note: this basic setup works fine if you run felix.jar standalone; I think the key error log entry is: whereas object of type "org.apache.log4j.ConsoleAppender" was loaded by [WebappClassLoader -Original Message- From: Karl Pauls [mailto:[EMAIL PROTECTED] Sent:

Re: using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Karl Pauls
Could you maybe post your complete config.properties? regards, Karl On Mon, Jul 7, 2008 at 12:59 PM, Craig Phillips <[EMAIL PROTECTED]> wrote: > Hi, I probably need to direct this to PAX, but I'll try here (felix dev) > first... Sorry to trouble you, if anyone with felix class loader > intimacy

[jira] Updated: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stuart McCulloch updated FELIX-624: --- Component/s: (was: Maven Bundle Plugin) Declarative Services (

using pax-logger/log4j in embedded felix (class loader issue)

2008-07-07 Thread Craig Phillips
Hi, I probably need to direct this to PAX, but I'll try here (felix dev) first... Sorry to trouble you, if anyone with felix class loader intimacy could take a look, I'd be appreciative... for a logger, this isn't critical and I'll probably just write my own simple FileLogger that implements LogSer

[jira] Commented: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611001#action_12611001 ] Stuart McCulloch commented on FELIX-624: Yes, that sounds like an SCR issue - is it

[jira] Commented: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611000#action_12611000 ] Stuart McCulloch commented on FELIX-624: I ran javap over the subclass and cannot fi

[jira] Commented: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Carsten Ziegeler (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610954#action_12610954 ] Carsten Ziegeler commented on FELIX-624: No, the subclass is not directly using the

[jira] Commented: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610949#action_12610949 ] Stuart McCulloch commented on FELIX-624: I'm not sure that the import is actually ne

[jira] Updated: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Carsten Ziegeler (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated FELIX-624: --- Attachment: test.zip Test case with two bundles. > Import statement incomplete when inheritin

[jira] Created: (FELIX-624) Import statement incomplete when inheriting from an abstract class from another bundle

2008-07-07 Thread Carsten Ziegeler (JIRA)
Import statement incomplete when inheriting from an abstract class from another bundle -- Key: FELIX-624 URL: https://issues.apache.org/jira/browse/FELIX-624 Project:

[jira] Commented: (FELIX-620) manifest goal of maven-bundle-plugin ignores _include instruction

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610946#action_12610946 ] Stuart McCulloch commented on FELIX-620: No - it does read the instructions from osg

[jira] Commented: (FELIX-620) manifest goal of maven-bundle-plugin ignores _include instruction

2008-07-07 Thread Sahoo (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610939#action_12610939 ] Sahoo commented on FELIX-620: - That's good. But, as I mentioned in the README, the problem is no

[jira] Commented: (FELIX-620) manifest goal of maven-bundle-plugin ignores _include instruction

2008-07-07 Thread Stuart McCulloch (JIRA)
[ https://issues.apache.org/jira/browse/FELIX-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610934#action_12610934 ] Stuart McCulloch commented on FELIX-620: Actually the include instruction is being p

Re: OBR

2008-07-07 Thread Guillaume Sauthier
Clement Escoffier a écrit : Hi, I go on my investigations about an OBR for Felix. I'm working on writing descriptions for all released bundles. Indeed, Bindex generate correctly package capabilities and requirement in term of package, but is not very useful about services. The maven-bundle-plugi