Annotation gets lost when switch from Junit testing to OSGI (Eclipse application)? [message #334895] |
Sun, 08 March 2009 16:38  |
Eclipse User |
|
|
|
Hi,
not sure which list this problem belongs to so sorry for the initial cross posting.
Im using Hibernate 3.3.1 and using the annotation configuration mechanism.
When I run a small test code as Junit 3 test cases a call to
"AnnotationConfiguration.buildSessionFactory()" behaves ok and picks up the java annotations such an
"@Entity"
BUT when I call exactly the same code from a Exclipse Application (ViewPart) then the
AnnotationConfiguration:buildSessionFactory() does NOT pick up the annotations in my entity classes??
The AnnotationConfiguration:secondPassCompile() reports that there are no annotation available(in
the class, which it apparently found) ??!
Some information on the plugin structure
-----------------------------------
The hibernate jar are located in one plugin
The Entity classes are in onother plugin
The manager code, that, keep track of hibernate configuration and session are located in one plugin
The UI code is in a fourth plugin.
is this a known problem?
thanks
/anders
|
|
|
|
Re: Annotation gets lost when switch from Junit testing to OSGI (Eclipse application)? [message #334975 is a reply to message #334946] |
Fri, 13 March 2009 02:35  |
Eclipse User |
|
|
|
Finally I found the issue, its was plugin problem. The Entity plugin needed to buddy up with the
hibernate plugin.
/anderd
Daniel Megert wrote:
> Anders W.Tell wrote:
>> Hi,
>>
>> not sure which list this problem belongs to so sorry for the initial
>> cross posting.
>>
>> Im using Hibernate 3.3.1 and using the annotation configuration
>> mechanism.
>>
>> When I run a small test code as Junit 3 test cases a call to
>> "AnnotationConfiguration.buildSessionFactory()" behaves ok and picks
>> up the java annotations such an "@Entity"
>>
>> BUT when I call exactly the same code from a Exclipse Application
>> (ViewPart) then the AnnotationConfiguration:buildSessionFactory() does
>> NOT pick up the annotations in my entity classes??
>> The AnnotationConfiguration:secondPassCompile() reports that there are
>> no annotation available(in the class, which it apparently found) ??!
>>
>> Some information on the plugin structure
>> -----------------------------------
>> The hibernate jar are located in one plugin
>> The Entity classes are in onother plugin
>> The manager code, that, keep track of hibernate configuration and
>> session are located in one plugin
>> The UI code is in a fourth plugin.
>>
>> is this a known problem?
> I suggest you ask on eclipse.tools.jdt.
>
> Dani
>>
>> thanks
>> /anders
|
|
|
Powered by
FUDForum. Page generated in 0.02941 seconds