[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4137) Seam-gen should put commons-beanutils.jar into EAR/lib
by Alexey Kazakov (JIRA)
Seam-gen should put commons-beanutils.jar into EAR/lib
------------------------------------------------------
Key: JBSEAM-4137
URL: https://jira.jboss.org/jira/browse/JBSEAM-4137
Project: Seam
Issue Type: Bug
Components: Tools
Affects Versions: 2.1.1.GA
Reporter: Alexey Kazakov
commons-beanutils.jar should be avaliable for richfaces-api.jar
otherwise NoClassDefFoundError may be thrown by RichFaces:
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/PropertyUtils
at org.ajax4jsf.javascript.ScriptUtils.toScript(ScriptUtils.java:127)
at org.ajax4jsf.renderkit.AJAXDataSerializer.asString(AJAXDataSerializer.java:40)
at org.ajax4jsf.renderkit.AjaxRendererUtils.encodeAreas(AjaxRendererUtils.java:852)
at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:126)
at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:677)
at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:548)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
... 40 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.beanutils.PropertyUtils from BaseClassLoader
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:422)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 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
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4169) Enum converter does not handle inner anonymous enums
by Adam Michalik (JIRA)
Enum converter does not handle inner anonymous enums
----------------------------------------------------
Key: JBSEAM-4169
URL: https://jira.jboss.org/jira/browse/JBSEAM-4169
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.1.GA
Environment: JBoss 5.0.1.GA, JDK 6u13, Seam 2.1.1.GA
Reporter: Adam Michalik
The XHTML:
<h:selectManyListbox value="#{testBean.tests}">
<s:selectItems value="#{testLister.tests}" noSelectionLabel="" var="test" label="#{test}"/>
<s:convertEnum/>
</h:selectManyListbox>
testLister returns a Set<Test>, testBean.set/getTests operates on List<Test>.
The Test enum:
package test;
public enum Test {
TEST,
TEST_ANON {
};
}
Enum converter fails with:
java.lang.IllegalArgumentException with message: "test.Test$1 is not an enum type"
java.lang.Class.enumConstantDirectory(Class.java:2965)
java.lang.Enum.valueOf(Enum.java:191)
org.jboss.seam.ui.converter.EnumConverter.getAsObject(EnumConverter.java:44)
org.jboss.seam.ui.converter.PrioritizableConverter.getAsObject(PrioritizableConverter.java:61)
org.jboss.seam.ui.converter.ConverterChain.getAsObject(ConverterChain.java:110)
This is caused by the converter code:
else if (val instanceof Collection) {
t = ((Collection) val).iterator().next().getClass();
return Enum.valueOf(t, value);
}
When t is an anonymous inner enum, the Enum.valueOf cannot be invoked properly.
Cf.:
package test;
public enum Test {
TEST,
TEST_ANON {
};
public static void main(String[] args) {
System.out.println(Test.TEST.getClass()); // prints "class test.Test"
Class c1 = Test.TEST.getClass();
System.out.println(Enum.valueOf(c1, "TEST")); // prints "TEST"
System.out.println(Test.TEST_ANON.getClass()); // prints "class test.Test$1"
Class c2 = Test.TEST_ANON.getClass();
System.out.println(Enum.valueOf(c2, "TEST_ANON")); // java.lang.IllegalArgumentException: test.Test$1 is not an enum type
}
}
Solution would be to use Enum's getDeclaringClass().
--
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
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4168) Messages Regression. Message not appearing on screen.
by Tony Herstell (JIRA)
Messages Regression. Message not appearing on screen.
-----------------------------------------------------
Key: JBSEAM-4168
URL: https://jira.jboss.org/jira/browse/JBSEAM-4168
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.2.CR1
Environment: Win XP64 Pro 2.1.2.CR1 & Ubuntu
Reporter: Tony Herstell
This message is no longer appearing (since 2.1.1.GA)
<span> <h:outputText styleClass="bold" value="#{messages.enter_event_use_alternate_rider}" /> </span>
This is the message in messages it locks onto
enter_event_use_alternate_rider=click this box if #{competitorDetailsToAdd.competitor.firstname} is NOT the rider
competitorDetailsToAdd is in scope as its used on the page elsewhere:
<h:outputText id="enter_event_rider" value="#{competitorDetailsToAdd.competitor.surname}, #{competitorDetailsToAdd.competitor.firstname}" title="#{messages.enter_event_rider_tooltip}">
</h:outputText>
When I change the text to
enter_event_use_alternate_rider=click this box if you are NOT the rider
it will appear (once I restart the server of course).
--
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
[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-3264) REST requests create anemic HttpSessions
by Christian Bauer (JIRA)
[ https://jira.jboss.org/jira/browse/JBSEAM-3264?page=com.atlassian.jira.pl... ]
Christian Bauer closed JBSEAM-3264.
-----------------------------------
Fix Version/s: 2.1.2
Resolution: Done
Implemented the global <resteasy:application destroy-session-after-request="true"/> switch, need to revisit this issue when we implement conversation handling.
> REST requests create anemic HttpSessions
> ----------------------------------------
>
> Key: JBSEAM-3264
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3264
> Project: Seam
> Issue Type: Task
> Components: WS
> Reporter: Christian Bauer
> Assignee: Christian Bauer
> Fix For: 2.1.2
>
>
> REST requests are supposed to be stateless and the majority of users will write stateless services. However, Seams ContextualHttpRequest wrapper will always start an HttpSession when a request hits the server, so that the SESSION context is available. This is all good and OK, as long as we find a way to remove this session as soon as the request is over, it's never going to be used again. If we don't do anything, each and every REST call will create a new HttpSession which means trouble.
> This is a chicken/egg problem as some users might want to write stateful REST services in some situations, so we can't just globally kill all such sessions.
> Two possible solutions, probably should implement both:
> 1. Introduce a global configuration switch that says "I do not use sessions across requests, I do not send a session identifier with my REST calls". We can then invalidate the HttpSession after a REST request is served, so the SESSION context would effectively have the same lifespan as the EVENT context. This helps with memory consumption and active session limit.
> 2. Introduce a global configuration switch that says "I might use sessions across requests, I might want to send a session identifier with some of my REST calls". In that situation you probably want a shorter session timeout, not the global one your set in web.xml. So this configuration option would allow you to specify a different session timeout for any HttpSession that has been created for a REST request.
--
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
[jbossseam-issues] [JBoss JIRA] Work started: (JBSEAM-3264) REST requests create anemic HttpSessions
by Christian Bauer (JIRA)
[ https://jira.jboss.org/jira/browse/JBSEAM-3264?page=com.atlassian.jira.pl... ]
Work on JBSEAM-3264 started by Christian Bauer.
> REST requests create anemic HttpSessions
> ----------------------------------------
>
> Key: JBSEAM-3264
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3264
> Project: Seam
> Issue Type: Task
> Components: WS
> Reporter: Christian Bauer
> Assignee: Christian Bauer
>
> REST requests are supposed to be stateless and the majority of users will write stateless services. However, Seams ContextualHttpRequest wrapper will always start an HttpSession when a request hits the server, so that the SESSION context is available. This is all good and OK, as long as we find a way to remove this session as soon as the request is over, it's never going to be used again. If we don't do anything, each and every REST call will create a new HttpSession which means trouble.
> This is a chicken/egg problem as some users might want to write stateful REST services in some situations, so we can't just globally kill all such sessions.
> Two possible solutions, probably should implement both:
> 1. Introduce a global configuration switch that says "I do not use sessions across requests, I do not send a session identifier with my REST calls". We can then invalidate the HttpSession after a REST request is served, so the SESSION context would effectively have the same lifespan as the EVENT context. This helps with memory consumption and active session limit.
> 2. Introduce a global configuration switch that says "I might use sessions across requests, I might want to send a session identifier with some of my REST calls". In that situation you probably want a shorter session timeout, not the global one your set in web.xml. So this configuration option would allow you to specify a different session timeout for any HttpSession that has been created for a REST request.
--
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
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2616) <s:transformImageSize> fills transparent areas with white background
by Manfred Gleirscher (JIRA)
<s:transformImageSize> fills transparent areas with white background
--------------------------------------------------------------------
Key: JBSEAM-2616
URL: http://jira.jboss.com/jira/browse/JBSEAM-2616
Project: JBoss Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.0.0.GA
Environment: Windows, Jboss 4.2.1, Facelets
Reporter: Manfred Gleirscher
Priority: Minor
if a png-image containing transparent areas is scaled, the transparent areas get filled with white color.
I created my own transformImageSize-component which works properly.
Its applyTransformation method looks like that:
<code>
public void applyTransform(Image image) throws IOException {
...........
BufferedImage in = image.getBufferedImage();
GraphicsConfiguration gc = in.createGraphics().getDeviceConfiguration();
BufferedImage out = gc.createCompatibleImage(scaledWidth, scaledHeight,
Transparency.BITMASK);
Graphics2D g2d = out.createGraphics();
g2d.setComposite(AlphaComposite.Src);
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
g2d.drawImage(in, 0, 0, scaledWidth, scaledHeight, null);
g2d.dispose();
image.setBufferedImage(out);
}
</code>
--
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