[JBoss Seam] - Weird injection issue
by lcoetzee
Hi,
I have been having trouble with regard to a very weird injection issue, where some elements are injected, while others are not (this happening while the conversation has ended (I think ;-))). I will try and explain:
I have an entity bean:
@Entity
| @Name("grouping")
| @Table(name = "grouping")
| public class Grouping {...
This gets outjected in one of my beans (but using a different name):
@Out(required = false , scope = ScopeType.CONVERSATION)
| private Grouping selectedGroupingForView;
|
selectedGroupingForView is visible in the conversation context through the debug.jsf page.
In another bean (contentManagementBean) I inject selectedGroupingForView.
@In(required = true,value="selectedGroupingForView")
| @Out(required=true)
| private Grouping selectedGroupingForView;
|
During normal usage this works as expected, with the selectedGroupingForView outjected and then injected and used (I have a page "viewContent" from where a s:link action can be invoked on contentManagementBean (<s:link action="#{contentManagementBean.createContent}" ... ) ).
However, when some time is allowed to pass before invoking the link the contentManagementBean is created with things started to be injected (ideally it should have thrown me out saying that a valid conversation is required). Quite a few things are injected, but I always get an exception saying that selectedGroupingForView is required). Looking in the log file I see the following:
[org.jboss.seam.Component] trying to inject with hierarchical context search: content
| [org.jboss.seam.contexts.Contexts] found in conversation context: content
|
| [org.jboss.seam.Component] trying to inject with hierarchical context search: selectedGroupingForView, but note that it has not found it, while it did inject other elements.
Subsequently I get the following exception:
ERROR [org.jboss.seam.interceptors.ExceptionInterceptor] redirecting to debug page
| org.jboss.seam.RequiredException: In attribute requires value for component: contentManagementBean.selectedGroupingForView
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1844)
| at org.jboss.seam.Component.injectFields(Component.java:1317)
| at org.jboss.seam.Component.inject(Component.java:1087)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.GeneratedMethodAccessor1234.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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
| at sun.reflect.GeneratedMethodAccessor1202.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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| at sun.reflect.GeneratedMethodAccessor1201.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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
| at sun.reflect.GeneratedMethodAccessor1200.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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 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:49)
| at sun.reflect.GeneratedMethodAccessor1261.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:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:101)
| 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.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| 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 $Proxy415.createContent(Unknown Source)
| at csir.content.management.seam.ContentManagement$$FastClassByCGLIB$$d3cf354d.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| at sun.reflect.GeneratedMethodAccessor1370.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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| at sun.reflect.GeneratedMethodAccessor1199.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:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 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:78)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$ed38f46c.createContent(<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.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:59)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:71)
| at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:95)
| at org.jboss.seam.core.Pages.callAction(Pages.java:366)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.callPageActions(AbstractSeamPhaseListener.java:252)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:201)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:51)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
| 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.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
| 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:32)
| 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.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| 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)
This has been giving me quite a tough time, so any suggestions are welcome.
Thanks
Louis
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987546#3987546
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987546
19Â years, 5Â months
[EJB/JBoss] - ConnectException on IP Address no longer in use
by damo9f
If you get an error like this when you try to connect to the JBoss server:
| javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 10.10.34.77; nested exception is:
| java.net.ConnectException: Connection timed out: connect]
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
|
and the address (in this case 10.10.34.77) listed is no longer in use it is because the server remembers its startup address and hands it back to the client on the initial port (usually 1099). Unfortunately it is difficult to distinguish this connect error from one where the server is genuinely un-reachable.
This occurs on our development machines and stand-alone laptop deployments when someone starts up the server while wireless networking is connected and then disconnects wireless on the server machine. The client sucessfully finds the server using the jndi.properties url, but then the server hands back an old, stale address on the wireless subnet.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987545#3987545
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987545
19Â years, 5Â months
[JBossWS] - Standlone Client access jbossws over ssl
by atquake
As I know, I can set Standlone Client System Properties to enable ssl accessing:
| System.setProperty("javax.net.ssl.trustStore", sslstore);
| System.setProperty("javax.net.ssl.trustStorePassword", pass);
|
However, if the client need to use two different ssl connections, this will cause the problem. I just wonder whether there is an alternative way to create a web service over ssl. I saw there is a method in org.jboss.ws.jaxrpc.ServiceFactoryImpl as following:
| /**
| * Create a <code>Service</code> instance.
| *
| * @param wsdlURL URL for the WSDL document location
| * @param serviceName QName for the service.
| * @param mappingURL URL for the jaxrpc-mapping.xml document location
| * @param securityURL URL for the jboss-ws-security.xml file
| * @return Service.
| * @throws ServiceException If any error in creation of the specified service
| */
| public Service createService(URL wsdlURL, QName serviceName, URL mappingURL, URL securityURL) throws ServiceException
I guess maybe this is the solution but I have no idea about jboss-ws-security.xml. Can anybody help me?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987543#3987543
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987543
19Â years, 5Â months
[JBoss jBPM] - Defining an Alias
by psilva
I'm integrating jBPM in an existing software and I've reached a point where there is the need to create an alias in a process definition.
What happens is that, due to the necessity of maintaining the compatibility between the old code, I need to give the old code a way to know that a given state has more than on name.
The solution that I'm thinking of is to use a tag of the process definition to do this. For exemple use a false action or false script where the name will be the alias. Another possibility would be the tags content to do this but definition doesn't clearly states if content may be added to any tag. I think not.
I'm wondering if someone has already addressed this problem, and if there is a better way of doing this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987542#3987542
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987542
19Â years, 5Â months