[jBPM] - Form with multi-select yields single String instead of Collection
by Martin Müller
Martin Müller [https://community.jboss.org/people/martinmueller] created the discussion
"Form with multi-select yields single String instead of Collection"
To view the discussion, visit: https://community.jboss.org/message/759203#759203
--------------------------------------------------------------
Hey,
when a user starts a process instance in the jBPM Console I'd like to display a form with a select input allowing multiple selection.
I've got the form displayed properly with the multi-select box. However, when submitting the form the corresponding process variable only gets filled with a String containing the first selected value. Any other selected value is discarded, and I would have expected some Collection type instead of a String.
The form is a basic HTML form inside the <process_id>.ftl file:
<form action="complete" method="POST" enctype="multipart/form-data">
<select name="list" multiple="multiple">
<option value="value1">Option 1</option>
<option value="value2">Option 2</option>
<option value="value3">Option 3</option>
</select>
</form>
If I select "Option 2" and "Option 3" in this example and then start the process the list variable is set to a String "value2".
How do I make it return a Collection with all selected values instead?
Thanks in advance,
Martin
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759203#759203]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[Beginner's Corner] - SSO with Kerberos in JBoss-6.0.0.Final
by Pasqualino Imbemba
Pasqualino Imbemba [https://community.jboss.org/people/pi4630] created the discussion
"SSO with Kerberos in JBoss-6.0.0.Final"
To view the discussion, visit: https://community.jboss.org/message/759142#759142
--------------------------------------------------------------
Hi,
I'm trying to enable kerberos SSO on my JBoss-6.0.0.-Final.
To this purpose, I have created the following:
1. a simple webapplication in jsf
2. linux server has a keytab file and is part of ms active directory
3. added an application policy (see below, named "SPNEGO") that uses Kerberos Module
4. the jsf contains a jboss specific deplyoment descriptor that refers to the security domain defined at 3.
5. in the jsf's web.xml, I've set the auth-method and the realm-name
I stil can access the JSF from a PC without kerberos ticket.
Where am I doing wrong?
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Tic Tac Toe</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<!-- Added by @pb26683 -->
<login-config>
<auth-method>CLIENT_CERT</auth-method>
<realm-name>SPNEGO</realm-name>
</login-config>
</web-app>
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC -//JBoss//DTD Web Application 5.0//EN http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd>
<jboss-web>
<security-domain>java:/jaas/SPNEGO</security-domain>
</jboss-web>
login-conf.xml
<application-policy name="spnego-server">
<authentication>
<login-module code="com.sun.security.auth.module.Krb5LoginModule" flag="required">
<module-option name="storeKey">true</module-option>
<module-option name="doNotPrompt">true</module-option>
<module-option name="debug">true</module-option>
<module-option name="useKeyTab">true</module-option>
<module-option name="keyTab">/etc/develux.keytab</module-option>
<module-option name="principal">HTTP/develux.prov.bz</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name="SPNEGO">
<!--SPNEGO is short for Simple and Protected GSSAPI Negotiation Mechansim. See http://en.wikipedia.org/wiki/SPNEGO or details.-->
<authentication>
<login-module
code="org.jboss.security.negotiation.spnego.SPNEGOLoginModule"
flag="requisite">
<module-option name="password-stacking">useFirstPass</module-option>
<module-option name="serverSecurityDomain">spnego-server</module-option>
</login-module>
<login-module
code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="password-stacking">useFirstPass</module-option>
<module-option name="usersProperties">props/spnego-users.properties</module-option>
<module-option name="rolesProperties">props/spnego-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
I'm thankful for any hint!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759142#759142]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - Could not load org.jbpm.task.event.TaskCompletedEvent
by gvallangca
gvallangca [https://community.jboss.org/people/gvallangca] created the discussion
"Could not load org.jbpm.task.event.TaskCompletedEvent"
To view the discussion, visit: https://community.jboss.org/message/758527#758527
--------------------------------------------------------------
To whom it may concern,
I'm confused to pinpoint where the cause occured. I have started my web app successfully but when I'm about to invoke my method which creates a task in the jbpm,
this exception appears:
Sep 7, 2012 6:07:25 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.jbpm.task.event.TaskCompletedEvent. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1597)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at org.jbpm.task.event.TaskEventKey.readExternal(TaskEventKey.java:48)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.ArrayList.readObject(ArrayList.java:593)
at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuffer.java:1982)
at org.apache.mina.filter.codec.serialization.ObjectSerializationDecoder.doDecode(ObjectSerializationDecoder.java:92)
at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:178)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:225)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:176)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
I hope you could give me suggestions how to solve this issue.
Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/758527#758527]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[Beginner's Corner] - Session invalidation not happening at the right time
by Vikas V
Vikas V [https://community.jboss.org/people/selfcare] created the discussion
"Session invalidation not happening at the right time"
To view the discussion, visit: https://community.jboss.org/message/758914#758914
--------------------------------------------------------------
Hi,
Am using Jboss AS 5.1.0 GA. I have JSF 1.2 servlet running on it.
I have a Customised session listener which extends PortalSessionListener (am running Liferay 6.0)
In web.xml, I have configured session-timeout to be 3 minutes. When I hit my JSF servlet, and dont do any thing for 3 mins, then my customised session listener gets invoked and sessionDestroyed(HttpSessionEvent httpSessionEvent) is called.
Before 3rd minute if I carry out some activity on my servlet then the session gets extended. Then I wont do anything. This time if I watch the logs, my customised session listener is getting called at around 2nd minute instead of 3rd minute and its invalidating the session by calling sessionDestroyed(HttpSessionEvent httpSessionEvent).
*My first question is why is that session invalidation not happening at the right time* in the scenario described above?
Also, I have configured a session-timeout in web.xml of my Servlet. Am using httpServletRequest.isRequestedSessionIdValid() method to check if the session is valid or not. In the above scenario
when session got invalidated at around 2nd minute, this time after the session invalidation log got printed, if I click on any page on my Servlet it still finds that session is not invalidated yet.
But, its finding the session got invalidated only exactly after 3rd minute.
*My second question is why is this difference between session-timeout configured in Jboss AS web.xml and the one configured in Servlet's web.xml?*
Regards,
Vikas
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/758914#758914]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Messaging] - monitor Jboss queue with Java Program
by jboss debugg
jboss debugg [https://community.jboss.org/people/jmsdebug] created the discussion
"monitor Jboss queue with Java Program"
To view the discussion, visit: https://community.jboss.org/message/759101#759101
--------------------------------------------------------------
using Java program able to connect jmx/rmi/RMIAdapto, but ran into below exception in further deep into MBeanServerConnection ,
-------------------------
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy(a)7b1a9eabjava.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console
at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:89)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
at sun.reflect.GeneratedMethodAccessor279.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422)
---------------------
public class MBeanMonitor
{
private static MBeanServerConnection connection;
public static void connectJNDI() throws Exception{
Properties enviornment = new Properties();
enviornment.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
enviornment.setProperty("java.naming.provider.url","jnp://localhost:1099");
enviornment.setProperty("java.naming.factory.url.pkgs","org.jboss.naming rg.jnp.interfaces");
enviornment.setProperty(Context.SECURITY_PRINCIPAL, "admin");
enviornment.setProperty(Context.SECURITY_CREDENTIALS, "admin");
InitialContext initialContext = new InitialContext(enviornment);
connection = (MBeanServerConnection) initialContext.lookup("jmx/rmi/RMIAdaptor");
System.out.print(connection.toString());
}
public static void monitorJMS() throws Exception
{
ObjectName objectName=new ObjectName("jboss.messaging.destination:name=DLQ,service=Queue");
System.out.println("Queue = "+ (String)connection.getAttribute(new ObjectName("jboss.messaging.destination:name=DLQ,service=Queue"), new String("Name")));
}
public static void main(String[] args) throws Exception
{
process();
}
public static void process() {
try {
connectJNDI();
monitorJMS();
}catch (Exception e) {
e.printStackTrace();
}
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759101#759101]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months