[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1950) ClassCastException when using Hibernates DetachedCriteria
by Christian Pietsch (JIRA)
ClassCastException when using Hibernates DetachedCriteria
---------------------------------------------------------
Key: JBSEAM-1950
URL: http://jira.jboss.com/jira/browse/JBSEAM-1950
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.CR1, 2.0.0.BETA1
Environment: Jboss 4.2.1
Reporter: Christian Pietsch
Priority: Critical
Since migration to Seam 2 (tried Beta 1 and CR1) I cannot list my entities usingHibernate's DetachedCriteria any longer. Stack trace is:
Caused by: java.lang.ClassCastException: org.hibernate.search.impl.FullTextSessionImpl
at org.jboss.seam.persistence.HibernateSessionProxy.getDelegateSessionImplementor(HibernateSessionP
roxy.java:401)
at org.jboss.seam.persistence.HibernateSessionProxy.list(HibernateSessionProxy.java:566)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at de.dvdb.generic.search.AbstractSearch.retrieveItems(AbstractSearch.java:261)
- in general I can access the entityManager in my application
- I don't use Seam's new search capabilities at all (right now)
- I'm getting the Hibernate Session in the following way:
<factory name="hibernateSession" scope="STATELESS"
auto-create="true" value="#{dvdb.delegate}" />
<persistence:managed-persistence-context name="dvdb"
auto-create="true"
persistence-unit-jndi-name="java:/dvdbEntityManagerFactory" />
Add hibernate-search.jar and dependencies didn't help.
- Chris
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1916) EntityQuery: Refresh method doesn't refresh changes made in getEjbql()
by Ricardo Memoria (JIRA)
EntityQuery: Refresh method doesn't refresh changes made in getEjbql()
----------------------------------------------------------------------
Key: JBSEAM-1916
URL: http://jira.jboss.com/jira/browse/JBSEAM-1916
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.0.0.BETA1, 1.2.1.GA
Environment: Windows XP, JBOSS 4.2.1GA
Reporter: Ricardo Memoria
The Refresh method doesn't update changes in the Ejbql property.
My EntityQuery has a condition that can't be included as a restriction. It is:
Code:
@Name("mdrCases")
public class MdrCasesQuery extends EntityQuery {
private boolean allCases;
@Override
public String getEjbql() {
String cond = allCases? "": " where (c.endingTreatmentDate is null)";
return "from MdrCase c".concat(cond);
}
Since it doesn't contain any EL expression, it can't be included as a restriction. So the condition is placed on the fly when the user clicks a button to refresh the page:
Code:
<s:decorate template="/layout/edit.xhtml">
<ui:define name="label">#{messages['patients.allcases']}:</ui:define>
<h:selectBooleanCheckbox value="#{mdrCases.allCases}"></h:selectBooleanCheckbox>
</s:decorate>
<h:commandButton action="#{mdrCases.refresh}" value="#{messages['form.search']}" styleClass="button" />
The problem is that after the refresh method is called the Ejbql is not rebuild.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1915) EntityQuery generates exception when reading getResultCount() with restrictions applied.
by Ricardo Memoria (JIRA)
EntityQuery generates exception when reading getResultCount() with restrictions applied.
----------------------------------------------------------------------------------------
Key: JBSEAM-1915
URL: http://jira.jboss.com/jira/browse/JBSEAM-1915
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.0.0.BETA1, 1.2.1.GA
Environment: Windows Xp, SEAM 2.0.0.beta1 CVS sep-10th, JBOSS 4.2.1GA
Reporter: Ricardo Memoria
The following EntityQuery, when the region is defined (a restriction), I can't read the getResultCount() due to a bug in the EntityQuery/Query class:
@Name("localities")
public class LocalitiesQuery extends EntityQuery {
private String[] restrictions = {"l.region = #{localities.region}"};
private Region region;
public Region getRegion() {
return region;
}
public void setRegion(Region region) {
this.region = region;
}
@Override
public String getEjbql() {
return "from Locality l join fetch l.region";
}
@Override
public List<String> getRestrictions() {
return Arrays.asList(restrictions);
}
@Override
protected String getCountEjbql() {
return "select count(*) from Locality l";
}
}
It generates an Exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1983) Workspace component providing the top of each ConversationStack
by Jacob Orshalick (JIRA)
Workspace component providing the top of each ConversationStack
---------------------------------------------------------------
Key: JBSEAM-1983
URL: http://jira.jboss.com/jira/browse/JBSEAM-1983
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.CR1
Reporter: Jacob Orshalick
Priority: Minor
I have been using the conversationList component provided by Seam to allow switching between conversations. Currently, the conversationList contains all ConversationEntry instances. This seems to be unintuitive to users when working within nested conversations (especially when nested 3 or 4 conversations deep).
Each time a conversation is nested, the parent as well as the child are contained in the workspace entries. As you can imagine, if nesting continues, the number of workspaces grows quickly. It also seems that the ConversationStack already handles a representation of nested conversations through breadcrumbs.
In order to avoid this issue, I have implemented a workspace component which provides the top of each ConversationStack the user is working with. I then use breadcrumbs to represent nesting and allow traversal through nested conversations which seems intuitive to the users.
If it would help I can submit the workspace component as a patch.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1980) Using primary key in select count()
by thierry accart (JIRA)
Using primary key in select count()
------------------------------------
Key: JBSEAM-1980
URL: http://jira.jboss.com/jira/browse/JBSEAM-1980
Project: JBoss Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 1.2.1.GA
Environment: JBoss Seam with MSSQL database connections
Reporter: thierry accart
Priority: Optional
I see in my JBoss log several lines like
Hibernate: select count(*) as col_0_0_ from ....
I'm not sure how it's handled in mysql, oracle or other databases, but in mssql, indexes are stored in different datapages.
When counting rows, if we use select count (primarykey), we scan a much lower number of pages than we currently do with select(*)
Example : if one row has a 4 bytes long primary key, and one row stores 1000 bytes,
if the table has 20000 rows, sql will store this table in 2500 datapages (one page stores 8096 bytes).
a select (*) will scan the 2500 datapages, when a select (primarykey) will scan 1 (one) datapage.
As you can see, the impact on database server can be important for large tables with a lot of rows.
Rgds
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months