HHH-1123 - Cannot put more than 1000 elements in a InExpression
by Łukasz Antoniak
Hi all!
Recently I had a closer look at HHH-1123 issue. This bug affects both -
Criteria API and HQL. I have introduced
Dialect#maximumInExpressionElements() method which returns maximum
number of allowed elements in a single SQL IN clause, or null treated as
infinite. The change of InExpression was very easy. However, fixing this
bug for HQL queries requires modification of ParameterMetadata
(namedDescriptorMap cannot remain unmodifiable), as well as
AbstractQueryImpl (queryString). As I don't see any other solution, I
wanted to ask you guys for suggestions. Is it the only possible way of
fixing this issue? Finally, shall we really fix this? This is a DB
vendor limitation, but 40 user gave their vote for it.
Regards,
Lukasz Antoniak
12 years, 11 months
new schema in JIRA to handle pull requests
by Sanne Grinovero
Hi all,
over the weekend I've added a custom field to all issues to store a
link to a pull request; this is in no way mandatory nor it affects any
work flow you might want to use, but hope you find it useful. It can't
support multiple links, so we should replace them if they are updated,
and backported issues with multiple pull requests don't fit in it.
In addition, but only applied to the Search project, I've added new
state and transitions for issues to move them into the state "pull
request sent".
An open issue has a button "Link to pull request" which will ask you
for the link, and change the issue state. I consider this useful when
evaluating the state of progress for a release. I've added a "reopen"
button as well to be used in those cases in which the pull request is
not satisfactory.
I think we could polish this even more; it seems possible for example
to link a commit hook to mark issues solved when a pull request is
merged, but I didn't go that far as I guess that requires some
discussion since it has some practical consequences.
Ideally I would love to hook into github's "send pull request" to move
into the "pull request sent" state and add the link automatically, but
from a reading of their docs it doesn't look like possible. Am I
wrong?
Let me know if you want it reverted, or have suggestions.
Sanne
12 years, 11 months
[HSEARCH] Arquilian deployment error
by Emmanuel Bernard
I still have these errors on my machine when running the HSearch test suite.
Could it be because of our engine / orm split and the fact that JBoss module got screwed?
17:14:07,921 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-8) Hibernate Validator 4.2.0.Final
17:14:07,991 INFO [org.hibernate.search.Version] (MSC service thread 1-8) HSEARCH000034: Hibernate Search 4.0.0-SNAPSHOT
17:14:07,998 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.persistenceunit."MemberRegistrationIT.war#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."MemberRegistrationIT.war#primary": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]
Caused by: java.lang.NoClassDefFoundError: org/hibernate/search/spi/InstanceInitializer
at org.hibernate.search.event.impl.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:129)
at org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:82)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1722)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:884)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:143)
at org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:77)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
... 3 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.search.spi.InstanceInitializer from [Module "deployment.MemberRegistrationIT.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
... 15 more
17:14:08,221 INFO [org.jboss.as.server.controller] (pool-1-thread-1) Deployment of "MemberRegistrationIT.war" was rolled back with failure message {"Failed services" => {"jboss.persistenceunit.\"MemberRegistrationIT.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"MemberRegistrationIT.war#primary\": Failed to start service"}}
12 years, 11 months
@NotNull on @Embeddable's property doesn't affect DDL
by Christian Bauer
See Button.java in the tests. The @NotNull on the embeddables property is checked at runtime but doesn't affect DDL, there's no NOT NULL constraint generated. Is that by design - component nullability etc. - or missing?
12 years, 11 months
Hibernate Filters and EntityManager.find
by Jason Clawson
Hi everyone. I know that Hibernate session filters do not apply to
find/load operations because the assumption was made that if you know the
ID of the entity you wish to load, why tack on the extra WHERE condition.
Please let me explain my use case for filters and illustrate why this
assumption is incorrect.
We use filters to do data separation. For example, separating one
customers data from another's. We also have other filters that do finer
grained object visibility conditions. But lets take a look at customer
data separation since its the easiest to understand. The advantage of
doing customer data separation in this way is that developers don't need to
think about it. It just works, and it works *automatically*. The problem
comes in when you want to do something like em.find(User.class, 1). No
WHERE clause is attached to the SQL statement. Yes, I know the ID, but I
really want to tack on to the WHERE clause "AND customerId = 3" to make
sure that someone isn't fuzzing the ID parameter to try and get at another
customer's data.
The workaround we have is another mechanism that validates the entity in a
PostLoad entity listener and throws an exception if the customerId != the
request's customerId. This is "ok" for the simple example I laid out here.
However, we now have many more filters that implement complex visibility
rules based on subselects and oracle CONNECT BY clauses which cannot be
implemented using a simple equality check in java. The best, most
performant, solution is to be able to apply the filter clause to the
EntityManager.find operation.
What is your take on this?
Thanks,
Jason Clawson
12 years, 11 months
New Search QA job
by Sanne Grinovero
Hi Strong,
I've created this new job on Jenkins:
http://hudson.qa.jboss.com/hudson/job/hibernate-search-master-dbmatrix-co...
Usually we have CI testing Hibernate Search master, but it tests the
latest Hibernate Core release we defined as dependency; this new job
is specifically overriding the version of Hibernate Core to
4.0.0-SNAPSHOT.
so it tests:
- Search matrix tests extend Core's matrix test with more tests
- Improvements done in Core improve the Search matrix test as well
- Core changes won't break Search
We can remove this later on if you think it's overkill, for now it's
very useful for us to start fixing the Search matrix tests, which need
the fixes from latest snapshosts of Core.
Sanne
12 years, 11 months
PessimisticLockException API changes in Core 4.0.0.CR7
by Sanne Grinovero
I was upgrading Hibernate Search to depend on latest Hibernate Core
release, a very minor step but this broke the build.
In Search we're using
org.hibernate.PessimisticLockException.getEntity()
to convert it to a javax.persistence.PessimisticLockException when
using the JPA API.
It's not a hard change for Search to use one of the other exception
constructors to omit the missing information about the entity, but I'd
like someone to confirm that this removal was intentional and needed,
as I wasn't expecting API changes.
Sanne
12 years, 11 months