[JBoss jBPM] - Re: required variables
by dleerob
Well incase this will help anyone else, my quick fix will probably be running the following code before calling the taskInstance.end() method:
Map variables = taskInstance.getVariablesLocally();
| if (variables != null) {
| for (Iterator it = variables.keySet().iterator();it.hasNext();) {
| String variableName = (String)it.next();
| if (variables.get(variableName) == null) {
| startTaskInstance.deleteVariable(variableName);
| }
| }
| }
All local variables with a null value will be deleted, and if any of those variables are set to "required", the IllegalArgumentException will be thrown when the taskInstance.end() method is called, and therefore validation will work.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084146#4084146
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084146
18 years, 9 months
[Security & JAAS/JBoss] - InstanceNotFoundException in jboss.security:service=JaasSecu
by cffranco
Hi people,
I have one problem with JaasSecurityManager, when I used my application it is occurred the following errors:
007-09-13 09:19:05,510 DEBUG [AgendaCorporativa.model.br.com.unimed.fwp.control.LoginAction] execute() - action: LOGIN
2007-09-13 09:19:05,520 DEBUG [AgendaCorporativa.model.br.com.unimed.fwp.control.LoginAction] execute() - voTela: {action=LOGIN, j_username=, excluirMultiplos=[Ljava.lang.String;@1614ee3, page=1, j_password=}
2007-09-13 09:19:05,535 ERROR [AgendaCorporativa.model.br.com.unimed.fwp.control.LoginAction] jboss.security:service=JaasSecurityManager
javax.management.InstanceNotFoundException: jboss.security:service=JaasSecurityManager
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1010)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:804)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at br.com.unimed.fwp.control.LoginAction.doActionLogIn(LoginAction.java:198)
at br.com.unimed.fwp.control.LoginAction.execute(LoginAction.java:87)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:238)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:138)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
This is my BEAN definied in jboss-service.xml:
org.jboss.security.plugins.JaasSecurityManager
anonymous
<!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
in seconds.
If you want to disable caching of security credentials, set this to 0 to
force authentication to occur every time. This has no affect if the
AuthenticationCacheJndiName has been changed from the default value.
-->
1800
<!-- DefaultCacheResolution: Specifies the default timed cache policy
resolution in seconds. This controls the interval at which the cache
current timestamp is updated and should be less than the DefaultCacheTimeout
in order for the timeout to be meaningful. This has no affect if the
AuthenticationCacheJndiName has been changed from the default value.
-->
60
thanks
Claudemir. Frtanco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084145#4084145
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084145
18 years, 9 months
[JBossWS] - Re: NoSuchMethodError in remote client WS call
by fabiopmiranda
I'm getting the same error... I used the wsdl4j.jar in the client dir but still not working. I'm using JDK 5 and I think this is a problem with a wrong of some jar...
Exception in thread "main" java.lang.NoSuchMethodError: com.ibm.wsdl.xml.WSDLReaderImpl.setEntityResolver(Lorg/xml/sax/EntityResolver;)V
at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:142)
at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:273)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:110)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
any help would be appreciated.
Fabio Miranda
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084137#4084137
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084137
18 years, 9 months
[JBoss jBPM] - Re: required variables
by dleerob
If you take a look at the initializeVariables method, it actually does copy across the variables locally, but with a null value. Basically, the validation won't ever work because it doesn't take null values into account, and a null value is always copied acrossed to the local task instance, even if the variable is not readable.
if (variableAccesses!=null) {
| Iterator iter = variableAccesses.iterator();
| while (iter.hasNext()) {
| VariableAccess variableAccess = (VariableAccess) iter.next();
| String mappedName = variableAccess.getMappedName();
| if (variableAccess.isReadable()) {
| String variableName = variableAccess.getVariableName();
| Object value = contextInstance.getVariable(variableName, token);
| log.debug("creating task instance variable '"+mappedName+"' from process variable '"+variableName+"', value '"+value+"'");
| taskInstance.setVariableLocally(mappedName, value);
| } else {
| log.debug("creating task instance local variable '"+mappedName+"'. initializing with null value.");
| taskInstance.setVariableLocally(mappedName, null);
| }
| }
| }
Note the "else" block:
else {
| log.debug("creating task instance local variable '"+mappedName+"'. initializing with null value.");
| taskInstance.setVariableLocally(mappedName, null);
| }
|
Please correct me if I'm mistaken, as I just took a quick look.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084136#4084136
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084136
18 years, 9 months
[EJB 3.0] - ClassCastException with detached entities and memcached
by jagthedrummer
Hello everyone, I'm trying to speed up object retrieval by using memcached and things work fine at first. When I redeploy my app and try to retrieve and object from memcached I get a class cast exception. If I kill memcache and restart it things go back to working OK, but I've lost all the cached entities. Does anyone know why this would happen?
I have discovered that this problem does not occur if a client gets the entity from the server and stores it in memcached, it only happens when my objects home bean (stateless) is interfacing directly with memcached. To make it even stranger if I retrieve my object from memcached with a generic Object cast (instead of casting it to my class) and log o.getClass().getName() that matches what the class of the object should be. But then if I try to cast it as that Class, then I get a ClassCastException. Strange.
Thanks,
Jeremy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084133#4084133
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084133
18 years, 9 months
[JBoss Seam] - Losing params from Pages.xml
by Delphi's Ghost
I've got a problem with params defined in pages.xml disappearing. The problem can be seen by adding the following button to the search.xhtml page in the seam contact list demo :
| <h:commandButton value="Dummy" action="none"/>
|
If you add this after the search button, open up the seam contact list demo, type in a first name, click search, the page refreshes with the params in the URL. However, if you click the dummy button, the page refreshes and the params disappear. If this page was running under a pageflow, and the dummy button invoked an action defined in the pageflow, then the params would be appended on to the request url and all would be well.
The problem is that if I have an edit form, that has the widgetId in the URL, and I have a button that connects to a method on the backing bean, I will lose the widget Id when it is clicked. I could make the button return a string, and use a pageflow to call the method in response to the string since pageflows seem to work differently. This makes it somewhat hard to create a restful URL like myEdit.seam?widgetId=23 when the param is wiped out halfway through, and the URL is no longer bookmarkeable.
Is this by design, or should I fill out a jira?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084130#4084130
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084130
18 years, 9 months