|
Replies:
6
-
Pages:
1
-
Last Post:
Dec 30, 2009 3:08 PM
by: s.grinovero
|
|
|
Posts:
5
From:
Colombia
Registered:
12/29/09
|
|
|
|
@Field issues
Posted:
Dec 29, 2009 3:15 PM
|
|
Hello there:
When i'm using the Field annotation properties, e.g:
@Field(index=Index.TOKENIZED)
the compilation fails and sends this message:
warning: Cannot find annotation method 'index()' in type 'org.hibernate.search.annotations.Field': class file for org.hibernate.search.annotations.Field not found
However, when i don't use those properties. e.g: @Field
it compiles with no problem.
Any help??
I really appreciate the help.
|
|
Posts:
5
From:
Colombia
Registered:
12/29/09
|
|
|
|
Re: @Field issues
Posted:
Dec 29, 2009 3:17 PM
in response to:
KDash
|
|
Oh:
Im using glassfish 2.1 , hibernate search 3.1.1, hibernate-core 3.3.2 and hibernate annotation 3.4
|
|
Posts:
26
Registered:
4/24/08
|
|
|
|
Re: @Field issues
Posted:
Dec 30, 2009 5:11 AM
in response to:
KDash
|
|
Hello KDash, annotation without any element (like @Field with no index strategy specified) will be lazily-loaded by the classloader of your entity, so it's not trying to load the Search classes yet. When you specify any optional element on the annotation, the annotation will be initialized.
So your problem boils down to the fact that the classloader can't find Hibernate Search when the SessionFactory is created. Using JPA? you might have to move the hibernate jars to a different library location; I've not much experience with glassfish configuration.
|
|
Posts:
5
From:
Colombia
Registered:
12/29/09
|
|
|
|
Re: @Field issues
Posted:
Dec 30, 2009 9:01 AM
in response to:
KDash
|
|
Hello:
I put the hibernate-search.jar in different places like: Inside Glassfish libraries, in the server domain libraries and in the project build path, but it keeps sending the same message:
warning: Cannot find annotation method 'index()' in type 'org.hibernate.search.annotations.Field': class file for org.hibernate.search.annotations.Field not found An exception has occurred in the compiler (1.6.0_17).
should i update glassfish to 6.8 (I'm using 6.7)
|
|
Posts:
38
From:
Layton, Utah
Registered:
11/22/07
|
|
|
|
Re: @Field issues
Posted:
Dec 30, 2009 11:47 AM
in response to:
KDash
|
|
That wouldn't hurt. :>)
|
|
Posts:
5
From:
Colombia
Registered:
12/29/09
|
|
|
|
Re: @Field issues
Posted:
Dec 30, 2009 2:40 PM
in response to:
KDash
|
|
I meant the netbeans from 6.7 to 6.8
|
|
Posts:
26
Registered:
4/24/08
|
|
|
|
Legend
|
|
Gold: 300
+
pts
|
|
Silver: 100
- 299
pts
|
|
Bronze: 25
- 99
pts
|
|
Manning Author
|
|
Manning Staff
|
|