You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Luca Zago <lz...@e-tree.com> on 2003/04/02 21:15:41 UTC

Re: Slide J2EEStore based on new schema proposed last year (UPDATE)

Hi,
I tried the new Schema on a Oracle DB and Tyrex 1.0 on Tomcat 4.1.18, 
and I noticed that I can read without problem all from database, but 
every time I try to write something by slide on it, I got the exception:

CONNDEBUG: Got connection successfully
WARN  com.etree.cms.slide : Commit failure: Resource manager 
slidestore.j2ee.J2EENodeStore@c92507 Error code XA_RBCOMMFAIL in 
Transaction 18 xid Threa
d-3-1049310620596-18- in thread Thread-3
ERROR : javax.transaction.HeuristicMixedException
javax.transaction.HeuristicMixedException
         at 
org.apache.slide.transaction.SlideTransaction.commit(SlideTransaction.java:379)
         at 
org.apache.slide.transaction.SlideTransactionManager.commit(SlideTransactionManager.java:230)
         at 
org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessTokenImpl.java:440)
         at 
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMethod.java:326)
         at 
org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:201)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:550)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
         at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
         at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
         at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
         at java.lang.Thread.run(Thread.java:536)
ERROR: org.apache.slide.webdav.WebdavException: Internal Server Error



I use a FileStore for contents and your J2EEtore for Node Store.
It seems that two threads are open..probably one by the internal slide 
transaction manager and the other by Tyrex itself.
Have you some ideas what could be the reason for such behavior?

Thank you in advance,
Luca

P.s. if everybody is interested in it, I can post the SQL new schema for 
Oracle.


Kumar, Ashok wrote:
> Hi all,
> 
>    Here is the latest versions on the J2EEStore based on the new schema-also included is the database  schema for the same (SQLServer based). Please see the attachments. We have now Slide J2EEStore working 
> 	TC 4.1.x with Tyrex1.0 (SQLServer/DB2)
> 	TC 4.1.x with CommonDBCPPools (SQLServer/DB2)
> 	IBM WebSphere5.0 with DB27.2 as database.
> 
> Christopher Lenz sugested moving these to a new package org.**.rdbms.impl.*. I have not done so far. If every once is ok with it there is no problem in moving these to new package.
> What has been done.
> 
>  New Combined J2EEStore 
> --------------------------
> It was found that for proper handling of transactions the descriptor store and content store (Database based) to be combined to a single store. Other wise we could see seperate enlisting/delisting of transactions for each store. This could cause situations like the descriptor info gets commited even when content store operation fails ... Please see the domain.xml details in the how-j2eestore-tyrex.xml or how-j2eestore-CommonDBCP.xml for the combined store combination. Some of the SQLS have been modified so that it works across SQLServer and DB2 as well. There should not be any problems with other databases.
> 
> 
> Configuration TC 4.1.x with Tyrex1.0
> -----------------------------------
>   For configuration with Tyrex 1.0 (different from the older tyrex 0.9 version)
>   Please see the attached how-j2eestore-tyrex.xml
> 
> Configuration TC 4.1.x with Commondbcp pool
> -------------------------------------------
>   I am able to get slide up and running with common dbcp pools which is available along with the Tomcat. Our Test and production installations are now using common dbcp pools. Please see the attached how-j2eestore-CommonDBCP.xml
> 
> Versioning features may need modifications as this part has not been tested.
> 
> -- Ashok
>  
>   
>    
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org

-- 
Luca Zago
Senior IT Developer
_____________________________________________________

E-TREE S.p.a.  Via Fonderia 43 - 31100 Treviso (Italy)
phone +39.0422.3107
fax   +39.0422.310888
http://www.e-tree.com          http://www.webanana.com
_____________________________________________________



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Directory and File

Posted by Wong Kam Lai <kl...@onk.cintec.cuhk.edu.hk>.
Hi,

I dunno whether this problems related to slide or not ..
If I have some paths created and stored some data inside it, for example

slide- 
     - file-
           - haha.doc
           - hehe-
                 
     - abc-
           - meimei.xls

How can I know that haha.doc is not a directory? Also
If I am now at /slide, how can I know I am now standing at the top of the
hierarchy? Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: Slide J2EEStore based on new schema proposed last year (UPDATE)

Posted by Grant Gongaware <gg...@itensil.com>.
Luca,

First - Double check if you're using a true XA DataSource. 

Second - You might have the same TransactionManager problem I had. The
problem was the Connection retrieved from the DataSource was already
enlisted in the Container's transaction, and can't be committed or
rolled-back by Slide's built-in transaction manager.

I created a new store class with an additional parameter of the JNDI
name of the Container's TransactionManager. It suspends the container's
transaction before it grabs a Connection, and resumes the container's
transaction after the Slide transaction is complete.

Attached is the class. It's based on some RDBMS adapter stores I found
lying around the CVS. It works on Jboss 3.x, and hopefully the suspend
transaction hack, works in other Containers.

The Domain.xml will look some thing like:

<slide default="slide">
<namespace name="slide">
<definition>      
<store name="combo">
<nodestore classname="slide.J2EENonXAStore">
	<parameter 
		name="datasource">jdbc/DefaultDS</parameter>
	<parameter 
		name="TransactionManager">TransactionManager</parameter>
	<parameter
name="adapter">org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter</p
arameter>
</nodestore>
<securitystore>
	<reference store="nodestore"/>
</securitystore>
<lockstore>
	<reference store="nodestore"/>
</lockstore>
<revisiondescriptorsstore>
	<reference store="nodestore"/>
</revisiondescriptorsstore>
<revisiondescriptorstore>
	<reference store="nodestore"/>
</revisiondescriptorstore>
<contentstore classname="slidestore.reference.FileContentStore">
	<parameter name="rootpath">/slide</parameter>
	<parameter name="version">true</parameter>
	<parameter name="resetBeforeStarting">false</parameter>
</contentstore>
</store>      
<scope match="/" store="combo"/>
</definition>
...

-Grant

-----Original Message-----
From: Luca Zago [mailto:lzago@e-tree.com] 
Sent: Wednesday, April 02, 2003 11:16 AM
To: Slide Users Mailing List
Cc: slide-dev@jakarta.apache.org
Subject: Re: Slide J2EEStore based on new schema proposed last year
(UPDATE)

Hi,
I tried the new Schema on a Oracle DB and Tyrex 1.0 on Tomcat 4.1.18, 
and I noticed that I can read without problem all from database, but 
every time I try to write something by slide on it, I got the exception:

CONNDEBUG: Got connection successfully
WARN  com.etree.cms.slide : Commit failure: Resource manager 
slidestore.j2ee.J2EENodeStore@c92507 Error code XA_RBCOMMFAIL in 
Transaction 18 xid Threa
d-3-1049310620596-18- in thread Thread-3
ERROR : javax.transaction.HeuristicMixedException
javax.transaction.HeuristicMixedException
         at 
org.apache.slide.transaction.SlideTransaction.commit(SlideTransaction.ja
va:379)
         at 
org.apache.slide.transaction.SlideTransactionManager.commit(SlideTransac
tionManager.java:230)
         at 
org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessT
okenImpl.java:440)
         at 
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMe
thod.java:326)
         at 
org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:201)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
         at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
         at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:550)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5)
         at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
         at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
         at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:43
2)
         at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:386)
         at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:53
4)
         at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:530)
         at java.lang.Thread.run(Thread.java:536)
ERROR: org.apache.slide.webdav.WebdavException: Internal Server Error



I use a FileStore for contents and your J2EEtore for Node Store.
It seems that two threads are open..probably one by the internal slide 
transaction manager and the other by Tyrex itself.
Have you some ideas what could be the reason for such behavior?

Thank you in advance,
Luca

P.s. if everybody is interested in it, I can post the SQL new schema for

Oracle.


Kumar, Ashok wrote:
> Hi all,
> 
>    Here is the latest versions on the J2EEStore based on the new
schema-also included is the database  schema for the same (SQLServer
based). Please see the attachments. We have now Slide J2EEStore working 
> 	TC 4.1.x with Tyrex1.0 (SQLServer/DB2)
> 	TC 4.1.x with CommonDBCPPools (SQLServer/DB2)
> 	IBM WebSphere5.0 with DB27.2 as database.
> 
> Christopher Lenz sugested moving these to a new package
org.**.rdbms.impl.*. I have not done so far. If every once is ok with it
there is no problem in moving these to new package.
> What has been done.
> 
>  New Combined J2EEStore 
> --------------------------
> It was found that for proper handling of transactions the descriptor
store and content store (Database based) to be combined to a single
store. Other wise we could see seperate enlisting/delisting of
transactions for each store. This could cause situations like the
descriptor info gets commited even when content store operation fails
... Please see the domain.xml details in the how-j2eestore-tyrex.xml or
how-j2eestore-CommonDBCP.xml for the combined store combination. Some of
the SQLS have been modified so that it works across SQLServer and DB2 as
well. There should not be any problems with other databases.
> 
> 
> Configuration TC 4.1.x with Tyrex1.0
> -----------------------------------
>   For configuration with Tyrex 1.0 (different from the older tyrex 0.9
version)
>   Please see the attached how-j2eestore-tyrex.xml
> 
> Configuration TC 4.1.x with Commondbcp pool
> -------------------------------------------
>   I am able to get slide up and running with common dbcp pools which
is available along with the Tomcat. Our Test and production
installations are now using common dbcp pools. Please see the attached
how-j2eestore-CommonDBCP.xml
> 
> Versioning features may need modifications as this part has not been
tested.
> 
> -- Ashok
>  
>   
>    
> 
> 
> 
> 
> 
>
------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org

-- 
Luca Zago
Senior IT Developer
_____________________________________________________

E-TREE S.p.a.  Via Fonderia 43 - 31100 Treviso (Italy)
phone +39.0422.3107
fax   +39.0422.310888
http://www.e-tree.com          http://www.webanana.com
_____________________________________________________



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org