[JBoss Web Services] - EJB-Web Service built with wsconsume will not deploy on JBoss
by Steve Cohen
Steve Cohen [http://community.jboss.org/people/stevecoh4] created the discussion
"EJB-Web Service built with wsconsume will not deploy on JBoss"
To view the discussion, visit: http://community.jboss.org/message/631387#631387
--------------------------------------------------------------
I am unable to deploy an EJB Web Service built with wsconsume on JBoss 5.1.
I first created a simple hello-worldish POJO Web Service in top-down style from a hand-coded WSDL and Schema that I processed with
wsconsume.
This deploys and works just fine.
I then copied my wsdl and schema to a new EJB project and modified all instances of the name in the WSDL to be something different i.e. Sample-->EJBSample. Otherwise the structure of the WSDL and schema was identical.
In this project I also ran wsconsume to build the server code. This succeeded and the project built.
I then also copied my hand coded service implementation to the new project and modified it as indicated in the Manning book "JBoss in Action",
http://www.manning.com/jamae/chapter_9.pdf http://www.manning.com/jamae/chapter_9.pdf, section 9.3.1.
The ejb will not deploy. The error message is not very informative:
09:57:51,225 WARNING [config] Unable to process deployment descriptor for context '/jbsv-ejb'
I can't figure out what I've done wrong.
I tried boosting up the logging levels on the relevant loggers and this also provided no clue as to what might be missing.
Here are my implementations of the POJO and EJB services.
package org.javactivity.jbsv.demo;
import javax.jws.WebService;
import org.jboss.ws.annotation.SchemaValidation;
@WebService(targetNamespace = "http://org.javactivity/SampleService",
portName="SampleServiceSOAP",
serviceName="SampleService",
endpointInterface="org.javactivity.jbsv.demo.SampleServicePort")
public class SampleServicePortImpl implements SampleServicePort {
private static int nextSession = 0;
@Override
public int foo(UserTypeType usertype, String username, String key) {
return ++nextSession;
}
}
package org.javactivity.jbsv.ejb;
import javax.ejb.Stateless;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import org.jboss.wsf.spi.annotation.WebContext;
@Stateless
@WebContext(contextRoot="jbsv-ejb", urlPattern="/ejb")
@WebService(targetNamespace = "http://org.javactivity/EJBSampleService",
portName="EJBSampleServiceSOAP",
serviceName="EJBSampleService",
endpointInterface="org.javactivity.jbsv.ejb.EJBSampleServicePort")
public class EJBSampleServicePortImpl implements EJBSampleServicePort {
private static int nextSession = 0;
@Override
public int foo(UserTypeType usertype, String username, String key) {
// TODO Auto-generated method stub
return ++nextSession;
}
}
What am I missing?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/631387#631387]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[Beginner's Corner] - Dependecy Injection through Spring in EJB 3.0
by Amit Ajmani
Amit Ajmani [http://community.jboss.org/people/amitajmani1] created the discussion
"Dependecy Injection through Spring in EJB 3.0"
To view the discussion, visit: http://community.jboss.org/message/631426#631426
--------------------------------------------------------------
i am trying to use SpringBeanAutowiringInterceptor.class for DI in my Stateless EJB3
@Stateless
@TransactionManagement(TransactionManagementType.CONTAINER)
@Interceptors({ExceptionHandler.clss, SpringBeanAutowiringInterceptor.class})
public class InstrumentServiceEJB implements instrumentServiceRemote{
@Autowired
private InstrumentService instrService;
......
}
here is my beanRefContext.xml:
<? xml version=++"1.0" encoding="UTF-8"?>++
++<beans xmlns="....">++
++<bean class="org.springframework.context.support.ClassPathXmlApplicationContext">++
++<constructor-arg>++
++<list>++
++<value>/META-INF/applicationContext.xml</value>++
++</list>++
++</constructor-arg>++
++</beans>++
+applicationContext.xml:+
<? xml version=++"1.0" encoding="UTF-8"?>++
++<beans xmlns="....">++
<context:annotation-config/>
<bean id=++"instrService" class="com.company.business.InstrumentServiceCore"/>++
+</beans>+
+
+
here is my Remote interface
@Remote
public interface InstrumentService{
......
}
and i have two implementation of above InstrumentService , one is InstrumentServiceEJB and another one is InstrumentServiceCore.
i have put beanRefContext and applicationContext.xml under META-INF/folder
now when i tried to call my EJB, (I am invoking my EJB through a web service call ) it throws Exception like :
javax.ejb.EJBException: java.lang.RuntimeException: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [null], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.beans.factory.BeanFactory] is defined: expected single bean but found 0
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:85)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy346.invoke(Unknown Source)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
at $Proxy370.browseInstruments(Unknown Source)
at com.company.rts.webservice.instrument.impl.InstrumentServiceWSImpl.browseInstruments(InstrumentServiceWSImpl.java:42)
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:597)
at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:108)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
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:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [null], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.beans.factory.BeanFactory] is defined: expected single bean but found 0
at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1123)
at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1133)
at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1144)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:93)
at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:56)
at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:51)
at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:53)
at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:93)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
... 58 more
Caused by: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [null], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.beans.factory.BeanFactory] is defined: expected single bean but found 0
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:409)
at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.getBeanFactoryReference(SpringBeanAutowiringInterceptor.java:156)
at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.getBeanFactory(SpringBeanAutowiringInterceptor.java:137)
at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.doAutowireBean(SpringBeanAutowiringInterceptor.java:117)
at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(SpringBeanAutowiringInterceptor.java:97)
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:597)
at org.jboss.ejb3.interceptors.aop.LifecycleCallbackInterceptorMethodInterceptor.invoke(LifecycleCallbackInterceptorMethodInterceptor.java:80)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)
at org.jboss.webbeans.ejb.SessionBeanInterceptor.postConstruct(SessionBeanInterceptor.java:61)
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:597)
at org.jboss.ejb3.interceptors.aop.LifecycleCallbackInterceptorMethodInterceptor.invoke(LifecycleCallbackInterceptorMethodInterceptor.java:80)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_15719768.invoke(InvocationContextInterceptor_z_setup_15719768.java)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1119)
... 68 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.beans.factory.BeanFactory] is defined: expected single bean but found 0
at org.springframework.beans.factory.BeanFactoryUtils.beanOfType(BeanFactoryUtils.java:392)
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:400)
... 92 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/631426#631426]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[jBPM] - How to Complete a WorkItem using REST API
by analamala
analamala [http://community.jboss.org/people/analamala] created the discussion
"How to Complete a WorkItem using REST API"
To view the discussion, visit: http://community.jboss.org/message/631145#631145
--------------------------------------------------------------
Hi,
I am planning on extending the REST API to "complete" a work item asynchronously. For example, if I add this to "org.jboss.bpm.console.server.ProcessMgmtFacade" or some other (Task, Form, or something else) existing facade implementations, here are my questions.
1. What information do I need to pass as @FormParam or @PathParam, to be able to complete the work item.
2. How do I use these parameters inside the method signature, to complete the work item.
There may be other approaches, but I found this option the easiest implement, if it can be done. Once I know what parameters are needed and they can be used to complete, I will incorporate this into my design such that the calling client (REST API client) is already aware of what to pass into the REST API call.
Your feedback will be invaluable.
Thank you.
-Ajay
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/631145#631145]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[jBPM] - Reopen ended process and copy of a process
by Diduch Cordova
Diduch Cordova [http://community.jboss.org/people/diduch] created the discussion
"Reopen ended process and copy of a process"
To view the discussion, visit: http://community.jboss.org/message/630407#630407
--------------------------------------------------------------
How to reopen ended process and how can I get a complete copy of a processinstance, I mean.. The processinstance with all its information, relations, tasks, content, eventtypes, processinstancelog, processinstanceinfo, potowners. I want to get a copy of a process ended with a new number of process and this last should to be reopen, for this I want to change the status of the last task completed and convert this task in a reserved task and the user can continue with the sequence of the process.
Thanks for your help..
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/630407#630407]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[JBoss Web Services] - JBossWS, CXF and maven-jaxws-tools-plugin (4.0.0.Beta5)
by Ove Ranheim
Ove Ranheim [http://community.jboss.org/people/oranheim] created the discussion
"JBossWS, CXF and maven-jaxws-tools-plugin (4.0.0.Beta5)"
To view the discussion, visit: http://community.jboss.org/message/631324#631324
--------------------------------------------------------------
Hi,
I'm not able to get the maven-jaxws-tools-plugin v1.0.1.GA to work with latest JBossWS-CXF 4.0.0.Beta5. It works however with 3.4.1.GA. With the latest beta I get a CNF exception for: org.jboss.wsf.spi.tools.WSContractConsumer related to org.jboss.ws:jbossws-spi.
I need to JBossWS in order to implement support for PayEx (a Scandinavtion payment operator). Tried to consume their wsdls using JBossWS-Native, but that didn't work out. The JBossWS-CXF seems to be compliant with their MS.NET WSDLs.
As a newbie to JBossWS. Which JBossWS stack do you recommend for a new project? Where can I find WSConsume examples and JUnit/Arquillian examples?
Do you have any CDI integration and have you been aligned with Solder 3.1 what's going on there?
It would be good to understand what has happended to the SPI for JBossWS and how come maven-jaxws-tools-plugin is broken with the latest release?
Cheers,
Ove
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/631324#631324]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months