You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by luna_guo <gh...@163.com> on 2008/07/16 11:42:45 UTC
tapestry-hibernate problem
i've tested the hibernate.cfg.xml and the mapping files.
when i put them under classpath root.
i get a exception page:do i need more configuration when use
tapestry-hibernate?
Render queue error in Expansion[PropBinding[expansion Start(hello)]]: Error
invoking service builder method
org.apache.tapestry5.hibernate.HibernateModule.build(HibernateSessionSource,
PerthreadManager) (at HibernateModule.java:78) (for service
'HibernateSessionManager'): Exception constructing service
'HibernateSessionSource': Error invoking service builder method
org.apache.tapestry5.hibernate.HibernateModule.build(Logger, List,
RegistryShutdownHub) (at HibernateModule.java:117) (for service
'HibernateSessionSource'): tried to access field
org.hibernate.cfg.Configuration.xmlHelper from class
org.hibernate.cfg.AnnotationConfiguration
--
View this message in context: http://www.nabble.com/tapestry-hibernate-problem-tp18483952p18483952.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Stop Receiving Request
Posted by Josh Canfield <jo...@thedailytube.com>.
>
> This is interesting, is there a way to know before the file is sent the
> size
> of coming upload?
>
>From the client side you do not have access to the file that is going to be
uploaded, all you can do is inspect the POST on the server side. I believe
that most modern browsers will send the content-length along with the file
so that it can be rejected before much data has been read off the wire.
Tapestry is using http://commons.apache.org/fileupload, you can read up on
what's possible with this library.
Josh
On Wed, Jul 16, 2008 at 5:25 PM, Angelo Chen <an...@yahoo.com.hk>
wrote:
>
> Hi Josh,
>
> This is interesting, is there a way to know before the file is sent the
> size
> of coming upload? this will be very handy to warn the user for a long file
> uploading operation or just simply rejects the upload as the file size is
> beyond the allowable size.
>
> Angelo
>
>
> joshcanfield wrote:
> >
> > By the time you are checking the file size the whole stream has already
> > been
> > read in by the MultipartServletRequestFilter. The default is to have
> > unlimited upload size. You can add configuration to change the limit.
> > I believe this will work, but I have not tested it.
> >
> > public static void
> > contributeApplicationDefaults(MappedConfiguration<String,
> > String> configuration)
> > {
> > configuration.add(UploadSymbols.FILESIZE_MAX, 10000);
> > }
> > If you want to have a different max upload size per form, then I'd guess
> > you'd want to replace/supplement the MultiServletRequestFilter.
> >
> > Josh
> >
> >
> > On Wed, Jul 16, 2008 at 3:58 AM, Martin Kersten
> > <Ma...@mercateo.com>
> > wrote:
> >
> >> Hi User-Group,
> >>
> >> I expirence the following Problem:
> >>
> >> Using Tapestry + GWT I send a UploadRequest to a Tapestry Page.
> >> Once the Upload is processed the HTTP-Page containing 'OK' is
> >> returned, otherwise the Name of the Exception/Reason.
> >>
> >> On the server side the T5-page checks the size of the
> >> request-payload and response with a OversizedException. This
> >> exception is send to the client. This works very well with a
> >> single problem:
> >>
> >> Sending 300MB of Data the browser blocks until all 300MB are
> >> Transmitted but the page/server immediatly (used sysout to ensure)
> >> Rejects the transmittion by writing the OversizedException to
> >> response (MarkupWriter).
> >>
> >> I tried several things to stop the request upload from browser.
> >> I tried to open the content-input-stream of the request and
> >> Immediatly close this stream. With virtually no effect.
> >>
> >> Is there anyway to stop/break/destroy an request-upload of that
> >> size?
> >>
> >> Since all three major browsers (Opera, FireFox, IE) behave in the
> >> same way I guess the problem lies on Server-Side. So who is to blame
> >> for? Tapestry? (Dont think so), Tomcat?, Browsers?
> >>
> >> (In Short: You want to upload 300MB? I just read 10K and Say No To you!)
> >>
> >>
> >> Cheers,
> >>
> >> Martin (Kersten)
> >>
> >> PS: This is the Ajax way of doing things. The form (upload) is send to
> >> the server and the target of the response is an 'hidden' Iframe.
> >>
> >> PSS: If it is the browser I just would use the Upload Progress Listener-
> >> Mechanis I use to get the progress of the current upload.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > --
> > TheDailyTube.com. Sign up and get the best new videos on the internet
> > delivered fresh to your inbox.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/tapestry-hibernate-problem-tp18483952p18499364.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.
Re: T5: Stop Receiving Request
Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Josh,
This is interesting, is there a way to know before the file is sent the size
of coming upload? this will be very handy to warn the user for a long file
uploading operation or just simply rejects the upload as the file size is
beyond the allowable size.
Angelo
joshcanfield wrote:
>
> By the time you are checking the file size the whole stream has already
> been
> read in by the MultipartServletRequestFilter. The default is to have
> unlimited upload size. You can add configuration to change the limit.
> I believe this will work, but I have not tested it.
>
> public static void
> contributeApplicationDefaults(MappedConfiguration<String,
> String> configuration)
> {
> configuration.add(UploadSymbols.FILESIZE_MAX, 10000);
> }
> If you want to have a different max upload size per form, then I'd guess
> you'd want to replace/supplement the MultiServletRequestFilter.
>
> Josh
>
>
> On Wed, Jul 16, 2008 at 3:58 AM, Martin Kersten
> <Ma...@mercateo.com>
> wrote:
>
>> Hi User-Group,
>>
>> I expirence the following Problem:
>>
>> Using Tapestry + GWT I send a UploadRequest to a Tapestry Page.
>> Once the Upload is processed the HTTP-Page containing 'OK' is
>> returned, otherwise the Name of the Exception/Reason.
>>
>> On the server side the T5-page checks the size of the
>> request-payload and response with a OversizedException. This
>> exception is send to the client. This works very well with a
>> single problem:
>>
>> Sending 300MB of Data the browser blocks until all 300MB are
>> Transmitted but the page/server immediatly (used sysout to ensure)
>> Rejects the transmittion by writing the OversizedException to
>> response (MarkupWriter).
>>
>> I tried several things to stop the request upload from browser.
>> I tried to open the content-input-stream of the request and
>> Immediatly close this stream. With virtually no effect.
>>
>> Is there anyway to stop/break/destroy an request-upload of that
>> size?
>>
>> Since all three major browsers (Opera, FireFox, IE) behave in the
>> same way I guess the problem lies on Server-Side. So who is to blame
>> for? Tapestry? (Dont think so), Tomcat?, Browsers?
>>
>> (In Short: You want to upload 300MB? I just read 10K and Say No To you!)
>>
>>
>> Cheers,
>>
>> Martin (Kersten)
>>
>> PS: This is the Ajax way of doing things. The form (upload) is send to
>> the server and the target of the response is an 'hidden' Iframe.
>>
>> PSS: If it is the browser I just would use the Upload Progress Listener-
>> Mechanis I use to get the progress of the current upload.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>
>
--
View this message in context: http://www.nabble.com/tapestry-hibernate-problem-tp18483952p18499364.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Stop Receiving Request
Posted by Josh Canfield <jo...@thedailytube.com>.
By the time you are checking the file size the whole stream has already been
read in by the MultipartServletRequestFilter. The default is to have
unlimited upload size. You can add configuration to change the limit.
I believe this will work, but I have not tested it.
public static void contributeApplicationDefaults(MappedConfiguration<String,
String> configuration)
{
configuration.add(UploadSymbols.FILESIZE_MAX, 10000);
}
If you want to have a different max upload size per form, then I'd guess
you'd want to replace/supplement the MultiServletRequestFilter.
Josh
On Wed, Jul 16, 2008 at 3:58 AM, Martin Kersten <Ma...@mercateo.com>
wrote:
> Hi User-Group,
>
> I expirence the following Problem:
>
> Using Tapestry + GWT I send a UploadRequest to a Tapestry Page.
> Once the Upload is processed the HTTP-Page containing 'OK' is
> returned, otherwise the Name of the Exception/Reason.
>
> On the server side the T5-page checks the size of the
> request-payload and response with a OversizedException. This
> exception is send to the client. This works very well with a
> single problem:
>
> Sending 300MB of Data the browser blocks until all 300MB are
> Transmitted but the page/server immediatly (used sysout to ensure)
> Rejects the transmittion by writing the OversizedException to
> response (MarkupWriter).
>
> I tried several things to stop the request upload from browser.
> I tried to open the content-input-stream of the request and
> Immediatly close this stream. With virtually no effect.
>
> Is there anyway to stop/break/destroy an request-upload of that
> size?
>
> Since all three major browsers (Opera, FireFox, IE) behave in the
> same way I guess the problem lies on Server-Side. So who is to blame
> for? Tapestry? (Dont think so), Tomcat?, Browsers?
>
> (In Short: You want to upload 300MB? I just read 10K and Say No To you!)
>
>
> Cheers,
>
> Martin (Kersten)
>
> PS: This is the Ajax way of doing things. The form (upload) is send to
> the server and the target of the response is an 'hidden' Iframe.
>
> PSS: If it is the browser I just would use the Upload Progress Listener-
> Mechanis I use to get the progress of the current upload.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.
T5: Stop Receiving Request
Posted by Martin Kersten <Ma...@mercateo.com>.
Hi User-Group,
I expirence the following Problem:
Using Tapestry + GWT I send a UploadRequest to a Tapestry Page.
Once the Upload is processed the HTTP-Page containing 'OK' is
returned, otherwise the Name of the Exception/Reason.
On the server side the T5-page checks the size of the
request-payload and response with a OversizedException. This
exception is send to the client. This works very well with a
single problem:
Sending 300MB of Data the browser blocks until all 300MB are
Transmitted but the page/server immediatly (used sysout to ensure)
Rejects the transmittion by writing the OversizedException to
response (MarkupWriter).
I tried several things to stop the request upload from browser.
I tried to open the content-input-stream of the request and
Immediatly close this stream. With virtually no effect.
Is there anyway to stop/break/destroy an request-upload of that
size?
Since all three major browsers (Opera, FireFox, IE) behave in the
same way I guess the problem lies on Server-Side. So who is to blame
for? Tapestry? (Dont think so), Tomcat?, Browsers?
(In Short: You want to upload 300MB? I just read 10K and Say No To you!)
Cheers,
Martin (Kersten)
PS: This is the Ajax way of doing things. The form (upload) is send to
the server and the target of the response is an 'hidden' Iframe.
PSS: If it is the browser I just would use the Upload Progress Listener-
Mechanis I use to get the progress of the current upload.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org