[JBoss JIRA] (JBSEAM-5093) Seam produces malformed partial response on ViewExpiredException with Ajax
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5093?page=com.atlassian.jira.plugi... ]
Marek Novotny updated JBSEAM-5093:
----------------------------------
Fix Version/s: 2.3.1.CR1
> Seam produces malformed partial response on ViewExpiredException with Ajax
> --------------------------------------------------------------------------
>
> Key: JBSEAM-5093
> URL: https://issues.jboss.org/browse/JBSEAM-5093
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.0.Final
> Environment: Seam 2.3.1-SNAPSHOT 2013-05-02 082f3b3459893b1c4200b7bd8ce99556f87f0dd0
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> When ViewExpiredException occurs in an Ajax request, the response is malformed, containing duplicate partial-response element. This results in the response not being parsed (and in this case, redirect not being followed).
> {noformat}
> <?xml version='1.0' encoding='UTF-8'?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"></redirect></partial-response><?xml version="1.0" encoding="UTF-8"?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"/></partial-response>
> {noformat}
> This seems to happen, because there are two rules for the redirection in pages.xml:
> - main.xhtml has login required, handled in Pages.redirectToLoginView()
> <page view-id="/main.xhtml" login-required="true">
> - exception handler for ViewExpiredException, handled in ExceptionFilter
> <exception class="javax.faces.application.ViewExpiredException">
> <redirect view-id="/home.xhtml">
> ...
> </exception>
> None of the Seam's components involved (ExceptionFilter, Pages, Exceptions, RedirectHandler, MockExternalContext, ... ?) checks whether the response has already been written and the redirect partial response gets written twice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBSEAM-5093) Seam produces malformed partial response on ViewExpiredException with Ajax
by Marek Schmidt (JIRA)
Marek Schmidt created JBSEAM-5093:
-------------------------------------
Summary: Seam produces malformed partial response on ViewExpiredException with Ajax
Key: JBSEAM-5093
URL: https://issues.jboss.org/browse/JBSEAM-5093
Project: Seam 2
Issue Type: Bug
Components: Core
Affects Versions: 2.3.0.Final
Environment: Seam 2.3.1-SNAPSHOT 2013-05-02 082f3b3459893b1c4200b7bd8ce99556f87f0dd0
Reporter: Marek Schmidt
Assignee: Marek Novotny
When ViewExpiredException occurs in an Ajax request, the response is malformed, containing duplicate partial-response element. This results in the response not being parsed (and in this case, redirect not being followed).
{noformat}
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><redirect url="/seam-booking/home.seam?cid=22"></redirect></partial-response><?xml version="1.0" encoding="UTF-8"?>
<partial-response><redirect url="/seam-booking/home.seam?cid=22"/></partial-response>
{noformat}
This seems to happen, because there are two rules for the redirection in pages.xml:
- main.xhtml has login required, handled in Pages.redirectToLoginView()
<page view-id="/main.xhtml" login-required="true">
- exception handler for ViewExpiredException, handled in ExceptionFilter
<exception class="javax.faces.application.ViewExpiredException">
<redirect view-id="/home.xhtml">
...
</exception>
None of the Seam's components involved (ExceptionFilter, Pages, Exceptions, RedirectHandler, MockExternalContext, ... ?) checks whether the response has already been written and the redirect partial response gets written twice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (SEAMPERSIST-67) LazyInitializationException threw when persist a Many to Many collection of an entity.
by Ben Software Engineer (JIRA)
[ https://issues.jboss.org/browse/SEAMPERSIST-67?page=com.atlassian.jira.pl... ]
Ben Software Engineer commented on SEAMPERSIST-67:
--------------------------------------------------
Thanks Hantsy for the thoughts. We have a forms heavy highly customizable SaaS product that we find JSF very well suited for. I also think facelets is the best templating engine in then industry. EL expressions can be great for business rules that integrate into system easily. It's the rest I have issues with. Ajax is slow and does too much. Richfaces regions to solve this problem do not seem to work well. Transaction mgmt and scope/context issues are way to complex. They create problems larger than the ones they solve (flipping an auto commit flag off and having a managed map of named beans). I am really disappointed in the cross integration of lazy fetch in ORM/hibernate. It seams the design and idea is not even supported well without extra magic. JSF validation can be such a pain, just try to implement a "reset button" or do a "save for later" mechanism to let user save partial form without validation yet.
As for Seam, it has the difficult combination of innovating around java spec limits but also influencing them, thereby guaranteeing migration issues in the future to standards. It also is way too invasive. We found only way out of Seam was to upgrade first so we can iteratively move to standard JSF 2 stuff.
> LazyInitializationException threw when persist a Many to Many collection of an entity.
> --------------------------------------------------------------------------------------
>
> Key: SEAMPERSIST-67
> URL: https://issues.jboss.org/browse/SEAMPERSIST-67
> Project: Seam Persistence
> Issue Type: Bug
> Environment: Java 6 update 27, Seam 3.1.0Beta2, JBoss 7.0.1.Final
> Reporter: hantsy bai
> Priority: Critical
>
> I tried a saved a many to many relation(multicheckbox), but failed.
> But in before seam 2 application, I used like this, never encounter such a problem.
> I used Seam managed Persistence, and added TransactionIntercepter in the beans.xml.
> Please refer the discussion in the forum.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (SEAMPERSIST-67) LazyInitializationException threw when persist a Many to Many collection of an entity.
by hantsy bai (JIRA)
[ https://issues.jboss.org/browse/SEAMPERSIST-67?page=com.atlassian.jira.pl... ]
hantsy bai commented on SEAMPERSIST-67:
---------------------------------------
Oh, my God, this discussion was posted 1.5 year ago.
I think the collectionType is not the only problem.
A big problem is the converter.
I have read the codes of Seam 2 entityConverter, for the MultiSelectCheckBox/MultiList, it will convert between List<PK> and List<Entity TYPE>(and other types, such as Collection, Set, array).
But the object converter in Seam 3 does not provides such a features.
In fact, in the last two years, I have spent much time on JSF2/Richfaces4/Seam3 in projects, and some problems still can not be resolved.
Personally, I had got every bad experience when use Richfaces 4 and Seam 3. And later, I gave up Richfaces 4 rich components, and used pure JSF+ Richfaces A4j+ Twitter Boostrap + Seam3.
Now I am trying to give up JSF in new website based application, and use REST(backend)+JS/AngularJS(frontend) . I think in future I will use JSF in internal app or backend admin for some application.
Hantsy
> LazyInitializationException threw when persist a Many to Many collection of an entity.
> --------------------------------------------------------------------------------------
>
> Key: SEAMPERSIST-67
> URL: https://issues.jboss.org/browse/SEAMPERSIST-67
> Project: Seam Persistence
> Issue Type: Bug
> Environment: Java 6 update 27, Seam 3.1.0Beta2, JBoss 7.0.1.Final
> Reporter: hantsy bai
> Priority: Critical
>
> I tried a saved a many to many relation(multicheckbox), but failed.
> But in before seam 2 application, I used like this, never encounter such a problem.
> I used Seam managed Persistence, and added TransactionIntercepter in the beans.xml.
> Please refer the discussion in the forum.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (SEAMPERSIST-67) LazyInitializationException threw when persist a Many to Many collection of an entity.
by Jason Porter (JIRA)
[ https://issues.jboss.org/browse/SEAMPERSIST-67?page=com.atlassian.jira.pl... ]
Jason Porter commented on SEAMPERSIST-67:
-----------------------------------------
This one I think was due to a problem with the validation and not using the collectionType attribute in a collection. I'd need to see what you're doing to see if it's the same problem.
> LazyInitializationException threw when persist a Many to Many collection of an entity.
> --------------------------------------------------------------------------------------
>
> Key: SEAMPERSIST-67
> URL: https://issues.jboss.org/browse/SEAMPERSIST-67
> Project: Seam Persistence
> Issue Type: Bug
> Environment: Java 6 update 27, Seam 3.1.0Beta2, JBoss 7.0.1.Final
> Reporter: hantsy bai
> Priority: Critical
>
> I tried a saved a many to many relation(multicheckbox), but failed.
> But in before seam 2 application, I used like this, never encounter such a problem.
> I used Seam managed Persistence, and added TransactionIntercepter in the beans.xml.
> Please refer the discussion in the forum.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (SEAMPERSIST-67) LazyInitializationException threw when persist a Many to Many collection of an entity.
by Ben Software Engineer (JIRA)
[ https://issues.jboss.org/browse/SEAMPERSIST-67?page=com.atlassian.jira.pl... ]
Ben Software Engineer commented on SEAMPERSIST-67:
--------------------------------------------------
Hi Jason - thanks for the quick response. We started our migration last year before this announcement and are a far way in. We also wanted to start using CDI, JSF 2, and RichFaces 4 items without building more seam 2.3 items to just have to migrate at some future point. We have many things working on Seam3, this issue though we are having issues with. Does DeltaSpike solve this? DeltaSpike seems to be in beta, 0.4-incubating-SNAPSHOT, I do not think we can move there right now.
I did not follow this thread, for the read operation only (no many to many editing), what was the solution?
> LazyInitializationException threw when persist a Many to Many collection of an entity.
> --------------------------------------------------------------------------------------
>
> Key: SEAMPERSIST-67
> URL: https://issues.jboss.org/browse/SEAMPERSIST-67
> Project: Seam Persistence
> Issue Type: Bug
> Environment: Java 6 update 27, Seam 3.1.0Beta2, JBoss 7.0.1.Final
> Reporter: hantsy bai
> Priority: Critical
>
> I tried a saved a many to many relation(multicheckbox), but failed.
> But in before seam 2 application, I used like this, never encounter such a problem.
> I used Seam managed Persistence, and added TransactionIntercepter in the beans.xml.
> Please refer the discussion in the forum.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (SEAMPERSIST-67) LazyInitializationException threw when persist a Many to Many collection of an entity.
by Jason Porter (JIRA)
[ https://issues.jboss.org/browse/SEAMPERSIST-67?page=com.atlassian.jira.pl... ]
Jason Porter commented on SEAMPERSIST-67:
-----------------------------------------
Ben, I strongly suggest not moving to Seam 3 as it is no longer under active development. Take a look at Apache DeltaSpike, or stick with Seam 2 by upgrading to Seam 2.3.
> LazyInitializationException threw when persist a Many to Many collection of an entity.
> --------------------------------------------------------------------------------------
>
> Key: SEAMPERSIST-67
> URL: https://issues.jboss.org/browse/SEAMPERSIST-67
> Project: Seam Persistence
> Issue Type: Bug
> Environment: Java 6 update 27, Seam 3.1.0Beta2, JBoss 7.0.1.Final
> Reporter: hantsy bai
> Priority: Critical
>
> I tried a saved a many to many relation(multicheckbox), but failed.
> But in before seam 2 application, I used like this, never encounter such a problem.
> I used Seam managed Persistence, and added TransactionIntercepter in the beans.xml.
> Please refer the discussion in the forum.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (SEAMPERSIST-67) LazyInitializationException threw when persist a Many to Many collection of an entity.
by Ben Software Engineer (JIRA)
[ https://issues.jboss.org/browse/SEAMPERSIST-67?page=com.atlassian.jira.pl... ]
Ben Software Engineer commented on SEAMPERSIST-67:
--------------------------------------------------
Hi Hantsy/Jason - we are migrating from JBoss 5 and Seam 2 to JBoss 7 and Seam 3 as well. We are also seeing this issue. On initial render it works but on ajax post we get the LIE. We have also not changed anything from original Seam 2 working code. We are not trying to edit anything, our lazy fetch is on a read only entity. Any solutions?
> LazyInitializationException threw when persist a Many to Many collection of an entity.
> --------------------------------------------------------------------------------------
>
> Key: SEAMPERSIST-67
> URL: https://issues.jboss.org/browse/SEAMPERSIST-67
> Project: Seam Persistence
> Issue Type: Bug
> Environment: Java 6 update 27, Seam 3.1.0Beta2, JBoss 7.0.1.Final
> Reporter: hantsy bai
> Priority: Critical
>
> I tried a saved a many to many relation(multicheckbox), but failed.
> But in before seam 2 application, I used like this, never encounter such a problem.
> I used Seam managed Persistence, and added TransactionIntercepter in the beans.xml.
> Please refer the discussion in the forum.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months