RE: Tapestry 4.0.2 and Tapernate problem

2006-08-30 Thread Xiaoshu Wang
Does anyone has a clue about this?  It seems that once the server idles for
a while, it will bump into this problem and kills the application.  From
what I can understand, my guess is that this is probably a spring bugs.  (I
have upgrade spring to 1.2.8 but with no success).   But, tapernate uses
spring and if this problem cannot be solved, it will hurt the tapernate's
usefulness as well.

Xiaoshu

> -Original Message-
> From: Xiaoshu Wang [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, August 26, 2006 10:05 AM
> To: 'Tapestry users'
> Subject: Tapestry 4.0.2 and Tapernate problem
> 
> Hi,
> 
> I have a problem with using Tapestry/Tapernate.  The server 
> will run O.K.
> for a couple of days and will run into an application 
> exception of the following (see the exception stack trace 
> shown below.  And the exception seems not caused by 
> application code because there is none shown in the exception 
> trace. Even if I have a catch clause that should be able to 
> trap the exception by my application code because I turned 
> the transaction-per-request off and use the method 
> interceptor to do the transaction management.  The server is 
> Tomcat 5.0.25 and cp30 is used for pooling the connection.  
> 
> Xiaoshu  
> 
> Exception stack as follows,
> 
> javax.servlet.ServletException: Could not commit Hibernate 
> transaction; nested exception is 
> org.hibernate.TransactionException: JDBC commit failed
>   
> org.apache.tapestry.services.impl.WebRequestServicerPipelineBr
> idge.service(W
> ebRequestServicerPipelineBridge.java:60)
>   
> $ServletRequestServicer_10d46119614.service($ServletRequestSer
vicer_10d46119
> 614.java)
>   
> org.apache.tapestry.request.DecodedRequestInjector.service(Dec
> odedRequestInj
> ector.java:55)
>   
> $ServletRequestServicerFilter_10d46119610.service($ServletRequ
estServicerFil
> ter_10d46119610.java)
>   
> $ServletRequestServicer_10d46119616.service($ServletRequestSer
vicer_10d46119
> 616.java)
>   
> org.apache.tapestry.multipart.MultipartDecoderFilter.service(M
> ultipartDecode
> rFilter.java:52)
>   
> $ServletRequestServicerFilter_10d4611960e.service($ServletRequ
estServicerFil
> ter_10d4611960e.java)
>   
> $ServletRequestServicer_10d46119616.service($ServletRequestSer
vicer_10d46119
> 616.java)
>   
> org.apache.tapestry.services.impl.SetupRequestEncoding.service
> (SetupRequestE
> ncoding.java:53)
>   
> $ServletRequestServicerFilter_10d46119612.service($ServletRequ
estServicerFil
> ter_10d46119612.java)
>   
> $ServletRequestServicer_10d46119616.service($ServletRequestSer
vicer_10d46119
> 616.java)
>   
> $ServletRequestServicer_10d46119608.service($ServletRequestSer
vicer_10d46119
> 608.java)
>   
> org.apache.tapestry.ApplicationServlet.doService(ApplicationSe
> rvlet.java:123
> )
>   
> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServle
> t.java:79)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> 
> root cause
> 
> org.apache.hivemind.ApplicationRuntimeException: Could not 
> commit Hibernate transaction; nested exception is 
> org.hibernate.TransactionException: JDBC commit failed
>   
> org.apache.tapestry.error.ExceptionPresenterImpl.presentExcept
> ion(ExceptionP
> resenterImpl.java:64)
>   
> $ExceptionPresenter_10d461195db.presentException($ExceptionPre
senter_10d4611
> 95db.java)
>   
> $ExceptionPresenter_10d461195da.presentException($ExceptionPre
senter_10d4611
> 95da.java)
>   
> org.apache.tapestry.engine.AbstractEngine.activateExceptionPag
> e(AbstractEngi
> ne.java:121)
>   
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngi
> ne.java:280)
>   
> org.apache.tapestry.services.impl.InvokeEngineTerminator.servi
> ce(InvokeEngin
> eTerminator.java:60)
>   
> $WebRequestServicer_10d46119634.service($WebRequestServicer_10
d46119634.java
> )
>   
> com.javaforge.tapestry.tapernate.filter.TapernateFilter.servic
> e(TapernateFil
> ter.java:108)
>   
> $WebRequestServicerFilter_10d46119632.service($WebRequestServi
cerFilter_10d4
> 6119632.java)
>   
> $WebRequestServicer_10d46119636.service($WebRequestServicer_10
d46119636.java
> )
>   
> $WebRequestServicer_10d4611962e.service($WebRequestServicer_10
d4611962e.java
> )
>   
> org.apache.tapestry.services.impl.WebRequestServicerPipelineBr
> idge.service(W
> ebRequestServicerPipelineBridge.java:56)
>   
> $ServletRequestServicer_10d46119614.service($ServletRequestSer
vicer_10d46119
> 614.java)

Tapestry 4.0.2 and Tapernate problem

2006-08-26 Thread Xiaoshu Wang
Hi,

I have a problem with using Tapestry/Tapernate.  The server will run O.K.
for a couple of days and will run into an application exception of the
following (see the exception stack trace shown below.  And the exception
seems not caused by application code because there is none shown in the
exception trace. Even if I have a catch clause that should be able to trap
the exception by my application code because I turned the
transaction-per-request off and use the method interceptor to do the
transaction management.  The server is Tomcat 5.0.25 and cp30 is used for
pooling the connection.  

Xiaoshu  

Exception stack as follows,

javax.servlet.ServletException: Could not commit Hibernate transaction;
nested exception is org.hibernate.TransactionException: JDBC commit failed

org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(W
ebRequestServicerPipelineBridge.java:60)

$ServletRequestServicer_10d46119614.service($ServletRequestServicer_10d46119
614.java)

org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInj
ector.java:55)

$ServletRequestServicerFilter_10d46119610.service($ServletRequestServicerFil
ter_10d46119610.java)

$ServletRequestServicer_10d46119616.service($ServletRequestServicer_10d46119
616.java)

org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecode
rFilter.java:52)

$ServletRequestServicerFilter_10d4611960e.service($ServletRequestServicerFil
ter_10d4611960e.java)

$ServletRequestServicer_10d46119616.service($ServletRequestServicer_10d46119
616.java)

org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestE
ncoding.java:53)

$ServletRequestServicerFilter_10d46119612.service($ServletRequestServicerFil
ter_10d46119612.java)

$ServletRequestServicer_10d46119616.service($ServletRequestServicer_10d46119
616.java)

$ServletRequestServicer_10d46119608.service($ServletRequestServicer_10d46119
608.java)

org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123
)

org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

root cause

org.apache.hivemind.ApplicationRuntimeException: Could not commit Hibernate
transaction; nested exception is org.hibernate.TransactionException: JDBC
commit failed

org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP
resenterImpl.java:64)

$ExceptionPresenter_10d461195db.presentException($ExceptionPresenter_10d4611
95db.java)

$ExceptionPresenter_10d461195da.presentException($ExceptionPresenter_10d4611
95da.java)

org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi
ne.java:121)

org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)

org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
eTerminator.java:60)

$WebRequestServicer_10d46119634.service($WebRequestServicer_10d46119634.java
)

com.javaforge.tapestry.tapernate.filter.TapernateFilter.service(TapernateFil
ter.java:108)

$WebRequestServicerFilter_10d46119632.service($WebRequestServicerFilter_10d4
6119632.java)

$WebRequestServicer_10d46119636.service($WebRequestServicer_10d46119636.java
)

$WebRequestServicer_10d4611962e.service($WebRequestServicer_10d4611962e.java
)

org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(W
ebRequestServicerPipelineBridge.java:56)

$ServletRequestServicer_10d46119614.service($ServletRequestServicer_10d46119
614.java)

org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInj
ector.java:55)

$ServletRequestServicerFilter_10d46119610.service($ServletRequestServicerFil
ter_10d46119610.java)

$ServletRequestServicer_10d46119616.service($ServletRequestServicer_10d46119
616.java)

org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecode
rFilter.java:52)

$ServletRequestServicerFilter_10d4611960e.service($ServletRequestServicerFil
ter_10d4611960e.java)

$ServletRequestServicer_10d46119616.service($ServletRequestServicer_10d46119
616.java)

org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestE
ncoding.java:53)

$ServletRequestServicerFilter_10d46119612.service($ServletRequestServicerFil
ter_10d46119612.java)

$ServletRequestServicer_10d46119616.service($ServletRequestServicer_10d46119
616.java)

$ServletRequestServicer_10d46119608.service($ServletRequestServicer_10d46119
608.java)

org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123
)

org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
javax.servlet.http.

Tapestry 4.0.2 Dojo Editor and IE bugs

2006-08-23 Thread Xiaoshu Wang
Hi, I have a pecular problem with using Dojo's Editor in IE.  
I can take a textarea and built a Dojo Editor around it, something like

dojo.widget.fromScript("Editor", editorArgs, textarea);

It works fine in Firefox, but the cursor seems always goes to the first
character in IE whenever the area is clicked.  

Since the problem does not show on Dojo's Demo site, I wonder if it is
related to the Tapestry's javascript hook on the Form?

Xiaoshu


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can you always have valid html with tapestry templates?

2006-08-18 Thread Xiaoshu Wang
I don't see that as a valid HTML yet. The jwcid attribute is not specified
in HTML.  Maybe Tapestry should put up a namespace for its tag.  So, we can
use 

 Use:
> 
> blah blah
> 
>  stuff iterated 
> over by the foreach 
> 
> 
> 
> Denis McCarthy wrote:
> > Hi,
> > I have tables that are populated by a @ForEach component in my html.
> > The html template is like this
> > 
> > blah blah
> >
> > http://andyhot.di.uoa.gr Tapestry / Tacos developer Open 
> Source / J2EE Consulting 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tapernate question

2006-08-16 Thread Xiaoshu Wang
Thanks, James.  

I am able to get the exception now.  However, the exceptions seem to be
wrapped into spring's DataAccessException.  The original cause of
HibernateException is gone.  I tried to traverse the Exception track by
getCause(), but only get the DataIntegrityViolationException and
java.sql.BatchUpdateException.

I am writing an application that has two fields that can violate the same
contraints.  The lost of HibernateException won't allow me to figure out the
which field is duplicated.

Xiaoshu

> -Original Message-
> From: James Carman [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 16, 2006 6:05 AM
> To: 'Tapestry users'
> Subject: RE: tapernate question
> 
> If you want more fine-grained control over what's going on, 
> turn off transaction-per-request and use service methods with 
> transaction interceptors on them to achieve what you want.  
> The reason that you didn't get the exception is that the 
> transaction isn't committing until the end of the request and 
> that's when you'll get the unique constraint violation 
> exception.  The exception presenter might not even catch 
> this, come to think of it.  I actually changed the way 
> Tapernate is implemented in my local copy.  I might need to 
> push that out to the rest of you. 
> 
> -Original Message-
> From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 15, 2006 9:45 PM
> To: 'Tapestry users'
> Subject: RE: tapernate question
> 
> I tried to put something like
> 
> try {
>   getSession.update(message);
> } catch (Throwable e) {
>System.out.println("Catch it.");
> }
> 
> under the MessageDaoImpl.update(Message), but it seems not 
> doing anything.
> 
> How to hook with ExceptionPresenter? 
> 
> Xiaoshu
> 
> 
> > -Original Message-
> > From: James Carman [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 15, 2006 9:09 PM
> > To: 'Tapestry users'
> > Subject: RE: tapernate question
> > 
> > You can put in a hook into the ExceptionPresenter or wrap your call 
> > with a try/catch block.  The HibernateService class can be found at:
> > 
> > http://svn.javaforge.com/svn/hivemind/hivemind-utils/trunk/src
> /main/java/com
> > /javaforge/hivemind/util/HiveMindService.java
> > 
> > The username/password is anonymous/anon.
> > 
> > 
> > -Original Message-
> > From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 15, 2006 9:03 PM
> > To: users@tapestry.apache.org
> > Subject: tapernate question
> > 
> > Hi, I am playing around Tapernate, which I have a question 
> to ask.  It 
> > seems that the exception thrown by a database query would 
> not be able 
> > to be catched at the application level.
> > For isnstance, I justed added a unique constraints on the 
> > Message.value property.  If I ever try to created a message 
> that has a 
> > duplicated value with an existing Message, it break the 
> application.  
> > I didn't find a way to catch the exception.  Is this 
> expected behavior 
> > or not?
> > 
> > Also, where I can find the source code for the HibernateService?
> > 
> > Thanks,
> > 
> > XW
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tapernate question

2006-08-15 Thread Xiaoshu Wang
I tried to put something like

try {
  getSession.update(message);
} catch (Throwable e) {
   System.out.println("Catch it.");
}

under the MessageDaoImpl.update(Message), but it seems not doing anything.

How to hook with ExceptionPresenter? 

Xiaoshu


> -Original Message-
> From: James Carman [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 15, 2006 9:09 PM
> To: 'Tapestry users'
> Subject: RE: tapernate question
> 
> You can put in a hook into the ExceptionPresenter or wrap 
> your call with a try/catch block.  The HibernateService class 
> can be found at:
> 
> http://svn.javaforge.com/svn/hivemind/hivemind-utils/trunk/src
/main/java/com
> /javaforge/hivemind/util/HiveMindService.java
> 
> The username/password is anonymous/anon.
> 
> 
> -Original Message-
> From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 15, 2006 9:03 PM
> To: users@tapestry.apache.org
> Subject: tapernate question
> 
> Hi, I am playing around Tapernate, which I have a question to 
> ask.  It seems that the exception thrown by a database query 
> would not be able to be catched at the application level.  
> For isnstance, I justed added a unique constraints on the 
> Message.value property.  If I ever try to created a message 
> that has a duplicated value with an existing Message, it 
> break the application.  I didn't find a way to catch the 
> exception.  Is this expected behavior or not?
> 
> Also, where I can find the source code for the HibernateService?
> 
> Thanks,
> 
> XW
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tapernate question

2006-08-15 Thread Xiaoshu Wang
Hi, I am playing around Tapernate, which I have a question to ask.  It seems
that the exception thrown by a database query would not be able to be
catched at the application level.  For isnstance, I justed added a unique
constraints on the Message.value property.  If I ever try to created a
message that has a duplicated value with an existing Message, it break the
application.  I didn't find a way to catch the exception.  Is this expected
behavior or not?

Also, where I can find the source code for the HibernateService?

Thanks,

XW


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]