[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4389) Decorator message is not being shown inside seam message.
by Roman Mandeleil (JIRA)
Decorator message is not being shown inside seam message.
---------------------------------------------------------
Key: JBSEAM-4389
URL: https://jira.jboss.org/jira/browse/JBSEAM-4389
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.2.0.GA, 2.2.0.CR1, 2.1.2.GA
Environment: Windows, JBoss 4.2.3
Reporter: Roman Mandeleil
Priority: Critical
I am strugling very strange problem with decorate tag for a simple input . It seams that decorate template been parsed right but I can't make the seam:message that decorates the input to be affected by the errors.
The interesting part is that if I put rich:messages tag on the page I see the right messages for that input.
Here is the sample I cooked to reveal the problem:
http://rapidshare.com/files/270297734/sample-app.zip
it is an imitation of a comments system there is a comment class that represents the model of comment to be validated and saved in the database, SubmitNewCommentAction should save the comment in the DB when submit button is hit.
On the index.xhtml page there is a name input field that is decorated, it is there to reflect the problem.
Thanks in advance. Roman
--
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, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4396) Dynamically disable/enable global transactions
by asookazian (JIRA)
Dynamically disable/enable global transactions
----------------------------------------------
Key: JBSEAM-4396
URL: https://jira.jboss.org/jira/browse/JBSEAM-4396
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.2.0.GA
Environment: n/a
Reporter: asookazian
Need functionality to dynamically enable or disable global transactions. Currently, it's possible to enable or disable (globally, or once for the entire app) in components.xml like this:
<core:init transaction-management-enabled="false"/>
Would it be possible to enable/disable per JSF page or per Seam component in pages.xml, etc.?
Please see this thread: http://seamframework.org/Community/UsageOfUTTransaction
to find out what use case requires this functionality.
As per SiA book, turning off global tx's is generally not a good idea due to the effects of lazy loading in auto-commit mode (multiple tx's, etc.) But for certain tx management requirements when not using EJB3 CMT (i.e. Seam @Transactional or BMT), I had to turn off global tx's so there was no active tx when the component's action method was executed.
--
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, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4212) JMS feature does not work after cluster failover
by Scott McNab (JIRA)
JMS feature does not work after cluster failover
------------------------------------------------
Key: JBSEAM-4212
URL: https://jira.jboss.org/jira/browse/JBSEAM-4212
Project: Seam
Issue Type: Bug
Components: Remoting
Affects Versions: 2.0.2.SP1
Environment: JBoss 4.2.3.GA (clustered)
Reporter: Scott McNab
Assignee: Shane Bryzak
We have configured Seam to work in a clustered environment by using a custom JMSConnectionProvider that fetches the UIL2ConnectionFactory from HA-JNDI. This arrangements works perfectly fine while both servers are up - i.e. a web client connected to the slave server will correctly receive Asynchronous Seam notifications from a JMS topic hosted on the master server.
However, when the master server fails over to the slave, the Seam JMS support on the slave stops working. We get the following exception:
06-02 12:52:45.405 ERROR [seam.remoting.messaging.SubscriptionRegistry] (http-192.168.100.140-80-2:) org.jboss.mq.SpyJMSException: Cannot get the Topic from the provider; - nested throwable: (java.io.IOE
xception: Client is not connected)
06-02 12:52:45.406 ERROR [jboss.seam.remoting.Remoting] (http-192.168.100.140-80-2:) Error
java.lang.NullPointerException
at org.jboss.seam.remoting.messaging.SubscriptionRequest.marshal(SubscriptionRequest.java:31)
at org.jboss.seam.remoting.SubscriptionHandler.marshalResponse(SubscriptionHandler.java:107)
at org.jboss.seam.remoting.SubscriptionHandler.handle(SubscriptionHandler.java:96)
at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:111)
at org.jboss.seam.servlet.SeamResourceServlet.doGet(SeamResourceServlet.java:75)
at org.jboss.seam.servlet.SeamResourceServlet.doPost(SeamResourceServlet.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
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:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:677)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
We have diagnosed this issue and have developed a fix. The problem is as follows:
- once failover occurs, the topicConnection field in the SubscriptionRegistry object becomes invalid, as the connection to the master server has died.
- every subsequent call to SubscriptionRegistry.subscribe() will fail with SpyJMSException: Cannot get the Topic from the provider; Client is not connected.
- even if the master server recovers, this connection is dead and all Seam JMS subscriptions will no longer work.
The fix is to catch the Exception and retry with a new topicConnection if a subscribe request fails. The following patch on jboss-seam-2.0.2.SP1/src/remoting/org/jboss/seam/remoting/messaging/SubscriptionRegistry.java works for us:
Index: SubscriptionRegistry.java
===================================================================
--- SubscriptionRegistry.java (revision 5528)
+++ SubscriptionRegistry.java (working copy)
@@ -139,7 +139,21 @@
RemoteSubscriber sub = new RemoteSubscriber(UUID.randomUUID().toString(), topicName);
try {
- sub.subscribe(getTopicConnection());
+ try {
+ sub.subscribe(getTopicConnection());
+ } catch (Exception e) {
+ // If we failed during the first attempt, we might have a dead JMS connection.
+ // Clear the topic connection and try again.
+ if (topicConnection != null) {
+ try {
+ topicConnection.close();
+ } catch (Exception e1) {
+ // Ignore any exception during the close, since this connection is probably dead anyway
+ }
+ }
+ topicConnection = null;
+ sub.subscribe(getTopicConnection());
+ }
subscriptions.put(sub.getToken(), sub);
// Save the client's token in their session context
--
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, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2921) Wiki permission checking sometimes results in "no file extension in servlet path"
by Christian Bauer (JIRA)
Wiki permission checking sometimes results in "no file extension in servlet path"
---------------------------------------------------------------------------------
Key: JBSEAM-2921
URL: http://jira.jboss.com/jira/browse/JBSEAM-2921
Project: Seam
Issue Type: Bug
Components: Wiki
Reporter: Christian Bauer
Assigned To: Christian Bauer
I've seen this in the live log sometimes, couldn't reproduce it until now: Trigger a @Factory method on a page, the component that has the @Factory method has
@Create
public void create() {
if (!Identity.instance().hasPermission("User", "isAdmin", (User)Component.getInstance("currentUser") ) ) {
throw new AuthorizationException("You don't have permission for this operation");
}
}
This is from AdminHome.java. So for example try to access 'systemPreferenceEntities' variable without being an admin. This will result in a permission exception which is hidden and obscured by another exception in the exception handling phase:
>>> 12:45:02,053 DEBUG [org.jboss.seam.contexts.FacesLifecycle] >>> Begin exception recovery
>>> 12:45:02,055 DEBUG [org.jboss.seam.core.Manager] No stored conversation, or concurrent call to the stored conversation
>>> 12:45:02,059 DEBUG [org.jboss.seam.exception.Exceptions] reading exception mappings from /WEB-INF/pages.xml
>>> 12:45:02,064 DEBUG [org.jboss.seam.faces.Navigator] redirecting to: /wiki.xhtml
>>> 12:45:02,064 DEBUG [org.jboss.seam.contexts.FacesLifecycle] After render response, destroying contexts
>>> 12:45:02,066 DEBUG [org.jboss.seam.contexts.FacesLifecycle] <<< End JSF request for /wiki/
>>> 12:45:02,066 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/wiki].[default]] Servlet.service() for servlet default threw exception
java.lang.IllegalArgumentException: no file extension in servlet path: /
at org.jboss.seam.mock.MockViewHandler.getActionURL(MockViewHandler.java:44)
at org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:74)
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:162)
at org.jboss.seam.faces.Navigator.redirect(Navigator.java:50)
at org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:51)
at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
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:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:613)
--
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, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4360) Prefix bug in Seam integration of RESTEasy
by Stephane Epardaud (JIRA)
Prefix bug in Seam integration of RESTEasy
------------------------------------------
Key: JBSEAM-4360
URL: https://jira.jboss.org/jira/browse/JBSEAM-4360
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.2.GA
Reporter: Stephane Epardaud
The default way Seam integrates with RESTEasy is by mapping REST
resources to the default path "/app/seam/resource/rest/..." but there is
something fishy going on since calling
uriInfo.getBaseUriBuilder().path(MyResourceClass.class,
"getUser").build("2") on this resource:
@Name("RESTUsers")
@Path("/")
public class MyResourceClass {
@GET
@Path("/user/{userId}")
public Response getUser(@PathParam("userId") String identifier) {...}
}
Produces this URI: http://localhost/app/user/2 instead of
http://localhost/app/seam/resource/rest/user/2
Funny thing is that the required path info is stripped from the URI in
org.jboss.seam.resteasy.ResteasyResourceAdapter.extractUriInfo on
purpose (there is a comment about it and a setting to disable this that
breaks the application since it requires this path to be written in
@Path annotations for some weird reason).
I think the proper way to do it is to keep this path since it is
required for generating inter-resource URIs and make sure RESTEasy uses
it as a prefix when registering REST resource URIs. This should be done
when registering resources by calling
getDispatcher().getRegistry().setRootPath("/seam/resource/rest") so that
@Path("/user/{userId}") will match the prefixed URIs without having to
hard-code the prefix in there.
At the moment it's quite hard to generate responses for HTTP CREATED.
--
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, 4 months