[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2007) new-entity and generate-entities don't use same package name
by Dan Allen (JIRA)
new-entity and generate-entities don't use same package name
------------------------------------------------------------
Key: JBSEAM-2007
URL: http://jira.jboss.com/jira/browse/JBSEAM-2007
Project: JBoss Seam
Issue Type: Bug
Components: Tools
Affects Versions: 2.0.0.CR1
Reporter: Dan Allen
Fix For: 2.0.0.GA
Attachments: JBSEAM-2007-v1.txt
The *Home.java and *List.java classes that are produced by new-entity do not use the same package as the same classes produced by generate-entities.
Assuming the entity name is MyEntity, here is how the two actions play out.
new-entity:
src/action/com/company/action/MyEntityHome.java
src/action/com/company/action/MyEntityList.java
generate-entities:
src/action/com/company/model/MyEntityHome.java
src/action/com/company/model/MyEntityList.java
Notice that generate-entities uses "model" while the new-entity uses "action".
This behavior is due to a limitation in the hbmtemplate task which assumes that the Java files created will be in the same package as the model. However, it is possible to work around this problem. I have created such a patch. I believe that new-entity exhibits the correct behavior and puts the classes in the expected location.
The only limitation of doing this patch is that it is necessary to use a star import for the model classes since the hbmtemplate task assumes the current package is the package of the entity (hence even pojo.importType() wouldn't work). However, this shouldn't really be an issue since the IDE can cleanup the star imports. I would much rather have the consistency of the same package. Besides, *List.java and *Home.java are action components, not models.
--
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
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2024) log interpolation not failsafe
by Emmanuel Bernard (JIRA)
log interpolation not failsafe
------------------------------
Key: JBSEAM-2024
URL: http://jira.jboss.com/jira/browse/JBSEAM-2024
Project: JBoss Seam
Issue Type: Bug
Environment: wiki http://in.relation.to/Bloggers/FullTextSearchForHibernateGoesFinal
Reporter: Emmanuel Bernard
Priority: Critical
Fix For: 2.0.0.CR2
I have this stacktrace on the wiki
java.util.NoSuchElementException
java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
org.jboss.seam.core.Interpolator.interpolateExpressions(Interpolator.java:94)
org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:66)
org.jboss.seam.log.LogImpl.interpolate(LogImpl.java:143)
org.jboss.seam.log.LogImpl.warn(LogImpl.java:100)
(detail below)
I probably would be better to be failsafe on message interpolation when logging.
javax.servlet.ServletException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter.doFilter(WikiUrlRewriteFilter.java:45)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.util.NoSuchElementException
java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
org.jboss.seam.core.Interpolator.interpolateExpressions(Interpolator.java:94)
org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:66)
org.jboss.seam.log.LogImpl.interpolate(LogImpl.java:143)
org.jboss.seam.log.LogImpl.warn(LogImpl.java:100)
org.jboss.seam.wiki.core.ui.UIWikiFormattedText.encodeBegin(UIWikiFormattedText.java:224)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:269)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276)
com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter.doFilter(WikiUrlRewriteFilter.java:45)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--
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
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2021) validate package combination
by Dan Allen (JIRA)
validate package combination
----------------------------
Key: JBSEAM-2021
URL: http://jira.jboss.com/jira/browse/JBSEAM-2021
Project: JBoss Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 2.0.0.CR1
Reporter: Dan Allen
Assigned To: Dan Allen
Priority: Minor
Fix For: 2.0.0.GA
If one of the packages specified (action, model, or test) in the seam-gen setup script is the default package (empty package), then all of the packages must be the default package. Java does not allow classes in the default package to be imported into classes that are not in the default package. Allowing this situation will lead to a project that cannot compile.
The validation I would like to have put in place is that if one package uses the default, then they all have to use the default.
For instance, the following would be illegal
action.package=
model.package=com.company.model
test.package=com.company.test
This validation would happen during the validate-project target.
--
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
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1999) Improve documentation of when the ConversationList component is populated
by Jacob Orshalick (JIRA)
Improve documentation of when the ConversationList component is populated
-------------------------------------------------------------------------
Key: JBSEAM-1999
URL: http://jira.jboss.com/jira/browse/JBSEAM-1999
Project: JBoss Seam
Issue Type: Task
Affects Versions: 2.0.0.CR1
Reporter: Jacob Orshalick
Priority: Minor
The conversationList is only populated with a ConversationEntry if entry.isDisplayable() returns true (which requires a description entry in pages.xml). 6.7.1 and 6.7.2 show how to set the descriptions for pages in the pages.xml to populate the ConversationList, but neither sections 6.7.1, 6.7.2, 6.7.3, or 28.4 describe this behavior. Having this described in the documentation would likely help new users.
In addition, a nice-to-have would be a warning in the log or some default description if the conversationList is requested and a ConversationEntry is not displayable.
The documentation could state something like:
The conversationList component will only be populated with a ConversationEntry if a description of the conversation's view-id is provided in pages.xml. Adding descriptions to a view-id in pages.xml is described in Sections 6.7.1 and 6.7.2.
--
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
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1967) UIGraphic accesses lazy loaded data beyond transaction boundaries
by Christian Bauer (JIRA)
UIGraphic accesses lazy loaded data beyond transaction boundaries
-----------------------------------------------------------------
Key: JBSEAM-1967
URL: http://jira.jboss.com/jira/browse/JBSEAM-1967
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 2.0.0.CR1
Reporter: Christian Bauer
Priority: Minor
I have a lazy loaded byte[] in my domain model which is enhanced with the Hibernate instrument task. So it's only loaded on access. If I bind this to a <s:graphicImage>, this loading is triggered after the transaction of the RENDER RESPONSE phase was committed. In that case, Hibernate will just grab a database connection to load the property, which will never be closed. JBoss AS doesn't like that:
(http-127.0.0.1-8080-2hread) 15:18:51,492 TRACE [SeamPhaseListener] after phase: RENDER_RESPONSE 6
(http-127.0.0.1-8080-2hread) 15:18:51,492 DEBUG [SeamPhaseListener] committing transaction after phase: RENDER_RESPONSE 6
(http-127.0.0.1-8080-2hread) 15:18:51,492 DEBUG [UTTransaction] committing JTA transaction
(http-127.0.0.1-8080-2hread) 15:18:51,493 TRACE [RootInterceptor] intercepted: fileHome.isIdDefined
(http-127.0.0.1-8080-2hread) 15:18:51,493 TRACE [RootInterceptor] intercepted: fileMetaMap.getFielMetaMap
(http-127.0.0.1-8080-2hread) 15:18:51,494 DEBUG [Manager] Storing conversation state: 72
(http-127.0.0.1-8080-2hread) 15:18:51,494 DEBUG [FacesLifecycle] After render response, destroying contexts
(http-127.0.0.1-8080-2hread) 15:18:51,495 DEBUG [FacesLifecycle] <<< End JSF request
(http-127.0.0.1-8080-2hread) 15:18:51,496 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@60b945
java.lang.Throwable: STACKTRACE
at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:123)
at org.hibernate.persister.entity.AbstractEntityPersister.initializeLazyPropertiesFromDatastore(AbstractEntityPersister.java:786)
at org.hibernate.persister.entity.AbstractEntityPersister.initializeLazyProperty(AbstractEntityPersister.java:758)
at org.hibernate.intercept.AbstractFieldInterceptor.intercept(AbstractFieldInterceptor.java:73)
at org.hibernate.intercept.javassist.FieldInterceptorImpl.readObject(FieldInterceptorImpl.java:82)
at org.jboss.seam.wiki.core.model.File.$javassist_read_data(File.java)
at org.jboss.seam.wiki.core.model.File.getData(File.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at javax.faces.component.UIGraphic.getValue(UIGraphic.java:137)
at org.jboss.seam.ui.graphicImage.GraphicImageRendererBase.doEncodeBegin(GraphicImageRendererBase.java:31)
at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
at com.sun.faces.renderkit.html_basic.OutputLinkRenderer.encodeChildren(OutputLinkRenderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
It seems like this behavior was OK or has change, I didn't get this exception with Hibernate 3.2.3 but now with Hibernate 3.2.5.
--
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
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1514) seam-gen should normalize project name
by Dan Allen (JIRA)
seam-gen should normalize project name
--------------------------------------
Key: JBSEAM-1514
URL: http://jira.jboss.com/jira/browse/JBSEAM-1514
Project: JBoss Seam
Issue Type: Patch
Components: Tools
Affects Versions: 1.3.0.ALPHA
Environment: Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)
seam CVS HEAD
Reporter: Dan Allen
seam-gen uses the name of the project in a lot of (dangerous) places when generating the code and configurations. If a project created with seam-gen is going to work correctly, this name must have "safe" characters (safe for JNDI, safe for value binding expressions, etc). Currently, if the person using seam-gen enters a space character or a hyphen in the name (two very standard use cases), then the resulting project will not work correctly.
I have provided a patch that will normalize this name. It is implemented as an Ant task that filters the name for spaces and hyphens and replaces them with underscores. It then does a second pass to eliminate duplicate underscore characters. Granted, doing this filtering will not honor the exact name for the project that the user provides, but then again, what is the use if the project is broken.
--
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
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2022) split transaction enablement into two options
by Dan Allen (JIRA)
split transaction enablement into two options
---------------------------------------------
Key: JBSEAM-2022
URL: http://jira.jboss.com/jira/browse/JBSEAM-2022
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.CR1
Reporter: Dan Allen
Assigned To: Gavin King
Priority: Minor
Fix For: 2.0.x
I can see cases where a developer will want to wrap the rendering phase in a transaction, but not the preceding phases. When transaction management is disabled, there are annotations available for wrapping action handler methods in transactions. However, there is no easy way (other than writing a phase listener) to get a transaction wrapped around the render response phase.
I am thinking something like this:
Leave the property transactionManagementEnabled as is.
Add a property restrictTransactionToRenderPhase (or something similarly named)
Interpretation of this property will require a change in SeamPhaseListener
I know that this feels like a bit too much control, but I came across a use case recently where I needed to do several isolated transactions, but since I had the global transaction management enabled, the @Transactional elements on my methods were being ignored (because a global transaction was already in play).
--
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
17 years, 2 months