尝试编写webservice的服务端时遇到报错:

Exception in thread “main” java.lang.IllegalArgumentException: An operation with name [{http://service.demo.example.com/}count] already exists in this service
完整报错如下:

Exception in thread "main" java.lang.IllegalArgumentException: An operation with name [{http://service.demo.example.com/}count] already exists in this serviceat org.apache.cxf.service.model.InterfaceInfo.addOperation(InterfaceInfo.java:78)at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:1008)at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createOperation(JaxWsServiceFactoryBean.java:633)at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:1000)at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:461)at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:695)at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:530)at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:263)at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:103)at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)at com.example.demo.controller.WebService.main(WebService.java:22)

检查半天后发现似乎是mybatisplus与webservice起冲突了

报错代码:

package com.example.demo.service;import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.domain.UserDO;
import javax.jws.WebService;@WebService
public interface UserService extends IService<UserDO> {String test(String name);
}
package com.example.demo.service.serviceimpl;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.dao.UserDao;
import com.example.demo.domain.UserDO;
import com.example.demo.service.UserService;public class UserServiceimpl extends ServiceImpl<UserDao, UserDO>  implements UserService {@Overridepublic String test(String name){return name+",你好";}
}

去除mybatisplus后不再报错的代码

package com.example.demo.service;import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.domain.UserDO;
import javax.jws.WebService;@WebService
//public interface UserService extends IService<UserDO> {public interface UserService{String test(String name);
}
package com.example.demo.service.serviceimpl;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.dao.UserDao;
import com.example.demo.domain.UserDO;
import com.example.demo.service.UserService;//public class UserServiceimpl extends ServiceImpl<UserDao, UserDO>  implements UserService {public class UserServiceimpl implements UserService {@Overridepublic String test(String name){return name+",你好";}
}

java.lang.IllegalArgumentException: An operation with name [{X}count] already exists in this service相关推荐

  1. java.lang.IllegalArgumentException: Does not contain a valid host:port authority: ignorethis

    执行Hive语句运行MapReduce程序时突然出现这样的异常: Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce ...

  2. hive跑mr时报错,java.lang.IllegalArgumentException: The value of property yarn.resourcemanager.zk-address

    E1:hive跑mr时报错,java.lang.IllegalArgumentException: The value of property yarn.resourcemanager.zk-addr ...

  3. java8中使用java.util.Base64报“java.lang.IllegalArgumentException: Illegal base64 character d”

    概述 Base64是一种字符串编码格式,采用了A-Z,a-z,0-9,"+"和"/"这64个字符来编码原始字符(还有垫字符"=").一个字符 ...

  4. java.lang.IllegalArgumentException: columnNames.length = 3, columnValues.length = 4

    错误如下: java.lang.IllegalArgumentException: columnNames.length = 3, columnValues.length = 4 出现错误的原因一般是 ...

  5. android java.lang.IllegalArgumentException: Comparison method violates its general contract! 问题

    android  java.lang.IllegalArgumentException: Comparison method violates its general contract! 问题 jav ...

  6. 登录首页时报错:java.lang.IllegalArgumentException (不合法的参数异常)

    处理一个老项目,DOWN下项目并配好之后,启动没问题,但是登陆之后首页显示如下: 控制台报错如下: 严重: Servlet.service() for servlet jsp threw except ...

  7. 报错提示:java.lang.IllegalArgumentException: Target must not be null

    报错提示: org.springframework.web.util.NestedServletException: Request processing failed; nested excepti ...

  8. Android报错:java.lang.IllegalArgumentException: Surface was abandoned

    背景情况 使用Camera2 Api 直接报错 报错如下: java.lang.IllegalArgumentException: Surface was abandonedat android.ha ...

  9. 【Android】java.lang.IllegalArgumentException Illegal character in scheme 异常

    在使用字符串拼接成url地址进行数据请求的时候,有时在数据请求的时候会出现 java.lang.IllegalArgumentException: Illegal character in schem ...

最新文章

  1. Nginx的upstream目前支持5种分配方式
  2. windows下安装android版reactnative
  3. 自定义函数或者回调函数中调用对话框对象
  4. 056_Avatar头像
  5. 单例模式在JDK 应用的源码分析||单例模式注意事项和细节说明
  6. python 35 使用 3D densecrf (DenseInferenceWrapper)
  7. 操纵自如--页面内的配合与通信
  8. 【大话存储】学习笔记(7章), OSI模型
  9. 【MFC系列-第19天】初步认识GDI绘图技术
  10. C#数据结构-单链表
  11. Java类class isMemberClass()方法及示例
  12. 使用百度链的智能合约来落地公司业务场景
  13. Python argparse模块详解
  14. “跳过更新”还得付费?Docker 新变化引发群嘲
  15. Java之品优购课程讲义_day12(2)
  16. Centos7安装Rarlinux解压rar文件
  17. 杀毒与免杀技术详解---白嫖党福音
  18. visio 2007 画直线和矩形
  19. web集群之通过tomcat部署jpress应用
  20. oppoa5降级教程_OPPOR11S线刷降级旧版本可以吗?Colors版降到3.2没问题

热门文章

  1. 【ThreeJS】基础教学 创建一个立方体
  2. Python全套视频
  3. (20191231)免费下载论文的方法汇总
  4. 谷歌如何注册账号?手机号无法验证处理方法!2023年最新教程!
  5. 栈的基本结构与基本操作
  6. Cygwin安装和配置
  7. 鸿蒙系统 google应用
  8. linux下terminal重命名方法
  9. html5中,contextmenu 和 spellcheck
  10. sql语句查询,多字段like模糊查询优化