]
Pete Muir resolved JBSEAM-2474.
-------------------------------
Resolution: Cannot Reproduce Bug
Assignee: Pete Muir
I can't reproduce using this patch
### Eclipse Workspace Patch 1.0
#P jboss-seam
Index: examples/ui/src/org/jboss/seam/example/ui/Continent.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-seam/examples/ui/src/org/jboss/seam/example/ui/Continent.java,v
retrieving revision 1.2
diff -u -r1.2 Continent.java
--- examples/ui/src/org/jboss/seam/example/ui/Continent.java 25 Feb 2007 00:42:33
-0000 1.2
+++ examples/ui/src/org/jboss/seam/example/ui/Continent.java 9 Jan 2008 11:57:57 -0000
@@ -4,6 +4,7 @@
import java.util.List;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
@@ -16,7 +17,7 @@
private String name;
- @OneToMany(mappedBy="continent")
+ @OneToMany(mappedBy="continent", fetch=FetchType.LAZY)
private List<Country> countries;
public List<Country> getCountries()
If you can attach an example to reproduce, with steps to show the issue, please reopen.
s:selectItems and FetchType.LAZY gives Transaction is not active
exception
--------------------------------------------------------------------------
Key: JBSEAM-2474
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2474
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.1.CR1
Environment: java6/hibernate ear project
Reporter: Menashe
Assigned To: Pete Muir
jsf:
<h:selectOneMenu id="cc" value="#{billing.fundSource}">
<s:convertEntity/>
<s:selectItems value="#{user.creditCards}" var="item"
label="#{item.label}" noSelectionLabel="Select Source"/>
</h:selectOneMenu>
java:
class User
...
@OneToMany(fetch = FetchType.LAZY, mappedBy = "user")
public List<CreditCard> getCreditCards() {
return creditCards;
}
....
exception:
06:18:35,004 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
06:18:35,005 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple
< ac, BasicAction: 7f000101:cb6f:4784ad50:3f status: ActionStatus.ABORT_ONLY >; -
nested throwable: (javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: 7f000101:cb6f:4784ad50:3f status:
ActionStatus.ABORT_ONLY >)
06:18:35,035 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
06:18:35,035 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple
< ac, BasicAction: 7f000101:cb6f:4784ad50:3f status: ActionStatus.ABORT_ONLY >; -
nested throwable: (javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: 7f000101:cb6f:4784ad50:3f status:
ActionStatus.ABORT_ONLY >)
06:18:35,232 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
06:18:35,232 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple
< ac, BasicAction: 7f000101:cb6f:4784ad50:3f status: ActionStatus.ABORT_ONLY >; -
nested throwable: (javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: 7f000101:cb6f:4784ad50:3f status:
ActionStatus.ABORT_ONLY >)
06:18:35,235 ERROR [STDERR] Jan 9, 2008 6:18:35 AM com.sun.facelets.FaceletViewHandler
handleRenderException
SEVERE: Error Rendering View[/members/billing.xhtml]
org.hibernate.exception.GenericJDBCException: Cannot open connection
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
at
org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
at
org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
at
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
at
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:249)
at org.jboss.seam.ui.component.UISelectItems.asSelectItems(UISelectItems.java:178)
at org.jboss.seam.ui.component.UISelectItems.getValue(UISelectItems.java:126)
at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:323)
at
com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:675)
at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:793)
at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:335)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:190)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
at
org.jboss.seam.ui.renderkit.ValidateAllRendererBase.doEncodeChildren(ValidateAllRendererBase.java:33)
at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
at
org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:104)
at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at
org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:266)
at
org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:261)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
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 com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.
06:18:35,235 ERROR [STDERR] connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.util.NestedSQLException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: 7f000101:cb6f:4784ad50:3f status:
ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException:
Transaction is not active: tx=TransactionImple < ac, BasicAction:
7f000101:cb6f:4784ad50:3f status: ActionStatus.ABORT_ONLY >)
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
at
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
... 95 more
Caused by: javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: 7f000101:cb6f:4784ad50:3f status:
ActionStatus.ABORT_ONLY >
at
org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
... 97 more
06:18:35,310 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
06:18:35,310 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple
< ac, BasicAction: 7f000101:cb6f:4784ad50:3f status: ActionStatus.ABORT_ONLY >; -
nested throwable: (javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: 7f000101:cb6f:4784ad50:3f status:
ActionStatus.ABORT_ONLY >)
06:18:35,332 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
06:18:35,332 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple
< ac, BasicAction: 7f000101:cb6f:4784ad50:3f status: ActionStatus.ABORT_ONLY >; -
nested throwable: (javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: 7f000101:cb6f:4784ad50:3f status:
ActionStatus.ABORT_ONLY >)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: