[JBoss jBPM] - Re: problem when traversing to end state
by twiceknightly
I think this is an important issue and needs to be resolved because it's a fairly common scenario in any type of serious work to use CMT via EJB. Searching the forum it has caught a lot of people trying to do serious development and there isn't any official work around. It seems as if it just doesn't work with CMT out of the box. I'd be interested to see if any of you guys could put together a JBoss minimal app including EJB using CMT.
Are others not using transactions? Have people who are using JTA not seen the same issue? Are people just writing webapps and not 3 tier systems?
If someone with particular knowledge of what that particular class if for and when it gets called could write a brief description I would certainly have an attempt at finding a workaround. Assuming my company give me some more time to "evaluate" the jbpm :).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121998#4121998
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121998
18 years, 6 months
[JBoss Seam] - Long running conversation
by ristretto
I have this Seam POJO Action
@Name("bean")
@Scope(ScopeType.CONVERSATION)
@Conversational
public class BeanAction implements Serializable
{
@Begin(join=true)
@Create
public void create(){
log.debug("Starting Conversation id: "+ Conversation.instance().getId()+" long running?: "+Conversation.instance().isLongRunning());
}
When I browse bean.xhtml (facelets/jfc), the log says
Starting Conversation id: 1 long running?: false
Why false, thought it should be true?
And, when I submit a form on the page like this
<h:commandButton value="Submit to Method" action="#{bean.method}">
<s:conversationPropagation type="join"/>
</h:commandButton>
I get an exception saying my bean isn't in the context. And it seems that the conversation isn't available, which would make sense if it truely isn't long running, right? I'm quite confused, so my message may be lacking information to totally make sense. If so, ask questions.
javax.servlet.ServletException: /bean.xhtml @59,55 binding="#{bean.table}": Target Unreachable, identifier 'bean' resolved to null
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
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)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121997#4121997
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121997
18 years, 6 months
[JBossWS] - Re: Throws exception in WS (back to remote client) without g
by mjhammel
This is still a problem for me, and I'm hoping someone has a pointer as to how I can get rid of the server side stack trace's when I generate an application exception in my web service.
Here is the Web Service:
package com.cei.crunch.server.ws.KernelServices;
|
| import javax.ejb.*;
| import javax.persistence.*;
| import javax.jws.WebService;
| import javax.jws.WebMethod;
| import javax.jws.soap.SOAPBinding;
|
| import org.apache.log4j.Logger;
|
| import com.cei.crunch.ejb.*;
| import com.cei.crunch.exception.*;
|
| /* Make this an EJB3 service endpoint. */
| @Stateless
|
| /* Make this an Web Services endpoint. */
| @WebService(
| name = "KernelWS",
| endpointInterface = "com.cei.crunch.server.ws.KernelServices.KernelServicesEndpoint"
| )
| @SOAPBinding(style = SOAPBinding.Style.RPC)
|
| /**
| * The .Crunch interface to Kernel Services
| */
| public class KernelServices implements KernelServicesEndpoint {
|
| private static final Logger logPolicy = Logger.getLogger("com.cei.crunch.kernel.policy");
|
| @WebMethod
| public Policymgmt findPolicyMgmt(String guid) throws CrunchWSException
| {
| PolicymgmtBean pb = null;
| Policymgmt pm = null;
|
| pb = new PolicymgmtBean();
| if ( pb == null )
| logPolicy.info("Failed to get PolicymgmtBean.");
| else
| {
| String msg = null;
| try {
| pm = pb.findPolicyMgmt(guid);
| }
| catch (CrunchEJBException e) {
| throw new CrunchWSException(e.getMessage());
| }
|
| if ( pm != null )
| {
| logPolicy.info("Policymgmt info: \n" +
| "PolicyName: " + pm.getPolicyName() + "\n" +
| "Value : " + pm.getPolicyValue() + "\n"
| );
| }
| }
| return pm;
| }
| }
Here is the client that calls it:
package wsKernel;
|
| import java.net.URL;
| import javax.xml.ws.*;
| import javax.jws.*;
|
| /* Web Services interfaces */
| import com.cei.crunch.server.ws.kernelservices.*;
|
| public class wsKernel {
|
| private static URL targetURL = null;
| private String subscriberID = null;
| private String pw = null;
| private String host = null;
| private String keystore = null;
| private String storepw = null;
| private String crunchServer = null;
| KernelServicesEndpoint ss = null;
|
| private Policymgmt pm = null;
| private String guid = null;
|
| private boolean serviceBind()
| {
| try {
|
| KernelServicesService service = new KernelServicesService();
| ss = service.getKernelWSPort();
|
| /* Set NEW Endpoint Location */
| BindingProvider bp = (BindingProvider)ss;
| bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, crunchServer);
|
| /* Setup to authenticate with the server. */
| bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, subscriberID);
| bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, pw);
|
| return true;
| }
| catch (Exception e) {
| System.out.println("Failed to login to server.");
| e.printStackTrace();
| System.exit(1);
| }
| return false;
| }
| public void run(String[] args) {
|
| /* Save the subscriber login information. */
| if ( args.length != 5 )
| {
| System.out.println("Missing command line args (userid, password, server, keystore).");
| System.exit(1);
| }
| this.subscriberID = args[0];
| this.pw = args[1];
| this.host = args[2];
| this.keystore = args[3];
| this.storepw = args[4];
|
| /* Set the Stegi servers. */
| crunchServer = "https://" + this.host + ":8443/Crunch/KernelServices";
| System.out.println("Trying to connect to " + crunchServer + " as User: " + subscriberID + ", password: " + pw);
|
| /* Configure the keystore for access via HTTPS */
| System.setProperty("javax.net.ssl.trustStore", keystore);
| System.setProperty("javax.net.ssl.trustStorePassword", storepw);
| System.out.println("Trustore: " + keystore);
| System.out.println("TrustorePassword: " + storepw);
|
| /* Get the WSDL interfaces to the server. */
| if ( serviceBind() == false )
| {
| System.out.println("Login failed.");
| System.exit(1);
| }
|
| /* Retrieve subscriber profile information. */
| System.out.println("Search for Policy guid: CRUNCH-POLICY-1");
| searchGuid("CRUNCH-POLICY-1");
|
| System.out.println("Search for non-existent Policy guid: BLAH");
| searchGuid("BLAH");
| }
|
| public boolean searchGuid(String guid)
| {
| pm = null;
| try {
| pm = ss.findPolicyMgmt(guid);
| }
| catch (Exception e) {
| System.out.println("Failed findPolicyMgmt(): " + e.getMessage());
| e.printStackTrace();
| return false;
| }
| if ( pm == null )
| {
| System.out.println("findPolicyMgmt() failed.");
| return false;
| }
| System.out.println("Policy name : " + pm.getPolicyName());
| return true;
| }
|
| /*
| * main() has to be static, but that gets in the way of doing
| * anything useful. So we create a new instance and call
| * the run method to get things going.
| */
| public static void main(String[] args) {
| new wsKernel().run(args);
| }
|
| }
Here is the output on the client side when the client is run:
client.test.kernel:
| [java] Trying to connect to https://localhost:8443/Crunch/KernelServices as User: admin, password: admin
| [java] Trustore: /home/mjhammel/src/cei/crunch/src/config/jboss/crunch.truststore
| [java] TrustorePassword: .crunch
| [java] Search for Policy guid: CRUNCH-POLICY-1
| [java] Policy name : COMP-ENABLED
| [java] Search for non-existent Policy guid: BLAH
| [java] Failed findPolicyMgmt(): PolicymgmtBean: no matching entry for guid = BLAH
| [java] com.cei.crunch.server.ws.kernelservices.CrunchWSException_Exception: PolicymgmtBean: no matching entry for guid = BLAH
| [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| [java] at org.jboss.ws.metadata.umdm.FaultMetaData.toServiceException(FaultMetaData.java:384)
| [java] at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:128)
| [java] at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
| [java] at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
| [java] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
| [java] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| [java] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| [java] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| [java] at $Proxy17.findPolicyMgmt(Unknown Source)
| [java] at wsKernel.wsKernel.searchGuid(wsKernel.java:92)
| [java] at wsKernel.wsKernel.run(wsKernel.java:85)
| [java] at wsKernel.wsKernel.main(wsKernel.java:114)
And here is the output on the server console from the same test run of the client:
17:05:33,452 [CRUNCH] INFO (kernel.policy): Policymgmt info:
| PolicyName: COMP-ENABLED
| Value : 1
|
| 17:05:33,452 INFO [policy] Policymgmt info:
| PolicyName: COMP-ENABLED
| Value : 1
|
| 17:05:33,684 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| com.cei.crunch.exception.CrunchWSException: PolicymgmtBean: no matching entry for guid = BLAH
| at com.cei.crunch.server.ws.KernelServices.KernelServices.findPolicyMgmt(KernelServices.java:48)
| 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.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:102)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| 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.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
The client side output is correct as far as I'm concerned - I told it to print the stack trace and the exception message is correct. But the SOAP stack trace on the server side shouldn't be printed since this is a simple application error. Obviously I've got some problem with how I hand off my exception to SOAP. I must not be telling it something it needs to know. But what?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121996#4121996
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121996
18 years, 6 months
[JBoss Seam] - context variable not instance of component
by cdiggins
I am having a strange issue in which none of my beans can be accessed. On the first request to the server that is for one of the beans, I get the following error:
| java.lang.IllegalArgumentException: value of context variable is not an instance of the component bound to the context variable: employeeBean
| at org.jboss.seam.Component.getInstance(Component.java:1885)
| 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.getTarget(AstValue.java:34)
| at org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
| at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
| at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
| at javax.faces.component.UICommand.broadcast(UICommand.java:383)
| at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
| at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
| at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
| at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| 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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| 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.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.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Unknown Source)
|
This worked a short time ago without any problems, and I can not figure out what I did or what happened to cause it to break. If you have any ideas what could cause all of my beans to get this error, please let me know.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121993#4121993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121993
18 years, 6 months