[Security & JAAS/JBoss] - How to find out the problem when login doesn't work when usi
by Kentzhou
hi, I try to config Jboss using sql server as security datasource. The datasource is okay when I test it.
The file jboss-web.xml in war file as:
<jboss-web>
<security-domain>java:/jaas/todo</security-domain>
</jboss-web>
In file login-config.xml, I add following info:
<application-policy name = "todo">
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required" >
<module-option name = "dsJndiName" >java:/MSSQLDS</module-option>
<module-option name = "principalQuery" >select passwd from users where login = ? </module-option>
<module-option name = "rolesQuery" >select role, 'Roles' from user_roles where login = ? </module-option>
</login-module>
</application-policy>
The I start Jboss and visit the application todo, every time, it reminds me input login id and password. But when I input the login id and password get from database, It can pass the logn. The application asks for login Id and password again and again. But there is no any error message.
How can I find out the reason for this issue?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996351#3996351
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996351
19 years, 4 months
[JBoss jBPM] - Implementing AssignmentHandler
by dslevine
I'm just starting to try and implement my own AssignmentHandler. Simple question on the existing implementation, ExpressionAssignmentHandler.
The code is:
| public class ExpressionAssignmentHandler implements AssignmentHandler {
|
| private static final long serialVersionUID = 1L;
|
| protected String expression;
| protected ExecutionContext executionContext = null;
| protected ExpressionSession expressionSession = null;
| protected TermTokenizer tokenizer;
| protected Entity entity = null;
|
| public void assign(Assignable assignable, ExecutionContext executionContext) {
|
| try {
| expressionSession = getExpressionSession();
| if (expressionSession==null) {
| throw new NullPointerException("getIdentitySession returned null");
| }
| this.tokenizer = new TermTokenizer(expression); // My Comment: how is expression set by here??
|
How does expression get set in this class?
The code in getExpressionSession() doesnt set it:
| /**
| * serves as a hook for customizing the way the identity session is retrieved.
| * overload this method to reuse this expression assignment handler for your
| * user data store.
| */
| protected ExpressionSession getExpressionSession() {
| JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
| if (jbpmContext==null) {
| throw new RuntimeException("no active JbpmContext for resolving assignment expression'"+expression+"'");
| }
| return new IdentitySession(jbpmContext.getSession());
| }
|
...so what does? I'm sure I'm missing something simple, thanks!
PS: I need to implement AssignmentHandler from scratch and not extend ExpressionAssignmentHandler even though I am going to stay with expressions because I dont want to use jbpm User objects as I have my own User objects already.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996349#3996349
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996349
19 years, 4 months
[JBoss Eclipse IDE (users)] - Help! Eclipse IDE Tutorial!
by xinhua
hi, all
i followed the Tutorial doc 1.5 in detail but got failure
javax.servlet.ServletException: Lookup of java:comp/env/ejb/Fibo faild
| at tutorial.web.ComputeServlet.init(ComputeServlet.java:58)
| at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
| at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:13
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:17
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociation
| va:175)
Here is my environment:
jdk1.5.0_10
Eclipse3.2
IDE2.0.0 Beta2
JBoss 4.0.5GA
I didnot creat FiboEJB-client.jar and it must not be the problem of duplicated interfaces in war and jar. And i have also tried with
java:env/ejb/Fibo and ejb/Fibo
But still failed.
Can anyone help me?
thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996348#3996348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996348
19 years, 4 months