Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] RE: equinox-dev Digest, Vol 41, Issue 52

Many thanks

Regards
 
George
 
Cell: 082 493 0934
Fax: 088 011 913-0317
 
george.goebel@xxxxxxxxxxxx
 
PO Box 26134                                    
East Rand
1462        
               
-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx
[mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of
equinox-dev-request@xxxxxxxxxxx
Sent: Monday, September 29, 2008 6:01 PM
To: equinox-dev@xxxxxxxxxxx
Subject: equinox-dev Digest, Vol 41, Issue 52

Send equinox-dev mailing list submissions to
	equinox-dev@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
	https://dev.eclipse.org/mailman/listinfo/equinox-dev
or, via email, send a message with subject or body 'help' to
	equinox-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
	equinox-dev-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of equinox-dev digest..."


Today's Topics:

   1. Re: Extension registry evolution (Gunnar Wagenknecht)
   2. Re: Problems starting Equinox Aspects on the command	line
      (Heiko Seeberger)
   3. Re: Problems starting Equinox Aspects on the command 	line
      (tharbig@xxxxxxxxxxxx)
   4. Re: Problems starting Equinox Aspects on the command	line
      (Martin Lippert)


----------------------------------------------------------------------

Message: 1
Date: Sun, 28 Sep 2008 21:16:51 +0200
From: Gunnar Wagenknecht <gunnar@xxxxxxxxxxxxxxx>
Subject: [equinox-dev] Re: Extension registry evolution
To: equinox-dev@xxxxxxxxxxx
Message-ID: <gbol7c$3p6$1@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1

Boris Bokowski schrieb:
> public class SomeContributedView {
>  public SomeContributedView(ISelectionService ss, IProgressService ps,
> IWorkbenchHelpSystem hs) {
> ...
> }

I think it pretty much comes down to a personal preference. I could also
imagine that there could be a single "IUIServices" context which would
provide access to the UI services. But having the capability to inject
whatever is available in the context would definitely be a great helper.

> Note that I already see three interfaces "IDisposable" in my workspace
> (one in ECF, one in EMF, and one in Platform UI), and I suspect they
> all could extend this common one.

+1

> Another possibility, since you are using reflection anyway, is to not
> require clients to implement interfaces like this but rather call
> their init() and dispose() methods should they exist.

What I don't like with such reflection magic is that it makes it more
difficult to understand the code. It's not simple anymore to search for
callers of a method (Ctrl+Shift+G). That's why I would prefer having a
visible contract.

> (3) What about existing dependency injection frameworks? 

That's a good point. Is there any progress in relation to e4? I
understand that this is a work item on the e4 list.

-Gunnar


-- 
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/



------------------------------

Message: 2
Date: Mon, 29 Sep 2008 08:15:16 +0200
From: Heiko Seeberger <heiko.reg@xxxxxxxxxxxxx>
Subject: Re: [equinox-dev] Problems starting Equinox Aspects on the
	command	line
To: tharbig@xxxxxxxxxxxx,	Equinox development mailing list
	<equinox-dev@xxxxxxxxxxx>
Message-ID: <F2AD39CA-7144-4C3E-844B-2EA83DE481FD@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Thorsten,

see my comments below ...

Heiko

Am 28.09.2008 um 08:43 schrieb Thorsten Harbig:

> Actually I have looked for a way to use AOP in OSGi. I didn't want  
> to do
> compile-time-weaving, as that would mean a dependency to AspectJ for
> each bundle which is augmented by aspects. So the right solution for  
> me
> seemed to be Equinox Aspects.

The right decision ;-)

> Therefore I tried the provided example and
> it worked just perfect for me - but unfortunately it worked only  
> inside
> eclipse.
>
> When I tried to run the example on the command line I didn't succeed.
>
> In order to help you in finding the problem in my set-up, I document
> each step. I hope I wrote to the correct mailing list or should I have
> created a bug in bugzilla ?

This place is just fine. If we find out that it is a bug we still can  
create one ...

>
>
> I use the following bundles:
> org.aspectj.runtime_1.6.1.20080703120000
> org.aspectj.weaver_1.6.1.20080703120000
> org.eclipse.equinox.weaving.aspectj_1.0.0.200809192119.jar
> org.eclipse.equinox.weaving.demo.hello
> org.eclipse.equinox.weaving.demo.hello.aspects
> org.eclipse.equinox.weaving.hook_1.0.0.200809192119.jar
> org.eclipse.osgi_3.4.0.v20080605-1900.jar
>
> my config.ini file in the configuration directory looks like the
> following:
> org.aspectj.weaver.showWeaveInfo=true
> osgi.framework.extensions=org.eclipse.equinox.weaving.hook
> osgi.bundles=org.aspectj.runtime_1.6.1.20080703120000,
> org.aspectj.weaver_1.6.1.20080703120000,
> org.eclipse.equinox.weaving.aspectj_1.0.0.200809192119.jar, org.
> eclipse.equinox.weaving.hook_1.0.0.200809192119.jar,
> org.eclipse.equinox.weaving
> .demo.hello, org.eclipse.equinox.weaving.demo.hello.aspects
>
>
> After starting the the osgi app:
> java -jar org.eclipse.osgi_3.4.0.v20080605-1900.jar -console

Looking at this I have got one question: Are the system bundle  
(org.eclipse.osgi) and the framework extension fragment  
(org.eclipse.equinox.weaving.hook) colocated, i.e. in the same  
directory? That is neccessary for Equinox to recognize the framework  
extension (see http://wiki.eclipse.org/index.php/Adaptor_Hooks for  
details) => Equinox Aspects will not work if the both bundles are not  
colocated.

>
>
> I cann see all the installed bundles:
> Framework is launched.
>
> id	State       Bundle
> 0	ACTIVE      org.eclipse.osgi_3.4.0.v20080605-1900
> 	            Fragments=1
> 1	RESOLVED    org.eclipse.equinox.weaving.hook_1.0.0.200809192119
> 	            Master=0
> 2	RESOLVED    org.aspectj.runtime_1.6.1.20080703120000
> 3	RESOLVED    org.aspectj.weaver_1.6.1.20080703120000
> 4	<<LAZY>>    org.eclipse.equinox.weaving.aspectj_1.0.0.200809192119
> 5	RESOLVED    org.eclipse.equinox.weaving.demo.hello_1.0.0
> 6	RESOLVED    org.eclipse.equinox.weaving.demo.hello.aspects_1.0.0
>
>
> and I try to start the bundle 4 in order to get the weaving working,  
> but
> then I get the following exception: (see on the bottom)
> Ok it seems like the hook bunde can not be found or at least the  
> classes
> (IWeavingService) cannot be found. But the hook is shown as bundle 1
> (see above).
>
> Maybe someone of the Equinox Aspect team has an idea what I do wrong  
> and
> can help me to run Equinox Aspects on the command line...
>
>
> org.osgi.framework.BundleException: Exception in
> org.eclipse.equinox.weaving.aspectj.WeavingServicePlugin.start() of
> bundle org.eclipse.equinox.weaving.aspectj.
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core.BundleContextImpl.startActivator(BundleContextImpl.java:1028)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
> 	at
> org 
> .eclipse 
> .osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java: 
> 346)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core.FrameworkCommandProvider._start(FrameworkCommandProvider.java: 
> 257)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:616)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core 
> .FrameworkCommandInterpreter 
> .execute(FrameworkCommandInterpreter.java:150)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.FrameworkConsole.run(FrameworkConsole.java: 
> 223)
> 	at java.lang.Thread.run(Thread.java:636)
> Caused by: java.lang.NoClassDefFoundError:
> org.eclipse.equinox.service.weaving.IWeavingService
> 	at
> org 
> .eclipse 
> .equinox 
> .weaving 
> .aspectj.WeavingServicePlugin.start(WeavingServicePlugin.java:71)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl
> $2.run(BundleContextImpl.java:1009)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
> 	... 14 more
> Nested Exception:
> java.lang.NoClassDefFoundError:
> org.eclipse.equinox.service.weaving.IWeavingService
> 	at
> org 
> .eclipse 
> .equinox 
> .weaving 
> .aspectj.WeavingServicePlugin.start(WeavingServicePlugin.java:71)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl
> $2.run(BundleContextImpl.java:1009)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
> 	at
> org 
> .eclipse 
> .osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java: 
> 346)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core.FrameworkCommandProvider._start(FrameworkCommandProvider.java: 
> 257)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:616)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core 
> .FrameworkCommandInterpreter 
> .execute(FrameworkCommandInterpreter.java:150)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.FrameworkConsole.run(FrameworkConsole.java: 
> 223)
> 	at java.lang.Thread.run(Thread.java:636)
> Nested Exception:
> java.lang.NoClassDefFoundError:
> org.eclipse.equinox.service.weaving.IWeavingService
> 	at
> org 
> .eclipse 
> .equinox 
> .weaving 
> .aspectj.WeavingServicePlugin.start(WeavingServicePlugin.java:71)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl
> $2.run(BundleContextImpl.java:1009)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
> 	at
> org 
> .eclipse 
> .osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java: 
> 346)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core.FrameworkCommandProvider._start(FrameworkCommandProvider.java: 
> 257)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:616)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal 
> .core 
> .FrameworkCommandInterpreter 
> .execute(FrameworkCommandInterpreter.java:150)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework 
> .internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
> 	at
> org 
> .eclipse 
> .osgi 
> .framework.internal.core.FrameworkConsole.run(FrameworkConsole.java: 
> 223)
> 	at java.lang.Thread.run(Thread.java:636)
>
> osgi>
>
>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev



------------------------------

Message: 3
Date: Mon, 29 Sep 2008 09:31:45 +0200 (CEST)
From: tharbig@xxxxxxxxxxxx
Subject: Re: [equinox-dev] Problems starting Equinox Aspects on the
	command 	line
To: "Heiko Seeberger" <heiko.reg@xxxxxxxxxxxxx>
Cc: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Message-ID:
	<21423.194.39.218.10.1222673505.squirrel@xxxxxxxxxxxxxxxxx>
Content-Type: text/plain;charset=iso-8859-1


> Looking at this I have got one question: Are the system bundle
> (org.eclipse.osgi) and the framework extension fragment
> (org.eclipse.equinox.weaving.hook) colocated, i.e. in the same
> directory? That is neccessary for Equinox to recognize the framework
> extension (see http://wiki.eclipse.org/index.php/Adaptor_Hooks for
> details) => Equinox Aspects will not work if the both bundles are not
> colocated.

Yes, I have all bundles within the same directory.

- org.eclipse.equinox.weaving.aspectj_1.0.0.200808061839.jar (file)
- org.eclipse.equinox.weaving.hook_1.0.0.200808061839.jar (file)
- org.eclipse.osgi_3.4.0.v20080605-1900.jar (file)
- org.aspectj.weaver_1.6.1.20080703120000 (dir)
- org.aspectj.runtime_1.6.1.20080703120000 (dir)
(like it is delivered with the equinox-aspects-demo-hello.zip)

Additionally I copied the two exported bundles
- org.eclipse.equinox.weaving.demo.hello.aspects
- org.eclipse.equinox.weaving.demo.hello
into the same directory.

Than I created a configuration directory where I added the config.ini with
the necessary bundles and the hook information
osgi.framework.extensions=org.eclipse.equinox.weaving.hook

now I start it from the command line in the directory where all the
bundles are located.


Actually the org.eclipse.equinox.weaving.demo.hello just works fine for
me, but without the augmentation through the aspect of course.



------------------------------

Message: 4
Date: Mon, 29 Sep 2008 14:04:28 +0200
From: Martin Lippert <lippert@xxxxxxx>
Subject: Re: [equinox-dev] Problems starting Equinox Aspects on the
	command	line
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Message-ID: <48E0C44C.7090106@xxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Thorsten!

What happens if you start the aspectj weaving service bundle directly at 
start level 1 from the config.ini? Does it make any difference or do you 
get the same ClassNotFoundException?

-Martin




tharbig@xxxxxxxxxxxx wrote:
>> Looking at this I have got one question: Are the system bundle
>> (org.eclipse.osgi) and the framework extension fragment
>> (org.eclipse.equinox.weaving.hook) colocated, i.e. in the same
>> directory? That is neccessary for Equinox to recognize the framework
>> extension (see http://wiki.eclipse.org/index.php/Adaptor_Hooks for
>> details) => Equinox Aspects will not work if the both bundles are not
>> colocated.
> 
> Yes, I have all bundles within the same directory.
> 
> - org.eclipse.equinox.weaving.aspectj_1.0.0.200808061839.jar (file)
> - org.eclipse.equinox.weaving.hook_1.0.0.200808061839.jar (file)
> - org.eclipse.osgi_3.4.0.v20080605-1900.jar (file)
> - org.aspectj.weaver_1.6.1.20080703120000 (dir)
> - org.aspectj.runtime_1.6.1.20080703120000 (dir)
> (like it is delivered with the equinox-aspects-demo-hello.zip)
> 
> Additionally I copied the two exported bundles
> - org.eclipse.equinox.weaving.demo.hello.aspects
> - org.eclipse.equinox.weaving.demo.hello
> into the same directory.
> 
> Than I created a configuration directory where I added the config.ini with
> the necessary bundles and the hook information
> osgi.framework.extensions=org.eclipse.equinox.weaving.hook
> 
> now I start it from the command line in the directory where all the
> bundles are located.
> 
> 
> Actually the org.eclipse.equinox.weaving.demo.hello just works fine for
> me, but without the augmentation through the aspect of course.
> 
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> 
> 
> 


------------------------------

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


End of equinox-dev Digest, Vol 41, Issue 52
*******************************************

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.7.5/1696 - Release Date: 9/28/2008
1:30 PM



Back to the top