[JBoss jBPM] - solved - Re: Dynamic task creation
by massimiliano_cuccia
Scull, I doesn't understood. But now It works.
At the end of all my attempts I resolved. Continue reading to know all the story.. Hope this will help someone.
I moved The action that creates all the dynamic tasks to the node-enter of the task to "clone" (if you followed the example in the previous post, the task in tCompDoc)
This is the code of dynamic creation:
| Token token = executionContext.getToken();
| TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
| TaskNode taskNode = (TaskNode) executionContext.getNode();
| Task task = taskNode.getTask("task compilazione");
| TaskInstance taskInstance = tmi.createTaskInstance(task, executionContext);
| taskInstance.setActorId(user);
|
But the important part of this is the execution point. Remembar "node-enter of the cloning task". Elsewhere will cause errors and token scramble.
In my sample I need a task to close every dynamic task created early, still not ended, I put this code to the node-leave of chiusura-interpello.
This is the relevant part of code:
| if (!ti.hasEnded())
| ti.cancel();
|
thanks to every one helped me to achieve this goal
Hoping this will help someone else.
If you have any question, ask.
bye
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147466#4147466
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147466
17 years, 11 months
[JBossWS] - Re: Newbee Q: Returning hashmaps
by mikkus
toString() outputs the contents of the HashMap only if the class generated is actually a HashMap, otherwise it outputs the java class instance name.
Most probably, wsconsume generated a class named HashMap, instead of using java.util.HashMap. This class is not actually a hashmap but a representation of the web service return data. Most probably, you'll need to convert that data to an actual hashmap.
I notice you commented out the cast to java.util.HashMap, probably you got a ClassCastException here? Seeing the class generated by wsconsume and related wsdl would help.
Your web.xml file should not be the problem. It just exposes the webservice, and since you're able to invoke it, it is doing its job.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147462#4147462
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147462
17 years, 11 months
[Remoting] - Re: Encounting
by lanceliao
After the above error, we tried another several times. and we got the following.
1. we tried client side again on another PC, and it gave the following exception:
4360 [main] ERROR org.jboss.remoting.transport.socket.MicroSocketClientInvoker - Error setting up S
ocketClientInvoker[b61fd1, socket://omc:4446]
java.net.UnknownHostException: omc: omc
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.setup(MicroSocketClientInvok
er.java:382)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.(MicroSocketClientInvo
ker.java:245)
at org.jboss.remoting.transport.socket.SocketClientInvoker.(SocketClientInvoker.java:7
2)
at org.jboss.remoting.transport.socket.TransportClientFactory.createClientInvoker(TransportC
lientFactory.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
at org.jboss.remoting.Client.connect(Client.java:459)
at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.init(UnifiedInvokerProxy.java
:97)
at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.readExternal(UnifiedInvokerPr
oxy.java:251)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.util.HashMap.readObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:157)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.datangmobile.oss.platform.jndiresource.client.EJBHomeFactory.lookup(EJBHomeFactory.ja
va:70)
at com.datangmobile.oss.platform.clientmonitor.client.ClientMonitorImp_J2EE.login(ClientMoni
torImp_J2EE.java:43)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.initRouter(OmtStart.java:511)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.main(OmtStart.java:145)
4453 [main] FATAL org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy - Could not initializ
e UnifiedInvokerProxy.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
at org.jboss.remoting.Client.connect(Client.java:459)
at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.init(UnifiedInvokerProxy.java
:97)
at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.readExternal(UnifiedInvokerPr
oxy.java:251)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.util.HashMap.readObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:157)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.datangmobile.oss.platform.jndiresource.client.EJBHomeFactory.lookup(EJBHomeFactory.ja
va:70)
at com.datangmobile.oss.platform.clientmonitor.client.ClientMonitorImp_J2EE.login(ClientMoni
torImp_J2EE.java:43)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.initRouter(OmtStart.java:511)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.main(OmtStart.java:145)
Caused by: java.lang.RuntimeException: omc: omc
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.(MicroSocketClientInvo
ker.java:250)
at org.jboss.remoting.transport.socket.SocketClientInvoker.(SocketClientInvoker.java:7
2)
at org.jboss.remoting.transport.socket.TransportClientFactory.createClientInvoker(TransportC
lientFactory.java:39)
... 45 more
4563 [Finalizer] DEBUG org.jboss.remoting.transport.socket.MicroSocketClientInvoker - SocketClientI
nvoker[b61fd1, socket://omc:4446] disconnecting ...
4578 [Finalizer] DEBUG org.jboss.remoting.transport.socket.MicroSocketClientInvoker - SocketClientI
nvoker[b61fd1, socket://omc:4446] disconnecting ...
4594 [main] DEBUG org.jboss.security.SecurityAssociation - Using ThreadLocal: false
4610 [main] ERROR com.datangmobile.oss.platform.clientmonitor.client.ClientMonitorImp_J2EE - Client
info registry fails
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.create(Unknown Source)
at com.datangmobile.oss.platform.clientmonitor.client.ClientMonitorImp_J2EE.login(ClientMoni
torImp_J2EE.java:45)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.initRouter(OmtStart.java:511)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.main(OmtStart.java:145)
Caused by: java.lang.Exception: Can not make remoting client invocation due to not being connected t
o server.
at org.jboss.remoting.Client.invoke(Client.java:1639)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.ja
va:183)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
... 4 more
com.datangmobile.oss.platform.clientmonitor.common.ClientMonitorException: java.lang.reflect.Undecla
redThrowableException
at com.datangmobile.oss.platform.clientmonitor.client.ClientMonitorImp_J2EE.login(ClientMoni
torImp_J2EE.java:51)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.initRouter(OmtStart.java:511)
at com.datangmobile.oss.omc.omt.appstart.OmtStart.main(OmtStart.java:145)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy0.create(Unknown Source)
at com.datangmobile.oss.platform.clientmonitor.client.ClientMonitorImp_J2EE.login(ClientMoni
torImp_J2EE.java:45)
... 2 more
Caused by: java.lang.Exception: Can not make remoting client invocation due to not being connected t
o server.
at org.jboss.remoting.Client.invoke(Client.java:1639)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.ja
va:183)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
... 4 more
2. If the client side and the Jboss are on the same machine(SunOS sparc), everything is OK. the above error no longer exists.
So, we thought it's something related to ip address that caused the above error. If is ,how to avoid it? What common line should we use to start the jboss?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147460#4147460
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147460
17 years, 11 months
[Security & JAAS/JBoss] - Re: ClientLoginModule and additional state
by bidd
Thank you for the reply and sorry - I didn't quite make myself clear. Using state was not the correct term.
Having read the JAAS tutorial I see that a Subject can have many principals. For instance a username, a social security number etc. Using the ClientLoginModule (from a remote java client) I was hoping that I could add addition principals to my Subject and the additional Principals would be available in the server in my custom login module. This isn't the case.
I think I know why now as in the SecurityClientInterceptor.java JBoss does the following:
public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
| {
| // Get Principal and credentials
| Principal principal = SecurityActions.getPrincipal();
| if (principal != null) invocation.getMetaData().addMetaData("security", "principal", principal);
|
| Object credential = SecurityActions.getCredential();
| if (credential != null) invocation.getMetaData().addMetaData("security", "credential", credential);
|
| return invocation.invokeNext();
| }
|
So it appears that only a Principal and Credential are remoted to the server in the ejb call meta data.
Not that I really know anything about it but I was expecting to see a Subject used rather than a Principal.
I'll investigate using a custom principal.
I can see no way from a remote java client to get information into the options and shared state maps as I understand it, they are purely for purposes of communication between login modules and for configuration options.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147457#4147457
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147457
17 years, 11 months
[JBoss Portal] - Ldap authentication failed with /auth/... url
by kmekme
Hi,
I've set up LDAP configuration for jboss-portal in login-config.xml like this :
| <policy>
| <!-- For the JCR CMS -->
| <application-policy name="cms">
| <authentication>
| <login-module code="org.apache.jackrabbit.core.security.SimpleLoginModule" flag="required"/>
| </authentication>
| </application-policy>
|
| <application-policy name="portal">
| <authentication>
|
| <!-- LDAP -->
| <login-module code="org.jboss.portal.identity.auth.SynchronizingLDAPExtLoginModule" flag="required">
| <module-option name="synchronizeIdentity">true</module-option>
| <module-option name="synchronizeRoles">true</module-option>
| <module-option name="defaultAssignedRole">Medecin</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
| <module-option name="java.naming.provider.url">ldap://cbh71-int:389/</module-option>
| <module-option name="java.naming.security.authentication">simple</module-option>
| <module-option name="bindDN">CN=Manager,dc=mck,dc=com</module-option>
| <module-option name="bindCredential">secret</module-option>
| <module-option name="baseCtxDN">ou=People,dc=mck,dc=com</module-option>
| <module-option name="baseFilter">(uid={0})</module-option>
| <module-option name="rolesCtxDN">ou=People,dc=mck,dc=com</module-option>
| <module-option name="roleFilter">(member={1})</module-option>
| <module-option name="roleAttributeID">cn</module-option>
| <module-option name="roleRecursion">-1</module-option>
| <module-option name="searchTimeLimit">10000</module-option>
| <module-option name="searchScope">SUBTREE_SCOPE</module-option>
| <module-option name="allowEmptyPasswords">false</module-option>
| </login-module>
|
| </authentication>
| </application-policy>
| </policy>
|
|
Ldap authentication is sucessfull.
But when I'm in an page with an URL like ..../AUTH/..... I've an 403 error.
I've no errors in JBoss logs.
If i open a new browser, i'm still logged in.
Is there something I've forgot?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147454#4147454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147454
17 years, 11 months