- 浏览: 3366 次
- 性别:
- 来自: 深圳
-
最近访客 更多访客>>
文章分类
最新评论
-
gty509:
你的问题是把一个实体加载了两次。比如User。如果有get(U ...
并发访问量大时抛出的异常,是 hibernate 问题 , 还是 xfire 是问题? -
daytodayme:
@WebService(name = "Travel ...
EJB3 编写 WebService 的返回列表的问题. -
asdf93945:
没有高手有空?
EJB3 编写 WebService 的返回列表的问题. -
asdf93945:
多谢 Anatorian 的建议. :下面是我添加的修改后的结 ...
EJB3 编写 WebService 的返回列表的问题. -
Anatorian:
JAXB 不知道如何转化你的对象,你应该在chen.degui ...
EJB3 编写 WebService 的返回列表的问题.
EJB3 编写 WebService 的返回列表的问题.
服务端的 EJB 代码如下:
客户端的 PHP 代码如下:
如果服务端是 @Stateless . 使用 Java 客户端调用是没有问题的,
服务端是 @WebService 时, 使用 new ArrayList 实现返回也是没有问题. 唯有 query.getResultList(); 返回时, 出现 WebServiceException 异常.
那位高手有空, 请指点下小弟. 小弟是新手. 3 个月前刚买了几本 java 的书看看.
QQ : 280016524
Email : degui.chen@qq.com
如下是服务器端抛出的异常:
22:44:45,127 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.3.GA/server/defau
lt/deploy/WebServicesDemo.jar/
22:44:45,228 INFO [DefaultEndpointRegistry] register: jboss.ws:context=WebServi
cesDemo,endpoint=TravelAgentBean
22:44:51,086 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.3.G
A/server/default/data/wsdl/WebServicesDemo.jar/TravelAgentService55191.wsdl
22:44:51,396 INFO [TomcatDeployer] deploy, ctxPath=/WebServicesDemo, warUrl=...
/tmp/deploy/WebServicesDemo.jar55190.war/
22:44:53,570 INFO [STDOUT] name :
22:44:53,570 INFO [STDOUT] asdfhasldfjl
22:44:54,691 INFO [STDOUT] list :
22:44:54,691 INFO [STDOUT] [chen.degui.domain.Cabin@1681460]
22:44:54,711 ERROR [RequestHandlerImpl] Error processing web service request
org.jboss.ws.WSException: javax.xml.ws.WebServiceException: javax.xml.bind.Marsh
alException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:325)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl
.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
HandlerImpl.java:134)
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(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
6)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSe
rializer.java:124)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
87)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo
rt.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon
tent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:
72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle
ment.java:141)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen
tDoc.java:85)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle
ment.java:547)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle
mentWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit
er.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3
25)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl
erImpl.java:392)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:321)
... 22 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
320)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav
a:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
81)
... 37 more
Caused by: javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any o
f its super class is known to this context.
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.j
ava:240)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.j
ava:255)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:647)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.seriali
zeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeLi
stBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(Ar
rayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBean
InfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:679)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:151)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:185)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Element
BeanInfoImpl.java:305)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:312)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:71)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.j
ava:488)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
317)
... 39 more
Caused by: javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any o
f its super class is known to this context.
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextIm
pl.java:556)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:642)
... 51 more
22:44:54,861 ERROR [[TravelAgentBean]] Servlet.service() for servlet TravelAgent
Bean threw exception
javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its super
class is known to this context.
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextIm
pl.java:556)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:642)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.seriali
zeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeLi
stBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(Ar
rayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBean
InfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:679)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:151)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:185)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Element
BeanInfoImpl.java:305)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:312)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:71)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.j
ava:488)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
317)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav
a:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
81)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo
rt.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon
tent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:
72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle
ment.java:141)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen
tDoc.java:85)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle
ment.java:547)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle
mentWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit
er.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3
25)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl
erImpl.java:392)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:321)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl
.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
HandlerImpl.java:134)
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(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
6)
at java.lang.Thread.run(Thread.java:619)
建议看看黎活明的ejb3.0的书和他出的视频,我也是从书和视频中了解的,JPQL语句写成from Cabin c是不正确的(这是Hibernate的语法),正确的为:select c from Cabin c
返回List需要指明元素类型,否则JAXB在反射集合元素类型时会失败.
@WebService(name = "TravelAgent", serviceName = "TravelAgentService") @Stateless public class TravelAgentBean implements TravelAgentRemote { ...... @WebMethod @WebResult(name = "List") public List test(@WebParam(name = "name") String name) { System.out.println("name : ");System.out.println(name); Query query = manager.createQuery("from Cabin c"); List list = query.getResultList(); return list; } ...... }
客户端的 PHP 代码如下:
$client = new SoapClient($wsdl_url); $username = $client->test(array('name'=>'asdfhasldfjl')); var_dump($username);
如果服务端是 @Stateless . 使用 Java 客户端调用是没有问题的,
服务端是 @WebService 时, 使用 new ArrayList 实现返回也是没有问题. 唯有 query.getResultList(); 返回时, 出现 WebServiceException 异常.
那位高手有空, 请指点下小弟. 小弟是新手. 3 个月前刚买了几本 java 的书看看.
QQ : 280016524
Email : degui.chen@qq.com
如下是服务器端抛出的异常:
22:44:45,127 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.3.GA/server/defau
lt/deploy/WebServicesDemo.jar/
22:44:45,228 INFO [DefaultEndpointRegistry] register: jboss.ws:context=WebServi
cesDemo,endpoint=TravelAgentBean
22:44:51,086 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.3.G
A/server/default/data/wsdl/WebServicesDemo.jar/TravelAgentService55191.wsdl
22:44:51,396 INFO [TomcatDeployer] deploy, ctxPath=/WebServicesDemo, warUrl=...
/tmp/deploy/WebServicesDemo.jar55190.war/
22:44:53,570 INFO [STDOUT] name :
22:44:53,570 INFO [STDOUT] asdfhasldfjl
22:44:54,691 INFO [STDOUT] list :
22:44:54,691 INFO [STDOUT] [chen.degui.domain.Cabin@1681460]
22:44:54,711 ERROR [RequestHandlerImpl] Error processing web service request
org.jboss.ws.WSException: javax.xml.ws.WebServiceException: javax.xml.bind.Marsh
alException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:325)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl
.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
HandlerImpl.java:134)
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(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
6)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSe
rializer.java:124)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
87)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo
rt.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon
tent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:
72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle
ment.java:141)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen
tDoc.java:85)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle
ment.java:547)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle
mentWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit
er.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3
25)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl
erImpl.java:392)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:321)
... 22 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
320)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav
a:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
81)
... 37 more
Caused by: javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any o
f its super class is known to this context.
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.j
ava:240)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.j
ava:255)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:647)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.seriali
zeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeLi
stBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(Ar
rayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBean
InfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:679)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:151)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:185)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Element
BeanInfoImpl.java:305)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:312)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:71)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.j
ava:488)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
317)
... 39 more
Caused by: javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any o
f its super class is known to this context.
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextIm
pl.java:556)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:642)
... 51 more
22:44:54,861 ERROR [[TravelAgentBean]] Servlet.service() for servlet TravelAgent
Bean threw exception
javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its super
class is known to this context.
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextIm
pl.java:556)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:642)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.seriali
zeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeLi
stBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(Ar
rayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBean
InfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize
r.java:679)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:151)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme
ntBeanInfoImpl.java:185)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Element
BeanInfoImpl.java:305)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:312)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element
BeanInfoImpl.java:71)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.j
ava:488)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
317)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav
a:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
81)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo
rt.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon
tent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:
72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle
ment.java:141)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen
tDoc.java:85)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle
ment.java:547)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle
mentWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit
er.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3
25)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl
erImpl.java:392)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:321)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl
.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
HandlerImpl.java:134)
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(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
6)
at java.lang.Thread.run(Thread.java:619)
评论
4 楼
daytodayme
2009-01-12
@WebService(name = "TravelAgent", serviceName = "TravelAgentService") @Stateless public class TravelAgentBean implements TravelAgentRemote { ...... @WebMethod @WebResult(name = "List") public List<Cabin> test(@WebParam(name = "name") String name){ Query query = manager.createQuery("select c from Cabin c"); return query.getResultList(); } ...... }
建议看看黎活明的ejb3.0的书和他出的视频,我也是从书和视频中了解的,JPQL语句写成from Cabin c是不正确的(这是Hibernate的语法),正确的为:select c from Cabin c
返回List需要指明元素类型,否则JAXB在反射集合元素类型时会失败.
3 楼
asdf93945
2009-01-12
没有高手有空?
2 楼
asdf93945
2009-01-09
多谢 Anatorian 的建议. :
下面是我添加的修改后的结果:
异常为:
23:59:14,985 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.3.G
A/server/default/data/wsdl/WebServicesDemo.jar/TravelAgentService64072.wsdl
23:59:15,496 INFO [TomcatDeployer] deploy, ctxPath=/WebServicesDemo, warUrl=...
/tmp/deploy/WebServicesDemo.jar64071.war/
23:59:43,506 INFO [STDOUT] name :
23:59:43,506 INFO [STDOUT] asdfhasldfjl
23:59:45,689 INFO [STDOUT] list :
23:59:45,689 INFO [STDOUT] [chen.degui.domain.Cabin@175beef]
23:59:45,729 ERROR [RequestHandlerImpl] Error processing web service request
org.jboss.ws.WSException: javax.xml.ws.WebServiceException: javax.xml.bind.Marsh
alException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:325)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl
.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
HandlerImpl.java:134)
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(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
6)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSe
rializer.java:124)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
87)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo
rt.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon
tent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:
72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle
ment.java:141)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen
tDoc.java:85)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle
ment.java:547)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle
mentWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit
er.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3
25)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl
erImpl.java:392)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:321)
... 22 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
320)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav
a:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
81)
下面是我添加的修改后的结果:
@Entity @XmlRootElement public class Cabin implements java.io.Serializable { private int id; private String name; private int deckLevel; private int shipId; private int bedCount; @Id @Column(name = "CABIN_ID") public int getId() { ...............
异常为:
23:59:14,985 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.3.G
A/server/default/data/wsdl/WebServicesDemo.jar/TravelAgentService64072.wsdl
23:59:15,496 INFO [TomcatDeployer] deploy, ctxPath=/WebServicesDemo, warUrl=...
/tmp/deploy/WebServicesDemo.jar64071.war/
23:59:43,506 INFO [STDOUT] name :
23:59:43,506 INFO [STDOUT] asdfhasldfjl
23:59:45,689 INFO [STDOUT] list :
23:59:45,689 INFO [STDOUT] [chen.degui.domain.Cabin@175beef]
23:59:45,729 ERROR [RequestHandlerImpl] Error processing web service request
org.jboss.ws.WSException: javax.xml.ws.WebServiceException: javax.xml.bind.Marsh
alException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:325)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl
.java:201)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
HandlerImpl.java:134)
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(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
6)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSe
rializer.java:124)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
87)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo
rt.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon
tent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:
72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle
ment.java:141)
at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen
tDoc.java:85)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle
ment.java:547)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen
tImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j
ava:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle
mentWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit
er.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3
25)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl
erImpl.java:392)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand
lerImpl.java:321)
... 22 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe
r class is known to this context.]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
320)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav
a:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:
81)
1 楼
Anatorian
2009-01-08
JAXB 不知道如何转化你的对象,你应该在chen.degui.domain.Cabin 类上加上 @XmlRootElement。 查看JAXB相关文档吧。
相关推荐
Files contained in javax.ejb.jar: META-INF/MANIFEST.MF javax.ejb.AccessLocalException.class javax.ejb.AccessTimeout.class javax.ejb.ActivationConfigProperty.class javax.ejb.AfterBegin.class javax....
javax.ejb.AccessLocalException.class javax.ejb.CreateException.class javax.ejb.DuplicateKeyException.class javax.ejb.EJBContext.class javax.ejb.EJBException.class javax.ejb.EJBHome.class javax.ejb....
javax.ejb.EJB.class javax.ejb.EJBAccessException.class javax.ejb.EJBContext.class javax.ejb.EJBException.class javax.ejb.EJBHome.class javax.ejb.EJBLocalHome.class javax.ejb.EJBLocalObject.class javax...
基于java的开发源码-EJB中JNDI的使用源码例子.zip 基于java的开发源码-EJB中JNDI的使用源码例子.zip 基于java的开发源码-EJB中JNDI的使用源码例子.zip 基于java的开发源码-EJB中JNDI的使用源码例子.zip 基于java的...
Files contained in javax.ejb.jar: META-INF/MANIFEST.MF javax.ejb.AccessLocalException.class javax.ejb.AccessTimeout.class javax.ejb.ActivationConfigProperty.class javax.ejb.AfterBegin.class javax....
EJB中ejb-jar文件配置详解 EJB(Enterprise JavaBean)是一种Java技术,用于开发企业级应用程序。EJB容器提供了许多功能,如事务处理、安全认证、资源管理等,以便开发者更方便地开发企业级应用程序。在EJB中,ejb-...
《Apress.Pro.EJB.3.Java.Persistence.API.May.2006》是一部关于企业级JavaBeans(EJB)3.0版本的专著,主要聚焦于Java持久性API(JPA)。EJB 3.0是Java EE平台的一个重要组成部分,它极大地简化了企业级应用的开发...
《Apress.Pro.EJB.3.Java.Persistence.API》这本书专注于企业级Java开发中的核心技术——EJB(Enterprise JavaBeans)3.0和Java Persistence API(JPA)。EJB是Java平台上用于构建可部署在服务器端的企业级应用的...
**JSF(JavaServer Faces)与EJB3(Enterprise JavaBeans 3)集成开发** JSF(JavaServer Faces)是Java平台上的一个用于构建用户界面的MVC(Model-View-Controller)框架,它简化了在Web应用中创建用户交互界面的...
《Manning.EJB.3.in.Action.Apr.2007.rar》是一个压缩包文件,包含了一本关于企业级JavaBeans(EJB)3.0技术的专业书籍——《EJB 3 in Action》的电子版。这本书是Manning出版社于2007年4月出版的,由David Geary、...
**EJB(Enterprise JavaBeans)WebService Demo** EJB(Enterprise JavaBeans)是Java平台上的一个核心组件,用于构建可扩展的、安全的、事务处理的分布式应用程序。它为开发人员提供了一种在Java环境中实现服务器...
EJB3是EJB规范的一个重要版本,它在EJB2的基础上进行了重大改进,简化了API,使得开发者能够更加专注于业务逻辑,而无需过多关注底层的容器管理服务。 EJB3.0引入了许多关键特性,旨在提高开发效率和可维护性,如:...
在使用Hibernate3的时候,发现程序编译好了,在运行时总是抛出java.lang.NoClassDefFoundError: javax/persistence/EntityListeners异常,经查找是因为缺少ejb3-persistence.jar包。应该是这个~
3. **EJB 3.0与WebService的整合** - **EJB 3.0 as WebService**:通过JAX-WS,EJB 3.0组件可以被自动暴露为Web服务。只需添加`@WebService`注解,EJB就会成为可调用的服务端点。 - **WebService调用EJB**:反之,...
【ejb WebService】是企业级Java应用中的一个重要概念,它结合了Enterprise JavaBeans(EJB)技术与WebService...学习和掌握ejb WebService的相关知识,对于Java EE开发者来说,是提升技能和解决复杂分布式问题的关键。
【压缩包子文件的文件名称列表】:"EJB_ejb_plannedvhz_源码.rar" 表明压缩包内的文件可能与原标题一致,包含的是源代码文件。 在EJB中,我们可以探讨以下知识点: 1. **EJB架构**:EJB架构由容器管理的部分和...
它们有两种形式:旧式的实体Bean(EJB 2.x)和Java Persistence API(JPA)中的实体Bean(EJB 3.x及以上版本)。 - **消息驱动Bean(Message-Driven Beans, MDB)**:用于处理Java消息服务(JMS)消息,是异步处理...