[JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe
by tynor
I dont know how i missed this the first time, but in fact, there was also a Facelets exception complaining about class loading.
2007-08-01 17:24:11,602 ERROR [STDERR] java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.security.SecurityFunctions
| 2007-08-01 17:24:11,602 ERROR [STDERR] at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| 2007-08-01 17:24:11,602 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:514)
| 2007-08-01 17:24:11,602 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
| 2007-08-01 17:24:11,602 ERROR [STDERR] at
| ...
This is in fact almost identical symptoms to those described (and as far as I can tell never solved) at: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056730 (i.e., the security functions work some times, and fail after a submit - in my case, continue to work after some submits, but seem to fail when a Validator fails)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069823#4069823
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069823
17Â years, 3Â months
[JBoss Portal] - Re: Calling JAAS
by gersonjohan
I treated to login using a LoginContext as the following:
|
| String username = request.getParameter("username");
| String password = request.getParameter("password");
|
| boolean loginOk = false;
|
| if (username != null && password != null){
|
| LoginContext lc = null;
|
| try {
| ClienteCallbackHandler handler = new ClienteCallbackHandler(username, password.toCharArray());
| lc = new LoginContext("portal", handler);
| lc.login();
| loginOk = true;
| } catch (LoginException e) {
| logger.error("Login incorrecto.", e);
| }
| }
|
I create my callback and everything works without errors, but the portal continues sending to the login page when it is tried to accede to a safe context.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069821#4069821
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069821
17Â years, 3Â months
[JBoss Tools (users)] - Disable the internal browser in the nightly tools?
by andrew.rw.robinson
I keep having Eclipse continuously crash on me. There seems to be some kind of conflict between the code completion using the browser and the jboss tools using the browser.
If I open an XHTML file, I can no longer use the code completion (crashes eclipse in the XUL shared library).
If I open a Java file and use the code completion, trying to open an XHTML file causes eclipse to crash.
Trying to open the code completion inside of an XHTML file seems to crash eclipse when it closes.
All these problems seem to stem from the visual and preview support from the red hat web page editor from the jboss tools. I only edit these files in source mode, so I wouldn't mind permanently disabling these features if it stops eclipse from crashing.
Any ideas?
Environment:
eclipse 3.3 using GTK version on linux
JBossTools-200707210217-nightly-ALL-linux-gtk.zip
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069819#4069819
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069819
17Â years, 3Â months
[Security & JAAS/JBoss] - strange behavior in getting caller principal in ejb
by jainsau
Sorry for the long post, but I have tried to explain the problem in detail.
We are facing strange issues in getting the caller principal in our EJBs. Here is the envt we have:
We are using JBoss 4.2.0 GA. We are not using JAAS for authentication. A custom service is validating the credentials and returns a custom principal. The custom principal and password are set on the initial context:
credentials.put(Context.SECURITY_PRINCIPAL, customPrincipalInstance);
credentials.put(Context.SECURITY_CREDENTIALS, "dummy");
context = new InitialContext(credentials);
along with other usual details.
This context is used to lookup the remote proxy in the client. So the invoked bean should now have the sessionContext populated with the customPrincipalInstance.
We also have an EJB interceptor that intercepts any ejb method invocation. If the principal available in the interceptor is not an instance of our CustomPrincipal it throws an exception.
We have the following invocation steps (along with interceptors) which we are testing:
client->interceptor->EJB1->interceptor->EJB2.
Now when I start JBoss app server and access the client, the above steps should be undertaken. I am able to get the correct caller principal in EJB2 (EJB2 is injected into EJB1 using @EJB annotation) only at the third attempt. Here's what happens in each attempt:
First Attempt: Client passes customPrincipalInstance. In interceptor, the callerPrincipal returned by sessionConext is customPrincipalInstance. But, in EJB1, the callerPrincipal returned by sessionContext is SimplePrincipal (unauthenticated). So, when EJB1 invokes EJB2, the second interceptor fails, as the principal now in the context is SimplePrincipal.
Second Attempt: Client passes customPrincipalInstance. In interceptor, the callerPrincipal is customPrincipalInstance. This time in EJB1 also, the callerPrincipal is customPrincipalInstance. When EJB1 invokes EJB2, the second interceptor gets customPrincipalInstance. So EJB 2 gets invoked, but when I print the caller principal here, the value is SimplePrincipal (unauthenticated).
Third Attempt: Now everything works fine. Both the EJBs and the interceptors get customPrincipalInstance. No errors anywhere.
All further attempts also work fine.
I dont know why the first two invocations give error. I certainly cannot tell the client to login 3 times to get the app to work :). What could be the issue?
I checked the JBoss code, and found that threadPrincipal.get() in SecurityAssociation.getCallerPrincipal() returns the principal. But cannot understand why it doesnt work in first two attempts but works later.
Any help/input is appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069816#4069816
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069816
17Â years, 3Â months