[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3526) SecurityInterceptor is not serializable
by Pete Muir (JIRA)
SecurityInterceptor is not serializable
---------------------------------------
Key: JBSEAM-3526
URL: https://jira.jboss.org/jira/browse/JBSEAM-3526
Project: Seam
Issue Type: Bug
Components: Security
Reporter: Pete Muir
Assignee: Shane Bryzak
Fix For: 2.1.0.GA
All interceptors should be serializable (as AbstractInterceptor implemenets Serializable) but Method isn't Serializable.
4:34:40,786 ERROR [Objects] Error serializing object class org.jboss.seam.example.wicket.Main [object=[Page class = org.jboss.seam.example.wicket.Main, id = 6, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: java.lang.reflect.Method
Field hierarchy is:
6 [class=org.jboss.seam.example.wicket.Main, path=6]
private java.lang.Object org.apache.wicket.MarkupContainer.children [class=org.apache.wicket.MarkupContainer$ChildList]
private java.lang.Object[] org.apache.wicket.MarkupContainer$ChildList.childs [class=[Ljava.lang.Object;]
private java.lang.Object[] org.apache.wicket.MarkupContainer$ChildList.childs[0] [class=org.jboss.seam.example.wicket.Template, path=6:body]
private java.lang.Object org.apache.wicket.MarkupContainer.children [class=org.apache.wicket.MarkupContainer$ChildList]
private java.lang.Object[] org.apache.wicket.MarkupContainer$ChildList.childs [class=[Ljava.lang.Object;]
java.lang.Object org.apache.wicket.Component.data[5] [class=org.jboss.seam.example.wicket.Main$HotelSearchForm, path=6:body:searchCriteria]
private java.lang.Object org.apache.wicket.MarkupContainer.children [class=org.apache.wicket.MarkupContainer$ChildList]
private java.lang.Object[] org.apache.wicket.MarkupContainer$ChildList.childs [class=[Ljava.lang.Object;]
private java.lang.Object[] org.apache.wicket.MarkupContainer$ChildList.childs[0] [class=org.apache.wicket.markup.html.form.TextField, path=6:body:searchCriteria:searchString]
java.lang.Object org.apache.wicket.Component.data [class=org.jboss.seam.example.wicket.Main$HotelSearchForm$1]
private org.apache.wicket.model.PropertyModel org.jboss.seam.wicket.SeamPropertyModel.model [class=org.apache.wicket.model.PropertyModel]
private java.lang.Object org.apache.wicket.model.AbstractPropertyModel.target [class=org.javassist.tmp.java.lang.Object_$$_javassist_2]
private java.util.List org.jboss.seam.intercept.RootInterceptor.userInterceptors [class=java.util.ArrayList]
private final java.util.concurrent.locks.ReentrantLock$Sync java.util.concurrent.locks.ReentrantLock.sync[write:2][write:4][write:5] [class=org.jboss.seam.security.SecurityInterceptor]
private java.util.Map org.jboss.seam.security.SecurityInterceptor.restrictions [class=java.util.HashMap]
private java.util.Map org.jboss.seam.security.SecurityInterceptor.restrictions[write:1] [class=java.lang.reflect.Method] <----- field that is not serializable
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3523) org.jboss.seam.persistence.Filter should be Serializable
by Nikolay Elenkov (JIRA)
org.jboss.seam.persistence.Filter should be Serializable
---------------------------------------------------------
Key: JBSEAM-3523
URL: https://jira.jboss.org/jira/browse/JBSEAM-3523
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.0.CR1, 2.0.3.CR1
Environment: RHEL Linux, JBoss 4.2.2 (two node cluster behind Apache), Seam 2.0.3.CR1, Oracle 10g
Reporter: Nikolay Elenkov
When I install a Hibernate filter, configured via components.xml in a <distributable/> webapp, I get a
NotSerializableException: org.jboss.seam.persistence.Filter
when session is replicated.
The Filter class should be Serializable to be usable in a cluster environment.
I have something like this:
components.xml:
<component name="entityManager" auto-create="true" precedence="20"
class="MyCustomPersistenceContext">
<property name="persistenceUnitJndiName">java:/foobar/EntityManagerFactory</property>
<property name="filters">
<value>#{activeFoo}</value>
</property
</component>
<persistence:filter name="activeFoo" auto-create="true">
<persistence:name>activeFooFilter</persistence:name>
</persistence:filter>
Entity:
@Entity
public class Bar implements Serializable {
@OneToMany
@Filter(name = "activeFooFilter", condition = "deleted = 0")
public Set<Foo> getFoos() {
return foos;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3521) components.xml is read twice if the jboss-seam.jar is declared in application.xml as well as in manifest classpath
by Pete Muir (JIRA)
components.xml is read twice if the jboss-seam.jar is declared in application.xml as well as in manifest classpath
------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-3521
URL: https://jira.jboss.org/jira/browse/JBSEAM-3521
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.0.BETA1
Reporter: Jay Balunas
Assignee: Pete Muir
Fix For: 2.1.0.GA
This issue was exposed while working on JBSEAM-3363, and using patched jsf jars from Ryan Lubke which fixes the initial problem (see note below on using Ryan's patch).
We do not see the duplicate seam phase listener issue any longer, but we continue to see this error.
08:50:53,573 ERROR [[/Stantest]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.IllegalStateException: duplicate factory for: org.jboss.seam.web.webSession (duplicate is specified in components.xml)
at org.jboss.seam.core.Init.checkDuplicateFactoryExpressions(Init.java:222)
at org.jboss.seam.core.Init.checkDuplicateFactory(Init.java:215)
at org.jboss.seam.core.Init.addFactoryValueExpression(Init.java:278)
This is because we are reading in the components.xml file from the jboss-seam.jar twice as this log shows:
2008-09-30 10:21:08,245 INFO [org.jboss.seam.init.Initialization] reading /WEB-INF/components.xml
2008-09-30 10:21:08,396 INFO [org.jboss.seam.init.Initialization] reading jar:file:/jboss/apps/jboss-4.2.3.GA/server/default/deploy/Stantest.ear/jboss-seam.jar!/META-INF/components.xml
2008-09-30 10:21:08,400 INFO [org.jboss.seam.init.Initialization] reading jar:file:/jboss/apps/jboss-4.2.3.GA/server/default/tmp/deploy/tmp3645jboss-seam.jar!/META-INF/components.xml
To use Ryan's patch:
----------------------
Use the attached jsf jars in the jsf-libs directory, and update JBOSS_HOME/server/default/deploy/jboss-web.deployer/conf/web.xml to include the following context param:
<context-param>
<param-name>com.sun.faces.duplicateJARPattern</param-name>
<param-value>^tmp\d+(\S*\.jar)</param-value>
</context-param>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3520) Handling Exception (not only) when using JPDL Pageflows
by ahus1 (JIRA)
Handling Exception (not only) when using JPDL Pageflows
-------------------------------------------------------
Key: JBSEAM-3520
URL: https://jira.jboss.org/jira/browse/JBSEAM-3520
Project: Seam
Issue Type: Feature Request
Components: BPM
Affects Versions: 2.0.2.SP1
Environment: seam with jpdl
Reporter: ahus1
The problem: when there are exceptions in a jpdl pageflow , you will not be able to continue with the pageflow if you are stuck at a transition node or a decision node. There is no chance to display the error message and to return to the last page.
The solution idea: Use an exception handler in the jpdl pageflow, store some information, reposition the pageflow on a page node in a seam exception handler.
The other problem: When this can be done for pageflows, can this be done for conversations as well?
The other solution idea: This should work when there is an exception in the invoke application phase (in the POST-Phase), but when there is a GET request (rendering the view in the GET after POST) redirecting to the indentical view could lead to a infinite loop.
This is how I do it manually, maybe there is a chance to these things automatically in seam:
(1) place an exception handler in every pageflow
<exception-handler exception-class="javax.el.ELException">
<action class="de.plusfinanzservice.common.bean.ExceptionAction" />
</exception-handler>
In a jpdl pageflow with seam we usually use EL expressions, therefore all exceptions we get here are wrapped in an EL Exception. First we unwrap them.
We determine the source of the transition. If the source is a decision node (and not a page node), we will need to find the error handling page node. Our convention is to use a "failure" transition on every decision node to do exactly that. The data is saved on a new seam bean exception handler.
(2) pick up all exceptions in pages.xml
<exception class="java.lang.Exception">
<redirect view-id="#{exceptionHandler.getViewId('/iss/error.jspx')}">
<message severity="error">
#{messages[exceptionHandler.getMessage(org.jboss.seam.handledException)]}
</message>
</redirect>
</exception>
After collection the right information in the exception action, reposition in the exception handler is easy:
if (node != null) {
Pageflow.instance().reposition(node);
retVal = Pageflow.instance().getPage().getViewId();
}
This exception handler tries to do "the right thing" even if you are not in a pageflow. For GET requests it assumes that the exception has been raised in the render view phase and no recovery is possible. If not, I tries to forward you to the last known view (using conversation information). The message to be displayed is extracted from the Exception.
Final thoughts: maybe it would be a good idea to create a two phase solution. One basic with exception handling. And another one that extends it that adds jpdl handling.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months