[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1080) Component class obfuscates IllegalArgumentExceptions from Reflections class
by Stuart Robertson (JIRA)
Component class obfuscates IllegalArgumentExceptions from Reflections class
---------------------------------------------------------------------------
Key: JBSEAM-1080
URL: http://jira.jboss.com/jira/browse/JBSEAM-1080
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.0.GA
Environment: Seam 1.2.0PATCH1, OS X 10.4.9, JDK 1.5, JBOSS 4.0.2
Reporter: Stuart Robertson
Priority: Minor
Reflections.java:63 generates a very clear exception message when rethrowing IllegalArgumentException. In stepping through the debugger for instance, here's what I saw was the message at this point:
Could not set field value by reflection: CatalogItemSearchAction.itemFilterCriteriaSelection on: com.fb.core.action.CatalogItemSearchAction with value: class com.fb.util.criteria.ItemFilterCriterion
Outstanding.
However this exception is then caught by Component.java:1559 by the following method:
private void setFieldValue(Object bean, Field field, String name, Object value)
{
try
{
Reflections.set(field, bean, value);
}
catch (Exception e)
{
throw new IllegalArgumentException("could not set field value: " + getAttributeMessage(name), e);
}
}
...and the beautiful message is lost. Below is the complete stacktrace seen in the application.
FAILED: test
javax.ejb.EJBException: java.lang.IllegalArgumentException: could not set field value: itemSearch.itemFilterCriteria
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:189)
at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
at $Proxy59.getItemResults(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
at org.javassist.tmp.java.lang.Object_$$_javassist_1.getItemResults(Object_$$_javassist_1.java)
at com.fb.core.test.CatalogSearchTest$1.invokeApplication(CatalogSearchTest.java:88)
at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:489)
at com.fb.core.test.CatalogSearchTest.test(CatalogSearchTest.java:97)
Caused by: java.lang.IllegalArgumentException: could not set field value: itemSearch.itemFilterCriteria
at org.jboss.seam.Component.setFieldValue(Component.java:1559)
at org.jboss.seam.Component.access$500(Component.java:135)
at org.jboss.seam.Component$BijectedField.set(Component.java:2285)
at org.jboss.seam.Component.injectDataModelSelection(Component.java:1285)
at org.jboss.seam.Component.injectDataModelSelections(Component.java:1254)
at org.jboss.seam.Component.inject(Component.java:1196)
at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
... 52 more
at org.jboss.seam.util.Reflections.set(Reflections.java:77)
at org.jboss.seam.Component.setFieldValue(Component.java:1555)
... 78 more
Caused by: java.lang.IllegalArgumentException
at org.jboss.seam.util.Reflections.set(Reflections.java:63)
... 79 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1078) NPE in ConversationEntry
by Petr Ferschmann (JIRA)
NPE in ConversationEntry
------------------------
Key: JBSEAM-1078
URL: http://jira.jboss.com/jira/browse/JBSEAM-1078
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.0.GA
Reporter: Petr Ferschmann
Priority: Minor
Sometime when some kind of error happens I receive NPE
java.lang.NullPointerException
at org.jboss.seam.core.ConversationEntry.<init>(ConversationEntry.java:44)
at org.jboss.seam.core.ConversationEntries.createConversationEntry(ConversationEntries.java:50)
at org.jboss.seam.core.Manager.createConversationEntry(Manager.java:649)
at org.jboss.seam.core.Manager.beforeRedirect(Manager.java:796)
at org.jboss.seam.exceptions.DebugPageHandler.handle(DebugPageHandler.java:25)
at org.jboss.seam.core.Exceptions.handle(Exceptions.java:70)
at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:91)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:73)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:74)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
And there is:
this.conversationIdStack = stack==null ?
null : Collections.unmodifiableList(stack);
if ( conversationIdStack.size()>1 )
So I think it is expected that stack is null (there is a check).
--
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
19 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1073) NPE in RedirectServlet
by Petr Ferschmann (JIRA)
NPE in RedirectServlet
----------------------
Key: JBSEAM-1073
URL: http://jira.jboss.com/jira/browse/JBSEAM-1073
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.0.GA
Environment: I am using my own URLRewriter.
Reporter: Petr Ferschmann
In case of error in my application, user is redirect to debug.xhtml. I get NPE:
java.lang.StringIndexOutOfBoundsException: String index out of range: -7
at java.lang.String.substring(String.java:1938)
at org.jboss.seam.web.RedirectFilter.getViewId(RedirectFilter.java:94)
at org.jboss.seam.web.RedirectFilter.getViewId(RedirectFilter.java:85)
at org.jboss.seam.web.RedirectFilter$1.sendRedirect(RedirectFilter.java:59)
local variables:
url=/pes/templateImage/edit-361893//debug.xhtml?cid=73
pathInfo=/templateImage/edit-361893/
servletPath=/fw/templateImage/edit-361893/
contextPath=/pes
I am using my own URL Rewriter. I have servlet mapped to url /fw/ and it is rewritten from /pes/templateImage/. I am using Seam as wrapper around my own servlet.
It casts NPE when I redirect to different URL in this servlet.
--
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
19 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1049) super's MultipartRequest.getParameterMap() is immutable
by Petr Ferschmann (JIRA)
super's MultipartRequest.getParameterMap() is immutable
-------------------------------------------------------
Key: JBSEAM-1049
URL: http://jira.jboss.com/jira/browse/JBSEAM-1049
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.0.GA
Environment: Jetty plugin in Maven
Reporter: Petr Ferschmann
Priority: Minor
I am using MultipartFilter directly (in web.xml as first plugin). It tries in MultipartRequest.getParameterMap() to modify Map returned by super.getParameterMap(). It should make copy of it.
Callstack:
java.lang.UnsupportedOperationException
at java.util.Collections$UnmodifiableMap.put(Collections.java:1286)
at org.jboss.seam.web.MultipartRequest.getParameterMap(MultipartRequest.java:582)
at cz.softeu.rewriter.RequestWrapper.<init>(RequestWrapper.java:68)
at cz.softeu.rewriter.RewriterFilter.doFilter(RewriterFilter.java:170)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:74)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:303)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:735)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:636)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:320)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
--
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
19 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1024) Switching to HTTPS using scheme attribute does not work for custom http and https ports
by H K (JIRA)
Switching to HTTPS using scheme attribute does not work for custom http and https ports
---------------------------------------------------------------------------------------
Key: JBSEAM-1024
URL: http://jira.jboss.com/jira/browse/JBSEAM-1024
Project: JBoss Seam
Issue Type: Bug
Components: Security
Affects Versions: 1.2.0.GA, 1.1.7.CR1
Reporter: H K
Priority: Minor
If you use custom http and https ports (say, 8080, 8443), the switching to https does not work using the 'scheme' attribute in the pages.xml. The reason is that in Pages.encodeScheme() the server port is calculated by looking at the request url, this port will be 8080, while the correct port that needs to be in the new url should be 8443.
Also, it would be great if the documentation could be updated to include a warning for people with proxied environments. That is, depending on how your proxied environment is setup, using scheme might result in an infinity redirect loop. Here is how this could happen: lets say you have a webserver that can handle both http and https, however, this webserver can only talk http with the appserver. Now, if you mark a page such as 'login.xhtml' with scheme = https, then if the user types https://www.somedomain.com/login.seam, the webserver will be sending http://www.somedomain.com/login.seam to the appserver. When Seam looks at it, it will ask the browser to redirect to https again, resulting in an infinity redirect loop.
Should I open a different JIRA issue for the documentation update?
--
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
19 years