[jBPM] - Default Handler
by Hari Krishna
Hari Krishna [https://community.jboss.org/people/08august] created the discussion
"Default Handler"
To view the discussion, visit: https://community.jboss.org/message/757700#757700
--------------------------------------------------------------
Hi,
i am created own service task in jbpm 5.3 eclipse tooling.i wanted to export service task,therefore i created one repository.In that wid file what i have to give for default handler. In dependencies i have given jar file for work item handler in lib folder of repository..
if i did not mention any default handler,i am getting following error..
Exception in thread "main" org.jbpm.workflow.instance.WorkflowRuntimeException: [com.sample.bpmn.hello:1 - TASK1:4] -- [Error: unbalanced braces [ ... ]]
[Near : {... [ ....}]
[Line: 1, Column: 1]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:130)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:303)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:130)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1077)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:315)
at com.sample.ProcessMain.main(ProcessMain.java:20)
Caused by: [Error: unbalanced braces [ ... ]]
[Near : {... [ ....}]
^
[Line: 1, Column: 1]
at org.mvel2.util.ParseTools.balancedCaptureWithLineAccounting(ParseTools.java:1493)
at org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:1197)
at org.mvel2.MVELInterpretedRuntime.parseAndExecuteInterpreted(MVELInterpretedRuntime.java:86)
at org.mvel2.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:49)
at org.mvel2.MVEL.eval(MVEL.java:165)
at org.drools.SessionConfiguration.loadWorkItemHandlers(SessionConfiguration.java:304)
at org.drools.SessionConfiguration.initWorkItemHandlers(SessionConfiguration.java:294)
at org.drools.SessionConfiguration.getWorkItemHandlers(SessionConfiguration.java:269)
at org.drools.common.AbstractWorkingMemory.getWorkItemManager(AbstractWorkingMemory.java:1106)
at org.drools.impl.StatefulKnowledgeSessionImpl.getWorkItemManager(StatefulKnowledgeSessionImpl.java:311)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
... 14 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/757700#757700]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[Beginner's Corner] - InstantiationExceptionConstructorAccessorImpl when deploying simple web application
by Niklas Jansson
Niklas Jansson [https://community.jboss.org/people/jansson] created the discussion
"InstantiationExceptionConstructorAccessorImpl when deploying simple web application"
To view the discussion, visit: https://community.jboss.org/message/755967#755967
--------------------------------------------------------------
Hello,
First of all - I'm a complete newbie to jBoss, first time ever trying to get a test-enviroment up and running. I have the jboss-7.1.1-Final application server running on a Linux box. And as a first project just want to create a simple webservice using javax.ws but I can't get the application to deploy, I'm using ant to build a simple .war file and then copying into {JBOSS_HOME}\standalone\deployments. However I get the exception:
23:28:20,665 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/webservice]] (MSC service thread 1-1) Servlet /webservice threw load() exception: java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) [rt.jar:1.6.0_18]
at java.lang.reflect.Constructor.newInstance(Constructor.java:532) [rt.jar:1.6.0_18]
at org.jboss.msc.value.ConstructedValue.getValue(ConstructedValue.java:61)
at org.jboss.as.naming.ValueManagedReferenceFactory.getReference(ValueManagedReferenceFactory.java:49)
at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:90) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.deployment.component.WebComponentInstantiator$1.<init>(WebComponentInstantiator.java:57) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.deployment.component.WebComponentInstantiator.getReference(WebComponentInstantiator.java:55) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.deployment.WebInjectionContainer.instantiate(WebInjectionContainer.java:99) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:78) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:72) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1156) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_18]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_18]
at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_18]
23:28:20,686 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /webservice
My web.xml:
<web-app xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee" xmlns:web=" http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>Helloworld</display-name>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>javax.servlet.http.HttpServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
My Helloworld.java:
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
public class HelloWorld {
// This method is called if TEXT_PLAIN is request
@GET
@Produces(MediaType.TEXT_PLAIN)
public String sayPlainTextHello() {
return "Hello Jersey";
}
// This method is called if XML is request
@GET
@Produces(MediaType.TEXT_XML)
public String sayXMLHello() {
return "<?xml version=\"1.0\"?>" + "<hello> Hello World" + "</hello>";
}
// This method is called if HTML is request
@GET
@Produces(MediaType.TEXT_HTML)
public String sayHtmlHello() {
return "<html> " + "<title>" + "Hello World" + "</title>"
+ "<body><h1>" + "Hello World" + "</body></h1>" + "</html> ";
}
}
I'm a bit lost and googling all night haven't given me an answers, any pointers or ideas is much appreciated!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/755967#755967]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JBoss Web Services] - Re: Metro in JBoss 7 HowTo
by Alessio Soldano
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion
"Re: Metro in JBoss 7 HowTo"
To view the discussion, visit: https://community.jboss.org/message/757622#757622
--------------------------------------------------------------
Hi Mike,
I'll comment later on the classpath / client topic.
> Mike P wrote:
>
> Lastly, it's interesting that, possibly, as is, right now, Metro can not do WS-Trust with a CXF server. Unless that tagged on /mex url becomes automagically available.
> My thinking on that one, is that *if* the wsdl advertises the (extra?) metadata, that CXF then goes ahead and makes avaibable this mystery /mex service (that apparently does GETs and POSTs and whatnots), and that Metro "ought to" not make assumptions about mex being available when the wsdl doesn't list it (which might be considered a bug in Metro - which should be reported - or at least feedback ought to be requested on this issue - I can post a report about my findings, since I've already spend time banging my head into this...).
> *Maybe* there could a flag somewhere that makes CXF make available mex even though wsdl doesn't advertise it - just so that clients like Metro that require this (wrongfully), don't end up failing.
> *Or*, have CXF add mex always. I don't know when mex should be added - perhaps only with this WS-Trust stuff? Or perhaps for other ws security features. Not needed for simple unsecure ws calls I would think (will have to verify that).
I did a bit of additional investigation on this topic today. Basically, Apache CXF is able to reply to WS-MEX requests sent to "/mex". The problem is with properly configuring the STS endpoint on JBoss AS.
You need to have the JBoss Web layer deal with HTTP messages to the /mex subpath, for instance by having a web.xml descriptor as follows (please note the wildcard in the url pattern):
<web-app ...>
<servlet>
<servlet-name>TestSecurityTokenService</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.trust.SampleSTS</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestSecurityTokenService</servlet-name>
<url-pattern>/SecurityTokenService/*</url-pattern>
</servlet-mapping>
</web-app>
Besides that, I unfortunately found a bug in the jbossws-cxf SubjectCreatingInterceptor which basically block any WS-MEX call, see https://issues.jboss.org/browse/JBWS-3543 https://issues.jboss.org/browse/JBWS-3543 . It's fixed on jbossws-cxf trunk and will be in next release.
This said, there're many complaints on the net regarding Metro default behaviour wrt WS-MetadataExchange and STS endpoints; btw Glen Mazza also created a WSIT / Metro improvement ticket at http://java.net/jira/browse/WSIT-1586 http://java.net/jira/browse/WSIT-1586 long time ago (for a better configurability of Metro), but that's not been worked yet.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/757622#757622]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JBoss Web Services] - Which versions for eclipse + JBoss AS + JDK + JBossWS
by Giuliano Aparecido
Giuliano Aparecido [https://community.jboss.org/people/giuliano.rap] created the discussion
"Which versions for eclipse + JBoss AS + JDK + JBossWS"
To view the discussion, visit: https://community.jboss.org/message/757194#757194
--------------------------------------------------------------
Hi,
Where can I see the possible configuration supported to create web services?
Like eclipse, jdk, JBossWS, JBoss AS, etc...
I am asking because my company has a system in JBoss AS 4.2.2 with jdk 1.6.0_07 and I need to create a web service. But when I try to create the web service using the eclipse wizard, I get the message:
| Error: Could not generate. (use --show-traces to see full traces) |
|
| java.lang.NoClassDefFoundError: com/sun/codemodel/JExpression |
|
|
| at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:89) |
|
|
| at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:123) |
|
|
| at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:184) |
|
|
| at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:77) |
|
| Caused by: java.lang.ClassNotFoundException: com.sun.codemodel.JExpression |
|
|
| at java.net.URLClassLoader$1.run(URLClassLoader.java:202) |
|
|
| at java.security.AccessController.doPrivileged(Native Method) |
|
|
| at java.net.URLClassLoader.findClass(URLClassLoader.java:190) |
|
|
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306) |
|
|
| at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) |
|
|
| at java.lang.ClassLoader.loadClass(ClassLoader.java:247) |
|
|
| ... 4 more |
I am using the JBossWS from the JBoss AS, at JBossWS Preferences I just appointed to JBoss AS folder...
Any idea?
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/757194#757194]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months