Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Classloading problems while migrating vom 3.1.0 to 3.2.1
Classloading problems while migrating vom 3.1.0 to 3.2.1 [message #76330] Fri, 03 November 2006 20:58 Go to next message
Thijs Metsch is currently offline Thijs MetschFriend
Messages: 13
Registered: July 2009
Junior Member
Hi @all,

I had a strange error here. Let me first explan my scenario. I have got an
RCP application which was based upon eclipse 3.1.0. I had written an own
logging service which used log4j (in LogServiceImpl).

I gained access to this logging service by using commons logging (because
always regsitering the log service is just to much). So all bundles im my
RCP application used commons-logging. Which then was registered to the log
service and send log message. The output looked as follows:

2006-11-03 19:30:01,933 INFO - de.dlr.test.SimpleTest - dummyCalc() called!

Now I migrated to eclipse 3.2.1 (so exchanging org.eclipse.osgi, adding
org.eclipse.equinox.* etc). and the log message changed to:

2006-11-03 19:26:45,305 INFO - de.dlr.osgi.service.log.LogServiceImpl -
dummyCalc() called!

This is kind of strange :-) I did not change code in my plugins and the
output message changed. Now my question is: has this something to do with
the refactoring of OSGi? Or with classloading? Did anything change on that
area?

King regards from Germany,

-Thijs Metsch
Re: Classloading problems while migrating vom 3.1.0 to 3.2.1 [message #76362 is a reply to message #76330] Fri, 03 November 2006 21:11 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Thijs Metsch wrote:
> Hi @all,
>
> I had a strange error here. Let me first explan my scenario. I have got an
> RCP application which was based upon eclipse 3.1.0. I had written an own
> logging service which used log4j (in LogServiceImpl).
>
> I gained access to this logging service by using commons logging (because
> always regsitering the log service is just to much). So all bundles im my
> RCP application used commons-logging. Which then was registered to the log
> service and send log message. The output looked as follows:
>
> 2006-11-03 19:30:01,933 INFO - de.dlr.test.SimpleTest - dummyCalc() called!
>
> Now I migrated to eclipse 3.2.1 (so exchanging org.eclipse.osgi, adding
> org.eclipse.equinox.* etc). and the log message changed to:
>
> 2006-11-03 19:26:45,305 INFO - de.dlr.osgi.service.log.LogServiceImpl -
> dummyCalc() called!
>
> This is kind of strange :-) I did not change code in my plugins and the
> output message changed. Now my question is: has this something to do with
> the refactoring of OSGi? Or with classloading? Did anything change on that
> area?
>
> King regards from Germany,
>
> -Thijs Metsch
>
>

I do not understand the output. What are de.dlr.test.SimpleTest and
de.dlr.osgi.service.log.LogServiceImpl? Are these classes? If so How
does your logging system know what class called into it?

It is hard to tell what went wrong. Is there a testcase we can use to
reproduce?

Tom
Re: Classloading problems while migrating vom 3.1.0 to 3.2.1 [message #76394 is a reply to message #76362] Fri, 03 November 2006 21:24 Go to previous messageGo to next message
Thijs Metsch is currently offline Thijs MetschFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,

Thx for the fast reply...see answers below...

>> I had a strange error here. Let me first explan my scenario. I have got
>> an RCP application which was based upon eclipse 3.1.0. I had written an
>> own logging service which used log4j (in LogServiceImpl).
>>
>> I gained access to this logging service by using commons logging (because
>> always regsitering the log service is just to much). So all bundles im my
>> RCP application used commons-logging. Which then was registered to the
>> log service and send log message. The output looked as follows:
>>
>> 2006-11-03 19:30:01,933 INFO - de.dlr.test.SimpleTest - dummyCalc()
>> called!
>>
>> Now I migrated to eclipse 3.2.1 (so exchanging org.eclipse.osgi, adding
>> org.eclipse.equinox.* etc). and the log message changed to:
>>
>> 2006-11-03 19:26:45,305 INFO - de.dlr.osgi.service.log.LogServiceImpl -
>> dummyCalc() called!
>>
>> This is kind of strange :-) I did not change code in my plugins and the
>> output message changed. Now my question is: has this something to do with
>> the refactoring of OSGi? Or with classloading? Did anything change on
>> that area?
>>
>> King regards from Germany,
>>
>> -Thijs Metsch
>
> I do not understand the output. What are de.dlr.test.SimpleTest and
> de.dlr.osgi.service.log.LogServiceImpl? Are these classes? If so How
> does your logging system know what class called into it?

I'll give it a try to give some more details. The setup is as follows:

I have a bundle de.dlr.test with a class de.dlr.test.SimpleTest in it. It
uses commons-logging to call logger.info("dummyCalc() called!");

I have a bundle which is called de.dlr.osgi.service.log which has all
classes in it which are needed to realize a logger service (Interfaces are
in in org.osgi.service.log). Also included is the configuration of
commons.logging which says to use the LogServiceImpl! LogServiceImpl
implements the interface LogService and therefore hast the methods log(). In
the method log() I'm calling log4j which then presents the output.

> It is hard to tell what went wrong. Is there a testcase we can use to
> reproduce?

I will give it a try and setup a testcase so it can be tested more commonly.

Greetings,

-Thijs
Re: Classloading problems while migrating vom 3.1.0 to 3.2.1 [message #76409 is a reply to message #76394] Sat, 04 November 2006 11:22 Go to previous messageGo to next message
Thijs Metsch is currently offline Thijs MetschFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,

>> I do not understand the output. What are de.dlr.test.SimpleTest and
>> de.dlr.osgi.service.log.LogServiceImpl? Are these classes? If so How
>> does your logging system know what class called into it?

I made a test setup. Feel free to download the files
http://217.79.187.62/~thijs/test/test-with-3.1.0.zip and
http://217.79.187.62/~thijs/test/test-with-3.2.1.zip.

Both include the same bundles. Only the OSGi revision changed from 3.1.0
to 3.2.1. But the output is different (See the rce.log file after
starting eclipse.exe).

In the first case (OSGi equinox version 3.1.0) it looks like:

2006-11-04 12:13:50,302 INFO - de.dlr.osgi.service.log.LogServiceImpl -
Log Service is registered
2006-11-04 12:13:50,318 INFO - de.dlr.test.TestActivator - start called

In the second case (OSGi equinox version 3.2.1) it looks like:

2006-11-04 12:13:57,240 INFO - de.dlr.osgi.service.log.LogServiceImpl -
Log Service is registered
2006-11-04 12:13:57,256 INFO - de.dlr.osgi.service.log.LogServiceImpl -
start called

The source code is included (Or for log service in
http://217.79.187.62/~thijs/test/src-log.zip)

It would be great if you could test this scenario and give a idee why
this is happing. I'm still somehow confused.

Regards,

-Thijs
Re: Classloading problems while migrating vom 3.1.0 to 3.2.1 [message #76526 is a reply to message #76409] Mon, 06 November 2006 01:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com

Can you attach any examples etc to a bug report. Eclipse committers
ought not run around downloading random things unless the license is
really clear. By putting it on any eclipse.org server you are
contributing it under the EPL so we are safe to look at it.

Thanks

Jeff

Thijs Metsch wrote:
>
> Hi,
>
>>> I do not understand the output. What are de.dlr.test.SimpleTest and
>>> de.dlr.osgi.service.log.LogServiceImpl? Are these classes? If so
>>> How does your logging system know what class called into it?
>
> I made a test setup. Feel free to download the files
> http://217.79.187.62/~thijs/test/test-with-3.1.0.zip and
> http://217.79.187.62/~thijs/test/test-with-3.2.1.zip.
>
> Both include the same bundles. Only the OSGi revision changed from 3.1.0
> to 3.2.1. But the output is different (See the rce.log file after
> starting eclipse.exe).
>
> In the first case (OSGi equinox version 3.1.0) it looks like:
>
> 2006-11-04 12:13:50,302 INFO - de.dlr.osgi.service.log.LogServiceImpl -
> Log Service is registered
> 2006-11-04 12:13:50,318 INFO - de.dlr.test.TestActivator - start called
>
> In the second case (OSGi equinox version 3.2.1) it looks like:
>
> 2006-11-04 12:13:57,240 INFO - de.dlr.osgi.service.log.LogServiceImpl -
> Log Service is registered
> 2006-11-04 12:13:57,256 INFO - de.dlr.osgi.service.log.LogServiceImpl -
> start called
>
> The source code is included (Or for log service in
> http://217.79.187.62/~thijs/test/src-log.zip)
>
> It would be great if you could test this scenario and give a idee why
> this is happing. I'm still somehow confused.
>
> Regards,
>
> -Thijs
Re: Classloading problems while migrating vom 3.1.0 to 3.2.1 [message #76590 is a reply to message #76526] Mon, 06 November 2006 07:00 Go to previous message
Thijs Metsch is currently offline Thijs MetschFriend
Messages: 13
Registered: July 2009
Junior Member
Jeff McAffer wrote:
> Can you attach any examples etc to a bug report. Eclipse committers
> ought not run around downloading random things unless the license is
> really clear. By putting it on any eclipse.org server you are
> contributing it under the EPL so we are safe to look at it.
>
> Thanks
>
> Jeff

No problem see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=163513 :-)

Regards,

-Thijs Metsch
Previous Topic:Passing OSGI an argument when deployed in Jetty
Next Topic:Best way to determine whether Equinox is running
Goto Forum:
  


Current Time: Thu Sep 26 13:58:39 GMT 2024

Powered by FUDForum. Page generated in 0.06175 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top