[JBoss Seam] - Re: Advice on Security System
by mikepkp17
ok, I figured out that the classcast exception is thrown if I add the <distributable/> tag to web.xml, this exception is also thrown in the seamspace example if I add this tag (also after I annotate the SFSBs with @Clustered).
So this is another problem I will focus on later...
But I noticed that org.jboss.seam.security.Identity is checking the principals against SimplePrincipal and SimpleGroup and not against the Interfaces.
So I get
| callbacks [org.jboss.seam.intercept.JavaBeanInterceptor@17f7411]
| class class org.jboss.seam.security.Identity$$EnhancerByCGLIB$$ae5bb089
| loggedIn false
| principal
| subject Betreff: Principal: mike Principal: roles(members:sysadmin,admin)
| toString() org.jboss.seam.security.Identity@1030eda
|
Note that the principal is empty and loggedIn is therefore false.
I tried to change the methods getPrincipal() and isUserInRole(String role) in Identity.java to check against the Interfaces Group and Principal (instead of SimpleGroup and SimplePrincipal) which resulted in the following Exception in SeamSpace after clicking the login button:
javax.ejb.EJBException: javax.persistence.NoResultException: No entity found for query
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.remoting.ReplicantsManagerInterceptor.invoke(ReplicantsManagerInterceptor.java:51)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy171.display(Unknown Source)
| at org.jboss.seam.example.seamspace.ProfileLocal$$FastClassByCGLIB$$c6d6fe9b.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:89)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
| at sun.reflect.GeneratedMethodAccessor217.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:39)
| at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:83)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
| at org.jboss.seam.example.seamspace.ProfileLocal$$EnhancerByCGLIB$$81a54d4c.display(<generated>)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:203)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1797)
| at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1684)
| at org.jboss.seam.Component.getInstance(Component.java:1621)
| at org.jboss.seam.Component.getInstance(Component.java:1598)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:105)
| at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.parser.AstEqual.getValue(AstEqual.java:41)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:241)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:91)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.security.filter.SeamSecurityFilter.doFilter(SeamSecurityFilter.java:68)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:63)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.persistence.NoResultException: No entity found for query
| at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:82)
| at org.jboss.seam.example.seamspace.ProfileAction.display(ProfileAction.java:44)
| at sun.reflect.GeneratedMethodAccessor228.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.cache.StatefulReplicationInterceptor.invoke(StatefulReplicationInterceptor.java:45)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:73)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:79)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
| at sun.reflect.GeneratedMethodAccessor215.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
| at sun.reflect.GeneratedMethodAccessor180.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
| at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:35)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:337)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| ... 95 more
|
The Changed Methods:
| public Principal getPrincipal()
| {
| if (principal == null)
| {
| Set<Principal> principals = subject.getPrincipals(Principal.class);
| if (!principals.isEmpty())
| principal = principals.iterator().next();
| }
|
| return principal;
| }
|
| public boolean isUserInRole(String role)
| {
| for (Group sg : subject.getPrincipals(Group.class))
| {
| if ("roles".equals(sg.getName()))
| {
| return sg.isMember(new SimplePrincipal(role));
| }
| }
|
| return false;
| }
|
This changes work with the original Jboss DatabaseLoginModule but the SeamSpace example has some problems with it...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003314#4003314
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003314
19 years, 3 months
[JBoss AOP] - Re: Inteception on field inherited through generic superclas
by dunks80
Kabir,
I just downloaded AOP 1.5.3 and I'm still seeing the same behavior on my test case...here is the verbose output when running the testcase
| [debug] Passed in instrumentor: null
| [debug] Defaulting instrumentor to: org.jboss.aop.instrument.ClassicInstrumentor
| [debug] jboss.aop.class.path: /workspace/aop-problem/src/java
| [debug] Looking for aspects in: testcase.ZImpl
| [debug] Looking for aspects in: testcase.B
| [debug] Looking for aspects in: testcase.MyFieldAnnotation
| [debug] Looking for aspects in: testcase.A
| [debug] Looking for aspects in: testcase.Main
| [debug] Looking for aspects in: testcase.MyFieldInterceptor
| [debug] Found @InterceptorDef in: testcase.MyFieldInterceptor
| [debug] Looking for aspects in: testcase.C
| [debug] Looking for aspects in: testcase.Z
| [debug] jboss.aop.search.classpath: 'null' true
| [debug] jboss.aop.path: null
| [trying to transform] testcase.Main
| [debug] There are no caller pointcuts!
| [debug] javassist.CtMethod@44a4fe33[public static main ([Ljava/lang/String;)V] matches no pointcuts
| [debug] javassist.CtConstructor@366025e7[public Main ()V] matches no pointcuts
| [debug] javassist.CtConstructor@28d08633[public C ()V] matches no pointcuts
| [debug] javassist.CtConstructor@6037fb1e[public B ()V] matches no pointcuts
| [debug] testcase.A.myField:Ljava/lang/String; matches pointcut: get(* *->@testcase.MyFieldAnnotation)
| [debug] testcase.A.myField:Ljava/lang/String; matches no pointcuts
| [debug] javassist.CtConstructor@6686fe26[public A ()V] matches no pointcuts
| [debug] was testcase.Main converted: true
| [trying to transform] testcase.C
| [debug] There are no caller pointcuts!
| [debug] javassist.CtMethod@69cb6c6d[public toString ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtConstructor@41fc2fb[public C ()V] matches no pointcuts
| [debug] was testcase.C converted: false
| [trying to transform] testcase.B
| [debug] There are no caller pointcuts!
| [debug] javassist.CtConstructor@42704baa[public B ()V] matches no pointcuts
| [debug] testcase.A.myField:Ljava/lang/String; matches pointcut: get(* *->@testcase.MyFieldAnnotation)
| [debug] testcase.A.myField:Ljava/lang/String; matches no pointcuts
| [debug] was testcase.B converted: true
| [trying to transform] testcase.A
| [debug] There are no caller pointcuts!
| [debug] javassist.CtConstructor@65b4fad5[public A ()V] matches no pointcuts
| [debug] testcase.A.myField:Ljava/lang/String; matches pointcut: get(* *->@testcase.MyFieldAnnotation)
| [debug] testcase.A.myField:Ljava/lang/String; matches no pointcuts
| [debug] was testcase.A converted: true
| iterate binding testcase.MyFieldInterceptor
| field matched binding testcase.MyFieldInterceptor
| [debug] added advisor: testcase.A from binding: testcase.MyFieldInterceptor
| Using context classloader sun.misc.Launcher$AppClassLoader@64601bb1 to load aspect testcase.MyFieldInterceptor
| [trying to transform] testcase.MyFieldInterceptor
| [debug] There are no caller pointcuts!
| [debug] javassist.CtMethod@26562bc2[public getName ()Ljava/lang/String;] matches no pointcuts
| [debug] javassist.CtMethod@2ff3c113[public invoke (Lorg/jboss/aop/joinpoint/Invocation;)Ljava/lang/Object;] matches no pointcuts
| [debug] javassist.CtConstructor@2c76e369[public MyFieldInterceptor ()V] matches no pointcuts
| [debug] was testcase.MyFieldInterceptor converted: false
| null
|
were you able to get the test case i sent you to run correctly (with the duplicated myField inherited variable in class B commented out)?
Upon further investigation it seems that the interceptor is invoked on the inherited field as long as the field is not called from within the subclass itself...what I mean is that in subclass C I have a toString method that returns the inherited A.myField value....
| public class C extends B<ZImpl>
| {
| public String toString()
| {
| return myField;
| }
| }
|
If the inherited field is not duplicated in class B and I call C.toString the interceptor is not run on the inherited A.myField...however...if within the main class i directly call C.myField like this..
|
| public class Main
| {
| /**
| * @author gdunkle
| * @param args
| * TODO Implement auto-generated method stub
| */
| public static void main(String[] args)
| {
| C cInstance=new C();
| System.out.println(cInstance.toString());
| System.out.println(cInstance.myField);
| }
| }
|
the interceptor is run. I just reran the test case with the 1.5.2 release and the second print line in Main did not invoke the interceptor so it looks like that part of the issue was indeed solved by 1.5.3.
So I guess my new issue is that the interceptors are not being called on fields inherited through the superclass from inside the subclass itself. Should this be expected behavior? Could you please comment?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003309#4003309
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003309
19 years, 3 months
[JBoss jBPM] - Re: Howto get the running processID before it's persisted to
by estaub
Bertrand,
As you probably know, folks usually use the database for key generation because it avoids any possible contention across multiple threads, multiple classloaders (if a singleton is used to address thread synchronization), and multiple servers (if clustering). So...
It sounds like you won't get what you're asking for, so maybe back up: why do you need the process ID at that point in time? Maybe there's a different way to do it?
Another possibility, which I hesitate to mention, is that you might somehow coerce jBPM+Hibernate to write a "stub" process instance early, with just the id and little else, and fill in the rest later. I have no idea what the ripple from this would be - it seems quite dangerous, and would probably require a lot of code reconciling whenever you want to adopt a new version of jBPM.
(I'm a newbie - I may not know what I'm talking about!)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003308#4003308
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003308
19 years, 3 months
[Installation, Configuration & Deployment] - org.jboss.portal.portlet.container.PortletInitializationExce
by hussain_rangwala
hi,
Thanks in advance for replying.......
i am trying to deploy a struts application as a portlet on jboss portal 2.4.0.GA.
However the application gets deployed successfully and i see the portal-page when i access http://localhost:8080/portal.
However when i click on the portal page It gives an error
Cannot Render
"Object not found SETLInstanceName".
| 2007-01-16 16:35:32,434 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=portal:container=Portlet,id=SETLAppName.SETLPortletName state=Create
| org.jboss.portal.portlet.container.PortletInitializationException: The portlet SETLPortletName threw a runtime exception during init
| at org.jboss.portal.portlet.container.PortletContainer.start(PortletContainer.java:287)
| at org.jboss.portal.portlet.container.PortletContainerAdapter.start(PortletContainerAdapter.java:74)
| at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:72)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:92)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:452)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:147)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:74)
| at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:232)
| at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:79)
| at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfo$DeploymentContext.start(PortalDeploymentInfo.java:211)
| at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:242)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
|
|
below are the deployment descriptors:
1.jboss-app.xml
| <jboss-app>
| <app-name>SETLAppName</app-name>
| </jboss-app>
|
2.jboss-portlet.xml
| <portlet-app>
|
| <portlet>
| <portlet-name>SETLPortletName</portlet-name>
| <!-- Use the specific struts container configuration -->
| <config-name>StrutsPortlet</config-name>
| </portlet>
| </portlet-app>
|
|
3. portlet.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <portlet-app id="SETLAppName" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| version="1.0">
|
| <portlet id="SETLPortletName">
| <init-param>
| <name>ServletContextProvider</name>
| <value>org.jboss.portal.bridge.JBossServletContextProvider</value>
| </init-param>
| <init-param>
| <name>ViewPage</name>
| <value>/Login.do</value>
| </init-param>
| <init-param>
| <name>HelpPage</name>
| <value>/signIn.do</value>
| </init-param>
| <portlet-name>SETLPortletName</portlet-name>
| <display-name>SETL Display Name</display-name>
| <description>This is the SETLBAAAAAANK</description>
| <portlet-class>org.apache.portals.bridges.struts.StrutsPortlet</portlet-class>
| <expiration-cache>-1</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>HELP</portlet-mode>
| </supports>
| <portlet-info>
| <title>SETL Bank Demo</title>
| <short-title>This is the short title</short-title>
| <keywords>SETL</keywords>
| </portlet-info>
| </portlet>
| </portlet-app>
|
|
4.portlet-instances.xml
| <?xml version="1.0" standalone="yes"?>
|
| <instances>
| <instance>
| <instance-name>SETLInstanceName</instance-name>
| <component-ref>SETLPortletName</component-ref>
| </instance>
| </instances>
|
|
5.SETLAppName-object.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <deployments>
| <deployment>
| <if-exists>overwrite</if-exists>
| <parent-ref>default</parent-ref>
| <page>
| <page-name>SETLAppName</page-name>
| <window>
| <window-name>SETLWindowName</window-name>
| <instance-ref>SETLInstanceName</instance-ref>
| <region>center</region>
| <height>1</height>
| </window>
| </page>
| </deployment>
|
| </deployments>
|
6.SETLAppName-pages.xml
| <pages>
| <portal-name>default</portal-name>
| <page>
| <page-name>SETLStruts</page-name>
| <window>
| <window-name>SETLBankWindowName</window-name>
| <instance-ref>/SETLAppName.SETLPortletName.SETLInstanceName</instance-ref>
| <region>center</region>
| <height>0</height>
| </window>
| </page>
| </pages>
|
Any ideas and suggestions will be appreciated
Thanks
Hussain
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003306#4003306
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003306
19 years, 3 months
[JBoss jBPM] - IdentitySession commit exception
by JimKnopf
New Day, new Problem.
Hi again.
I want du add Users to my JBPM-Engine ...
at the beginning it works fine but now, i have a problem i don't realy understand.
At first the code that works fine:
| IdentitySession identitySession = new IdentitySession( this.getCurrentSession() );
| for (int i = 0; i < entities.length; i++) {
| identitySession.saveEntity( entities );
| }
| this.newTransaction();
|
And now the code witch produce a Exception:
| for (int i = 0; i < entities.length; i++) {
| System.err.println("-----------> ... "+ this.getCurrentSession());
| IdentitySession identitySession = new IdentitySession( this.getCurrentSession() );
| identitySession.saveEntity( entities );
| this.newTransaction();
| }
|
The Exception:
| Checking 28 named HQL queries
| Checking 0 named SQL queries
| -----------> ... SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
| -----------> ... SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
| org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:172)
| at org.jbpm.svc.Services.close(Services.java:211)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at medisite.arcaVia.service.ArcaViaController.closeJbpmContext(ArcaViaController.java:559)
| at medisite.arcaVia.service.ArcaViaController.commitAndCloseSession(ArcaViaController.java:377)
| at medisite.arcaVia.service.ArcaViaController.newTransaction(ArcaViaController.java:387)
|
The other methods i called in this block:
| private Session getCurrentSession(){
| return this.getCurrentJbpmContext().getSession();
| }
|
| private synchronized void newTransaction() {
| try {
| commitAndCloseSession();
| beginSessionTransaction();
| } catch (Throwable t) {
| throw new RuntimeException(
| "couldn't commit and start new transaction", t);
| }
| }
|
| public synchronized void commitAndCloseSession() {
| this.closeJbpmContext();
| }
|
| private void closeJbpmContext() {
| if( this.getCurrentJbpmContext() != null ){
| this.getCurrentJbpmContext().close();
| }
| }
|
| public JbpmContext getCurrentJbpmContext(){
| return this.getJbpmConfiguration().getCurrentJbpmContext();
| }
|
| private JbpmConfiguration getJbpmConfiguration() {
| return jbpmConfiguration;
| }
|
| public synchronized void beginSessionTransaction() {
| if( this.getCurrentJbpmContext() == null ){
| createJbpmContext();
| }
| }
|
| private void createJbpmContext() {
| getJbpmConfiguration().createJbpmContext();
| }
|
| private static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
|
The reason i wan't to make a commit after every User is,
that i want to have a method to add Users like this:
| private void addEntity( Entity e ){
| if( e == null )
| return;
|
| if( this.getCurrentJbpmContext() == null )
| this.beginSessionTransaction();
|
| IdentitySession identitySession = this.getIdentitySession();
| identitySession.saveEntity( e );
|
| this.newTransaction();
| }
|
Any body an idea why i get the exception?
Thank for ur help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003305#4003305
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003305
19 years, 3 months
[JBossCache] - Re: Buddy replication behavior
by manik.surtani@jboss.com
Correct, this is what is expected.
You need to
1) enable gravitation explicitly if you want to pull data out of a potential backup scenario (this is necessary as a separate option to prevent calls trying to gravitate data for data that does not exist. E.g., If I try
| String[] s = {"/one", "/two", "/three", "/four", "/five",
| "/six", "/seven", "/eight", "/nine", "/ten"};
|
| for (String fqn : s) cache[1].get(fqn);
|
I don't want expensive network calls (esp. if the cluster is big) to go out when looking for nodes four to ten.
This is why when you know about a view-change event (perhaps by using a listener) you can execute gravitate calls.
2) Gravitation should not happen automatically - only when a gravitation call occurs, and even then, only for the node being called. This is to prevent a "network storm" when a node dies. Let's assume each node has 1GB of data. If a node dies, I don't want 1GB of network traffic of data being gravitated, since this may then kill other nodes or cause the network to be unresponsive.
This is why this happens lazily, when a node is requested.
Hope this helps,
Manik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003302#4003302
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003302
19 years, 3 months