[JBoss Portal] - Re: Unable to persist preferences.
by PeterJ
I didn't say that the weather portlet was not working. I can see the local weather with it just fine. But the reason that it works is that the processAction methods sets "newZip" in the response parameters and then redirects to the view. The view then uses the "newZip" parameter, and not the value from the preferences. If there is no "newZip" parameter, then the weather in Miami shows, which is what is set in portlet.xml.
I have been digging through the code and have come to the conclusion that this problem is all related to a configuration setting. That is, if the portlet is configured to treat preferences as read-only, it will ignore all changes. Code in PortletPreferencesImpl.sotre():
if (prefs.isReadOnly() == false)
| {
| PropertyChange[] changes = (PropertyChange[])updates.values().toArray(new PropertyChange[updates.size()]);
| prefs.update(changes);
| }
But I have not yet found where the "isReadOnly()" value of "prefs" originates. Seems that every class is getting it from somewhere else. Someone someplace must be setting the original value, but I haven't tracked it down yet.
This is not to be confused with the user not having write privileges on the preferences, in which case an exception gets thrown when the PortletPreferences.setvalue() method is called (such as when you are not logged into the portal).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959369#3959369
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959369
19 years, 9 months
[JBoss jBPM] - problems integrating jbpm console with another application
by jainer
Hi, i've been integrating an application with the jbpm console; and i've jumped the step of login and home pages until to the task.jsp, for the users from my application go directly to task.jsp.
i've used code from UserBean.java for the login():
| UserBean userBean = new UserBean();
| userBean.setUserName("edison acosta");
| session.setAttribute("userBean",userBean);
|
| userBean.login();
|
and code from HomeBean.java for to load an task instance(selectTaskInstance()) if exists the process, or to load a process(startProcessInstance) if is the first time that the user starts the process.
also i use code from a script that produces home.jsp
| <form id="linkDummyForm" name="linkDummyForm" style="display:inline" method="post" action="/jbpm/faces/task.jsp">
|
| <input type="hidden" name="linkDummyForm:_link_hidden_"/>
| <input type="hidden" name="taskInstanceId"/>
| <input type="hidden" name="processDefinitionId"/>
|
|
| <script type="text/javascript">
|
| function clear_linkDummyForm() {
|
| var f = document.forms['linkDummyForm'];
| f.elements['linkDummyForm:_link_hidden_'].value='';
| f.elements['taskInstanceId'].value='';
| f.elements['processDefinitionId'].value='';
| f.target='';
|
| document.forms['linkDummyForm'].elements['linkDummyForm:_link_hidden_'].value='_id14_0:_id17';
| document.forms['linkDummyForm'].elements['processDefinitionId'].value='1';
|
| if(document.forms['linkDummyForm'].onsubmit){
| document.forms['linkDummyForm'].onsubmit();
| }
| document.forms['linkDummyForm'].submit();
| return false;
| }
| clear_linkDummyForm();
|
| </script>
| </form>
|
my problem is when i try to submitt the "Save and Close" button, then throws an exception:
| 16:33:13,502 ERROR [LazyInitializationException] could not initialize proxy - the owning Session was closed
| org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
| at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:56)
| at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
| at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:133)
| at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$6582bdd4.setVariable(<generated>)
| at org.jbpm.webapp.bean.TaskBean.save(TaskBean.java:159)
| at org.jbpm.webapp.bean.TaskBean.saveAndClose(TaskBean.java:180)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:271)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
| at org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
| at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
| at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:44)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:169)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
| at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
| at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
| at java.lang.Thread.run(Thread.java:595)
|
i hope that you understand me fine!!!
thanx!!
regards
______________
jainer e.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959362#3959362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959362
19 years, 9 months