[JBoss Seam] - Problems with Seam Security
by m.schuetz
I just tried out the example from the seam reference documentation to do a JAAS login via the SeamLoginModule and Identity object. Therefore I left out any declaration of a Security Context (none of my EJBs, components, ... is part of some), initialized the Identity component in components.xml (see code below) and created an appropriate login form (exactly like in the documentation).
components.xml
<security:identity authenticate-method="#{authenticator.seamAuthenticate}"/>
The mentioned authenticator component is a stateless session bean. So when accessing the login page, the following error message occurs.
error message:
15:59:31,017 ERROR [Exceptions] redirecting to debug page
| javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalStateException: No valid security context for the caller identity
|
Did I miss anything ?
Thx in advance !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011957#4011957
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011957
19Â years, 2Â months
[JBoss AOP] - ClassCastException on invocation parameter casting
by pepelu
Hi,
I have a webapp deployed in jboss and successfully deployed an aspect using the default aop deployer, this is the definition:
| <aop>
| <bind pointcut="execution(*core.services.document.DocumentService->*(..))">
| <interceptor class="core.services.aspect.DocumentInterceptor"/>
| </bind>
| </aop>
DocumentInterceptor implements org.jboss.aop.advice.Interceptor and tries to cast one of the parameters to its origin class like this:
DocumentServiceParameters parameter = (DocumentServiceParameters)(((MethodInvocation)invocation).getArguments()[0]);
|
this throws a ClassCastException, but if printed, getClass().getName() shows DocumentParameter as instance class and instanceof returns false if asked:
| 16:10:02,693 INFO [STDOUT] 16:10:02,692 INFO [CertificationService] Fin fullSignatureAndCertificateCheck
| 16:10:02,693 INFO [STDOUT] Instancia de parametros: core.services.document.DocumentServiceParameters@1ad2db5
| 16:10:02,693 INFO [STDOUT] Is DocumentServiceParameters? false
| 16:10:02,694 INFO [STDOUT] 16:10:02,694 ERROR [SendDocWS] Error ejecutando servicio web Document
| java.lang.ClassCastException: core.services.document.DocumentServiceParameters
| at core.services.aspect.DocumentInterceptor.invoke(Unknown Source)
What's wrong here?, I can do reflection to get my DocumentServiceParameters methods invoked, but should be done the right way...
Is this some kind of classloading bug?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011956#4011956
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011956
19Â years, 2Â months
[JBossCache] - Endless loop in JBoss Cache 1.4.1.GA
by msteiner
My application works perfect with 1.4.0.SP1 but not with 1.4.1.GA. I have got node " / a / b"
Everything works fine then I remove (TreeCacheMBean.remove(Fqn root);) then I once again put " / a / b" (TreeCacheMBean.put(Fqn fqn, String key, Object object);) and here problem starts. I have debugged a litle and found problematic place: org.jboss.cache.interceptors.PessimisticLockInterceptor line 170
| (...)
| if (createIfNotExists)
| {
| do
| {
| lock(fqn, ctx.getGlobalTransaction(), lock_type, recursive, zeroLockTimeout ? 0 : lock_timeout, createIfNotExists, storeLockedNode);
| }
| while(!cache.exists(fqn)); // keep trying until we have the lock (fixes concurrent remove())
| // terminates successfully, or with (Timeout)Exception
| }
|
| (...)
|
cache.exists(fqn) always returns false beause node "a" in fqn " / a / b" has been marked for removal (data={__JBOSS_MARKED_FOR_REMOVAL=null})
and org.jboss.cache.Node.getOrCreateChild(..) (line 322) does nothing with this node because it only creates new node if children().get(child_name)==null but this node is not null ! it exists and has __JBOSS_MARKED_FOR_REMOVAL flag.
Why node 'a' is not removed but only marked __JBOSS_MARKED_FOR_REMOVAL?
It is connected with JBCACHE-871 ?
My TransactionManager configuration:
<attribute name="TransactionManagerLookupClass">
| org.jboss.cache.JBossTransactionManagerLookup
| </attribute>
|
| <attribute name="IsolationLevel">NONE</attribute>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011955#4011955
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011955
19Â years, 2Â months
[JBoss Seam] - Re: multiple component instances in one page
by fernando_jmt
You can try defining a new different role for the second DumbUser.
First you need to modify your dumbClass like this (adding a new role):
| @Name("dumbUser")
| @Role(name="dumbUser1")
| public class DumbUser {
|
| private String name;
|
| public DumbUser() {
| }
|
| public String getName() {
| return name;
| }
|
| public void setName(String name) {
| this.name = name;
| }
| }
|
Then your hello world component:
| @Name("helloworld")
| public class Helloworld {
|
| @In("dumbUser")
| private DumbUser dumbUser1;
|
| @In("dumbUser1")
| private DumbUser dumbUser2;
|
| public String sayHello() {
| System.out.println("sayHello: "+ dumbUser1.getName());
| System.out.println("sayHello: "+ dumbUser2.getName());
| return "success";
| }
| }
|
Then the JSF should looks like:
| <h:form>
| <div>
| <h:inputText value="#{dumbUser.name}"></h:inputText>
| <h:inputText value="#{dumbUser1.name}"></h:inputText>
|
| <h:commandButton type="submit" value="sayHello!" action="#{helloworld.sayHello}"/>
| </div>
| </h:form>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011954#4011954
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011954
19Â years, 2Â months
[EJB 3.0] - Annotated MDB not detected/deployed
by lpmon
Symptom: Annotated MDB is not detected (apparently). It is not deployed. No "[EJBContainer] STARTED EJB:" in log for the MDB. The related JMS topic is not created automatically.
more info:
I can place the exact same MDB into another ear and it works. I did this experiment as a debug test. There must be something about this app that is causing the problem but I am not sure where to start. What could cause this?
Both the working and non-working apps are deployed as an ear and have an EJB jar inside it. The EJB jar has both session beans and MDBs. The non-working app also has entity beans (one notable diff). The entity beans and session beans are deployed properly. There are no errors in the log when the app is being deployed.
Ideas???
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011949#4011949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011949
19Â years, 2Â months
[JBoss Seam] - Re: multiple component instances in one page
by soudmaijer
Alright,
this works, but now to another problem. Lets say my simple object looks like this:
| @Name("dumbUser")
| public class DumbUser {
|
| private String name;
|
| public DumbUser() {
| }
|
| public String getName() {
| return name;
| }
|
| public void setName(String name) {
| this.name = name;
| }
| }
|
and my helloworld component looks like this:
| @Name("helloworld")
| public class Helloworld {
|
| @In("dumbUser")
| private DumbUser dumbUser;
|
| public String sayHello() {
| System.out.println("sayHello: "+ dumbUser.getName());
| return "success";
| }
| }
|
my jsf like this:
| <h:form>
| <div>
| <h:inputText value="#{dumbUser.name}"></h:inputText>
|
| <h:commandButton type="submit" value="sayHello!" action="#{helloworld.sayHello}"/>
| </div>
| </h:form>
|
This all works fine, but if I want to add another dumbUser to the Helloworld component, something like this:
| @Name("helloworld")
| public class Helloworld {
|
| @In("dumbUser")
| private DumbUser dumbUser1;
|
| @In("dumbUser")
| private DumbUser dumbUser2;
|
| public String sayHello() {
| System.out.println("sayHello: "+ dumbUser1.getName());
| System.out.println("sayHello: "+ dumbUser2.getName());
| return "success";
| }
| }
Is this possible? How do I access them from the JSF? Something like this?
| <h:form>
| <div>
| <h:inputText value="#{dumbUser1.name}"></h:inputText>
| <h:inputText value="#{dumbUser2.name}"></h:inputText>
|
| <h:commandButton type="submit" value="sayHello!" action="#{helloworld.sayHello}"/>
| </div>
| </h:form>
|
This doesnt work... but i`ve tried many variations... is it possible?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011943#4011943
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011943
19Â years, 2Â months