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

From: noban (noba..andex.ru)
Date: Tue Oct 25 2005 - 03:40:54 EDT

  • Next message: jaka lustek: "Tapestry integration"

    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 - 03:41:14 EDT