java-webservice实现main方法的时候报错的,不知道在那里出错了,实在找不到原因

问题描述

webservice实现main方法的时候报错的,不知道在那里出错了,实在找不到原因

Exception in thread "main" javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:171)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:99)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:250)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:343)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:205)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:513)
at com.sun.xml.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:261)
at com.sun.xml.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:185)
at com.sun.xml.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:128)
at javax.xml.ws.Endpoint.publish(Endpoint.java:57)
at com.landingtech.push.PushServiceImpl.main(PushServiceImpl.java:160)
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.Map is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at java.util.Map
at public java.util.Map com.landingtech.push.jaxws.PushTags.arg3
at com.landingtech.push.jaxws.PushTags
java.util.Map does not have a no-arg default constructor.
this problem is related to the following location:
at java.util.Map
at public java.util.Map com.landingtech.push.jaxws.PushTags.arg3
at com.landingtech.push.jaxws.PushTags

at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158)
... 10 more

Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.Map is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at java.util.Map
at public java.util.Map com.landingtech.push.jaxws.PushTags.arg3
at com.landingtech.push.jaxws.PushTags
java.util.Map does not have a no-arg default constructor.
this problem is related to the following location:
at java.util.Map
at public java.util.Map com.landingtech.push.jaxws.PushTags.arg3
at com.landingtech.push.jaxws.PushTags

at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:466)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:298)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:141)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1157)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:111)
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:113)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:166)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
... 12 more

解决方案

http://stackoverflow.com/questions/7383146/javax-xml-ws-webserviceexception-unable-to-create-jaxbcontext

解决方案二:

把map那个变量申明为map对应的实现类

时间: 2024-10-29 21:29:17

java-webservice实现main方法的时候报错的,不知道在那里出错了,实在找不到原因的相关文章

java web-Javaweb在Java类的main方法中无法通过Proxool连接数据库

问题描述 Javaweb在Java类的main方法中无法通过Proxool连接数据库 Javaweb在Java类的main方法中无法通过Proxool连接数据库,报SQLException,找不到驱动,同样的代码启动tomcat后在服务器中能运行??????? 解决方案 有两个可能,一个是jar包没有引入全:还有一个就是配置文件的编码方式,把配置文件打开看看有没有乱码

详细讲解Java中的main()方法_java

前言 JAVA中的主函数是我们再熟悉不过的了,相信每个学习过JAVA语言的人都能够熟练地写出这个程序的入口函数,但对于主函数为什么这么写,其中的每个关键字分别是什么意思,可能就不是所有人都能轻松地答出来的了.我也是在学习中碰到了这个问题,通过在网上搜索资料,并加上自己的实践终于有了一点心得,不敢保留,写出来与大家分享. Java中的main()方法 java虚拟机通过main方法找到需要启动的运行程序,并且检查main函数所在类是否被java虚拟机装载.如果没有装载,那么就装载该类,并且装载所有

weblogic连接池-Java调用Oracle存储过程传入数组参数报错

问题描述 Java调用Oracle存储过程传入数组参数报错 weblogic连接池 JNDI提供的链接保存 Oracle数组 报错 oracle.jdbc.driver.T4CConnection cannot be cast to oracle.jdbc.OracleConnection oracle.jdbc.driver.T4CConnection cannot be cast to oracle.jdbc.OracleConnection 大家好,我在用weblogic连接池 JNDI

Java Socket实现客户端服务画面同步,报错

问题描述 Java Socket实现客户端服务画面同步,报错 java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.Abstra

namespace-struts2注解url没跳转到action里的方法,没报错也没跳转

问题描述 struts2注解url没跳转到action里的方法,没报错也没跳转 我补下图片: package com.AppServer.action; import javax.annotation.Resource; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.ExceptionMapping; import org.apache

java连接sqlserver2008连不上,报错sqljdbc.dll这个包有错,但是我已经拷到那个目录下了啊

问题描述 java连接sqlserver2008连不上,报错sqljdbc.dll这个包有错,但是我已经拷到那个目录下了啊 请问还有其他方法吗,该配置的我都配置实在没办法了,百度百度个遍了 解决方案 你导入这个包试试:sqljdbc4.jar 解决方案二: sqljdbc.dll你这个是程序集啊,在C#里面用的,Java中要导 .jar的包 解决方案三: 这个有可能是jar包的问题,可以换个jar包试试,也有可能是sqlServer2008的连接问题 解决方案四: 拷贝sqljdbc4.jar这

求java大神帮看解答一下报错,在线等

问题描述 求java大神帮看解答一下报错,在线等 16:29:21,442 ERROR ContextLoader:215 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of resource fields failed; nested except

ssh整合-java Web 中提交数据信息时 报错

问题描述 java Web 中提交数据信息时 报错 Entering nullPropertyValue [target=[com.shyou.action.BusinessShopAction@1178dc3, com.opensymphony.xwork2.DefaultTextProvider@cbd684], property=bShop] Error setting expression 'bShop.personCharge' with value '[Ljava.lang.Stri

suse linux java ftp上传文件名称导致报错,求大神指导

问题描述 suse linux java ftp上传文件名称导致报错,求大神指导 上传时"school_user.questionext.csv"就因为文件名称多了一个"."导致报错 553 Could not create file.