bug 总结

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.mybatis.mapper.OrdersMapper.finarray

at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:189)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:43)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51)

找不到dao层和mapper层对应的接口文件
1:检查xml文件所在的package名称是否和interface对应的package名称一一对应

2:检查xml文件的namespace是否和xml文件的package名称一一对应

3:检查函数名称能否对应上

4:去掉xml文件中的中文注释

5:随意在xml文件中加一个空格或者空行然后保存
最后我的时在spring-mybaties加入如下配置
    </plugins>
      <resources>
          <resource>
              <directory>src/main/java</directory>
              <includes>
                  <include>**/mapper/*Mapper.xml</include>
              </includes>
          </resource>
      </resources>
  </build>

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sourceController': Unsatisfied dependency expressed through field 'dataSourceService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.bigdata.service.DataSourceService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
[org.springframework.web.context.ContextLoader] - Context initialization failed


serviceimpl没有写注解

空指针异常:没有实例化对象

使用hive API,执行HQL语句时,返回的结果根据执行的语句得到的结果来确定
<code>true</code> if the first result is a <code>ResultSet</code>object;
 <code>false</code> if it is an update count or there are no results

执行sqoop的API命令
sqoop: command not found
环境变量的配置为当前用户的文件
source .bash_profile && sqoop list-databases --connect jdbc:mysql://192.168.21.128:3306 --username root --password 000000
环境变量的配置为整个系统的环境变量
source /etc/profile && sqoop list-databases --connect jdbc:mysql://192.168.21.128:3306 --username root --password 000000


org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.bigdata.po.DataSource with invalid types () or values (). Cause: java.lang.NoSuchMethodException: com.bigdata.po.DataSource.<init>()
    org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:76)
    org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:421)
    com.sun.proxy.$Proxy38.selectList(Unknown Source)
    org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:206)
    org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)
    org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
    org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
    com.sun.proxy.$Proxy40.gethive(Unknown Source)
    com.bigdata.service.impl.dataFlowServiceImpl.getHiveSource(dataFlowServiceImpl.java:26)
    com.bigdata.controller.dataFlowController.getHiveSource(dataFlowController.java:35)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:497)
    org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
    org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
    org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:849)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:760)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

在bean对象中写入一个空构造方法

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值