java.lang.ClassCastException: cn.itcase.serviceImpl.servicestudentImpl cannot be cast to javax.servlet.Servlet

可能原因(1)因为这个只不过是一个是实现类而已,它本身是不能访问的,只有通过servlet来调用这些方法,并用doGet()或者doPost()方法来实现才是可以的

可能原因2:servicestudentImpl本来需要 extends HttpServlet但是没有继承

java.lang.ClassCastException: cn.itcase.serviceImpl.servicestudentImpl cannot be cast to javax.servlet.Servlet的更多相关文章

  1. WebLogic部署报java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory

    今天在部署WebLogic项目时,报了java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot b ...

  2. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer错误解决办法

    严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java. ...

  3. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer

    A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.Li ...

  4. java.lang.ClassCastException:weblogic.xml.jaxp.RegistryDocumentBuilderFactory cannot be cast to javax.xml.parsers.DocumentBuilderFactory

    java.lang.ClassCastException:weblogic.xml.jaxp.RegistryDocumentBuilderFactory cannot be cast to java ...

  5. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer。。。。。检查一下servlet-api是否冲突了?

    原因:jar包发生冲突.在我的pom.xml文件中 <dependency>      <groupId>javax.servlet</groupId>       ...

  6. java.lang.ClassCastException: com.sun.proxy.$Proxy53 cannot be cast to cn.service.impl.WorkinggServiceImpl

    java.lang.ClassCastException: com.sun.proxy.$Proxy53 cannot be cast to cn.service.impl.WorkinggServi ...

  7. java.lang.ClassCastException: com.sun.proxy.$Proxy6 cannot be cast to com.etc.service.serviceImpl.BankServiceImpl

    错误原因: java.lang.ClassCastException: com.sun.proxy.$Proxy6 cannot be cast to com.etc.service.serviceI ...

  8. java.lang.ClassCastException: com.sun.proxy.$Proxy27 cannot be cast to com.bbk.n002.service.QuestionService

    1 严重: Servlet /N002-1.0 threw load() exception 2 java.lang.ClassCastException: com.sun.proxy.$Proxy2 ...

  9. Java-Spring:java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***问题解决方案

    java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***问题解决方案 临床表现: 病例: 定义代理类: @Tra ...

随机推荐

  1. xpath路径前可用方法测试

    $x("string-length(//h3[@class='t'])") 8 $x("string(//h3[@class='t'])") "XPa ...

  2. mysql系列十三、mysql中replace into和duplicate key的使用区

    一.创建测试表 1.创建唯一索引"b" CREATE TABLE `test2` ( `id` int(10) NOT NULL AUTO_INCREMENT, `a` varch ...

  3. H3C SNMP OID

    有两种mib-style [1]老些的设备 cpu 使用率OID: .1.3.6.1.4.1.25506.2.6.1.1.1.1.6.slot  内存使用率OID: .1.3.6.1.4.1.2550 ...

  4. python通过操作windows系统注册表方式修改环境变量

    #coding=utf8 import os import sys from subprocess import check_call if sys.hexversion > 0x0300000 ...

  5. C# Excel使用NPOI

    程序处理excel使用using Microsoft.Office.Interop.Excel方式,运行程序需要电脑安装excel,而且excel版本还需要一样,使用起来不方便.使用NPOI不用电脑安 ...

  6. elasticsearch5.0.1安装 marvel 插件

    elasticsearch5.0.1安装 marvel 插件 1.在elasticsearch上安装x-pach插件 在elasticsearch的根目录(每个节点),运行 bin/elasticse ...

  7. mysql5.5.48的my.cnf配置

    MYSQL配置 [client] port = 3306 socket = /tmp/mysql.sock [mysqld] port = 3306 default-storage-engine=My ...

  8. Quartz 定时邮件发送多个备份文件

    项目代码 pom.xml 文件Quartz 的包是整个项目不可缺少的 <properties> <!-- Spring的版本 --> <springframework.v ...

  9. django----Form扩展

    用第二种方式需要加上下面的这个: 三.判断用户民是不存在,存在就不添加了 from django.core.exceptions import ValidationError initial  修改时 ...

  10. 从输入url到显示网页,后台发生了什么?

    参考http://igoro.com/archive/what-really-happens-when-you-navigate-to-a-url/ http://www.cnblogs.com/we ...