Forums

Get More Support

Here for you 24/7

learn more
VOD Free SDK

Start Building your Engine Now

Download Now
VOD Extranet

Access to patches, license management,
tech docs and more for existing VOD customers.

Learn More
eclipse rcp application dependant on db4o bundle
Last Post 30 Sep 2007 12:22 AM by brindy. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
brindy
New Member
New Member
Posts: 98


--
30 Sep 2007 12:22 AM

    Hi,

     I'm writing an RCP application and am wanting to use db4o as the "file format" for my application.  However, I'm having a little problem.

    I've added db4o_osgi.jar to my plugins folder of my Eclipse 3.3 environment and all the wizards and things in the PDE find it fine.  So far I only have a single plugin, so I added db4o_osgi as a required plugin.  Because it is in my plugins folder Eclipse finds it just fine.  However, if I try and reference any of the db4o classes (other than the ones actually in the osgi jar) I get this problem:

    The type com.db4o.ObjectContainer cannot be resolved. It is indirectly referenced from required .class files 

    I can fix this in the IDE by referencing the actual db4o jar files (either as a library or by copying the jars in to the project and adding them to the build-path), but when I try to launch the product, I get all kinds of problems that seem unrelated, but when I comment out the db4o related code and update the dependencies, the product works fine.

     Any ideas?  

    Thanks in advance,
    Brindy

     

    brindy
    New Member
    New Member
    Posts: 98


    --
    30 Sep 2007 12:51 AM

    Update:  I managed to get this working in the expected way by doing the following things:

    1) Unzip the db4o-6.3-osgi.jar in a folder in the plugins folder

    2) package up the osgi classes in to a jar in their own right

    3) change the MANIFEST.MF so that it included the new jar and not '.'

    However, this is still not ideal as unpacking jar files as plugins is no longer recommended, but I can live with it to be able to use db4o in my RCP application.

    (I also had to make sure that the bundle is STARTED before I try and use the service, but that's a launch thing.)

    Thanks,
    Brindy 

    huli
    New Member
    New Member



    --
    19 Jan 2008 04:09 PM

    I found the same problem and fixed it as you said:

      * uncompres db4o-6.4.14.8131-osgi.jar in TARGET/db4o_osgi    (target/eclipse/plugins/db4o_osgi) 

     * create a db4o_osgi.jar with the content of com/db4o/osgi:
    cd db4o_osgi/lib;jar -vcf osgi.jar -C .. com

    * then edit db4o_osgi/META-INF/MANIFEST.MF and replace  "." for "lib/db4o_osgi.jar" :

    Bundle-ClassPath: lib/db4o_osgi.jar,lib/db4o-6.4.14.8131-java1.2.jar,lib/db4o-6.4.14.8
     131-nqopt.jar,lib/bloat-1.0.jar,lib/db4o-6.4.14.8131-tools.jar
     

    thank you, I will use it until understanding OSGi better. 

    German Viscuso
    Veteran Member
    Veteran Member
    Posts: 1235


    --
    19 Jul 2009 10:33 AM

    Also, check this blog post:

    http://jmj-eclipse.blogspot.com/200...undle.html

    Best!

    You are not authorized to post a reply.


    Active Forums 4.3