[JBoss Seam] - Hibernate Search with Seam works?
by srpantano
I put in my persistence.xml:
| <property name="hibernate.search.default.directory_provider"
| value="org.hibernate.search.store.FSDirectoryProvider"/>
| <property name="hibernate.search.default.indexBase"
| value="C:\temp\indexes"/>
|
| <property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.FullTextIndexEventListener"/>
| <property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.FullTextIndexEventListener"/>
| <property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/>
|
in my class:
| @Entity
| @Indexed
| public class License {
|
| @Id
| @DocumentId
| @GeneratedValue(strategy = GenerationType.AUTO)
| @NotNull
| private Long id;
|
| @NotNull
| @Length(min = 3, max = 30)
| @Field(index=TOKENIZED, store=YES)
| private String sufix;
|
| ...
|
| }
|
I put too the Hibernate-Search, Lucene-core and Hibernate-common-annotation that cames with Seam 2.
I'm using Jboss 4.2.2 then when the project deploys it show that is using Hibernate EntityManager 3.2.1, Hibernate Annotations 3.2.1 and Hibernate 3.2.4.sp1.
but On updates or inserts the follow error appear:
| Caused by: java.lang.NoSuchMethodError: org.apache.lucene.document.Document.add(Lorg/apache/lucene/document/Field;)V
| at org.hibernate.search.engine.DocumentBuilder.getDocument(DocumentBuilder.java:234)
| at org.hibernate.search.event.FullTextIndexEventListener.onPostUpdate(FullTextIndexEventListener.java:165)
| at org.hibernate.action.EntityUpdateAction.postUpdate(EntityUpdateAction.java:180)
|
If I remove the:
| <property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.FullTextIndexEventListener"/>
| <property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.FullTextIndexEventListener"/>
| <property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/>
|
I insert and update records, nothing happens and I try this:
| @In FullTextEntityManager entityManager;
|
| ...
|
| List<License> ls = licenses.getResultList();
|
| for (License license : ls) {
|
| entityManager.index(license);
|
| }
|
the exception appears:
| Caused by: org.hibernate.HibernateException: Lucene event listener not initialized
|
I ask, Is it Hibernate-search with Seam works?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110821#4110821
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110821
18 years, 4 months
[Security & JAAS/JBoss] - j_security_check not working in LDAP based Authentication
by jbosexplorer
Hi There,
I'm using JBoss 4.2.1. In our application, we have the following snippet in login.jsp.
<form action="j_security_check" method="post">
| <input name="j_username" type="text" class="input" id="j_username" size="20">
| <input name="j_password" type="password" class="input" id="j_password" size="20">
And, the web.xml has
<security-constraint>
| <web-resource-collection>
| <web-resource-name>Login Page</web-resource-name>
| <url-pattern>/logonNoSSO.jsp</url-pattern>
| <http-method>POST</http-method>
| <http-method>GET</http-method>
| </web-resource-collection>
| <user-data-constraint>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
| </security-constraint>
| <login-config>
| <auth-method>FORM</auth-method>
| <realm-name>myrealm</realm-name>
| <form-login-config>
| <form-login-page>/login.jsp</form-login-page>
| </form-login-config>
| </login-config>
| <security-role>
| <description>ADMIN Role</description>
| <role-name>adminRole</role-name>
| </security-role>
The Jboss-web.xml has the following
<security-domain>java:/jaas/myrealm</security-domain>
| <security-role>
| <role-name>adminRole</role-name>
| <principal-name>Admin</principal-name>
| </security-role>
When I try to login with correct user name / pwd I'm getting
Access to the specified resource (Access to the requested resource has been denied) has been forbidden
Could somebody help me to solve this issue?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110819#4110819
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110819
18 years, 4 months