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

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Oct 24 2005 - 10:01:33 EDT

  • Next message: Andrus Adamchik: "Re: OutOfMemory problem"

    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?
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Oct 24 2005 - 10:01:36 EDT