[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2901) seam-gen unable to clear off database catalog name
by Ashish Kulkarni (JIRA)
seam-gen unable to clear off database catalog name
--------------------------------------------------
Key: JBSEAM-2901
URL: http://jira.jboss.com/jira/browse/JBSEAM-2901
Project: Seam
Issue Type: Bug
Components: Tools
Affects Versions: 2.0.1.GA
Environment: Seam 2.0.1.GA, JDk 1.5.0_11, Windows XP, ANT 1.7.0
Reporter: Ashish Kulkarni
Hi there,
If I use a database catalog name when generating a project using seam-gen say, for h2 database, and then, I decide to use seam-gen for another database that doesn't use catalogs, like PostgreSQL, there is no way of clearing off the database catalog name unless I manually do that.
In short, I need to edit seam-gen/build.properties manually for this.
Can seam-gen deal with this in some way?
Best Regards,
Ashish.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3176) HotelSearchingAction not serializable
by Kurt Stam (JIRA)
HotelSearchingAction not serializable
-------------------------------------
Key: JBSEAM-3176
URL: https://jira.jboss.org/jira/browse/JBSEAM-3176
Project: Seam
Issue Type: Bug
Components: Examples
Affects Versions: 2.0.3.CR1, 2.0.2.GA
Reporter: Kurt Stam
if you cluster HotelSearchingAction, in it hotels is not serializable, as the List.subList is not serializable.
hotels = results.subList(0,pageSize);
13:03:00,270 ERROR [JBossCacheService] externalizeSession(): exception occurred externalizing session SessionBasedClusteredSession[id: cKrhNBCSg5KciOdaAiMQCA**.server2 lastAccessedTime: 1216227772088 version: 6 lastOutdated: 0] java.io.NotSerializableException: java.util.RandomAccessSubList at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) at org.jboss.seam.jsf.ListDataModel.writeObject(ListDataModel.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) at java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1380) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) at org.jboss.web.tomcat.service.session.SessionBasedClusteredSession.writeExternal(SessionBasedClusteredSession.java:175) at org.jboss.web.tomcat.service.session.JBossCacheService.externalizeSession(JBossCacheService.java:1027) at org.jboss.web.tomcat.service.session.JBossCacheService.putSession(JBossCacheService.java:316) at org.jboss.web.tomcat.service.session.JBossCacheClusteredSession.processSessionRepl(JBossCacheClusteredSession.java:121) at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1097) at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:652) at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:49) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:98) at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:84) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595)
--
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
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3121) EJB Session Bean Injection using @In weblogic server
by Leonardo Bernardelli (JIRA)
EJB Session Bean Injection using @In weblogic server
----------------------------------------------------
Key: JBSEAM-3121
URL: http://jira.jboss.com/jira/browse/JBSEAM-3121
Project: Seam
Issue Type: Bug
Components: EJB3
Affects Versions: 2.0.2.SP1
Environment: Weblogic application server 10.0
Reporter: Leonardo Bernardelli
Priority: Critical
I have 2 statefull ebjs, I am trying to inject OrganizacaoFacadeImpl e UsuarioGerenciador. I am trying to inject UsuarioGerenciador using @In annotation. I got the below exception:
javax.ejb.EJBTransactionRolledbackException: EJB Exception: ; nested exception is: org.jboss.seam.InstantiationException: Could not instantiate Seam component: usuarioGerenciador
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:791)
at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:483)
at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:421)
at weblogic.ejb.container.internal.StatefulLocalObject.postInvokeTxRetry(StatefulLocalObject.java:86)
at com.milestone.cop.action.OrganizacaoFacadeImpl_ldfou8_OrganizacaoFacadeImpl.listaOrganizacoesPorEstadoEmCriacao(OrganizacaoFacadeImpl_ldfou8_OrganizacaoFacadeImpl.java:167)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
at org.javassist.tmp.java.lang.Object_$$_javassist_2.listaOrganizacoesPorEstadoEmCriacao()V(Object_$$_javassist_2.java:???)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2092)
at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1929)
at org.jboss.seam.Component.getInstance(Component.java:1866)
at org.jboss.seam.Component.getInstance(Component.java:1843)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
I have tried to inject with @In(create = true) and I got the same error. I managed to put it to work with @EBJ annotation, but seam components injected in UsuarioGerenciador like @Logger didn't work.
I think tihis problem is similar to http://jira.jboss.org/jira/browse/JBSEAM-3034
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2485) NoClassDefFound when a service bean interface is in an outside .jar
by Adam Warski (JIRA)
NoClassDefFound when a service bean interface is in an outside .jar
-------------------------------------------------------------------
Key: JBSEAM-2485
URL: http://jira.jboss.com/jira/browse/JBSEAM-2485
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.1.CR1, 2.0.0.GA
Environment: JBoss AS 4.2.2, 4.2.1, Seam 2.0.0.GA, 2.0.1.CR1
Reporter: Adam Warski
My deployment is as follows:
- MyApi.jar, which contains the local an interface for a stateless session bean
- MyApp.ear, which is a normal Seam application, and has an implementation of the interface
The api is in a separate jar so that I can use the SLSB in other applications.
On some occasions, I got weird exceptions, like:
Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/jboss/seam/intercept/Proxy
at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:190)
or
Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/jboss/seam/Instance
at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:190)
(full example stack trace below).
I think the reason is as follows:
in org.jboss.seam.Component.createProxyFactory(...) - lines 2234-2254, a set of interfaces is created. It is a HashSet, so the first element may differ on each invocation of the method (that's why the exception is thrown only sometimes).
This set contains both the business interfaces, as well as org/jboss/seam/Instance, org/jboss/seam/intercept/Proxy.
Then, in org.jboss.seam.util.ProxyFactory.getClassLoader (lines 196-212) (which is invoked from the previously mentioned method), a classloader is obtained, which is later used to load all the interfaces classes and instantiate the proxy (in javassist). The classloader is taken to be the classloader of the first interface in the interfaces array (which is constructed from the set).
So, the classloader may be that of:
(1) the business interface
(2) org/jboss/seam/Instance, org/jboss/seam/intercept/Proxy.
If it is number (2), then it is the scoped classloader of the ear. However, if it is (1), then it is the unified class loader which was used to load the .jar, which contains the business interface. This classloader cannot load the org/jboss/seam/intercept/Proxy and org/jboss/seam/Component interfaces, as they are contained in a scoped deployment. Thus, an exception is thrown.
A fix which I have right now is, in org.jboss.seam.Component.createProxyFactory:
1. replace HashSet with LinkedHashSet - then the first element will always be the same
2. move adding the org/jboss/seam/intercept/Proxy and org/jboss/seam/Component interfaces to the top, so that the scoped class loader is later obtained in org.jboss.seam.util.ProxyFactory.getClassLoader.
I've tested it and it seems to fix the issue.
And finally the promised stack trace:
javax.el.ELException: /home.xhtml: Could not instantiate Seam component: serviceBean
at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:50)
at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:613)
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: serviceBean
at org.jboss.seam.Component.newInstance(Component.java:1970)
at org.jboss.seam.Component.getInstance(Component.java:1873)
at org.jboss.seam.Component.getInstance(Component.java:1840)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.ELText$ELTextVariable.writeText(ELText.java:184)
at com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
... 53 more
Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/jboss/seam/intercept/Proxy
at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:190)
at org.jboss.seam.Component.createProxyFactory(Component.java:2260)
at org.jboss.seam.Component.getProxyFactory(Component.java:1375)
at org.jboss.seam.Component.wrap(Component.java:1366)
at org.jboss.seam.Component.instantiateSessionBean(Component.java:1288)
at org.jboss.seam.Component.instantiate(Component.java:1273)
at org.jboss.seam.Component.newInstance(Component.java:1966)
... 67 more
Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: org/jboss/seam/intercept/Proxy
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:165)
at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:186)
... 73 more
Caused by: java.lang.NoClassDefFoundError: org/jboss/seam/intercept/Proxy
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:177)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
... 74 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2794) Make Seam EL more extensible and unified
by Michael Youngstrom (JIRA)
Make Seam EL more extensible and unified
----------------------------------------
Key: JBSEAM-2794
URL: http://jira.jboss.com/jira/browse/JBSEAM-2794
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.0.A1
Reporter: Michael Youngstrom
Assigned To: Michael Youngstrom
Fix For: 2.1.0.BETA2
I'm currently having some trouble dealing with ELResolvers in Seam and JSF.
1. It is not very easy to add ELResolvers to Seam (e.g. SpringELResolver must be put in the end of the resolver chain when it should be one of the first.)
2. When executing outside a FacesRequest you have to use the Seam ELResolver infrastructure which doesn't see any of the JSF ELResolvers
3. It would be nice to have a little more control over the order of ELResolvers since I have run into a few recursive situations as EL can sometimes sneak it's way into situations where EL is used in the SeamELResolver to resolve EL.
I believe that all of the above can be solved by:
1. Turn the SeamELResolver into a CompositeELResolver where a Seam Component can manage the included ELResolvers.
2. Add the above single SeamCompositeELResolver to the faces-context.xml. Making it so custom ELResolvers can be managed in a single place in Seam for both Faces and non Faces requests.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3148) Seam URL encoding UTF-8 conflicts with Tomcat Default ISO-8859-1
by Michael Youngstrom (JIRA)
Seam URL encoding UTF-8 conflicts with Tomcat Default ISO-8859-1
----------------------------------------------------------------
Key: JBSEAM-3148
URL: http://jira.jboss.com/jira/browse/JBSEAM-3148
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.3.CR1
Reporter: Michael Youngstrom
Assigned To: Michael Youngstrom
Fix For: 2.0.3.GA
I am having trouble transmitting multi-byte characters through page params. The problem appears to be this:
1. The servlet spec defaults URI decoding as ISO-8859-1.
2. Calling request.setCharacterEncoding() changes this default for the body of the message (post params)
3. In Tomcat calling request.setCharacterEncoding() does not change the encoding tomcat uses to decode the url. In order to change the uri encoding the useBodyEncodingForURI=true must be set in tomcat configuration (http://tomcat.apache.org/tomcat-5.5-doc/config/http.html).
4. A seam redirect uses seam.core.Manager.encode() to encode request params which encodes the parameters using UTF-8.
5. So when a multi-byte character is communicated as a page param by default it gets encoded by Seam in UTF-8 and decoded by Tomcat using ISO-8859-1.
How do we fix this? Two options:
1. Change Manager.encode() to use ISO-8859-1 instead of UTF-8 by default.
2. Make everyone who uses tomcat set useBodyEncodingForURI=true in their configuration.
I don't know if tomcat is the only container that doesn't by default URIDecode using the same content type as request.setCharacterEncoding().
I'm leaning towards option #1. Thoughts?
Mike
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3447) Error in wicket example
by Marcell Barbacena (JIRA)
Error in wicket example
-----------------------
Key: JBSEAM-3447
URL: https://jira.jboss.org/jira/browse/JBSEAM-3447
Project: Seam
Issue Type: Bug
Components: Wicket
Affects Versions: 2.1.0.BETA1
Environment: Wicket Example BETA1
Reporter: Marcell Barbacena
Clicking 2 times the confirm button in the Confirm Hotel Booking page from Beta1 wicket example (some other options have shown this error as well but this is the only one I can reproduce more frequently):
15:09:50,096 ERROR [org.apache.wicket.util.lang.Objects] Error serializing object class org.jboss.seam.example.wicket.Co
nfirm [object=[Page class = org.jboss.seam.example.wicket.Confirm, id = 21, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: java.lang.refle
ct.Method
Field hierarchy is:
21 [class=org.jboss.seam.example.wicket.Confirm, path=21]
private org.jboss.seam.example.wicket.action.HotelBooking org.jboss.seam.example.wicket.Confirm.hotelBooking [class=
org.javassist.tmp.java.lang.Object_$$_javassist_5]
private java.util.List org.jboss.seam.intercept.RootInterceptor.userInterceptors [class=java.util.ArrayList]
private java.util.List org.jboss.seam.intercept.RootInterceptor.userInterceptors[write:1][write:2][write:3] [cla
ss=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.ref
lect.Method] <----- field that is not serializable
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:342)
at org.apache.wicket.util.io.SerializableChecker.access$500(SerializableChecker.java:63)
at org.apache.wicket.util.io.SerializableChecker$1InterceptingObjectOutputStream.replaceObject(SerializableCheck
er.java:489)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1116)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.HashMap.writeObject(HashMap.java:1000)
at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:496)
at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.access$500(SerializableChecker.java:63)
at org.apache.wicket.util.io.SerializableChecker$1InterceptingObjectOutputStream.replaceObject(SerializableCheck
er.java:489)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1116)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:496)
at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:678)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
at org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:125)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1090)
at org.apache.wicket.protocol.http.pagestore.AbstractPageStore$PageSerializer.getPageReplacementObject(AbstractP
ageStore.java:278)
at org.apache.wicket.Page.writeReplace(Page.java:1301)
at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:1032)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1107)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:117)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1090)
at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:197)
at org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:810)
at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(SecondLevelCacheSess
ionStore.java:332)
at org.apache.wicket.Session.requestDetached(Session.java:1370)
at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at org.jboss.seam.web.WicketFilter$1.process(WicketFilter.java:57)
at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.web.WicketFilter.doFilter(WicketFilter.java:52)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.NotSerializableException: java.lang.reflect.Method
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.HashMap.writeObject(HashMap.java:1000)
at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:117)
... 55 more
--
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
15 years, 10 months