[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4147) ConcurrentAccessException when resolving EL on Stateful bean
by Sylvain Catudal (JIRA)
ConcurrentAccessException when resolving EL on Stateful bean
------------------------------------------------------------
Key: JBSEAM-4147
URL: https://jira.jboss.org/jira/browse/JBSEAM-4147
Project: Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 2.1.1.GA
Environment: jboss as 5.0
Reporter: Sylvain Catudal
How to reproduce:
- Extend EntityQuery and make it a stateful EJB.
- Add a restriction that has EL in it that refers to that EJB
- Create a test that invokes the resultCount or resultList
While running the test, you'll get a ConcurrentAccessException.
Code example :
EJB :
@Name("authenticationList")
@Stateful
public class AuthenticationListBean extends EntityQuery<Authentication>
implements AuthenticationList {
private static final long serialVersionUID = 3302243104496804256L;
private static final String EJBQL = "select authentication "
+ "from Authentication authentication inner join fetch "
+ "authentication.user";
private static final String[] RESTRICTIONS = {
"authentication.user.userId = #{authenticationList.userId}" };
private Long userId;
public AuthenticationListBean() {
setEjbql(EJBQL);
setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
setMaxResults(15);
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getUserId() {
return userId;
}
@Remove @Destroy
public void destroy() {
}
}
Test :
public class FailingTest extends SeamTest {
Long countBefore ;
@Test
public void test() throws Exception {
new FacesRequest() {
@Override
protected void invokeApplication() {
countBefore = (Long) getValue("#{authenticationList.resultCount}");
}
}.run();
}
--
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
16 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4108) p:anchor in footer
by Tihomir Surdilovic (JIRA)
p:anchor in footer
------------------
Key: JBSEAM-4108
URL: https://jira.jboss.org/jira/browse/JBSEAM-4108
Project: Seam
Issue Type: Feature Request
Components: PDF
Affects Versions: 2.0.2.SP1
Reporter: Tihomir Surdilovic
Following example of having and external anchor reference in page footer does not work (exception below)
<p:footer borderWidthTop=".4" borderWidthBottom="0" alignment="left">
Page [<p:pageNumber />]
<p:paragraph>
<p:anchor reference="http://www.jboss.org/index.html?module=bb&op=viewforum&f=231"> support forums</p:anchor>
</p:paragraph>
</p:footer>
Exception:
com.sun.facelets.FaceletException: Error Parsing /pdftest.xhtml: Error Traced[line: 26] The reference to entity "op" must end with the ';' delimiter.
at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:105)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
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:109)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
After removing parameters:
<p:footer borderWidthTop=".4" borderWidthBottom="0" alignment="left">
Page [<p:pageNumber />]
<p:paragraph>
<p:anchor reference="http://www.jboss.org/index.html"> support forums</p:anchor>
</p:paragraph>
</p:footer>
Exception thrown is:
java.lang.RuntimeException: Not all annotations could be added to the document (the document doesn't have enough pages).
at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
at com.lowagie.text.Document.close(Unknown Source)
at org.jboss.seam.pdf.ui.UIDocument.encodeEnd(UIDocument.java:269)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
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:109)
--
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
16 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3915) RESTEasy GET request: java.lang.RuntimeException: Bad arguments passed to public java.lang.String method
by Viggo Navarsete (JIRA)
RESTEasy GET request: java.lang.RuntimeException: Bad arguments passed to public java.lang.String method
---------------------------------------------------------------------------------------------------------
Key: JBSEAM-3915
URL: https://jira.jboss.org/jira/browse/JBSEAM-3915
Project: Seam
Issue Type: Bug
Environment: JDK 1.6
Jboss 5.0.0.GA for JDK 1.6
Seam 2.1.1.GA
Reporter: Viggo Navarsete
Deploying the attached project and going to the following url: http://localhost:8080/app-cci-seam/seam/resource/rest/gqiResource/getShel...
results in the following stacktrace:
09:00:03,046 ERROR [STDERR] java.lang.RuntimeException: Bad arguments passed to public java.lang.String com.tracetracker.cci.session.GqiResourceBean.getShelfLife(java.lang.String,java.lang.String) ( arg1, arg2
09:00:03,047 ERROR [STDERR] at org.resteasy.MethodInjectorImpl.invoke(MethodInjectorImpl.java:133)
09:00:03,047 ERROR [STDERR] at org.resteasy.ResourceMethod.invoke(ResourceMethod.java:162)
09:00:03,047 ERROR [STDERR] at org.resteasy.ResourceMethod.invoke(ResourceMethod.java:134)
09:00:03,047 ERROR [STDERR] at org.resteasy.Dispatcher.invoke(Dispatcher.java:161)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.resteasy.ResteasyResourceAdapter$1.process(ResteasyResourceAdapter.java:127)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.resteasy.ResteasyResourceAdapter.getResource(ResteasyResourceAdapter.java:71)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80)
09:00:03,047 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
09:00:03,047 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
09:00:03,047 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
09:00:03,047 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
09:00:03,047 ERROR [STDERR] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
09:00:03,048 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
09:00:03,048 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
09:00:03,048 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
09:00:03,048 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
09:00:03,048 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
09:00:03,048 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
09:00:03,048 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
09:00:03,048 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
09:00:03,049 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
09:00:03,049 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
09:00:03,049 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
09:00:03,049 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
09:00:03,049 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
09:00:03,049 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
09:00:03,049 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
09:00:03,049 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
09:00:03,049 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
09:00:03,049 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
09:00:03,049 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
09:00:03,049 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
09:00:03,049 ERROR [STDERR] at org.resteasy.MethodInjectorImpl.invoke(MethodInjectorImpl.java:72)
09:00:03,049 ERROR [STDERR] ... 50 more
The interface for the RESTEasy webservice is com.tracetracker.cci.GqiResource
The implementation is com.tracetracker.cci.GqiResourceBean
I have tried to change the parameter types resulting in the same error. It looks the argumentss are not handlet corectly for GET requests.
--
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
16 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4134) Add a monitoring annotation
by Heiko W. Rupp (JIRA)
Add a monitoring annotation
---------------------------
Key: JBSEAM-4134
URL: https://jira.jboss.org/jira/browse/JBSEAM-4134
Project: Seam
Issue Type: Feature Request
Components: Core
Reporter: Heiko W. Rupp
It would be nice to be able to monitor Seam executions.
I think having an annotation on a method
@Monitor(name="foo")
could be good. When the method is called, as monitoring interceptor would
- increase a counter for that method
- add some call timing for that method to a timing variable
The values would be stored in a Map(name, values) -- with the name being either
the name of the method (perhaps in the form Class.method or the one passed as
argument.
This map would be exposed via JMX (together with "clean (name) " and "cleanAll"
operations.
--
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
16 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4053) Can't resolve EL Function which serialized to ViewState
by Hiroyuki Wada (JIRA)
Can't resolve EL Function which serialized to ViewState
-------------------------------------------------------
Key: JBSEAM-4053
URL: https://jira.jboss.org/jira/browse/JBSEAM-4053
Project: Seam
Issue Type: Bug
Components: EL
Affects Versions: 2.1.1.GA, 2.0.2.SP1
Reporter: Hiroyuki Wada
Attachments: FunctionMapperImpl.java.patch
It seems that EL Function which serialized to ViewState can't be resolved when the object is deserialize. Because the jboss-el directly use "Class#forName(String)". The code is as follows,
{code:title=org.jboss.el.lang.FunctionMapperImpl.java|borderStyle=solid}
public Method getMethod() {
if (this.m == null) {
try {
Class t = Class.forName(this.owner);
Class[] p = ReflectionUtil.toTypeArray(this.types);
this.m = t.getMethod(this.name, p);
} catch (Exception e) {
{code}
I think the above code cause ClassLoader Scope Problem. "Thread.currentThread().getContextClassLoader()" should be used.
I found the jboss-el already had utility method for "Class.forName". It's "ReflectionUtil#forName(String)" method. Please use this method.
--
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
16 years, 8 months