[JBoss Seam] - How to case seam components in different jars?
by Jump
I've decided to divide my project. So I've putted several components into separate jar, added blank components.xml and faces-config.xml to META-INF and putted that jar into EAR lib folder. I had no problems at deployment time, but at runtime I've got an exception
| SEVERE: Error Rendering View[/task.xhtml]
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: structureBean
| at org.jboss.seam.Component.newInstance(Component.java:1970)
| at org.jboss.seam.Component.getInstance(Component.java:1873)
| at org.jboss.seam.Component.getInstance(Component.java:1840)
| at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
| at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
| at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
| at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
| at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
| at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at javax.faces.component.UIData.getValue(UIData.java:582)
| at org.richfaces.component.UITree.createDataModel(UITree.java:512)
| at org.richfaces.component.UITree.resetDataModel(UITree.java:291)
| at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1032)
| at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
| at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
| at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
| at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
| at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
| at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
| at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: javax.naming.NameNotFoundException: StructureProviderBean not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at org.jboss.seam.Component.instantiateSessionBean(Component.java:1287)
| at org.jboss.seam.Component.instantiate(Component.java:1273)
| at org.jboss.seam.Component.newInstance(Component.java:1966)
| ... 71 more
|
I've checked all dependencies, but found no problems there.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121275#4121275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121275
18 years, 5 months
[JBossWS] - Re: WS-Security Newbie Question...
by lafaserem
Ok... I have now added xmlsec.jar into "JBOSS_HOME/lib/endorsed" and recompile (just in case...) and the wsrunclient again... and I got this error:
| javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: An
| internal WS-Security error occurred. See log for details
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFa
| ilure(HandlerChainExecutor.java:276)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(Ha
| ndlerChainExecutor.java:155)
| at org.jboss.ws.core.jaxws.client.ClientImpl.callRequestHandlerChain(Cli
| entImpl.java:160)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:297)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
|
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:16
| 4)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:15
| 0)
| at $Proxy15.echo(Unknown Source)
| at prueba.HelloClient.main(HelloClient.java:32)
| Caused by: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security e
| rror occurred. See log for details
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(
| WSSecurityDispatcher.java:105)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleOutbound(
| WSSecurityDispatcher.java:311)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleOutbou
| ndSecurity(WSSecurityHandler.java:95)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handle
| Outbound(WSSecurityHandlerClient.java:45)
| at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericH
| andler.java:55)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(Ha
| ndlerChainExecutor.java:295)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(Ha
| ndlerChainExecutor.java:140)
|
Thanks again for your interest :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121273#4121273
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121273
18 years, 5 months
[JBoss jBPM] - Re: How to retrieve the Task list of a user ?
by dleerob
In your process definition, you have:
| <swimlane name="user">
| </swimlane>
|
You've defined a swimlane called "user", but you haven't assigned any users to that swimlane.
Also, to get a list of tasks that can potentially be assigned to a user, I use a method like this:
/**
| * Gets all task instances that a user with the given actor id could claim.
| * @return List of jbpm task instances.
| */
| public static List getUnClaimedTaskInstancesForActorId (JbpmContext jbpmContext, String actorId) {
| Session session = jbpmContext.getSession();
|
| //create list of possible id's (this includes groups) that
| //belong to the current user.
| List actorsList = new ArrayList();
| actorsList.add(actorId);
| IdentitySession identitySession = new IdentitySession(session);
| org.jbpm.identity.User jbpmUser = identitySession.getUserByName(actorId);
| Iterator i = jbpmUser.getMemberships().iterator();
| while(i.hasNext()){
| Membership m = (Membership) i.next();
| actorsList.add(m.getGroup().getName());
| }
| List pooledTaskInstances = jbpmContext.getTaskMgmtSession().findPooledTaskInstances(actorsList);
| List jbpmTaskInstanceList = session.createQuery("from org.jbpm.taskmgmt.exe.TaskInstance ti where ti.start is null and ti.end is null and actorId = '"+actorId+"'").list();
| //add pooledTaskInstances to taskList
| jbpmTaskInstanceList.addAll(pooledTaskInstances);
|
| //TODO sort jbpmTaskInstanceList by task instance id
|
| return jbpmTaskInstanceList;
| }
Hope this helps a bit. Good luck!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121272#4121272
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121272
18 years, 5 months
[JBossWS] - Re: WS-Security Newbie Question...
by lafaserem
Ups... Ok... That's was consecuence of so many "copy-paste"s that I have done during all these days :)
My Hello.java file is now like this:
| package wssec;
|
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.xml.ws.RequestWrapper;
| import javax.xml.ws.ResponseWrapper;
|
|
| /**
| * This class was generated by the JAX-WS RI.
| * JAX-WS RI 2.1.1-b03-
| * Generated source version: 2.0
| *
| */
| @WebService(name = "Hello", targetNamespace = "urn:ws.sec")
| public interface Hello {
|
|
| /**
| *
| * @param nombre
| * @return
| * returns java.lang.String
| */
| @WebMethod
| @WebResult(targetNamespace = "")
| @RequestWrapper(localName = "echo", targetNamespace = "urn:ws.sec", className = "sec.ws.Echo")
| @ResponseWrapper(localName = "echoResponse", targetNamespace = "urn:ws.sec", className = "sec.ws.EchoResponse")
| public String echo(
| @WebParam(name = "nombre", targetNamespace = "")
| String nombre);
|
| }
|
but now I have this error:
| Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xml/securi
| ty/Init
| at org.jboss.ws.extensions.security.SecurityEncoder.<init>(SecurityEncod
| er.java:47)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleOutbound(
| WSSecurityDispatcher.java:302)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleOutbou
| ndSecurity(WSSecurityHandler.java:95)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handle
| Outbound(WSSecurityHandlerClient.java:45)
| at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericH
| andler.java:55)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(Ha
| ndlerChainExecutor.java:295)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(Ha
| ndlerChainExecutor.java:140)
| at org.jboss.ws.core.jaxws.client.ClientImpl.callRequestHandlerChain(Cli
| entImpl.java:160)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:297)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
|
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:16
| 4)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:15
| 0)
| at $Proxy15.echo(Unknown Source)
| at wssec.HelloClient.main(HelloClient.java:32)
|
I don't know what's happening now.. I'm with it, but if you see something, i'll be grateful for your advices ;)
At least now I see errors refering to WSSecurity and that makes me happy hehe :)
Thanks ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121266#4121266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121266
18 years, 5 months