[JBoss Seam] - problem while using SEAM tag <s:link> in a JSF Portlet
by jpbarbe
Hi,
I've got the following exception when I use a the SEAM tag <s:link> from a JSF Portlet:
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-desk]] No active conversation context
| java.lang.IllegalStateException: No active conversation context
| at org.jboss.seam.core.Process.instance(Process.java:32)
| at org.jboss.seam.core.TaskInstance.instance(TaskInstance.java:51)
| at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:213)
| at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:51)
| at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:155)
| at org.jboss.seam.Component.getInstance(Component.java:1245)
| at org.jboss.seam.Component.getInstance(Component.java:1230)
| at org.jboss.seam.contexts.Lifecycle.resumeConversation(Lifecycle.java:328)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.restoreAnyConversationContext(AbstractSeamPhaseListener.java:42)
| at org.jboss.seam.jsf.SeamPortletPhaseListener.beforePhase(SeamPortletPhaseListener.java:51)
| at org.jboss.seam.jsf.SeamExtendedManagedPersistencePortletPhaseListener.beforePhase(SeamExtendedManagedPersistencePortletPhaseListener.java:37)
| at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersBefore(LifecycleImpl.java:520)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:342)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:396)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)
| at com.eads.desk.core.portlet.DeskAccessPortlet.doView(DeskAccessPortlet.java:30)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
|
Here is the web.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <web-app version="2.4"
| xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
| <!-- Seam -->
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
| </web-app>
And the faces-config.xml
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE faces-config
| PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
| "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
|
| <faces-config>
|
| <lifecycle>
| <phase-listener>
| org.jboss.seam.jsf.SeamExtendedManagedPersistencePortletPhaseListener
| </phase-listener>
| </lifecycle>
|
|
| <navigation-rule>
| <from-view-id>/view/deskAccess.jsp</from-view-id>
| <navigation-case>
| <from-outcome>trManager</from-outcome>
| <to-view-id>/view/viewTRManager.jsp</to-view-id>
| <redirect />
| </navigation-case>
| </navigation-rule>
|
| <navigation-rule>
| <navigation-case>
| <from-action>#{pooledTask.assignToCurrentActor}</from-action>
| <from-outcome>taskAssignedToActor</from-outcome>
| <to-view-id>/view/viewTRManager.jsp</to-view-id>
| </navigation-case>
| </navigation-rule>
|
| </faces-config>
|
Thanks for your help...
JP
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990162#3990162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990162
18Â years
[JBoss jBPM] - Checking for RuntimeActions in GraphElement
by RAlfoeldi
Hi everybody,
I'm back at hacking a jBPM App and I've just run into my favorite topic:
Is it possible that the
| GraphElement
|
| List getRuntimeActionsForEvent(ExecutionContext executionContext, String eventType) {
| List runtimeActionsForEvent = null;
| List runtimeActions = executionContext.getProcessInstance().getRuntimeActions();
| if (runtimeActions!=null) {
| Iterator iter = runtimeActions.iterator();
| while (iter.hasNext()) {
| RuntimeAction runtimeAction = (RuntimeAction) iter.next();
| // if the runtime-action action is registered on this element and this eventType
| if ( (this==runtimeAction.getGraphElement())
| && (eventType.equals(runtimeAction.getEventType()))
| ) {
| // ... add its action to the list of runtime actions
| if (runtimeActionsForEvent==null) runtimeActionsForEvent = new ArrayList();
| runtimeActionsForEvent.add(runtimeAction.getAction());
| }
| }
| }
| return runtimeActionsForEvent;
| }
|
isn't really what you want?
If you debug it you will (sometimes) have the situation that thisis a straight forward Java Object and runtimeAction.getGraphElement() resolves to a Node$$EnhancerByCGLIB$$xxxxx. Both objects represent the same node (same id, the CGLIB even refs to the 'this' instance in its 'target' field.... but '==' obviously fails.
Am I missing something? Bug? Jira? Help?
Greetings from Bern
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990158#3990158
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990158
18Â years
[EJB 3.0] - A better IsLocalInterceptor?
by jahlborn
Jboss has always had the behavior where calls to remote beans are made locally if the same service exists on the local server. This may or not be desired behavior. We've had this problem in the past, where we really do want to call the remote server, even if the same service exists locally. In the ejb3 world, this optimization is done by the IsLocalInterceptor, which makes it fairly easy to factor out of the picture (in the ejb 2 world the behavior is embedded within the interceptor which actually makes the remote call). So, we've written a new interceptor for ejb3 which uses the jboss partition name to determine if the local call optimization should really be done or not. This seems to be correct behavior and seems to work. I'd appreciate feedback from jboss people indicating whether or not this is really a valid test. If so, it would be great if this code could be included in jboss for others to use (even if it is not used by default).
To use this you would replace the relevant references to IsLocalInterceptor in the deploy/ejb3-interceptors-aop.xml with references to this class instead.
| package com.hmsonline.jbossbootstrap.remoting;
|
| import java.io.Serializable;
|
| import org.jboss.aop.advice.Interceptor;
| import org.jboss.aop.joinpoint.Invocation;
| import org.jboss.ejb3.remoting.IsLocalInterceptor;
| import org.jboss.system.server.ServerConfigUtil;
|
|
| /**
| * This interceptor fixes the IsLocalInterceptor, which makes local calls
| * regardless of whether that's what is intended by the user. This
| * Interceptor instead stores the PartitionName of the partition on which the
| * interceptor was created and compares that to the partition name of the
| * invoking partition. If the names differ, the call is treated as a remote
| * call. Assuming that the partition names are setup correctly (which they
| * must be, or other bad things happen), then this test should be
| * sufficient for both clustered and non-clustered remote proxies.
| *
| * @author James Ahlborn
| */
| public class IsReallyLocalInterceptor implements Interceptor, Serializable
| {
| private static final long serialVersionUID = -2472756311741041575L;
|
| /** interceptor which handles actual local invocations */
| private IsLocalInterceptor _delegate = new IsLocalInterceptor();
| /** the name of the partition on which this interceptor was created, filled
| in at construction */
| private String _creationPartitionName;
| /** the name of the partition on which the interceptor is being utilized,
| re-filled in on deserialization */
| private transient String _invocationPartitionName;
|
|
| public IsReallyLocalInterceptor() {
| // store the partition name on which this interceptor is created
| _creationPartitionName = getInternedPartitionName();
| _invocationPartitionName = _creationPartitionName;
| }
|
| public String getName()
| {
| return getClass().getName();
| }
|
| public Object invoke(Invocation invocation) throws Throwable
| {
| // if we got the interceptor locally, let IsLocalInterceptor handle the
| // call, otherwise continue down the interceptor chain. Note, we intern
| // the partition names so we can use object equality.
| if(_creationPartitionName == _invocationPartitionName) {
| return _delegate.invoke(invocation);
| }
|
| return invocation.invokeNext();
| }
|
| private void readObject(java.io.ObjectInputStream in)
| throws java.io.IOException, ClassNotFoundException
| {
| // handle serialized fields
| in.defaultReadObject();
|
| // make sure creation partition is interned
| _creationPartitionName = _creationPartitionName.intern();
|
| // grab the invocation partition
| _invocationPartitionName = getInternedPartitionName();
| }
|
| /**
| * Returns the partition name of the current environment, interned.
| */
| private static String getInternedPartitionName() {
| return ServerConfigUtil.getDefaultPartitionName().intern();
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990154#3990154
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990154
18Â years
[Persistence, JBoss/CMP, Hibernate, Database] - Re: Existing column but column not found - urgent
by Melladh
This particular problem seems to have solved itself. Perhaps it was the fifth reboot that did it, I'm not sure.
After that, it complained about the keyfields being in the Many part of the relation mapping, so I moved it to the One part, in the jbosscmp-jdbc.xml
My current problem is that I simply cannot get the relationships to work automatically. I can't save them with
mainClass.setRelatedClass(Collection c);
where mainClass is One and relatedClass is Many.
Right now, I'm doing it like this, in pseudocode representation
sessionMethod(RelatedValues values)
| {
| Collection c = mainClass.getRelatedClass();
| c.add(new RelatedClass(values));
| mainClass.setRelatedClass(c);
| }
This gives me a nullpointerexception. The mainClass has just been created, so I can understand that I might get a nullpointerexception - after all, there is no collection of experience yet. But then how do I add it? If I simply try to use setRelatedClass with an entirely new collection, it doesn't accept it either. I get a more obscure nullpointerexception, that throws a long line of unhandled exceptions because it goes further down before it is thrown. The bean or container seems to not accept me creating a new collection to send in. An example I saw, from Sun, did it the way my pseudocode does, though in the mainClass bean instead of in the session.
The only examples I've been able to find so far doesn't have container managed relations, but programmatical (if that's the correct word in english); which I believe will not live up to the demands of this course.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990149#3990149
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990149
18Â years
[JBoss Portal] - JBoss Portal 2.4.1.CR2 Released
by julienï¼ jboss.com
2.4.1.CR2 has been released, the interesting improvements since the last release candidate :
- backport of the astonishing new 2.6 Renaissance theme feat. Mr. Cobb for the awesome design and our Guitar Hero 2 for the backport
- performance improvements by Sohil
- rewrite of the portlet container cache due to popular demand in order to fully implement the spec
We also have other another couple of good improvements that were already in the previous RC1 but it's really worth to mention it
- WSRP cookie management largely improved thanks to Chris
You can get it from our download page http://labs.jboss.com/portal/jbossportal/download/index.html
Release Notes
|
| Release Notes - JBoss Portal - Version 2.4.1.CR2
|
| ** Bug
| * [JBPORTAL-740] - Postgres constraint violation causes CMS create to blank portlet
| * [JBPORTAL-1003] - Incorrect handling of producer asking for registration without requiring any registration properties
| * [JBPORTAL-1072] - Clustering configurations does not startup with mysql
| * [JBPORTAL-1082] - Unable to edit properties of portlet instances that ship with Portal
| * [JBPORTAL-1095] - Failure in producer form processing when using array of parameters
| * [JBPORTAL-1104] - setting expiration cache has no effect.
| * [JBPORTAL-1117] - Performance issue in PortletResourceBundleManager
| * [JBPORTAL-1118] - Localized portlet titles obtained from resource bundles don't fallback to english
|
| ** Feature Request
| * [JBPORTAL-823] - Access to Portlet Action Request in LayoutStragegy
| * [JBPORTAL-1057] - Create/update DTD/schemas for descriptors.
|
| ** Patch
| * [JBPORTAL-1093] - MyFaces/Tomahawk library patch
|
| ** Task
| * [JBPORTAL-822] - Ensure that producer is back to a default state before the beginning of each test.
| * [JBPORTAL-936] - Update IPC sample and docs
| * [JBPORTAL-982] - Cookies handling in WSRP
| * [JBPORTAL-995] - make forums work with 2.4
| * [JBPORTAL-1083] - Include new Red Hat EULA
| * [JBPORTAL-1090] - fix testsuite build to include db driver jars for portal testing
| * [JBPORTAL-1119] - Introduce 2.4 to the Renaissance (theme)
| * [JBPORTAL-1134] - explicitly set up hibernate dialect for portal testsuite
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990148#3990148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990148
18Â years