[JBoss Seam] - SeamTest & Form based authentication
by eiswind
I try to write a SeamTest. Our application uses container authentication via Form based login. The tested bean accesses the logged in Principal via
FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal().getName();
So the test needs to login anyhow. Following is what I found through googling:
UsernamePasswordHandler handler = null;
| handler = new UsernamePasswordHandler("JU_benutzer1", "JU_benutzer1#");
| System.setProperty("java.security.auth.login.config", "I:/work/asd/asd-biz/classes/test/jaas.config");
| try {
| LoginContext lc = new LoginContext("example", handler);
| lc.login();
|
| }
with jaas.config looks like
example { org.jboss.security.ClientLoginModule required;};
but the principal I get from the FacesContext is always named "gavin". The CallBackHandler is invoked and gives my correct identification. What can I do to get the principal right ? Any ideas ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005353#4005353
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005353
19 years, 3 months
[JBoss jBPM] - Re: removeTaskInstance doesn't work!
by MindTheGap2
Yep
| Hibernate: select processdef0_.ID_ ...
| Hibernate: insert into JBPM_TOKEN ...
| Hibernate: insert into JBPM_PROCESSINSTANCE ...
| Hibernate: select definition0_.PROCESSDEFINITION_ ...
| Hibernate: select events0_.PROCESSDEFINITION_ ...
| Hibernate: select startstate0_.ID_ ...
| Hibernate: select leavingtra0_.FROM_ ...
| Hibernate: select events0_.NODE_ ...
| Hibernate: select events0_.TRANSITION_ ...
| Hibernate: select node0_.ID_ ...
| Hibernate: select events0_.NODE_ ...
| Hibernate: select tasks0_.TASKNODE_ ...
| Hibernate: insert into JBPM_TASKINSTANCE ...
| Hibernate: select events0_.TASK_ ...
| Hibernate: select leavingtra0_.FROM_ ...
| Hibernate: select events0_.TRANSITION_ ...
| Hibernate: select node0_.ID_ ...
| Hibernate: select events0_.NODE_ ...
| Hibernate: select tasks0_.TASKNODE_ ...
| Hibernate: insert into JBPM_TASKINSTANCE ...
| Hibernate: select events0_.TASK_ ...
| Hibernate: insert into JBPM_MODULEINSTANCE ...
| Hibernate: insert into JBPM_MODULEINSTANCE ...
| Hibernate: update JBPM_TOKEN ...
| Hibernate: update JBPM_PROCESSINSTANCE ...
| Hibernate: update JBPM_TASKINSTANCE ...
| Hibernate: update JBPM_TASKINSTANCE ...
| Hibernate: update JBPM_MODULEINSTANCE ...
| Hibernate: update JBPM_MODULEINSTANCE ...
| Hibernate: select taskinstan0_.ID_ ...
|
Strange...isnt it?
Thanks
RQ_
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005352#4005352
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005352
19 years, 3 months
[Beginners Corner] - java.io.StreamCorruptedException: invalid stream header
by nimrodr
After Jboss was running for several days, we received the following errors several times.
The errors appeared for about 2 minutes and then stopped. After that it seems that all MDB handling was stopped.
There are several variants of the stack trace, I listed an example of each one.
We are using Jboss 3.2.8 SP1 on Linux
00:28:18,448 ERROR [ServerThread] Failed to initialize
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:753)
at java.io.ObjectInputStream.(ObjectInputStream.java:268)
at org.jboss.invocation.pooled.interfaces.OptimizedObjectInputStream.(OptimizedObjectInputStream.java:119)
at org.jboss.invocation.pooled.server.ServerThread.dorun(ServerThread.java:258)
at org.jboss.invocation.pooled.server.ServerThread.run(ServerThread.java:152)
00:28:33,460 ERROR [ServerThread] Failed to initialize
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
at java.io.ObjectInputStream.(ObjectInputStream.java:268)
at org.jboss.invocation.pooled.interfaces.OptimizedObjectInputStream.(OptimizedObjectInputStream.java:119)
at org.jboss.invocation.pooled.server.ServerThread.dorun(ServerThread.java:258)
at org.jboss.invocation.pooled.server.ServerThread.run(ServerThread.java:152)
00:30:08,093 ERROR [ServerThread] Failed to initialize
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2217)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2230)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
at java.io.ObjectInputStream.(ObjectInputStream.java:268)
at org.jboss.invocation.pooled.interfaces.OptimizedObjectInputStream.(OptimizedObjectInputStream.java:119)
at org.jboss.invocation.pooled.server.ServerThread.dorun(ServerThread.java:258)
at org.jboss.invocation.pooled.server.ServerThread.run(ServerThread.java:152)
00:30:29,108 ERROR [ServerThread] Failed to initialize
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
at java.io.ObjectInputStream.(ObjectInputStream.java:268)
at org.jboss.invocation.pooled.interfaces.OptimizedObjectInputStream.(OptimizedObjectInputStream.java:119)
at org.jboss.invocation.pooled.server.ServerThread.dorun(ServerThread.java:258)
at org.jboss.invocation.pooled.server.ServerThread.run(ServerThread.java:152)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005345#4005345
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005345
19 years, 3 months