[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, 8 months
[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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4158) URL Rewriting Param SET only on second access
by Frederic Nauleau (JIRA)
URL Rewriting Param SET only on second access
---------------------------------------------
Key: JBSEAM-4158
URL: https://jira.jboss.org/jira/browse/JBSEAM-4158
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.1.GA
Environment: Mac Os X
JBoss AS 4.2.3
Reporter: Frederic Nauleau
Hello,
Two days checking my configurations... Googleling, reading docs, try demos etc... I have a problem...
Help !
Context
I'am using URL Rewriting with rewrite patterns in each .page.xml file.
I would like to have bookmarkable URLs as the BlogEntry exemple... In the URL I have an entity Id sets on page access to load an entity and outject it to the page.
Considering that I have in testPage.page.xml:
<rewrite pattern="/myPageTest-{entityId}.html" />
<rewrite pattern="/myPageTest.html" />
<param name="entityId" converterId="javax.faces.Long"
value="#{entityDataLoader.entityId}" />
I have the bean:
@Name("entityDataLoader")
public class EntityDataLoader implements IEntityDataLoader {
@In
private EntityManager entityManager;
private Long entityId;
public void setEntityId(Long entityId) {
this. entityId = entityId;
}
@Out(required = false)
private Entity outjectEntity;
@Factory("loadedEntity")
public void loadEntity() {
if (entityId != null)
outjectEntity = entityManager.find(Entity.class,entityId);
}
}
I myTestPage.xhtml, I am using loadedEntity... The loadEntity() method is correctly called.
Problem description
It's perfectly working if I have already made an access to a page.
For example:
1°) Going to home page
2°) Then typing http://www.GavinKingIsAGod.com/myPageTest-4.html
3°) Perfectly working ! The setMethod is called and the entity loaded...
BUT
0°)Reset session (by taking another browser or restart JBoss server)
1°)Going direclty to http://www.GavinKingIsAGod.com/myPageTest-4.html The page is found, displayed... But the entity is not loaded... The method setEntityId is not called !
2°)Retrying to go to http://www.GavinKingIsAGod.com/myPageTest-4.html Perfectly working...
The problem is only for FIRST access... After, all URL rewriting is working with all parameters... So the URL is not bookmarkable, because, on first access the entity is not load. If someone calls the page http://www.GavinKingIsAGod.com/myPageTest-4.html from google for example, the entity won't load directly... If he retries, it works.
Tests I have made
Access with ?entityId
When I access to the page via http://www.StopBeingNice.com/myPageTest.html?entityId=4
It's working... So I suspect an URL Rewriting problem !
Need getEntityId()
In my bean, I had to add the method public Long getEntityId()
Otherwise I get the following error:
Property 'entityId' not readable on type java.lang.Long
I don't understand Why... He needs to read the entityId....
Configuration
Component.xml
<web:rewrite-filter view-mapping="*.seam" />
<web:redirect-filter url-pattern="*.seam" />
<web:character-encoding-filter encoding="UTF-16"
override-client="true" url-pattern="*.seam" />
Web.xml
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>ERROR</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
Environment
I'am running on JBoss AS 4.2.3 and JBoss Seam 2.1.1 GA
Log
When JBoss is completely started I have in the console
17:56:25,893 INFO [Initialization] done initializing Seam
17:56:25,896 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.hotDeployFilter
17:56:25,896 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.loggingFilter
17:56:25,896 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.ajax4jsfFilter
17:56:25,927 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
17:56:25,930 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.LIBRARIES=/WEB-INF/custom.taglib.xml, facelets.DEVELOPMENT=true, org.richfaces.SKIN=blueSky, javax.faces.DEFAULT_SUFFIX=.xhtml}
17:56:25,930 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
17:56:25,949 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
17:56:25,950 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.LIBRARIES=/WEB-INF/custom.taglib.xml, facelets.DEVELOPMENT=true, org.richfaces.SKIN=blueSky, javax.faces.DEFAULT_SUFFIX=.xhtml}
17:56:25,950 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
17:56:25,950 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.redirectFilter
17:56:25,950 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.exceptionFilter
17:56:25,950 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.multipartFilter
17:56:25,950 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.identityFilter
17:56:25,950 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.rewriteFilter
17:56:25,950 INFO [SeamFilter] Initializing filter: org.jboss.seam.servlet.characterEncodingFilter
17:56:25,950 INFO [SeamFilter] Initializing filter: org.jboss.seam.debug.hotDeployFilter
17:56:25,995 INFO [EARDeployer] Started J2EE application: file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/
17:56:26,084 INFO [Http11Protocol] Démarrage de Coyote HTTP/1.1 sur http-localhost%2F127.0.0.1-8080
17:56:26,099 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009
17:56:26,108 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 1m:10s:332ms
On first access I get this in the console:
17:56:26,108 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 1m:10s:332ms
17:57:00,267 INFO [Contexts] starting up: org.jboss.seam.web.session
17:57:00,268 INFO [Contexts] starting up: org.jboss.seam.security.ruleBasedPermissionResolver
17:57:00,269 INFO [Contexts] starting up: org.jboss.seam.security.identity
17:57:01,102 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
17:57:01,107 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
17:57:01,125 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
17:57:01,146 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
17:57:01,152 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
17:57:01,168 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
17:57:01,187 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
17:57:01,192 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
17:57:01,208 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/a4j.taglib.xml
17:57:01,216 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/ajax4jsf.taglib.xml
17:57:01,225 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/jsp.taglib.xml
17:57:01,272 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/rich.taglib.xml
17:57:01,285 ERROR [STDERR] 29 avr. 2009 17:57:01 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/Applications/Eclipse/jboss-4.2.3.GA/server/default/deploy/BugTest-ear.ear/BugTest.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/richfaces.taglib.xml
I think something is initialized here that it isn't before...
Thanks to read all... If you need more infos.. just ask
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4013) Synchronous invocation of asynchronous method from asynchronously executing method.
by Anton Lyakishev (JIRA)
Synchronous invocation of asynchronous method from asynchronously executing method.
-----------------------------------------------------------------------------------
Key: JBSEAM-4013
URL: https://jira.jboss.org/jira/browse/JBSEAM-4013
Project: Seam
Issue Type: Bug
Components: Async
Affects Versions: 2.1.1.GA
Environment: Seam 2.1.1GA, JBoss 4.2.3GA.
Reporter: Anton Lyakishev
There is a problem with REENTRANT flag in AsynchronousInterceptor.java that leads to synchronous invocation of asynchronous method from asynchronously executing method. Any call to a synchronous method will reset the flag, so subsequent calls to asynchronous methods are executed synchronously.
How to reproduce: just add these three classes to quartz example:
Async.java:
________________________
package org.jboss.seam.example.quartz;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
@Name( "async" )
public class Async {
@In( create = true )
private Async1 async1;
@Observer( "org.jboss.seam.postInitialization" )
public void initialize() {
async1.test( 5000L );
}
}
Async1.java
________________________
package org.jboss.seam.example.quartz;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.async.Asynchronous;
import org.jboss.seam.annotations.async.Duration;
import org.jboss.seam.async.AbstractDispatcher;
import org.jboss.seam.async.QuartzTriggerHandle;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.log.Log;
@Name( "async1" )
public class Async1 {
@Logger
private Log log;
@In( create = true )
private Async2 async2;
private static final String REENTRANT = "org.jboss.seam.async.AsynchronousIntercepter.REENTRANT";
@Asynchronous
public QuartzTriggerHandle test( @Duration Long duration ) {
log.info( "EXECUTING_ASYNCHRONOUS_CALL = #0", Contexts.getEventContext().isSet( AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL ) );
log.info( "1. REENTRANT = #0", Contexts.getEventContext().isSet( REENTRANT ) );
async2.test( 5000L, "test1" );
log.info( "2. REENTRANT = #0", Contexts.getEventContext().isSet( REENTRANT ) );
async2.log( "sync" );
log.info( "3. REENTRANT = #0", Contexts.getEventContext().isSet( REENTRANT ) );
async2.test( 10000L, "test2" );
try {
Thread.sleep( 15000L );
} catch( InterruptedException e ) {
}
log.info( "4. REENTRANT = #0", Contexts.getEventContext().isSet( REENTRANT ) );
return null;
}
}
Async2.java
________________________
package org.jboss.seam.example.quartz;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.async.Asynchronous;
import org.jboss.seam.annotations.async.Duration;
import org.jboss.seam.async.AbstractDispatcher;
import org.jboss.seam.async.QuartzTriggerHandle;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.log.Log;
@Name( "async2" )
public class Async2 {
@Logger
private Log log;
@Asynchronous
public QuartzTriggerHandle test( @Duration Long duration, String message ) {
log( message );
return null;
}
// non-asynchronous method
public void log( String message ) {
log.info( "#0: EXECUTING_ASYNCHRONOUS_CALL = #1", message, Contexts.getEventContext().isSet( AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL ) );
log.info( "#0: REENTRANT = #1", message, Contexts.getEventContext().isSet( "org.jboss.seam.async.AsynchronousIntercepter.REENTRANT" ) );
}
}
Async schedules invocation of Async1. Then Async1 schedules two invocations of Async2. It also calls non-asynchronous method of Async2 before scheduling the second invocation. This causes the REENTRANT flag to be off and the second invocation to be executed synchronously by the same thread. Here is a relevant log:
18:24:34,349 INFO (main) [ServletContextListener] Welcome to Seam 2.1.1.GA
18:24:37,077 INFO (main) [QuartzScheduler] Quartz Scheduler v.1.6.0 created.
18:24:37,079 INFO (main) [RAMJobStore] RAMJobStore initialized.
18:24:37,365 INFO (main) [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 22s:600ms
18:24:42,172 INFO (Sched1_Worker-1) [Async1] EXECUTING_ASYNCHRONOUS_CALL = true
18:24:42,173 INFO (Sched1_Worker-1) [Async1] 1. REENTRANT = true
18:24:42,175 INFO (Sched1_Worker-1) [Async1] 2. REENTRANT = true
18:24:42,176 INFO (Sched1_Worker-1) [Async2] sync: EXECUTING_ASYNCHRONOUS_CALL = true
18:24:42,177 INFO (Sched1_Worker-1) [Async2] sync: REENTRANT = true
18:24:42,177 INFO (Sched1_Worker-1) [Async1] 3. REENTRANT = false
18:24:42,185 INFO (Sched1_Worker-1) [Async2] test2: EXECUTING_ASYNCHRONOUS_CALL = true
18:24:42,185 INFO (Sched1_Worker-1) [Async2] test2: REENTRANT = true
18:24:47,190 INFO (Sched1_Worker-2) [Async2] test1: EXECUTING_ASYNCHRONOUS_CALL = true
18:24:47,190 INFO (Sched1_Worker-2) [Async2] test1: REENTRANT = true
18:24:57,186 INFO (Sched1_Worker-1) [Async1] 4. REENTRANT = false
Expected behavior: test2 should be invoked asynchronously (by different thread) after the test1.
Changes might be as simple as the following (AsynchronousInterceptor.java):
boolean flag_is_set = false;
if (isExecutingAsynchronousCall() && !Contexts.getEventContext().isSet(REENTRANT))
{
Contexts.getEventContext().set(REENTRANT, true);
flag_is_set = true;
}
try
{
return invocation.proceed();
}
finally
{
if (flag_is_set)
{
Contexts.getEventContext().remove(REENTRANT);
}
}
to make sure we do not reset the REENTRANT flag if it was not set by us.
--
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, 8 months