System: Windows (vista) JBoss Portal + JBoss AS 4.2.2 bundle, freshly downloaded from jboss.
My goal: I want to store user(account) information in my database instead of bundled hsqldb. (In the long run I want to store all portal info in my db) I looked at the reference, searched the forums to find a solution for changing the default hibernate user datasource to a postgresql datasource. I am quite new to jboss, so I probably don't understand the majority of the documents. In the end what i did was: 1. created a new datasource called XyzDS, defined in portal-xyz-ds.xml 2. I modified jboss-portal.sar\META-INF\jboss-service.xml and put a <depends>jboss.jca:service=DataSourceBinding,name=XyzDS</depends> after each PortalDS ...PortalDS tag 3. I modified jboss-portal.sar\conf\hibernate\user\hibernate.cfg.xml i changed datasource to XyzDS and added auto update so that it creates the tables instead of me, and forced the dialect: | <property name="connection.datasource">java:XyzDS</property> | <property name="hbm2ddl.auto">update</property> | <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> | Every time I log in and try to do something it always throws the following exception: | HTTP Status 500 - | | type Exception report | | message | | description The server encountered an internal error () that prevented it from fulfilling this request. | | exception | | javax.servlet.ServletException: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f5751ff:ee99:47c99ba6:26b status: ActionStatus.ABORT_ONLY > | org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:406) | javax.servlet.http.HttpServlet.service(HttpServlet.java:803) | org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) | | root cause | | javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f5751ff:ee99:47c99ba6:26b status: ActionStatus.ABORT_ONLY > | org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304) | org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396) | org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842) | org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88) | org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) | org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) | org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) | org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139) | org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547) | org.hibernate.loader.Loader.doQuery(Loader.java:673) | org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) | org.hibernate.loader.Loader.loadEntity(Loader.java:1907) | org.hibernate.loader.entity.CollectionElementLoader.loadElement(CollectionElementLoader.java:72) | org.hibernate.persister.collection.OneToManyPersister.getElementByIndex(OneToManyPersister.java:360) | org.hibernate.collection.AbstractPersistentCollection.readElementByIndex(AbstractPersistentCollection.java:158) | org.hibernate.collection.PersistentMap.get(PersistentMap.java:146) | org.jboss.portal.core.impl.model.portal.PortalObjectImpl.getChild(PortalObjectImpl.java:382) | org.jboss.portal.core.impl.model.portal.ContextImpl.getPortal(ContextImpl.java:52) | org.jboss.portal.core.impl.model.CustomizationManagerService.getDashboard(CustomizationManagerService.java:282) | org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.injectDashboardNav(PageCustomizerInterceptor.java:244) | org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:164) | org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:77) | org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81) | org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42) | org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:51) | org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50) | org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157) | org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:134) | org.jboss.portal.core.model.portal.PortalObjectResponseHandler.processCommandResponse(PortalObjectResponseHandler.java:74) | org.jboss.portal.core.controller.classic.ClassicResponseHandler.processHandlers(ClassicResponseHandler.java:79) | org.jboss.portal.core.controller.classic.ClassicResponseHandler.processCommandResponse(ClassicResponseHandler.java:53) | org.jboss.portal.core.controller.handler.ResponseHandlerSelector.processCommandResponse(ResponseHandlerSelector.java:72) | org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:271) | org.jboss.portal.core.controller.Controller.processCommand(Controller.java:259) | org.jboss.portal.core.controller.Controller.handle(Controller.java:218) | org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131) | org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47) | org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68) | org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96) | org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:245) | org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98) | org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65) | org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49) | org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java) | org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) | org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253) | org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java) | org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) | org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262) | org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java) | org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java) | org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:70) | org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:131) | org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115) | org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157) | org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:380) | javax.servlet.http.HttpServlet.service(HttpServlet.java:803) | org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) | | Probably this can be fixed with a line or two, but being a newcomer, I have no idea where to look. And above this, is there an easy way to change to whole portal data management datasource to my datasource, or do I have to find and fill the above mentioned lines into each hibernate config file? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133455#4133455 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133455 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
