[jboss-user] [JBoss Seam] - Odd Transactional Exception on WebLogic 9.2
neilac333
do-not-reply at jboss.com
Thu Feb 14 15:19:16 EST 2008
Using Seam 2.0 GA on WebLogic 9.2, I am trying to simply populate a dropdown list with values from a database table. The code to do so is in a Seam-managed persistence component and has been tested and found to work. My Facelet then calls on this component to populate the dropdown. When I do so, I get this:
| Caused by: java.sql.SQLException: Transaction BEA1-02F463ADA554FEA2ACBA not active anymore. tx status = Marked rollback. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException]
| at weblogic.jdbc.jts.Driver.getTransaction(Driver.java:564)
| at weblogic.jdbc.jts.Driver.connect(Driver.java:121)
| at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
| 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.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.doList(Loader.java:2220)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
| at org.hibernate.loader.Loader.list(Loader.java:2099)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
| at gov.nist.srm.persistence.QueryServiceImpl.getTechnicalCategories(QueryServiceImpl.java:31)
| at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
| at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
|
|
As I said, this is a basic readonly operation from the database. At no point do I call for any rollback. Also, the datasource has been tested in the WebLogic console and found to work.
Here are the properties in persistence.xml:
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
| <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.CMTTransactionFactory"/>
| </properties>
|
Finally, here is the code:
| @Name("queryService")
| public class QueryServiceImpl extends Object implements QueryService, Serializable {
| @Transactional(TransactionPropagationType.SUPPORTS)
| public List<Category> getCategories() { ... }
| .
| .
| .
| }
|
And here is the reference in the Facelet:
| <select jsfc="h:selectOneMenu" id="categoryDropdown" value="#{myAction.category}">
| <s:selectItems value="#{queryService.categories}" var="category" label="#{category.name}" noSelectionLabel="" />
| </select>
|
I should note that if I remove that @Transactional annotation, there is no change.
Any insight into what causes this bizarre rollback on WebLogic is appreciated. Please let me know if you need more information.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129493#4129493
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129493
More information about the jboss-user
mailing list