[Hibernate-JIRA] Created: (HSEARCH-232) Using SnowballPorterFilterFactory throws NoClassDefFoundError
by Hardy Ferentschik (JIRA)
Using SnowballPorterFilterFactory throws NoClassDefFoundError
-------------------------------------------------------------
Key: HSEARCH-232
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-232
Project: Hibernate Search
Issue Type: Bug
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
Fix For: 3.1.0.Beta2
Trying to use SnowballPorterFilterFactory in @AnalyzerDef will currently throw the following exception:
java.lang.NoClassDefFoundError: org/apache/solr/request/QueryResponseWriter
at org.apache.solr.analysis.SnowballPorterFilterFactory.init(SnowballPorterFilterFactory.java:42)
The problem is SnowballPorterFilterFactory contains a log statement using SolrCore.log.fine(). SolrCore itself has then a whole list of other import statements including QueryResponseWriter. Within Hibernate Search we use a custom/shrinked version of the solr jar which only contains the classes needed for analysis. QueryResponseWriter should of course not be required (see http://repository.jboss.org/maven2/org/hibernate/apache/lucene/solr/apach...).
The problem does not occur when the full solr jar is used.
We need to start a discussion with the solr developers regrading this logging issue.
Example annotation causing the error:
@AnalyzerDef(name="customanalyzer",
tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),
filters = {
@TokenFilterDef(factory = LowerCaseFilterFactory.class),
@TokenFilterDef(factory = SnowballPorterFilterFactory.class,params = {
@Parameter(name="language", value= "English")
}),
})
--
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
16 years, 3 months
[Hibernate-JIRA] Commented: (HHH-1483) MySQL5: No Dialect mapping for JDBC type: -1
by Don Mitchell (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483?page=c... ]
Don Mitchell commented on HHH-1483:
-----------------------------------
I just ran into this and instead of changing the dialect, I used the SQLQuery addScalar() method to specify the type of the text column as Hibernate.STRING. For example:
SQLQuery q = getSession().createSQLQuery("select * from ...");
q.addScalar("af.email", Hibernate.STRING);
The downside to this is that it seems like you have to specify all of the columns via the addScalar() method, although you don't need to specify the type of each, just do that for the ones you want to override.
> MySQL5: No Dialect mapping for JDBC type: -1
> --------------------------------------------
>
> Key: HHH-1483
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.2
> Environment: MySQL 5.0.18-nt
> Reporter: Sergey Vladimirov
> Priority: Minor
>
> MySQL5: No Dialect mapping for JDBC type: -1
> SELECT answpos,answer FROM votes_answers WHERE question=? ORDER BY answpos
> mysql> describe votes_answers;
> +----------+---------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +----------+---------+------+-----+---------+-------+
> | question | int(11) | NO | MUL | | |
> | answpos | int(11) | NO | | | |
> | answer | text | YES | | NULL | |
> +----------+---------+------+-----+---------+-------+
> mysql> describe temp;
> +---------+---------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +---------+---------+------+-----+---------+-------+
> | answpos | int(11) | NO | | 0 | |
> | answer | text | YES | | NULL | |
> +---------+---------+------+-----+---------+-------+
> Please, let me know what to add to MySQL5Dialect :)
> Will it be ok to add? :
> registerColumnType( Types.LONGVARCHAR, "text" );
--
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
16 years, 3 months
[Hibernate-JIRA] Commented: (HHH-158) nested DetachedCriteria throwing NullPointerException
by Jean Vence (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-158?page=co... ]
Jean Vence commented on HHH-158:
--------------------------------
No activity on this issue for a while. Seems bug still exists in 2.x
> nested DetachedCriteria throwing NullPointerException
> -----------------------------------------------------
>
> Key: HHH-158
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-158
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0 beta 4
> Reporter: Jérôme Boehm
> Assignee: Gavin King
> Attachments: testcase.zip
>
>
> It seems that it is not possible to nest DetachedCriteria.
> This is examplified in the testWithReturnedObject() method of the attached TestCase.
> When nesting DetachedCriteria using DetachedCriteria.add(Subqueries.<a_Subqueries_static_method>) twice, we get the following exception:
> java.lang.NullPointerException
> at org.hibernate.criterion.SubqueryExpression.getTypedValues(SubqueryExpression.java:73)
> at org.hibernate.loader.criteria.CriteriaQueryTranslator.getQueryParameters(CriteriaQueryTranslator.java:230)
> at org.hibernate.criterion.SubqueryExpression.toSqlString(SubqueryExpression.java:50)
> at org.hibernate.criterion.Junction.toSqlString(Junction.java:58)
> at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:312)
> at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:92)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1208)
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
> at test.subqueries.SubqueriesTest.main(SubqueriesTest.java:41)
> Then, after "correcting" SubqueryExpression so that the params instance variable is initialized (see the attached Corrected_SubqueryExpression), it seems that the nested aliases are not properly propagated, which is examplified in testWithNoReturnedObject().
> The generated sql is:
> select this_.a_id as a1_0_ from a this_ where exists (select this0__.b_id as y0_ from b this0__ where this0__.a_id=this_.a_id and exists (select this0__.c_id as y0_ from c this0__ where this0__.b_id=this0__.b_id))
> I think it should be (notice the this1__ alias for table c):
> select this_.a_id as a1_0_ from a this_ where exists (select this0__.b_id as y0_ from b this0__ where this0__.a_id=this_.a_id and exists (select this1__.c_id as y0_ from c this1__ where this1__.b_id=this0__.b_id))
--
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
16 years, 3 months
[Hibernate-JIRA] Created: (HHH-3310) Using Nested DetachedCriteria (Sub-Selects) throwing NullPointerException
by Roshan Dawrani (JIRA)
Using Nested DetachedCriteria (Sub-Selects) throwing NullPointerException
-------------------------------------------------------------------------
Key: HHH-3310
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3310
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5, Oracle 10g
Reporter: Roshan Dawrani
Attachments: Nested_Subselects.zip
Hi,
We have come across an issue with the usage of nested subselects in the sql query with hibernate 3.2.5.
We get the following exception when there is more than one level of sub-selects in the query :
----------------------------------------------------------------------------------------------------------------------
java.lang.NullPointerException
at org.hibernate.criterion.SubqueryExpression.getTypedValues(SubqueryExpression.java:80)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getQueryParameters(CriteriaQueryTranslator.java:251)
at org.hibernate.criterion.SubqueryExpression.toSqlString(SubqueryExpression.java:55)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:334)
at org.hibernate.loader.criteria.CriteriaJoinWalker.<init>(CriteriaJoinWalker.java:71)
at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:67)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at NestedDetachedCriteriaTest.testNestedDetachedCriteria(Unknown Source)
----------------------------------------------------------------------------------------------------------------------
The actual query that gets fired is like:
----------------------------------------------------------------------------------------------------------------------
select this_.name as y0_ from cat this_ where this_.name =
(select this0__.name as y0_ from cat this0__ where this0__.parent_id =
(select this0__.parent_id as y0_ from cat this0__ where this0__.name =
(select this0__.name as y0_ from cat this0__ where this0__.cat_id = ?)))
----------------------------------------------------------------------------------------------------------------------
We investigated the issue and have fixed it by making some changes in org.hibernate.criterion.SubqueryExpression class.
The attached file has the following contents:
1. SubqueryExpression.java - Fix we have made to SubqueryExpression class.
2. NestedDetachedCriteriaTest.zip - A test case to highlight the nested sub-select issue (testNestedDetachedCriteria).
Regards,
Roshan
--
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
16 years, 3 months
[Hibernate-JIRA] Created: (HSEARCH-219) Manual indexing strategy not implemented
by Fol De Rol (JIRA)
Manual indexing strategy not implemented
----------------------------------------
Key: HSEARCH-219
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-219
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.0.1.GA
Reporter: Fol De Rol
Priority: Blocker
It looks impossible to implement fully manual strategy of indexing because of mandating event listeners to be registered.
See org.hibernate.search.util.ContextHelper.java:25:
//FIXME this sucks since we mandante the event listener use
This causes a side effect to my application that stores an indication that the certain object is indexed in a child collection. So, when I complete manual indexing of an object, I add an element to this collection (actually, the cluster node identifier). This causes the Hibernate Search event listener to be triggered because the dependent collection has been modified which in its turn adds one more indexing job. Finally, I get an endless recursion.
--
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
16 years, 3 months