[Hibernate-JIRA] Created: (HSEARCH-462) Indexes are not getting updated when entity gets updated via hql.
by shareef shaik (JIRA)
Indexes are not getting updated when entity gets updated via hql.
-----------------------------------------------------------------
Key: HSEARCH-462
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-462
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.1.1.GA
Environment: Hibernate 3.3, H-Search 3.1.1 GA, Hiberante Annotations, Oracle DB, FSDirectoryProvider
Reporter: shareef shaik
We are using Hibernate Annotations and Hibernate Search, and to my understanding there is no need to write listeners to update/delete index on update/delete of an entity. I tried updating an entity via hql update, and also via persisting the entity and making changes in it. In the second scenario, the index is getting updated, but in the first scenario it is not. I checked for the changes in db and in both scenarios, the changes are reflected in db. A simple test case for the same.
Case 1:
--------
String hql = "update UserMaster umst set umst.userName = :uName where umst.userId = :uId";
org.hibernate.Query query = getSession().createQuery(hql);
query.setParameter("uName","ABM1");
query.setParameter("uId",1001L);
query.executeUpdate();
Case 2:
--------
UserMaster master = (UserMaster)getSession().get(UserMaster.class,1001L);
master.setUserName("ABM1");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[Hibernate-JIRA] Created: (HSEARCH-466) separating annotations from core as own jar
by Vadim Bauer (JIRA)
separating annotations from core as own jar
-------------------------------------------
Key: HSEARCH-466
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-466
Project: Hibernate Search
Issue Type: Improvement
Components: build
Affects Versions: 3.2.0.Beta1, 3.1.1.GA, 3.1.0.GA, 3.1.0.CR1, 3.1.0.Beta2, 3.1.0.Beta1, 3.1.2, 3.2.0.CR1, 3.3.0
Environment: not important
Reporter: Vadim Bauer
Why not separating the hibernate search annotations from HS core?
e.g.
hibernate-search-core.jar
hibernate-search-annotations.jar
It is quite cumbersome if you in a fat clients or RCPs environment and want share the same domain model with your client. The client needs to have lucene, hibernate search and hibernate stuff even thou he never uses it except a few annotations.
If it is ok I would like contribute my changes to the community.
Best regards
Vadim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[Hibernate-JIRA] Created: (HSEARCH-492) FSMasterDirectoryProvider and FSSlaveDirectoryProvider don't shutdown the Executor
by Sylvain Charton (JIRA)
FSMasterDirectoryProvider and FSSlaveDirectoryProvider don't shutdown the Executor
----------------------------------------------------------------------------------
Key: HSEARCH-492
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-492
Project: Hibernate Search
Issue Type: Bug
Components: directory provider
Affects Versions: 3.1.1.GA
Environment: Java 1.6.0
Reporter: Sylvain Charton
Priority: Minor
I'm using Hibernate Search clustering feature in a stand alone Java application (not a webapp).
My problem is the application never stops: many threads are still living.
Both FSMasterDirectoryProvider and FSSlaveDirectoryProvider use a Single Thread Executor to perform the CopyTask.
When the FSSlaveDirectoryProvider.stop() is called, the timer is stopped, but not the Executor in the TimerTask.
Consequence is the process can't stop, because some threads are still living, endlessly.
This happens after the first CopyDirectory task was executed.
My fix was to copy this class in my code, and replace the Executor in TriggerTask class by an ExecutorService in FSSlaveDirectoryProvider class.
The ExecutorService is initialized in the start() method:
{code:Java}this.executor = Executors.newSingleThreadExecutor() ;{code}
And properly shut down in the stop() method:
{code:java}
executor.shutdown();
boolean terminated = false ;
try{
terminated = executor.awaitTermination(20, TimeUnit.SECONDS);
} catch (InterruptedException e1) {
terminated = false ;
}
if (!terminated) {
executor.shutdownNow() ;
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[Hibernate-JIRA] Created: (HSEARCH-460) LazyInitializationException while removing entity with @ContainedIn annotation
by Maciej Szulik (JIRA)
LazyInitializationException while removing entity with @ContainedIn annotation
------------------------------------------------------------------------------
Key: HSEARCH-460
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-460
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.1.1.GA
Reporter: Maciej Szulik
Priority: Blocker
Attachments: hibsearch.zip, Lazy.stack
I attach a Jboss Seam 2.2.0.GA project (without lib directory - one should take it entirely from seam default application generated using seam gen), as a complete illustration of the problem.
The Problem itself:
I have 2 entities:
Color (Long id, String name, Set<Vehicle> vehicles)
and Vehicle (Long id, String name, Color color).
Vehicle is indexed entity (@Indexed), while color has @ContainedIn on Set<Vehicle>.
Problem arises while managing color objects, strictly speaking while removing colors, LazyInitalizationException is thrown (stack trace is in attachment).
Every other operation on color entity (inserting, updating) works like a charm.
In attached example I created with a simple page for managing colors. It presents a list of already defined color objects in DB. If non present, you should generate some with 'Add random color'. To obtain above error click on 'Remove' link next to one of the colors presented on list.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[Hibernate-JIRA] Created: (HHH-5080) NPE when determining types of named parameters
by John Aylward (JIRA)
NPE when determining types of named parameters
----------------------------------------------
Key: HHH-5080
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5080
Project: Hibernate Core
Issue Type: Bug
Components: core, query-hql
Affects Versions: 3.5.0-Final
Environment: sun java 6.0.19 runtime, hibernate 3.5.0-final using annotations, mysql 5.0.75-0ubuntu10.3
Reporter: John Aylward
Attachments: hibernateLog.txt
Attached is the relevant hibernate log with the offending query.
Relevant stack trace:
java.lang.NullPointerException
at org.hibernate.hql.ast.ParameterTranslationsImpl.getNamedParameterExpectedType(ParameterTranslationsImpl.java:87)
at org.hibernate.engine.query.HQLQueryPlan.buildParameterMetadata(HQLQueryPlan.java:320)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:121)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:98)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1760)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months