[JBoss JIRA] (HIBERNATE-97) Clarifications about jta.jar and jboss-j2ee.jar in the Reference Guide - Tutorial
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-97?page=com.atlassian.jira.plug... ]
Steve Ebersole closed HIBERNATE-97.
-----------------------------------
Resolution: Rejected
> Clarifications about jta.jar and jboss-j2ee.jar in the Reference Guide - Tutorial
> ---------------------------------------------------------------------------------
>
> Key: HIBERNATE-97
> URL: https://issues.jboss.org/browse/HIBERNATE-97
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: Documentation
> Reporter: Juraci Paixão Kröhling
> Assignee: Bawany Satgunanathan
>
> In Hibernate_Reference_Guide.pdf , page 17, it lists all the required libraries to run Hibernate. It lists jta.jar file, which is not included in the package with this name. The lib jboss-j2ee.jar, which implements JTA, is included, but the user *may* find it difficult to link jta.jar with jboss-j2ee.jar, considering it is in the "tutorial" part . So, the suggestion is to put a note in the documentation about this, maybe like the note about log4j.
> Suggestion:
> Before:
> more or less libraries. See the README.txt file in the lib/ directory of the Hibernate distribution
> for more information about required and optional third-party libraries. (Actually, Log4j is not
> required but preferred by many developers.)
> After:
> more or less libraries. See the README.txt file in the lib/ directory of the Hibernate distribution
> for more information about required and optional third-party libraries.
> Note: The lib Log4j is not required but preferred by many developers.
> Note 2:Instead of jta.jar, use your preferred JTA implementation. In
> the Hibernate distribution, you can use jboss-j2ee.jar for this purpose.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-97) Clarifications about jta.jar and jboss-j2ee.jar in the Reference Guide - Tutorial
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-97?page=com.atlassian.jira.plug... ]
Steve Ebersole commented on HIBERNATE-97:
-----------------------------------------
This is not the correct project to report Hibernate issues under. This Jira project is for reporting issues in the integration between Hibernate and WildFly. To report issues in Hibernate, please use https://hibernate.atlassian.net. Thanks.
> Clarifications about jta.jar and jboss-j2ee.jar in the Reference Guide - Tutorial
> ---------------------------------------------------------------------------------
>
> Key: HIBERNATE-97
> URL: https://issues.jboss.org/browse/HIBERNATE-97
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: Documentation
> Reporter: Juraci Paixão Kröhling
> Assignee: Bawany Satgunanathan
>
> In Hibernate_Reference_Guide.pdf , page 17, it lists all the required libraries to run Hibernate. It lists jta.jar file, which is not included in the package with this name. The lib jboss-j2ee.jar, which implements JTA, is included, but the user *may* find it difficult to link jta.jar with jboss-j2ee.jar, considering it is in the "tutorial" part . So, the suggestion is to put a note in the documentation about this, maybe like the note about log4j.
> Suggestion:
> Before:
> more or less libraries. See the README.txt file in the lib/ directory of the Hibernate distribution
> for more information about required and optional third-party libraries. (Actually, Log4j is not
> required but preferred by many developers.)
> After:
> more or less libraries. See the README.txt file in the lib/ directory of the Hibernate distribution
> for more information about required and optional third-party libraries.
> Note: The lib Log4j is not required but preferred by many developers.
> Note 2:Instead of jta.jar, use your preferred JTA implementation. In
> the Hibernate distribution, you can use jboss-j2ee.jar for this purpose.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-99) nested select doesn't work
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-99?page=com.atlassian.jira.plug... ]
Steve Ebersole commented on HIBERNATE-99:
-----------------------------------------
This is not the correct project to report Hibernate issues under. This Jira project is for reporting issues in the integration between Hibernate and WildFly. To report issues in Hibernate, please use https://hibernate.atlassian.net. Thanks.
> nested select doesn't work
> --------------------------
>
> Key: HIBERNATE-99
> URL: https://issues.jboss.org/browse/HIBERNATE-99
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: JBoss Seam with Hibernate
> Reporter: Uros Majeric
> Assignee: Steve Ebersole
>
> I found this example somewhere:
> Query q = em.createQuery("select o from Order o where exists (select li from o.items li where li.price > 10000)");
> this works fine if "items" id is basic type (Integer, Short, ...), but problems happens if id is an EmbeddedId (embedded class) then the SQL is not generated as it should be.
> it generates SQL like this one:
> select *
> from
> ORDER order0_
> where
> exists (
> select
> (item1_.id, item1_.name)
> from
> items item1_
> where
> order0_.id=item1_.id
> and item1_.price > 10000
> )
> if id and name are primary keys of embedded class.
> (item1_.id, item1_.name) should not have paranthesis.
> Uros
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-99) nested select doesn't work
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-99?page=com.atlassian.jira.plug... ]
Steve Ebersole closed HIBERNATE-99.
-----------------------------------
Resolution: Rejected
> nested select doesn't work
> --------------------------
>
> Key: HIBERNATE-99
> URL: https://issues.jboss.org/browse/HIBERNATE-99
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: JBoss Seam with Hibernate
> Reporter: Uros Majeric
> Assignee: Steve Ebersole
>
> I found this example somewhere:
> Query q = em.createQuery("select o from Order o where exists (select li from o.items li where li.price > 10000)");
> this works fine if "items" id is basic type (Integer, Short, ...), but problems happens if id is an EmbeddedId (embedded class) then the SQL is not generated as it should be.
> it generates SQL like this one:
> select *
> from
> ORDER order0_
> where
> exists (
> select
> (item1_.id, item1_.name)
> from
> items item1_
> where
> order0_.id=item1_.id
> and item1_.price > 10000
> )
> if id and name are primary keys of embedded class.
> (item1_.id, item1_.name) should not have paranthesis.
> Uros
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-101) IdHashShardingStrategy fails after 1.7M id is generated
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-101?page=com.atlassian.jira.plu... ]
Steve Ebersole closed HIBERNATE-101.
------------------------------------
Resolution: Rejected
> IdHashShardingStrategy fails after 1.7M id is generated
> -------------------------------------------------------
>
> Key: HIBERNATE-101
> URL: https://issues.jboss.org/browse/HIBERNATE-101
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: Rafal Glowacz
> Assignee: Steve Ebersole
>
> public class IdShardingStrategyTest extends TestCase
> {
> private IdHashShardingStrategy _defaultIdStrategy;
> private IdShardingStrategy _idStrategy;
> protected void setUp() throws Exception {
> _idStrategy = new IdShardingStrategy();
> _idStrategy.initialize(null, createDirectoryProviders());
> _defaultIdStrategy = new IdHashShardingStrategy();
> _defaultIdStrategy.initialize(null, createDirectoryProviders());
> }
> private DirectoryProvider[] createDirectoryProviders() {
> return new DirectoryProvider[]{new MockDirectoryProvider(),
> new MockDirectoryProvider(),
> new MockDirectoryProvider()};
> }
> public void testIdSharding() {
> long id = 1;
> long limit = 1000 * 1000000 * 1000000L;
> try {
> while (id < limit) {
> generateForAddition(_idStrategy, id);
> generateForDeletion(_idStrategy, id);
> id += 129653153;
> }
> } catch (Exception e) {
> fail("Couldn't get directory for id " + id);
> }
> }
> public void testIdHashSharding() {
> long id = 1;
> long limit = 1000 * 1000000 * 1000000L;
> try {
> while (id < limit) {
> generateForAddition(_defaultIdStrategy, id);
> generateForDeletion(_defaultIdStrategy, id);
> id += 129653153;
> }
> fail("Should fail with ArrayIndexOutOfBoundsException for long id");
> } catch (Exception e) {
> }
> }
> private MockDirectoryProvider generateForAddition(IndexShardingStrategy strategy, long id) {
> return (MockDirectoryProvider) strategy.getDirectoryProviderForAddition(null, id, id + "", null);
> }
> private DirectoryProvider[] generateForDeletion(IndexShardingStrategy strategy, long id) {
> return strategy.getDirectoryProvidersForDeletion(null, id, id + "");
> }
> }
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-103) Search default properties are ignored when at least one shard property exist
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-103?page=com.atlassian.jira.plu... ]
Steve Ebersole commented on HIBERNATE-103:
------------------------------------------
This is not the correct project to report Hibernate issues under. This Jira project is for reporting issues in the integration between Hibernate and WildFly. To report issues in Hibernate, please use https://hibernate.atlassian.net. Thanks.
> Search default properties are ignored when at least one shard property exist
> ----------------------------------------------------------------------------
>
> Key: HIBERNATE-103
> URL: https://issues.jboss.org/browse/HIBERNATE-103
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: Rafal Glowacz
> Assignee: Steve Ebersole
>
> I'm trying to use shared strategy for search. So my basic setup was:
> common.hibernate.search.default.indexBase = /lucene/index
> common.hibernate.search.default.optimizer.operation_limit.max = 1000
> common.hibernate.search.default.optimizer.transaction_limit.max = 1000
> common.hibernate.search.default.directory_provider = org.hibernate.search.store.FSDirectoryProvider
> common.hibernate.search.default.sharding_strategy = com.newbay.search.sharding.strategy.IdShardingStrategy
> common.hibernate.search.blogentry.sharding_strategy.nbr_of_shards = 5
> But this won't work for me because when sharding configuration properties exist then those default ones are completely ignored - I can't understand that. To change this I changed ".default." to ".blogentry." and then I found the bug that the number of properties decides how many shards I want for current index. (nbrOfShards = nbrOfShards >= indexSpecificDefaultProps.size() ?
> nbrOfShards :
> indexSpecificDefaultProps.size();)
> So in this case I can't do anything. I'm looking for such config:
> common.hibernate.search.default.indexBase = /lucene/index
> common.hibernate.search.default.optimizer.operation_limit.max = 1000
> common.hibernate.search.default.optimizer.transaction_limit.max = 1000
> common.hibernate.search.default.directory_provider = org.hibernate.search.store.FSDirectoryProvider
> common.hibernate.search.default.sharding_strategy = com.newbay.search.sharding.strategy.IdShardingStrategy
> common.hibernate.search.website.sharding_strategy.nbr_of_shards = 2
> common.hibernate.search.website.indexBase = /lucene/website
> common.hibernate.search.blogentry.sharding_strategy.nbr_of_shards = 5
> common.hibernate.search.blogentry.indexBase = /lucene/blogentry
> But it doesn't work for now.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-103) Search default properties are ignored when at least one shard property exist
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-103?page=com.atlassian.jira.plu... ]
Steve Ebersole closed HIBERNATE-103.
------------------------------------
Resolution: Rejected
> Search default properties are ignored when at least one shard property exist
> ----------------------------------------------------------------------------
>
> Key: HIBERNATE-103
> URL: https://issues.jboss.org/browse/HIBERNATE-103
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: Rafal Glowacz
> Assignee: Steve Ebersole
>
> I'm trying to use shared strategy for search. So my basic setup was:
> common.hibernate.search.default.indexBase = /lucene/index
> common.hibernate.search.default.optimizer.operation_limit.max = 1000
> common.hibernate.search.default.optimizer.transaction_limit.max = 1000
> common.hibernate.search.default.directory_provider = org.hibernate.search.store.FSDirectoryProvider
> common.hibernate.search.default.sharding_strategy = com.newbay.search.sharding.strategy.IdShardingStrategy
> common.hibernate.search.blogentry.sharding_strategy.nbr_of_shards = 5
> But this won't work for me because when sharding configuration properties exist then those default ones are completely ignored - I can't understand that. To change this I changed ".default." to ".blogentry." and then I found the bug that the number of properties decides how many shards I want for current index. (nbrOfShards = nbrOfShards >= indexSpecificDefaultProps.size() ?
> nbrOfShards :
> indexSpecificDefaultProps.size();)
> So in this case I can't do anything. I'm looking for such config:
> common.hibernate.search.default.indexBase = /lucene/index
> common.hibernate.search.default.optimizer.operation_limit.max = 1000
> common.hibernate.search.default.optimizer.transaction_limit.max = 1000
> common.hibernate.search.default.directory_provider = org.hibernate.search.store.FSDirectoryProvider
> common.hibernate.search.default.sharding_strategy = com.newbay.search.sharding.strategy.IdShardingStrategy
> common.hibernate.search.website.sharding_strategy.nbr_of_shards = 2
> common.hibernate.search.website.indexBase = /lucene/website
> common.hibernate.search.blogentry.sharding_strategy.nbr_of_shards = 5
> common.hibernate.search.blogentry.indexBase = /lucene/blogentry
> But it doesn't work for now.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-101) IdHashShardingStrategy fails after 1.7M id is generated
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-101?page=com.atlassian.jira.plu... ]
Steve Ebersole commented on HIBERNATE-101:
------------------------------------------
This is not the correct project to report Hibernate issues under. This Jira project is for reporting issues in the integration between Hibernate and WildFly. To report issues in Hibernate, please use https://hibernate.atlassian.net. Thanks.
> IdHashShardingStrategy fails after 1.7M id is generated
> -------------------------------------------------------
>
> Key: HIBERNATE-101
> URL: https://issues.jboss.org/browse/HIBERNATE-101
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: Rafal Glowacz
> Assignee: Steve Ebersole
>
> public class IdShardingStrategyTest extends TestCase
> {
> private IdHashShardingStrategy _defaultIdStrategy;
> private IdShardingStrategy _idStrategy;
> protected void setUp() throws Exception {
> _idStrategy = new IdShardingStrategy();
> _idStrategy.initialize(null, createDirectoryProviders());
> _defaultIdStrategy = new IdHashShardingStrategy();
> _defaultIdStrategy.initialize(null, createDirectoryProviders());
> }
> private DirectoryProvider[] createDirectoryProviders() {
> return new DirectoryProvider[]{new MockDirectoryProvider(),
> new MockDirectoryProvider(),
> new MockDirectoryProvider()};
> }
> public void testIdSharding() {
> long id = 1;
> long limit = 1000 * 1000000 * 1000000L;
> try {
> while (id < limit) {
> generateForAddition(_idStrategy, id);
> generateForDeletion(_idStrategy, id);
> id += 129653153;
> }
> } catch (Exception e) {
> fail("Couldn't get directory for id " + id);
> }
> }
> public void testIdHashSharding() {
> long id = 1;
> long limit = 1000 * 1000000 * 1000000L;
> try {
> while (id < limit) {
> generateForAddition(_defaultIdStrategy, id);
> generateForDeletion(_defaultIdStrategy, id);
> id += 129653153;
> }
> fail("Should fail with ArrayIndexOutOfBoundsException for long id");
> } catch (Exception e) {
> }
> }
> private MockDirectoryProvider generateForAddition(IndexShardingStrategy strategy, long id) {
> return (MockDirectoryProvider) strategy.getDirectoryProviderForAddition(null, id, id + "", null);
> }
> private DirectoryProvider[] generateForDeletion(IndexShardingStrategy strategy, long id) {
> return strategy.getDirectoryProvidersForDeletion(null, id, id + "");
> }
> }
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months
[JBoss JIRA] (HIBERNATE-104) useless stacktrace
by Steve Ebersole (JIRA)
[ https://issues.jboss.org/browse/HIBERNATE-104?page=com.atlassian.jira.plu... ]
Steve Ebersole commented on HIBERNATE-104:
------------------------------------------
This is not the correct project to report Hibernate issues under. This Jira project is for reporting issues in the integration between Hibernate and WildFly. To report issues in Hibernate, please use https://hibernate.atlassian.net. Thanks.
You really mean chains of nested exceptions, not stack traces.. Anyway, stack-traces and nested exceptions may be useless to you but are often useful to developer to help track down problems you report. Hard to say here as you say there is a "lot" of information but don't show it.
> useless stacktrace
> ------------------
>
> Key: HIBERNATE-104
> URL: https://issues.jboss.org/browse/HIBERNATE-104
> Project: Hibernate Integration
> Issue Type: Bug
> Environment: jboss-4.2.2.GA, linux 32bit
> Reporter: arne anka
> Assignee: Steve Ebersole
>
> when trying
> entityManager.merge(myUser);
> entityManager.flush();
> i get a very long list of recurrent stacktraces. it boils down to two messages:
> Caused by: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of my.class.roleId
> at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:171)
> at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:183)
> at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:3591)
> at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:3307)
> at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:181)
> at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:218)
> at org.hibernate.type.EntityType.getIdentifier(EntityType.java:397)
> at org.hibernate.type.EntityType.replace(EntityType.java:253)
> at org.hibernate.type.CollectionType.replaceElements(CollectionType.java:451)
> at org.hibernate.type.Collecti
> 14:46:07,362 INFO [STDOUT] onType.replace(CollectionType.java:518)
> at org.hibernate.type.TypeFactory.replace(TypeFactory.java:482)
> at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:340)
> at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:267)
> at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:120)
> at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53)
> at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:677)
> at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:661)
> at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:665)
> at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:227)
> ... 74 more
> and
> Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@661744
> at sun.reflect.GeneratedMethodAccessor2266.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:145)
> ... 92 more
> the property my.class.roleId is defined as Integer, setter and getter expect or return an Integer.
> i can't see, what type hibernate expects as argument and i can't see in what type hibernate tries to cast.
> - why does the stacktrace not mention the argument type hibernate expects?
> - why does the stacktrace not mention in which type hibernate tries to cast?
> with it's current level of null-information ist that _very_ long, confusing and time consuming stacktrace worse then useless.
> i am completely unable to deduce any way to remedy a possible bug in my code or circumvent a possible bug in hibernate.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 8 months