db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian <nospam...@gmx.net>
Subject Re: OJB in Eclipse plugins/RCP applications
Date Sun, 24 Oct 2004 18:45:18 GMT
Thomas Dudziak wrote:
> Sebastian wrote:
> 
>>> I'm trying to use ojb in an eclipse rich client plattform 
>>> application. I came accross several problems. The OJB.properties file 
>>> is not found even if its in the class path and OJB also can't find 
>>> several class files. I came across this news entry 
>>> http://groups.google.de/groups?hl=de&lr=&selm=3369326.1063581175%40dbforums.com

>>> that suggests a workaround by modifying the context class loader.
>>>
>>> Is this a good approach to solve the class loader issue?
>>> Are there any plans to make OJB working in Eclipse plugins by default?
> 
> 
>> I just recognized that the described workaround doesn't work anymore 
>> with Eclipse 3.0, so I'm really searching for a solution now.
> 
> 
> You can set the classloader that OJB uses via 
> org.apache.ojb.broker.util.ClassHelper#setClassLoader.
> But this must be done before using *any* of OJB classes.
> 
> Tom


Hi Thomas,
thanks a lot for pointing me to this method.
Using this in one of the the plugin classes did the trick:
ClassHelper.setClassLoader(getClass().getClassLoader());

Sebastian


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message