Re: Exporting same package multiple from bundles

2009-04-23 Thread Neil Bartlett
Sorry I'm unaware what the bndwrap task does that's different from standard Bnd. However, I still only see one JAR in your classpath, so you will only get classes from xstream.jar, not the classes that you want to patch xstream with. I don't think this mailing list is really the right place for ba

Re: Exporting same package multiple from bundles

2009-04-23 Thread Nima Kaviani
Hey guys, sorry for interfering with the discussion, but I ran into a similar problem and I had a hard time finding a work around. so I thought my experience may come in handy in this case, even though I might be totally wrong. Brenden, to my understanding, bndwrap modifies the content of MANIFES

RE: Exporting same package multiple from bundles

2009-04-23 Thread Brendan Haverlock
Haha, that all makes sense to me, but it doesn’t do what you say it does. Maybe it's a side effect of me using the bndwrap ant task? Let me just show you exactly what I am doing in ant because maybe I am specifying my classpath in the wrong place: Contents of BND definition file:

Re: Exporting same package multiple from bundles

2009-04-23 Thread Neil Bartlett
Brendan, You give Bnd a classpath which can contain many JARs and class directories. You tell it which packages should be in the bundle to be generated -- both private packages and exported packages. It then pulls those packages out of the classpath and generates a bundle. Therefore it can generat

RE: Exporting same package multiple from bundles

2009-04-23 Thread Brendan Haverlock
Can I get a little more explanation for this? The only way I could see it working is if it actually included the classes within the xstream jar in the Misc bundle. However, adding the -classpath option did nothing of the sort. I am not sure how adding the xstream jar to the classpath would so

Need notification re. a bundle about to be uninstalled

2009-04-23 Thread Nikita Sawant
Hi, I have an OSGi application that manages several bundles. The core framework needs to perform cleanup tasks *before* a bundle it observes ( via BundleListener ) is uninstalled. However, it is notified of the bundle being uninstalled *after* the bundle is uninstalled. I think what I am loo

Re: Exporting same package multiple from bundles

2009-04-23 Thread Neil Bartlett
Brendan, In my example, I had two JARs on the classpath. You only have one JAR, the xstream-1.2.2.jar, so the Misc bundle that you generate from this Bnd file can only contain classes that Bnd finds in xstream-1.2.2.jar. You could also have directories with classes in, or a mixture. In other word

RE: Exporting same package multiple from bundles

2009-04-23 Thread Brendan Haverlock
Thanks Neil, I gave that a shot, but it didn't make a difference. This is what my bnd file looks like: Bundle-Name: Misc -classpath: xstream-1.2.2.jar Export-Package: com.thoughtworks.xstream.converters.collections,* Now I still have xstream-1.2.2.jar as a bundle and Misc as a bundle being loa

Re: Exporting same package multiple from bundles

2009-04-23 Thread Neil Bartlett
It's a lot easier than that! Just put the JARs you want on the classpath for Bnd. Then use Bnd's Export-Package and Private-Package instructions to select the packages you want to include in the generated bundles. For example: #mybundle.bnd -classpath: foo.jar, bar.jar Private-Package: org.foo.int

Re: Exporting same package multiple from bundles

2009-04-23 Thread Richard S. Hall
I don't use BND directly (I use it through the maven-bundle-plugin), so I cannot be specific, but the general approach to BND is to give it a recipe from which it will create your bundle. When you specify Private-Package or Export-Package, BND uses this information to pull packages from the cla

RE: Exporting same package multiple from bundles

2009-04-23 Thread Brendan Haverlock
Right now, I have it unjar, replace the classes, rejar and then BND the jars to get around this issue. Do you have an example of how to use the BND tool to merge two bundles? That sounds like a much cleaner solution. Thanks! Brendan Haverlock WebReach, Inc. Software Engineer Work: 949-255-5054

Re: Bundle starting only after some commands to the shell

2009-04-23 Thread Tom Watson
This appears to be the VM bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809647 In Equinox we had to implement a similar workaround as described in the bug (check isAvailable()) before before reading from the InputStream. Also see eclipse bug https://bugs.eclipse.org/bugs/show_bug.cgi?i

Some questions concerning the Maven Bundle Plugin and the Export-Package instruction

2009-04-23 Thread Michael Grammling
Hi there, we would like to switch from our own OSGi Maven Plugin (we were the first! ;-)) to the Felix Maven Bundle Plugin. I started to replace the plugin and encountered a couple of problems. I hope you could help me. Attached you will find one of our POMs and the result of the MANIFEST gene

Re: Bundle not activating

2009-04-23 Thread Richard S. Hall
Did you resolve this issue? If not, please send me your bundle privately. -> richard On 4/15/09 2:17 PM, Ben Cuthbert wrote: Class: package test; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; public class Module implements BundleActivator{ public

Re: Bundle starting only after some commands to the shell

2009-04-23 Thread Patrick Forhan
Are you by any chance running this in eclipse? Have you tried from the command line? This looks very similar to the behavior we had when running from eclipse. You can also try removing the shell.tui bundle and running to see how it behaves. Pat. -- Defy mediocrity. --

Re: Exporting same package multiple from bundles

2009-04-23 Thread Richard S. Hall
You could always use maven-bundle-plugin (or BND directly) to construct a new bundle by merging the existing bundle with the classes you are overriding. This would probably be a lot less painful than trying to get OSGi to solve this issue for you. -> richard On 4/22/09 1:14 PM, Brendan Haverl

Re: File Install and execution environment

2009-04-23 Thread Ali Naddaf
Just created Felix-1055 and added my changes (one line) there. Regards, Ali. Clement Escoffier wrote: For sure, Just go ahead, I will commit the patch. Regards, Clement On 23.04.2009, at 16:15, Ali Naddaf wrote: Hello everyone. I recently needed to use the File Install bundle/service in m

Re: File Install and execution environment

2009-04-23 Thread Clement Escoffier
On 23.04.2009, at 16:22, Filippo Diotalevi wrote: On Thu, Apr 23, 2009 at 4:15 PM, Ali Naddaf wrote: Hello everyone. I recently needed to use the File Install bundle/service in my OSGi framework but since I was running in a CDC-1.1/Foundation-1.1 environment, the existing File Install could

Re: Bundle starting only after some commands to the shell

2009-04-23 Thread Gionni
I have isolated the problem. The instructions blocking Felix until something is entered on the shell is InetAddress.getByName("localhost"); The strange thing is that all works correctly if I press I do something on the shell. I also tried to perform the instruction on a thread started in the Ac

Re: File Install and execution environment

2009-04-23 Thread Filippo Diotalevi
On Thu, Apr 23, 2009 at 4:15 PM, Ali Naddaf wrote: > Hello everyone. > I recently needed to use the File Install bundle/service in my OSGi > framework but since I was running in a CDC-1.1/Foundation-1.1 environment, > the existing File Install couldn't run, so I made a couple of minor changes > to

Re: File Install and execution environment

2009-04-23 Thread Clement Escoffier
For sure, Just go ahead, I will commit the patch. Regards, Clement On 23.04.2009, at 16:15, Ali Naddaf wrote: Hello everyone. I recently needed to use the File Install bundle/service in my OSGi framework but since I was running in a CDC-1.1/Foundation-1.1 environment, the existing File

File Install and execution environment

2009-04-23 Thread Ali Naddaf
Hello everyone. I recently needed to use the File Install bundle/service in my OSGi framework but since I was running in a CDC-1.1/Foundation-1.1 environment, the existing File Install couldn't run, so I made a couple of minor changes to that bundle to get it to work. Is there any value if I

Bundle starting only after some commands to the shell

2009-04-23 Thread Gionni
Dear forum users, thanks in advance for your support! (I hope to be able to help you in the future.. ) My problem is that, when I start Felix, some bundles starts only after that I send some commnds to the shell (i.e. ps or also a blank line). For example the following code reegards a bundle Ac