java配置文件出错了不知道是哪求解决
  1. ```
  2. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [I:\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\cb\WEB-INF\classes\spring-mvc-applicatonContext-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [I:\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\cb\WEB-INF\classes\com\xiao\comment\dao\mapper\CommentMapper.xml]'; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiao.comment.bean.Comment'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiao.comment.bean.Comment
  3. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488)
  4. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
  5. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  6. at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
  7. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  8. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
  9. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  10. at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)
  11. at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
  12. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
  13. at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
  14. at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
  15. at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
  16. at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
  17. at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
  18. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
  19. at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
  20. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
  21. at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
  22. at org.apache.catalina.core.StandardService.start(StandardService.java:516)
  23. at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
  24. at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
  25. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  26. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  27. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  28. at java.lang.reflect.Method.invoke(Unknown Source)
  29. at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
  30. at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
  31. Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [I:\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\cb\WEB-INF\classes\com\xiao\comment\dao\mapper\CommentMapper.xml]'; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiao.comment.bean.Comment'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiao.comment.bean.Comment
  32. at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:462)
  33. at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:336)
  34. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
  35. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
  36. ... 27 more
  37. Caused by: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiao.comment.bean.Comment'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiao.comment.bean.Comment
  38. at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:113)
  39. at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:88)
  40. at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:460)
  41. ... 30 more
  42. Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiao.comment.bean.Comment'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiao.comment.bean.Comment
  43. at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:100)
  44. at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:257)
  45. at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:244)
  46. at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:236)
  47. at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:109)
  48. ... 32 more
  49. Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiao.comment.bean.Comment'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiao.comment.bean.Comment
  50. at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:114)
  51. at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:127)
  52. at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:98)
  53. ... 36 more
  54. Caused by: java.lang.ClassNotFoundException: Cannot find class: com.xiao.comment.bean.Comment
  55. at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:188)
  56. at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:87)
  57. at org.apache.ibatis.io.Resources.classForName(Resources.java:254)
  58. at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:110)
  59. ... 38 more

    一下配置文件
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
    <mapper namespace="com.xiao.comment.dao.CommentMapper" >
    <resultMap id="BaseResultMap" type="com.xiao.comment.bean.Comment" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue May 05 17:24:12 CST 2015.
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="userid" property="userid" jdbcType="INTEGER" />
    <result column="pointid" property="pointid" jdbcType="INTEGER" />
    <result column="detail" property="detail" jdbcType="VARCHAR" />
    <result column="addtime" property="addtime" jdbcType="TIMESTAMP" />
    <result column="username" property="username" jdbcType="VARCHAR" />
    <result column="commenttype" property="commenttype" jdbcType="VARCHAR" />
    <result column="code" property="code" jdbcType="VARCHAR" />
    <result column="state" property="state" jdbcType="INTEGER" />
    <result column="parentid" property="parentid" jdbcType="INTEGER" />
    <result column="parenttype" property="parenttype" jdbcType="VARCHAR" />
    </resultMap>
    
    mybatis配置
    
    <!-- SqlSesstion Factory 定义 ↓ mybatis文件 -->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <!-- 自动扫描entity目录,省略Configuration.xml里手工配置 -->
        <property name="mapperLocations" value="classpath*:/com/xiao/**/dao/**/*Mapper.xml"/>
    </bean>
    <!-- SqlSession Factory 定义 ↑ -->
    
    <!-- MapperScannerConfigurer定义,用于扫描Mapper DAO类 ↓ -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.xiao.**.dao.**"/>
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
    </bean>
    <!-- MapperScannerConfigurer定义,用于扫描Mapper DAO类 ↑ -->
    
    实体类
    package com.xiao.comment.bean;
    

import java.util.Date;

public class Comment {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cb_comment.id

0

5个回答

求各位大神关注一下吧!!!!!不明白什么错啊a

0

Cannot find class: com.xiao.comment.bean.Comment

0
qq_22676421
橘子^^ 路径对着呢!!!不知到为什么报这个错
大约 4 年之前 回复

mybaties的配置文件有错误!

0

CommentMapper.xml 检查下这个文件有没有什么地方写错,看你异常是提示找不到com.xiao.comment.bean.Comment

0

没有找到这个类com.xiao.comment.bean.Comment

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
不知道哪出错了
[color=#FF0000]JS:[/color]rnrnString.prototype.format = function() rn var s = this; rn for (var i=0,j=arguments.length; i 2)?arguments[2]:365,rn path = (arguments.length > 3)?arguments[3]:"/";rn with(new Date())rn setDate(getDate()+days);rn days=toUTCString();rn rn document.cookie = "0=1;expires=2;path=3".format(name, value, days, path);rn ,rn Get : function ()rn var returnValue=document.cookie.match(new RegExp("[\b\^;]?" + arguments[0] + "=([^;]*)(?=;|\b|$)","i"));rn return returnValue?unescape(returnValue[1]):returnValue;rn ,rn Delete : function ()rn var name=arguments[0];rn document.cookie = name + "=1 ; expires=Fri, 31 Dec 1900 23:59:59 GMT;";rn rnrnrnvar stTransform = function(s2t)rn var s="万与.......";rn var t="萬與.......";rn s2t = !!s2t || false;rn Cookie.Set("l",s2t?"t":"s");rn var stt = function(str)rn var r = "",i,j,k,c;rn for (i=0,j=str.length; i-1)rn return;rn if(o.title)rn o.title = stt(o.title);rn if(o.alt)rn o.alt = stt(o.alt);rn if(o.tagName && o.type && o.tagName.toUpperCase()=="INPUT" && ",button,submit,reset,".indexOf(o.type.toLowerCase())>-1)rn o.value = stt(o.value);rn for (var i=0,j=o.childNodes.length; i繁体rn[color=#FF0000]rn问题是只能变为繁体,无法变回到简体[/color]
不知道哪出错了?
用结构实现对学生的管理rn#includern#includern#includern#includernstruct Studentrnrn int sid;rn std::string name;rn double score;rn int rank;rn;rnviod printInfo( const Student & s)rnstd::cout<b.score;rnrnvoid put(int &i,char*s="",double &d)rnstd::cout<<"请分别输入学号,姓名,成绩"<>i>>s>>d;rnid=i;rnstrcpy(name,s);rnscore=d;rnrnint main()rnrn int N=5;rn Student s[];rn std::listls;rn for (i=0;i!=n;++i)rn ls.push_back(s[i]);rn ls.sort( compByScore);rn typedef std::list::itrator StudIter;rn for ( StudIter iter=ls.begin();iter!=ls.end();++iter)rn iter->rank=std::distance(ls.begin(),iter)+1;rn std::cout<<"after sort:"< pr;rn for(StudIter iter=ls.begin();iter!=ls.end();++iter)rn rn pr=std::equal_range(iter,ls.end(),*iter,compByScore);rn for(StudIter iter2=pr.first;iter2!=pr.second;++iter2)rn iter2->rank=iter->rank;rn rn std::cout<<"after reRank:"<
急死了不知道是哪出错了...
我用的是ACCESS数据库3张表分别是Employe,Department,Comany ,vs2005在做个员工管理的系统第一次用,看Scott Mitchell的ASP.NET2.0数据指南这个书,在2005里面创建强类型的DataSet和Table Adapterrn写上了个SQL语句rnrnSELECT [Employe_ID], [Employe_Name], [Department_ID], [Employe_Position], rn [Employe_Email], [Employe_Mobile], [Employe_Phone], [Employe__QQ], rn [Employe_MSN], [Employe_State],rn (SELECT Department_Namern FROM Departmentrn WHERE Department.Department_ID = Employe.Department_ID) rn AS Department_NamernFROM Employern提示说SELECT 子句错误: “SELECT”附近的表达式。rnSELECT 子句错误: “FROM”附近的表达式。rn缺少 FROM 子句。rn无法分析查询文本。rnrn我要是在在下面加个SELECT [Employe_ID], [Employe_Name], [Department_ID], [Employe_Position], rn [Employe_Email], [Employe_Mobile], [Employe_Phone], [Employe__QQ], rn [Employe_MSN], [Employe_State],rn (SELECT Department_Namern FROM Departmentrn WHERE Department.Department_ID = Employe.Department_ID) rn AS Department_NamernFROM Employernwhere Department_ID=@Department_IDrn他就会说至少有一个变量未被指定值rnrnrn请问这是怎么回事啊...,,,,,我急.......急死了rn
hibernate学生-课程-成绩
本人做一个hibernate学生-课程-成绩,的对于关系,数据能到数据库中去,但还是报了错,是配置文件出错了,求高手帮我改改。
不知道哪错了,求指教
#includern#includernclass consumerrnrnprotected:rn char kahao[20];rn char name[20];rn char password[10];rn float money;rnpublic:rn consumer(char Name[],char Kahao[],float Money,char Password[]);rn char* getname();rn char* getkahao();rn char* getpassword();rn float getmoney();rn void setmoney(float m);rn void setpassword(char p[]);rn rn;rnrnclass ATM:public consumerrnrn int times;rn consumer cnsm; rnpublic:rn ATM(consumer &cnsm);rn void welcome(); //欢迎界面rn bool checkpasswd(char num[],char pswd[]); //核对密码rn void changepasswd(); //修改密码rn void fetchmoney(); //取款rn void information(); //查询信息rn void functionshow(); //功能界面rn void lock();rn;rnconsumer::consumer(char Name[],char Kahao[],float Money,char Password[])//构造函数,建立账户rnrn strcpy(name,Name);rn strcpy(kahao,Kahao);rn money=Money;rn strcpy(password,Password);rnrnchar* consumer::getname()return name;rnchar* consumer::getkahao()return kahao;rnchar* consumer::getpassword()return password;rnfloat consumer::getmoney()return money;rnvoid consumer::setmoney(float m)rnmoney=m;rnvoid consumer::setpassword(char p[])rn strcpy(password,p);rnrnvoid ATM::welcome()rnrn times=0;rn cout<<"*欢迎使用银行ATM自动取款机*"<>num;rn cout<<"请输入密码:";rn cin>>passwd;rn if(!checkpasswd(num,passwd))rn rn cout<<"你输入的卡号或密码有误,请从新输入"<=3) lock();rnrnbool ATM::checkpasswd(char num[],char pswd[])rnrn if(strcmp(num,cnsm.getkahao())==0&&strcmp(pswd,cnsm.getpassword())==0)rn return true;rn else rn return false;rnrnvoid ATM::functionshow()rnrn int n;rn cout<4)rn rn cout<<"请输入正确的操作序号!"<>n;rn rn switch(n)rn rn case 1:changepasswd(); break;rn case 2:fetchmoney(); break;rn case 3:information(); break;rn// case 4:exitATM(); break;rn default:break;rn rnrnvoid ATM::changepasswd()rnrn char pasw[10],repasw[10];rn times=0;rn cout<>pasw;rn if(strcmp(pasw,cnsm.getpassword())==0)rn rn cout<<"请输入新密码:";rn cin>>pasw;rn int test;rn test=strlen(pasw);rn if(test<6)rn rn cout<<"密码不能小于6位"<6&&test<10)rn rn cout<<"请再输入一次新密码:";rn cin>>repasw;rn if(strcmp(pasw,repasw)!=0)rn rn cout<<"你输入的两次密码不一样,请重新输入!"<=3) lock();rnrnvoid ATM::fetchmoney()rnrn float m;rn cout<>m;rn while(m<=0)rn rn cout<<"请输入正确的数字!"<>m;rn rn if(m>5000)rn rn cout<<"对不起,每次最多取5000元"<=m)rn rn cout<<"对不起,你的余额不足!"<
javabean:不知道是哪错了!
String worker_write;rn Connection cn=null;rn Statement stem=null;rn ResultSet rs=null;rn tryrn rn String workername=new String(worker_name.getBytes("ISO8859_1"),"GBK");rn cn = DriverManager.getConnection("jdbc:microsoft:sqlserver://134.164.10.8:1433;DatabaseName=tele","tele", "totele");rn stem = cn.createStatement();rn rs=stem.executeQuery("insert into worker_list (worker_name,worker_time,worker_type,worker_gut) values ('"+worker_name+"',getdate(),'"+worker_type+"','"+worker_gut+"')");rn worker_write="Y";rn rn catch(Exception e)rn rn worker_write="N";rn rn return worker_write;
drawImage返回flase,不能正常显示的解决方案
问题: 该函数中用Graphics::drawImage显示图片,如下示 boolean b=false; b=g.drawImage(imgError,thex(i),they(j),this); 在开始的一段时间内返回值b经常会是false,导致显示不正常,但是,只要显示一段时间后,即该函数被调用若干次后返回值b就会一直是true,再也不会返回false了。 解...
阿里巴巴编码规范 基础技能认证 考题分析(考题+答案)
考试题98分,哪题错了不知道,希望大家还是看官方提供规范,仔细看都可以过
猴子选大王 不知道哪出错了
//单链表类型及其基本操作函数的定义rn#define OK 1rn#define ERROR 0rn#define OVERFLOW -2rn#define TRUE 1rn#define FALSE 0rntypedef int Status;rn#define OVERFLOW -2rn#define TRUE 1rn#include rn#include rn#include rntypedef int LElemType;rntypedef struct Lnodern LElemType data;rn struct Lnode *next;rn *LinkedList; //LinkedList为单链表类型rnrnvoid CreatList_l(LinkedList &L, int n) //正序创建单链表rn LinkedList p,q;rn int i;rn L=q=(LinkedList)malloc(sizeof(struct Lnode));rn L->data=1; rn for(i=2;i<=n;i++)rn rn q->next=(LinkedList)malloc(sizeof(struct Lnode));rn q->data=i; rn q=q->next;rn rn q->next=L;rnrnrn//循环单链表类型及其基本操作函数的定义rnLElemType Count(LinkedList &L,int m,int n)rnrn int i,j;rn LinkedList p,q;rn p=L;rn q=p->next;rn for(j=1;j<=m-1;j++)rn rn for(i=1;i<=n-2;i++)rn rn p=p->next;rn q=q->next;rn rn p->next=q->next;rn p=q->next;rn free(q);rn q=p->next; rn rn return(p->data); rn rnint main()rn rn int n,m;rn int king; rn LinkedList L;rn LElemType data;rn printf("请输入猴子的数目m:"); scanf("%d",&m);rn printf("输入整数n:"); scanf("%d",&n);rn CreatList_l(L,m);rn king=Count(L,m,n);rn printf("猴子大王是:%d!\n",king);rn system("pause");rn return 0;rnrnrnrnrn测试的时候 输入m = 3 ;n = 2rn会出现溢出rn应该在哪个地方怎么修改rn请高人指点
Spring配置Hibernate 配置文件哪出错了
[code=XML]rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn cn/zxap/bean/Student.hbm.xmlrn rn rn rn rn org.hibernate.dialect.SQLServerDialectrn updatern falsern falsern rn rn rn rn rn rn rn rn rnrn[/code]rnrnrn我一用rn[code=Java]rnApplicationContext applicationContext = new ClassPathXmlApplicationContext(rn "beans.xml");rn[/code]rn就报异常rn[code=XML]rnrnlog4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).rnlog4j:WARN Please initialize the log4j system properly.rnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [beans.xml]; nested exception is java.lang.IllegalArgumentException: protocol = http host = nullrn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)rn at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)rn at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at cn.zxap.service.StudentServiceTest.setUpBeforeClass(StudentServiceTest.java:17)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)rn at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)rn at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)rn at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)rnCaused by: java.lang.IllegalArgumentException: protocol = http host = nullrn at sun.net.spi.DefaultProxySelector.select(Unknown Source)rn at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)rn at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)rn at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDocumentEntity(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setInputSource(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)rn at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)rn at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)rn at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)rn ... 28 morern[/code]
一个简单的问题,不知道哪出错了
以前都是做java的,没碰到过这种问题,就是一般c++中声明定义放.h中,实现在.cpp。但是我自己做了如下实验却不行rnrntmp.h:rnclass tstClsrnrn public:rn void myDisplay();rnrnrntmp.cpp:rn#include "tmp.h"rnrnvoid tstCls::myDisplay()rnrn cout<<"asdadasd"<
『UVA 1619』感觉不错
题意:求一段连续子序列al,…,ar,使(al+..+ar)*min{al,…ar}尽量大.个人感想:明显的RMQ+前缀和,但是UVA有点坑,题目上的意思是pecial judge,可是输出必须得区间最小的,而且最左边的,我用线段树做的RMQ直接wa,我只能用直接的RMQ了..还有一个输出是个坑点,否则就PE分析:RMQ(用于记录最小值的位置)+前缀和代码:/* Author:GavinjouEle
数组倒置的递归算法 不知道哪出错了
public class ReverseArray n public static void main(String[] args) n //定义数组n int a[] = 2,3,4,5,6;n n reverse(a,0,a.length-1);n //遍历输出n for(int i = 0;i < a.length;i++) n System.out.print(a[i]);n n n //做递归n public static void reverse(int a[],int i,int j) n if(j > i) n Swap(a,a[i],a[j]);n reverse(a,i+1,j-1);n n n //数组中两个数交换n private static void Swap(int a[],int l,int k) n // TODO Auto-generated method stubn int temp = a[l];n a[l] = a[k];n a[k] = temp;n n nnn输出 数组越界 望大家教教
jsp页面出现乱码,不知道哪出错了?
<%@ page language="java" contentType="text/html; charset=GB18030"rn pageEncoding="GB18030"%>rn<%@ page import="com.weiweiqin.*" %> rn<%@ include file="_sessioncheck.jsp" %> rn <% rn request.setCharacterEncoding("GB18030");rn String name=request.getParameter("name");rn out.println(name);//name出现乱码rn %>rnrnrnrn rn Insert title herernrnrn rn //输入框rnrnrnrnrnrn在输入框中输入“你好”rnString name=request.getParameter("name");rnout.println(name);//name出现乱码且输出为ÄãºÃ rnrnrn
一个题目,不知道哪出错了,见鬼!!!
http://acm.tju.edu.cn/toj/showp2819.htmlrnrnrnrn以下是我写的代码,用提供的数据验算没有错,但是提交的时候就wa,麻烦高手指点指点!!!!rnrnrnrn#includernrnusing namespace std;rnrnint path[1001][1001];rnint main()rnrn int i,j,k,h;rn rn int n;rn cin>>n;rn rn int S,T;rn int N,M;rn for(i=1;i<=n;i++)rn rn rn rn cin>>N>>M;rn for(k=1;k<=1000;k++)rn rn for(j=1;j<=1000;j++)rn rn path[k][j]=-1;rn rn rn rn cin>>S>>T;rn for(j=1;j<=M;j++)rn rn int a,b,length;rn cin>>a>>b>>length;rn path[a][b]=length;rn path[b][a]=length;rn rn for(h=1;h<=N;h++)rn rn if(h==S||h==T) continue;rn if(path[S][h]!=-1&&path[h][T]!=-1&&(path[S][h]+path[h][T]
Linux之拯救配置文件出错----------------基本上命令全部丧失
在使用linux的时候经常会需要配置一些环境变量,如果有配置出错,就会导致系统的“瘫痪”,怎么补救呢? (1)如果你重启了,在图形化界面你会发现登录不了,这个时候可以切换到纯命令界面(ctrl+alt+F5),登录进去之后就可以使用另一种方式去把配置文件修改正确了(绝对路径可以使用) : 1.cd /bin(可以使用cd命令) 2./bin/vi /etc/pr...
求1条SQL语句 不知道哪出错了
SELECT 'A' AS JoinFlag ,A.CODE,B.CODE FROM NameJp AS A rnLEFT JOIN (SELECT 'A' AS JoinFlag ,HZ,CODE FROM NameJp) AS B On B.HZ = SUBSTRING('张三',2,1)AND A.JoinFlag=B.JoinFlagrnWHERE A.HZ = SUBSTRING('张三',1,1)rnrn这句话不知道错哪了
c++primer 6.12,代码不知道哪出错了,求指教!
寻找重复出现的单词并记录重复次数,最后输出重复次数最多的单词和次数rn[code=c]#includern#includernusing namespace std;rnint main()rnrn string word,preword,repword;rn int repnum=0,maxnum=1;rn while(cin>>word)rn if(word==preword)rn ++repnum; //重复单词计数rn elsern if(repnum>maxnum) //出现重复次数更多的单词rn maxnum=repnum;rn repword=preword;rn rn repnum=1; //计数器置1rn rn preword=word;rn rn if(maxnum==1)rn cout<<"no repeat"<
SPIN控件的使用问题
我的程序哪里错了为什么不能调节,,不知道哪里出错了,请大家看看,要写20字真是烦人
哪出错了?
从键盘输入10个整数,用函数编程实现将其中最大数与最小数的位置对换后,再输出调整后的数组rn#include rnint hanshu(int a[])rnrnint i,temp,j,max,min;rnmax=a[0];rnfor(i=1;i<=9;i++)rnrnif(a[i]>max)rnmax=a[i];rnrnmin=a[9];rnfor(j=0;j<=8;j++)rnrnif(a[j]
归并排序,哪出错了?
[code=Java]rnclass DArrayrn public void mergeSort(int[] arr,int left,int right)rn if(left
谁知道哪出错了?
#include rn#include rn//using std::bad_alloc;rnrnint main()rnrn double *ptr[50];rnrn tryrn for(int i=0;i<50;i++)rn rn ptr[i]=new double[5000000];rn cout<<"allocated 5000000 doubles in ptr["<
access,哪出错了???
出错提示:rnMicrosoft OLE DB Provider for ODBC Drivers (0x80004005)rn[Microsoft][ODBC Microsoft Access Driver] 不能更新。数据库或对象为只读。rn为什么??
哪出错了?
错误类型:rnMicrosoft VBScript 编译器错误 (0x800A0401)rn语句未结束rn/bbs/新建 文本文档.asp, line 54, column 19rntitle=" 第"&RS.AbsolutePage&"&/&"&RS.PageCount&"页rn------------------^rn原码:rntitle=" 第"&RS.AbsolutePage&"/"&RS.PageCount&"页 共"&RS.RecordCount&"条记录rnIF RS.AbsolutePage>1 thenrntitle=title&"上一页"rnElsern title=title&"上一页"rn End ifrn if RS.AbsolutePage下一页"rn Elsern title=title&"下一页"rn if RS.AbsolutePage>1 thenrn title=title&"首页"rn elsern rn title=title&"首页"rn End ifrn IF RS.Absolutepage尾页"rn else rn rn title=title&"尾页"rn end ifrntitle=title&"第页"
哪出错了???
以下代码哪出错了???怎样改??rnimport java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.*;rnimport java.sql.*;rnimport java.util.*;rnpublic class DatabaseFrame extends aFramern public static void main (String [] args)rn aFrame frame = new aFrame();rn frame.setDefaultCloseOperation(EXIT_ON_CLOSE);rn frame.setSize(300, 400);rn frame.show();rn rn rnrnclass aFrame extends JFramern public aFrame()rn Container c = getContentPane();rn c.add(new aPanel());rn rnrnrnclass aPanel extends JPanelrn private JTextField text1 = new JTextField(15);rn private JTextField text2 = new JTextField(15);rn private JTextField text3 = new JTextField(15);rn private JTextField text4 = new JTextField(15);rn private JTextField text5 = new JTextField(15);rn rn private JButton abutton = new JButton("Add");rn private JButton bbutton = new JButton("Cleat");rn rn private JPanel a = new JPanel();rn private JPanel b = new JPanel();rn rn public aPanel()rn add(a, BorderLayout.CENTER);rn add(b, BorderLayout.SOUTH);rn rn a.setLayout(new GridLayout(5,1));rn a.add(text1);a.add(text2);a.add(text3);a.add(text4);a.add(text5);rn b.add(abutton);b.add(bbutton);rn abutton.addActionListener(add);rn bbutton.addActionListener(clear);rn rn rn addlistener add = new addlistener();rn clearlistener clear = new clearlistener();rn rn rn private class addlistener implements ActionListenerrn Connection con = null;rn public void database() throws SQLException, ClassNotFoundExceptionrn Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");rn con = DriverManager.getConnection("jdbc:odbc:personinfo");rn Statement stmt = con.createStatement();rn tryrn int rs = stmt.executeUpdate("insert into personinformation (name, "rn + "sex, birthday, address, telephone) values ('" + text1.getText()rn + "', '" + text2.getText() + "', '" + text3.getText() + "', '" +rn text4.getText() + "', '" + text5.getText() + "')");rn System.out.print(rs);rn rn catch(SQLException s)rn System.out.print("sql");rn rn finallyrn stmt.close();rn con.close();rn rn rn public void actionPerformed(ActionEvent e)rn add.database();rn rn rn rn private class clearlistener implements ActionListenerrn public void actionPerformed(ActionEvent e)rn text1.setText("");rn text2.setText("");rn text3.setText("");rn text4.setText("");rn text5.setText("");rn rn rn
到底是哪出错了
在执行时会抱这个错误rnProject Project1exe raised exception class EClassNotFound with message 'Class TDBText not found' Process stopped.Use Step or Run to continue rn各位大哥指点,最好留下QQrnrn
看下哪出错了。。
#includernusing namespace std;rnclass QNErnrn public :rn static int a;//定义静态成员 rn int b;rn ONE(int c,int b)rn a=c;this->b=b; rn ;rn int ONE::a=0;//类外定性说明 rn int main()rn rn ONE one(10,20);rn cout<<"one.a="<
初学者 不知道哪错了
rnrn factor!!!!rn rnrnrnrn rnrnrn rnrn--------------------------------------------------------------rnrn看了几遍,不知道哪错了,求教。谢谢。
python不知道哪错了
不知道哪里出错了 运行不了 就是创建一个文本文件,将文本写入文本文件rnrnrnrn'''makeTextFile.py--creat text file,rn now'''rnrnimport osrnls=os.lineseprnrn#get a filenamernwhile True :rn fname=raw_input()rn if os.path.exists(fname):rn print "Error: '%s' already exists", fnamern else :rn breakrnrnrn#get file content(test) linesrnall=[]rnprint "\nEnter lines('.' by itself to quit).\n"rnrn#loop until user terminates inputrnwhile True:rn entry=raw_input('.')rn if entry=='.':rn breakrn else:rn all.append(entry)rnrnrn#write lines to file with proper line-endingrnrnfobj=open(fname,'w')rnfobj.writelines(['%s%s' % (x,ls) for x in all])rnrnfobj.close()rnprint 'Done!'rn
不知道哪错了????
题目:rnrnA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists a strictly increasing sequence of indices of X such that for all j = 1,2,...,k, xij = zj. For example, Z = is a subsequence of X = with index sequence <1, 2, 4, 6>. Given two sequences X and Y the problem is to find the length of the maximum-length common subsequence of X and Y.rnrnThe program input is from a text file. Each data set in the file contains two strings representing the given sequences. The sequences are separated by any number of white spaces. The input data are correct. For each set of data the program prints on the standard output the length of the maximum-length common subsequence from the beginning of a separate line.rnrnSample Inputrnrnabcfbc abfcabrnprogramming contest rnabcd mnprnrnSample Outputrnrn4rn2rn0rnrnrnrnrnrnrnrnrnrn一下是我的答案,对这些数据没有错误,但是提交就是wa....rnrnrnrn#includern#includernusing namespace std;rnint main()rnrn string a,b;rn int i,j,alen,blen,cnt,p;rn while(cin>>a>>b)rn rn cnt=0;rn p=0;rn rn alen=a.size();rn blen=b.size();rn for(i=0;i
哪出错了
设计一个函数,用来判断一个整数是否为素数rn#include rnint abc(int a)rnrnint i;rnif(a<=1)rnreturn 0;rnelsernrnfor(i=2;i
哪一句出错了?
class Demo1rnrn public int a; rnrnrnclass Demo2rnrn public jisuan(Demo1 d) //参数为Demo1的对象drnrn int x=d.i; //(1)rn int y=i; //(2)rnrnrnrn在(1)(2) 两个语句中那个是错误的啊??
看看哪出错了
写一个C或者C++程序完成字符串的转换,如把2008转换为1个2,2个0,1个8,即122018;my2009转换为1m1y122019rnrnrnrnrnrn#include "stdio.h"rn#include"string.h"rnchar * fun(char *p)rnrn char *s,t;rn int i=0,j=0;rnrn for(i=1;*p!='\0';p++,j++)rn rn t=*p;rn for(i=0;*p==t;p++)rn rn i++;rn rn *(s+(j++))=i;rn *(s+j)=*(--p);rn rn *(s+j)='\0';rn return s;rnrnrnvoid main()rnrn char *a;rn scanf("%s",a);rn printf("%s",fun(a));rnrnrn
编译错误,哪出错了?
--------------------Configuration: ogltest - Win32 Debug--------------------rnLinking...rnLIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16rnDebug/ogltest.exe : fatal error LNK1120: 1 unresolved externalsrnError executing link.exe.rnrnogltest.exe - 2 error(s), 0 warning(s)rn
hd1004哪出错了
Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result.rnrnThis year, they decide to leave this lovely job to you. rnrn rnrnInputrnInput contains multiple test cases. Each test case starts with a number N (0 < N <= 1000) -- the total number of balloons distributed. The next N lines contain one color each. The color of a balloon is a string of up to 15 lower-case letters.rnrnA test case with N = 0 terminates the input and this test case is not to be processed.rnrn rnrnOutputrnFor each case, print the color of balloon for the most popular problem on a single line. It is guaranteed that there is a unique solution for each test case.rnrn rnrnSample Inputrn5rngreenrnredrnbluernredrnredrn3rnpinkrnorangernpinkrn0rn rnrnSample Outputrnredrnpinkrnrnrnrn代码如下:rn#includern#includern#includernusing namespace std;rnrnint main()rnrn //freopen("input.txt","r",stdin);rn int N;rn while(cin>>N&&N)rn rn string str[10010];rn int arr[1000];rn memset(arr,0,sizeof(arr));rn int i,j;rn for(i=0;i>str[i];rn if(i==0)rn arr[i]=1;rn elsern rn for(j=0;jarr[j])rn rn k=i;rn rn cout<rn#includern#includernusing namespace std;rnrnint main()rnrn //freopen("input.txt","r",stdin);rn int N;rn while(cin>>N&&N)rn rn string str[10010];rn int arr[1000];rn memset(arr,0,sizeof(arr));rn int i,j;rn for(i=0;i>str[i];rn for(j=0;j<=i;++j)rn rn if(str[i].compare(str[j])==0)rn rn arr[j]++;rn rn rn rn int k;rn for(i=1;iarr[i]?k=j:k=i;rn cout<
哪一行出错了?
what is the output of this code?rntypedef structrn int age;rn char name[20];rnPerson;rnrnPerson p=25,"John";rnPerson *ptr=&p;rnprintf("%d",ptr->a);rnrnrnA 25rnB JohnrnC ErrorrnD Address of prnrn正确答案是CrnrnPerson *ptr=&p; 看不懂,一个指针?rnprintf("%d",ptr->a);看不懂,a是一个对象?rnrn这哪一行出错了?
排序不知道哪错了
[code=c]#include rnrnint main(void)rnrn long array[5]=5,4,3,2,1;rn int i,j,key;rnrn for(i=1;i<5;i++)rn rn key=array[i];rn j=i-1;rn while(j>=0 && array[j]>key)rn rn array[j+1]=array[j];rn j--;rn rn array[j]=key;rn rn rn for(i=0;i<5;i++)rn printf("%d",array[i]);rn[/code]
不知道到底是哪错了?
以下是小弟照书(PDF不是很清楚)编的一个猜数字的小游戏,对于文本属性的一些问题还是不大明白,比如像textattr的用法,请大家帮忙看看哪有错误!rnrn#include rn#include rn#include rn#include rnvoid main(void)rnrn int answer[4],guess=0,a,b,times=0,i,j; /*定义数组answer[4]用来放答案,guess用来放玩家所猜出的数,位置和数字都对的用A来表示,只是数字对的用B表示*/rn clrscr();rn for (i=0;i<=3;i++)rn rn randomize(); /*随机数发生器*/rn answer[i]=rand()%10; /*这句就有些不明白了,请达人详解*/rn for (j=0;j9999);rn for (i=3;i>-1;i--)rn rn for (j=0;j<4;j++)rn rn if ((int)(guess/pow10(i)==answer[j]) /*开始比较最高位的数是否和答案一样*/rn rn if (i+j=3) a=a+1;rn else b=b+1;rn rn rn guess=guess-(int)(guess/pow10(i))*pow10(i); /*去掉上次比较的那一位数,进入下一位比较*/rn rn window (20,0,40,31);rn cprintf ("\n\r% %dA%dB\n",a,b); /*最后输出是_A_B*/rn rn
疯了 不知道哪错了
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auctionManager' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'auctionUserDao' while setting bean property 'userDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'auctionUserDao' is definedrnCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'auctionUserDao' is definedrnrn----------------------------------rn相关代码rnorg.qjkt.service.impl.AuctionManagerImplrnrnrnprivate AuctionUserDao userDao;rn private BidDao bidDao;rn private ItemDao itemDao;rn private KindDao kindDao;rn private StateDao stateDao;rn private MailSender mailSender;rn private SimpleMailMessage message;rn rn public void setUserDao(AuctionUserDao userDao) rn this.userDao = userDao; rn rnrn public void setBidDao(BidDao bidDao) rn this.bidDao = bidDao; rn rnrn public void setItemDao(ItemDao itemDao) rn this.itemDao = itemDao; rn rn--------------------------------------------------------------rnapplicationContext.xmlrnrn rn rn rn rn rn rn rn rn rn------------------------------------------------rn希望大家踊跃发言 谢谢大家了
新手,不知道哪错了....
#include < stdio.h >rnvoid main()rnrn int i,num[10];rnrn for ( i=0;i<=9;i++; )rn scanf( "%d",&num[i] );rnrn for ( i=0;i<=9;i++; )rn printf( "%d",num[i] );rnrn上面在VC里有一个错误....不知道在哪....求大家帮我看看.........
文章热词 机器学习教程 Objective-C培训 交互设计视频教程 颜色模型 设计制作学习
相关热词 mysql关联查询两次本表 native底部 react extjs glyph 图标 java培训最好是哪 java配置文件的学习