[JBoss JIRA] (RF-13539) r:fileUpload doesn't have the attribute fileUploadListener anymore
by Juergen Zimmermann (JIRA)
Juergen Zimmermann created RF-13539:
---------------------------------------
Summary: r:fileUpload doesn't have the attribute fileUploadListener anymore
Key: RF-13539
URL: https://issues.jboss.org/browse/RF-13539
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-input
Affects Versions: 5.0.0.Alpha3
Reporter: Juergen Zimmermann
In RF 4.x and 5.0.0.Alpha1 the tag r:fileUpload had an attribute fileUploadListener to provide a listener which received the uploaded byte array. This attribute is gone. How shall one receive the uploaded bytes?
--
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
10 years, 4 months
[JBoss JIRA] (RF-13538) Closeables.closeQuietly() removed in Guava 16.0, but still used in RF
by Juergen Zimmermann (JIRA)
Juergen Zimmermann created RF-13538:
---------------------------------------
Summary: Closeables.closeQuietly() removed in Guava 16.0, but still used in RF
Key: RF-13538
URL: https://issues.jboss.org/browse/RF-13538
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Affects Versions: 5.0.0.Alpha3
Reporter: Juergen Zimmermann
For instance in org.richfaces.resource.Java2DUserResourceWrapperImpl at line 73 is an invocation of Closeables.closeQuietly(...). However, this method is removed in Guava 16.0 which is now used in RF 5.0.0.Alpha3.
javadoc of Guava 14.0 already mentioned:
"Deprecated. Where possible, use the try-with-resources statement if using JDK7 or Closer on JDK6 to close one or more Closeable objects. This method is deprecated because it is easy to misuse and may swallow IO exceptions that really should be thrown and handled. See Guava issue 1118 for a more detailed explanation of the reasons for deprecation and see Closing Resources for more information on the problems with closing Closeable objects and some of the preferred solutions for handling it correctly. This method is scheduled to be removed in Guava 16.0."
Well, now the method is removed, but still invoked in RF 5.0.0.Alpha3.
--
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
10 years, 4 months
[JBoss JIRA] (RF-13534) a4j:mediaOutput on GF4: "Unauthorized deserialisation attempt"
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13534?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13534:
-----------------------------
Assignee: (was: Juraj Húska)
> a4j:mediaOutput on GF4: "Unauthorized deserialisation attempt"
> --------------------------------------------------------------
>
> Key: RF-13534
> URL: https://issues.jboss.org/browse/RF-13534
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.5
> Environment: Glassfish 4.0, Mac OS X 10.9.1, Java(TM) SE Runtime Environment (build 1.7.0_21-b12), Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
> Reporter: Daniele Benegiamo
> Attachments: MediaOutput.zip
>
>
> On GF4.0 any attempt to use {{<a4j:mediaOutput>}} raises the same exception ("{{java.io.InvalidClassException: Unauthorized deserialisation attempt}}"). Everything works nicely with the old RichFaces 4.1.0.
> Below you can find a stack trace, a sample page and a sample managed bean as minimum reproducible test case.
> To keep the test case short, the sample doesn't uses the {{value}} attribute, but exceptions are raised also when using it (e.g. passing a simple {{java.lang.String}}).
> From a first quick analysis seems that:
> * basic types (as {{java.lang.String}}) are not properly detected as "de-serializable";
> * types implementing {{Serializable}} or {{SerializableResource}} interfaces are impossible to instantiate by {{LookAheadObjectInputStream}} (row 118 - {{Class.forName()}} call in {{isClassValid()}} method - raises a {{ClassNotFoundException}} exception).
> {code:title=Exception}
> SEVERE: Input error for deserialize data
> java.io.InvalidClassException: Unauthorized deserialization attempt; org.jboss.weld.util.el.ForwardingMethodExpression
> at org.richfaces.util.LookAheadObjectInputStream.resolveClass(LookAheadObjectInputStream.java:105)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at com.sun.faces.facelets.el.TagMethodExpression.readExternal(TagMethodExpression.java:158)
> at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at org.richfaces.util.Util.decodeObjectData(Util.java:237)
> at org.richfaces.resource.DefaultCodecResourceRequestData.getData(DefaultCodecResourceRequestData.java:97)
> at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:337)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:156)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
> at java.lang.Thread.run(Thread.java:722)
> WARNING: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.NullPointerException
> at org.richfaces.resource.MediaOutputResource.encode(MediaOutputResource.java:62)
> at org.richfaces.resource.UserResourceWrapperImpl.encode(UserResourceWrapperImpl.java:188)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:229)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
> at java.lang.Thread.run(Thread.java:722)
> {code}
> {code:xml|title=index.xhtml}
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://xmlns.jcp.org/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j">
> <h:head>
> <title>Page title</title>
> </h:head>
> <h:body>
> <a4j:mediaOutput element="img" createContent="#{myBean.myCreateContent}"/>
> </h:body>
> </html>
> {code}
> {code:java|title=MyBean.java}
> package org.example;
> import java.awt.Color;
> import java.awt.Font;
> import java.awt.Graphics2D;
> import java.awt.image.BufferedImage;
> import java.io.IOException;
> import javax.enterprise.context.RequestScoped;
> import javax.imageio.ImageIO;
> import javax.inject.Named;
> @Named
> @RequestScoped
> public class MyBean
> {
> public void myCreateContent (java.io.OutputStream output, java.lang.Object input)
> throws IOException
> {
> BufferedImage img = new BufferedImage (400, 200, BufferedImage.TYPE_INT_RGB);
> Graphics2D graphics2D = img.createGraphics ();
> graphics2D.setBackground (Color.BLACK);
> graphics2D.setColor (Color.WHITE);
> graphics2D.clearRect (0, 0, img.getWidth (), img.getHeight ());
> graphics2D.setFont (new Font ("Arial", Font.PLAIN, 12));
> graphics2D.drawString ("String", 20, 35);
> ImageIO.write (img, "png", output);
> }
> }
> {code}
--
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
10 years, 4 months
[JBoss JIRA] (RF-13534) a4j:mediaOutput on GF4: "Unauthorized deserialisation attempt"
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13534?page=com.atlassian.jira.plugin.s... ]
Juraj Húska commented on RF-13534:
----------------------------------
I *have reproduced* the issues with provided reproducer.
It can be reproduced with RichFaces {{4.3.5.Final}}, {{4.3.6-SNAPSHOT}}, {{5.0.0.Alpha3}}.
It can be reproduced on Glassfish 4 only. It works on AS 7.1.1.Final and WildFly latest SNAPSHOT.
I have tried to put {{org.jboss.weld.util.el.ForwardingMethodExpression}} into serialization white-list, but it *did not* resolved the issue for me.
Please tell me if I can do something more.
> a4j:mediaOutput on GF4: "Unauthorized deserialisation attempt"
> --------------------------------------------------------------
>
> Key: RF-13534
> URL: https://issues.jboss.org/browse/RF-13534
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.5
> Environment: Glassfish 4.0, Mac OS X 10.9.1, Java(TM) SE Runtime Environment (build 1.7.0_21-b12), Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
> Reporter: Daniele Benegiamo
> Assignee: Juraj Húska
> Attachments: MediaOutput.zip
>
>
> On GF4.0 any attempt to use {{<a4j:mediaOutput>}} raises the same exception ("{{java.io.InvalidClassException: Unauthorized deserialisation attempt}}"). Everything works nicely with the old RichFaces 4.1.0.
> Below you can find a stack trace, a sample page and a sample managed bean as minimum reproducible test case.
> To keep the test case short, the sample doesn't uses the {{value}} attribute, but exceptions are raised also when using it (e.g. passing a simple {{java.lang.String}}).
> From a first quick analysis seems that:
> * basic types (as {{java.lang.String}}) are not properly detected as "de-serializable";
> * types implementing {{Serializable}} or {{SerializableResource}} interfaces are impossible to instantiate by {{LookAheadObjectInputStream}} (row 118 - {{Class.forName()}} call in {{isClassValid()}} method - raises a {{ClassNotFoundException}} exception).
> {code:title=Exception}
> SEVERE: Input error for deserialize data
> java.io.InvalidClassException: Unauthorized deserialization attempt; org.jboss.weld.util.el.ForwardingMethodExpression
> at org.richfaces.util.LookAheadObjectInputStream.resolveClass(LookAheadObjectInputStream.java:105)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at com.sun.faces.facelets.el.TagMethodExpression.readExternal(TagMethodExpression.java:158)
> at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at org.richfaces.util.Util.decodeObjectData(Util.java:237)
> at org.richfaces.resource.DefaultCodecResourceRequestData.getData(DefaultCodecResourceRequestData.java:97)
> at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:337)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:156)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
> at java.lang.Thread.run(Thread.java:722)
> WARNING: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.NullPointerException
> at org.richfaces.resource.MediaOutputResource.encode(MediaOutputResource.java:62)
> at org.richfaces.resource.UserResourceWrapperImpl.encode(UserResourceWrapperImpl.java:188)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:229)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
> at java.lang.Thread.run(Thread.java:722)
> {code}
> {code:xml|title=index.xhtml}
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://xmlns.jcp.org/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j">
> <h:head>
> <title>Page title</title>
> </h:head>
> <h:body>
> <a4j:mediaOutput element="img" createContent="#{myBean.myCreateContent}"/>
> </h:body>
> </html>
> {code}
> {code:java|title=MyBean.java}
> package org.example;
> import java.awt.Color;
> import java.awt.Font;
> import java.awt.Graphics2D;
> import java.awt.image.BufferedImage;
> import java.io.IOException;
> import javax.enterprise.context.RequestScoped;
> import javax.imageio.ImageIO;
> import javax.inject.Named;
> @Named
> @RequestScoped
> public class MyBean
> {
> public void myCreateContent (java.io.OutputStream output, java.lang.Object input)
> throws IOException
> {
> BufferedImage img = new BufferedImage (400, 200, BufferedImage.TYPE_INT_RGB);
> Graphics2D graphics2D = img.createGraphics ();
> graphics2D.setBackground (Color.BLACK);
> graphics2D.setColor (Color.WHITE);
> graphics2D.clearRect (0, 0, img.getWidth (), img.getHeight ());
> graphics2D.setFont (new Font ("Arial", Font.PLAIN, 12));
> graphics2D.drawString ("String", 20, 35);
> ImageIO.write (img, "png", output);
> }
> }
> {code}
--
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
10 years, 4 months
[JBoss JIRA] (RF-13458) CommandLink Javassist Compatibility Failures (richfaces-5.0.0.Alpha2)
by Pavol Pitonak (JIRA)
[ https://issues.jboss.org/browse/RF-13458?page=com.atlassian.jira.plugin.s... ]
Pavol Pitonak reassigned RF-13458:
----------------------------------
Assignee: Juraj Húska (was: Pavol Pitonak)
Juraj, please try this reproducer.
> CommandLink Javassist Compatibility Failures (richfaces-5.0.0.Alpha2)
> ---------------------------------------------------------------------
>
> Key: RF-13458
> URL: https://issues.jboss.org/browse/RF-13458
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Steven W.
> Assignee: Juraj Húska
>
> There appear to be compatibility issues with the richfaces-5.0.0.Alpha2 release and the javassist package. Using older versions of the package lead to failures stating that new javassist methods are not available.
> When using the newer libraries (3.14 -> javassist-3.18.0-GA) exceptions are generated on the use of previously functioning command links (the corresponding methods are still the same signatures i.e. return String and take no parameters)
> {code}
> <rich:commandLink id="listByUnit" render="f_home,f_selections,g_body_wrapper"
> value="#{messages['listByUnit']}"
> title="#{messages['titleListByUnit']}"
> action="#{appController.selectCurrSelectionUnit}"/>
> {code}
> with
> {code}
> public String selectCurrSelectionUnit()
> {code}
> yields:
> {code}
> 2014-01-03 13:57:57,597 ERROR [org.jboss.seam.exception.Exceptions] - handled and logged exception
> javax.servlet.ServletException: /layout/controller-selections.xhtml: Property 'selectCurrSelectionUnit' not found on type com.integrits.bean.Controller_$$_javassist_seam_2
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:374)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
> at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
> at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
> at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
> 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.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.el.ELException: /layout/controller-selections.xhtml: Property 'selectCurrSelectionUnit' not found on type com.integrits.bean.Controller_$$_javassist_seam_2
> at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:94)
> at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
> at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:207)
> at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
> at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
> at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
> at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
> at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
> at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
> at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
> at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
> at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
> at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:447)
> at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
> at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:188)
> at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
> at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
> ... 33 more
> {code}
--
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
10 years, 4 months
[JBoss JIRA] (RF-13458) CommandLink Javassist Compatibility Failures (richfaces-5.0.0.Alpha2)
by Steven W. (JIRA)
[ https://issues.jboss.org/browse/RF-13458?page=com.atlassian.jira.plugin.s... ]
Steven W. commented on RF-13458:
--------------------------------
Hi
I've created a minimized sample - this was easier to achieve than the reproducer. As-is all you need to do is startup tomcat with the Example web app and you'll see the exception. Simply replace the m2 richfaces with m1 and you'll see it runs.
Example webapp: http://www.entracity.com/example/Example.war
Source to produce: http://www.entracity.com/example/m2-javassist-exception-example-src.zip
I hope this helps yield a ready solution :)
Thanks,
Steve
> CommandLink Javassist Compatibility Failures (richfaces-5.0.0.Alpha2)
> ---------------------------------------------------------------------
>
> Key: RF-13458
> URL: https://issues.jboss.org/browse/RF-13458
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Steven W.
> Assignee: Pavol Pitonak
>
> There appear to be compatibility issues with the richfaces-5.0.0.Alpha2 release and the javassist package. Using older versions of the package lead to failures stating that new javassist methods are not available.
> When using the newer libraries (3.14 -> javassist-3.18.0-GA) exceptions are generated on the use of previously functioning command links (the corresponding methods are still the same signatures i.e. return String and take no parameters)
> {code}
> <rich:commandLink id="listByUnit" render="f_home,f_selections,g_body_wrapper"
> value="#{messages['listByUnit']}"
> title="#{messages['titleListByUnit']}"
> action="#{appController.selectCurrSelectionUnit}"/>
> {code}
> with
> {code}
> public String selectCurrSelectionUnit()
> {code}
> yields:
> {code}
> 2014-01-03 13:57:57,597 ERROR [org.jboss.seam.exception.Exceptions] - handled and logged exception
> javax.servlet.ServletException: /layout/controller-selections.xhtml: Property 'selectCurrSelectionUnit' not found on type com.integrits.bean.Controller_$$_javassist_seam_2
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:374)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
> at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
> at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
> at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
> 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.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.el.ELException: /layout/controller-selections.xhtml: Property 'selectCurrSelectionUnit' not found on type com.integrits.bean.Controller_$$_javassist_seam_2
> at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:94)
> at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
> at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:207)
> at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
> at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
> at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
> at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
> at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
> at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
> at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
> at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
> at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
> at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:447)
> at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
> at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:188)
> at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
> at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
> ... 33 more
> {code}
--
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
10 years, 4 months
[JBoss JIRA] (RF-4308) rich:pickList: keep sort order of source list after add/remove operations
by Silvana Deana (JIRA)
[ https://issues.jboss.org/browse/RF-4308?page=com.atlassian.jira.plugin.sy... ]
Silvana Deana edited comment on RF-4308 at 2/10/14 2:09 PM:
------------------------------------------------------------
Sorry about my ignorance.
But, What do you mean when you day "include this orderedPickListFix.js in your app"
If I add it as a common script it give me an error, and id I add it with JQuery, my menus stop working.
So ... I'm lost
We are using richFaces 3.3.3 with Facelets.
Thanks in advance
was (Author: silvana.deana):
Sorry about my ignorance.
But, What do you mean when you day "include this orderedPickListFix.js in your app"
If I add it as a common script it give me an error, and id I add it with JQuery, my menus stop working.
So ... I'm lost
Thanks in advance
> rich:pickList: keep sort order of source list after add/remove operations
> -------------------------------------------------------------------------
>
> Key: RF-4308
> URL: https://issues.jboss.org/browse/RF-4308
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-selects
> Affects Versions: 3.2.2, 4.3.4, 5.0.0.Alpha1
> Reporter: Martin Höller
> Labels: low_hanging_fruit, order, picklist, sort
> Fix For: 5-Tracking
>
>
> When adding items from the source list to the target list and removing this items again, the original order of the source list is not preserved. This makes it hard to find items in a list that is longer than just a fest items. A good example is the second example on the livedemo at http://livedemo.exadel.com/richfaces-demo/richfaces/pickList.jsf. Add the first state (Alabama) and remove it. It can now be found at the very end of the otherwise alphabetical list of states. This can be rather unintuitive for a user.
> My suggestion is either remember the original sort order of the source list, or add some attribute that enables automatic sorting.
--
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
10 years, 4 months
[JBoss JIRA] (RF-4308) rich:pickList: keep sort order of source list after add/remove operations
by Silvana Deana (JIRA)
[ https://issues.jboss.org/browse/RF-4308?page=com.atlassian.jira.plugin.sy... ]
Silvana Deana commented on RF-4308:
-----------------------------------
Sorry about my ignorance.
But, What do you mean when you day "include this orderedPickListFix.js in your app"
If I add it as a common script it give me an error, and id I add it with JQuery, my menus stop working.
So ... I'm lost
Thanks in advance
> rich:pickList: keep sort order of source list after add/remove operations
> -------------------------------------------------------------------------
>
> Key: RF-4308
> URL: https://issues.jboss.org/browse/RF-4308
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-selects
> Affects Versions: 3.2.2, 4.3.4, 5.0.0.Alpha1
> Reporter: Martin Höller
> Labels: low_hanging_fruit, order, picklist, sort
> Fix For: 5-Tracking
>
>
> When adding items from the source list to the target list and removing this items again, the original order of the source list is not preserved. This makes it hard to find items in a list that is longer than just a fest items. A good example is the second example on the livedemo at http://livedemo.exadel.com/richfaces-demo/richfaces/pickList.jsf. Add the first state (Alabama) and remove it. It can now be found at the very end of the otherwise alphabetical list of states. This can be rather unintuitive for a user.
> My suggestion is either remember the original sort order of the source list, or add some attribute that enables automatic sorting.
--
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
10 years, 4 months
[JBoss JIRA] (RF-13534) a4j:mediaOutput on GF4: "Unauthorized deserialisation attempt"
by Pavol Pitonak (JIRA)
[ https://issues.jboss.org/browse/RF-13534?page=com.atlassian.jira.plugin.s... ]
Pavol Pitonak reassigned RF-13534:
----------------------------------
Assignee: Juraj Húska (was: Pavol Pitonak)
Juraj, please try to reproduce.
> a4j:mediaOutput on GF4: "Unauthorized deserialisation attempt"
> --------------------------------------------------------------
>
> Key: RF-13534
> URL: https://issues.jboss.org/browse/RF-13534
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.5
> Environment: Glassfish 4.0, Mac OS X 10.9.1, Java(TM) SE Runtime Environment (build 1.7.0_21-b12), Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
> Reporter: Daniele Benegiamo
> Assignee: Juraj Húska
> Attachments: MediaOutput.zip
>
>
> On GF4.0 any attempt to use {{<a4j:mediaOutput>}} raises the same exception ("{{java.io.InvalidClassException: Unauthorized deserialisation attempt}}"). Everything works nicely with the old RichFaces 4.1.0.
> Below you can find a stack trace, a sample page and a sample managed bean as minimum reproducible test case.
> To keep the test case short, the sample doesn't uses the {{value}} attribute, but exceptions are raised also when using it (e.g. passing a simple {{java.lang.String}}).
> From a first quick analysis seems that:
> * basic types (as {{java.lang.String}}) are not properly detected as "de-serializable";
> * types implementing {{Serializable}} or {{SerializableResource}} interfaces are impossible to instantiate by {{LookAheadObjectInputStream}} (row 118 - {{Class.forName()}} call in {{isClassValid()}} method - raises a {{ClassNotFoundException}} exception).
> {code:title=Exception}
> SEVERE: Input error for deserialize data
> java.io.InvalidClassException: Unauthorized deserialization attempt; org.jboss.weld.util.el.ForwardingMethodExpression
> at org.richfaces.util.LookAheadObjectInputStream.resolveClass(LookAheadObjectInputStream.java:105)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at com.sun.faces.facelets.el.TagMethodExpression.readExternal(TagMethodExpression.java:158)
> at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
> at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at org.richfaces.util.Util.decodeObjectData(Util.java:237)
> at org.richfaces.resource.DefaultCodecResourceRequestData.getData(DefaultCodecResourceRequestData.java:97)
> at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:337)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:156)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
> at java.lang.Thread.run(Thread.java:722)
> WARNING: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.NullPointerException
> at org.richfaces.resource.MediaOutputResource.encode(MediaOutputResource.java:62)
> at org.richfaces.resource.UserResourceWrapperImpl.encode(UserResourceWrapperImpl.java:188)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:229)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
> at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
> at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
> at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
> at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
> at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
> at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
> at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
> at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
> at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
> at java.lang.Thread.run(Thread.java:722)
> {code}
> {code:xml|title=index.xhtml}
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://xmlns.jcp.org/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j">
> <h:head>
> <title>Page title</title>
> </h:head>
> <h:body>
> <a4j:mediaOutput element="img" createContent="#{myBean.myCreateContent}"/>
> </h:body>
> </html>
> {code}
> {code:java|title=MyBean.java}
> package org.example;
> import java.awt.Color;
> import java.awt.Font;
> import java.awt.Graphics2D;
> import java.awt.image.BufferedImage;
> import java.io.IOException;
> import javax.enterprise.context.RequestScoped;
> import javax.imageio.ImageIO;
> import javax.inject.Named;
> @Named
> @RequestScoped
> public class MyBean
> {
> public void myCreateContent (java.io.OutputStream output, java.lang.Object input)
> throws IOException
> {
> BufferedImage img = new BufferedImage (400, 200, BufferedImage.TYPE_INT_RGB);
> Graphics2D graphics2D = img.createGraphics ();
> graphics2D.setBackground (Color.BLACK);
> graphics2D.setColor (Color.WHITE);
> graphics2D.clearRect (0, 0, img.getWidth (), img.getHeight ());
> graphics2D.setFont (new Font ("Arial", Font.PLAIN, 12));
> graphics2D.drawString ("String", 20, 35);
> ImageIO.write (img, "png", output);
> }
> }
> {code}
--
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
10 years, 4 months