[JBoss Seam] - Exception when redeploying ear with multiple wars.
by trickyvail
I have an ear that contains two wars. When I redeploy I get the following error in the log:
13:53:03,135 INFO [TomcatDeployer] undeploy, ctxPath=/www.domain1.com, warUrl=.../deploy/admin.ear/www.domain1.com.war/
| 13:53:03,277 INFO [TomcatDeployer] undeploy, ctxPath=/www.admin.domain2.net, warUrl=.../deploy/admin.ear/www.admin.domain2.net.war/
| 13:53:03,279 ERROR [net]] Exception sending context destroyed event to listener instance of class org.jboss.seam.servlet.SeamListener
| java.lang.IllegalStateException: Attempted to invoke a Seam component outside the an initialized application
| at org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
| at org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:50)
| at org.jboss.seam.contexts.ServletLifecycle.endApplication(ServletLifecycle.java:118)
| at org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:39)
| at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3893)
| at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4525)
| at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1134)
| at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4615)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
If I remove one of the wars from the ear, the application can be redeployed without error. It looks like the seam listener is destroyed for the first war, but then another message is sent to the now non-existent seam listener.
This error does not prevent the application from redeploying, but I thought a seam developer may want to be made aware of it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103089#4103089
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103089
18 years, 7 months
[JBoss Seam] - Re: Switching instance of backing bean of JSF page with Seam
by tim_ph
Well, I use one page with backing bean in Seam Framework.
- page.xml set id, which backing object Home use to load up the instance from DB
- page.xhtml get loaded with instance populated
- one page for view, one for edit
I try to switch old bean with new one as in objHome.setInstance() and setId(), but that won't work because when you set the view page on s:button with no id, it just uses current id for the next page. So, when the page is loaded, old instance populates the page.
Just thinking about using navigation from-action in page.xml like this
| <navigation from-action="#{applicationHome.manager.action}">
| <rule if-outcome="success">
| <redirect view-id="Application.xhtml">
| <param name="applicationId" value="#{applicationHome.instance.id}"/>
| </redirect>
| </rule>
| </navigation>
|
| |
| | If redirect populate #{applicationHome.instance.id} after action is done, then it will work. If not, current id will populate that, and we're back to square one.
| | Let me give it a try.
| |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103083#4103083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103083
18 years, 7 months
[EJB/JBoss] - JBossQL Filtering of most recent action by Time
by vandelay
I am currently having a problem with my query:
SELECT DISTINCT a.userID FROM Availablehistory a
WHERE a.action= 'Sign On' AND a.date BETWEEN ?7 AND ?8
The boundaries reflect the past day time limits ( ?1 = Midnight 4 days ago ?2 = 11:59:59 PM 4 days ago)
This query is incorrect since query should only
be taking in the most recent 'Sign On' action performed by each user,
not all 'Sign On' actions from a user.
So if a user performs action 'Sign On' within the past four days, this query will still return a result back since a user did "Sign On' 4 days ago.
I want to add a condition that will drop users from the results Collection that 'Sign On' in the past 4 days and only add to the result sets users that their most recent 'Sign On' action was 4 days ago.
Any thoughts or help will be appreciated.
Thanks,
Blake
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103082#4103082
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103082
18 years, 7 months
[JBoss Seam] - s:selectItems, entity-query, convertEntity stop working
by sztank
Hello,
When I migrate from seam 1.2 to 2.0 the following code stops to work properly:
View:
| ..
| <s:decorate id="clientDecorate" template="layout/edit.xhtml">
| <ui:define name="label">Client:</ui:define>
| <h:selectOneMenu value="#{contract.client}" required="true">
| <s:selectItems value="#{clients.resultList}" var="c" label="#{c.name}" noSelectionLabel="Not defined"/>
| <s:convertEntity />
| </h:selectOneMenu>
| </s:decorate>
| ..
|
where "clients" is the entity-query defined in components.xml file:
| <framework:entity-query name="clients" ejbql="select b from Client b" />
|
"contract" is the entity bean.
That work perfectly in seam 1.2. In seam 2.0 it behaves this way:
When the view is rendered the selectOneMenu is always set to "Not defined" even when the contract.client field is set. So for example when I filled the form and select some "client" from selectOneMenu and then post the form the proper value is set to contract.client field. I persist the contract entity to the database. Now when the enother (edit) form is displayed with the contract.client set the label is "Not defined"
I have read some posts that deal with s:selectItems migration problems but still can't solve the problem.
Thanks in advance for any help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103081#4103081
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103081
18 years, 7 months