Re: Solved: cayenne.jar as Eclipse plug-in - problems with cayenne.xml

From: Mike Kienenberger (mkienen..mail.com)
Date: Tue Oct 25 2005 - 10:08:06 EDT

  • Next message: Gentry, Michael \(Contractor\): "RE: Tapestry integration"

    Hi Noban,

    I hope you'll keep us informed with your progress in combining Cayenne
    and Eclipse RCP. I was working on an RCP project in my spare time to
    which I will probably try to add Cayenne at some point. Not sure
    when I'll get back to that project, but any insights you come up with
    will be helpful.

    Thanks!

    On 10/25/05, noban <noban@yandex.ru> wrote:
    > Thank you Andrus.
    >
    > BootstrapConfiguration before initalization didn`t worked. But nighty build from 23rd, with "..setContextClassLoader.." did well.
    > Looks like its working now, but I had to test it deeper (I don't have DB right now), but configuration is loading now.
    >
    >
    >
    >
    > >I am not sure how Eclipse ClassLoaders are structured, so I can't
    > >pinpoint the exact problem, but here is a few ideas:
    > >
    > >1. Put "bootstrap..." line BEFORE "initialize.."
    > >
    > >or..
    > >
    > >2. Coincidentally I did some refactoring of ClassLoader stuff in CVS
    > >recently to use thread context ClassLoader as default. You can try
    > >the newest stuff from the latest nightly build:
    > >
    > >http://objectstyle.org/downloads/cayenne/nightly/?M=D
    > >
    > >It no longer uses "bootstrapSharedConfiguration". Instead (if it
    > >doesn't work) you may do something like this BEFORE loading
    > >Configuration:
    > >
    > >Thread.currentThread().setContextClassLoader(this.getClass
    > >().getClassLoader());
    > >
    > >Andrus
    > >
    > >
    > >On Oct 24, 2005, at 5:18 AM, noban wrote:
    > >
    > >> Hi!
    > >>
    > >> I`m writing Eclispe RCP, so now I`ve moving all third-party jars
    > >> within my RCP to plugins. I`ve successfully created plugin from
    > >> cayenne.jar, but once I did that I've recieving msg in console :
    > >>
    > >> Unhandled event loop exception
    > >> Reason:
    > >> [v.1.2M5 July 22 2005] Error during Configuration initialization.
    > >> [v.1.2M5 July 22 2005]
    > >> [org.objectstyle.cayenne.conf.DefaultConfiguration] : Domain
    > >> configuration file "cayenne.xml" is not found.
    > >>
    > >> my configuration file isn`t located at the root directory, I'm
    > >> loading it with this code:
    > >>
    > >> DefaultConfiguration conf = new DefaultConfiguration();
    > >> conf.addClassPath(ResourceLogin.CAYENNE_XML_CONFIGURATIUON_PATH);
    > >> Configuration.initializeSharedConfiguration(conf);
    > >> Configuration.bootstrapSharedConfiguration(this.getClass());
    > >>
    > >> actually I have an idea, that cayenne isn`t loading because new
    > >> cayenne plugin is separate project and can`t look into my main RCP
    > >> plugin - project for specified dir/cayenne.xml.
    > >> As well putting cayenne.xml in my RCP`s root dir seems doing nothing.
    > >>
    > >> I've tried to include my project in dependancy list of cayenne
    > >> plugin, but as my own plugin also require cayenne plugin I`ve got
    > >> dependancy cycle.
    > >>
    > >> Does anybody have done something similar? Any hints?
    > >>
    > >>
    > >
    >
    >
    > --
    > Сегодня удачный день, чтобы завести почту на Яндексе http://mail.yandex.ru
    >



    This archive was generated by hypermail 2.0.0 : Tue Oct 25 2005 - 10:08:08 EDT