精华内容
下载资源
问答
  • java 中报错 ~[classes/:na]

    千次阅读 2020-06-22 17:14:01
    java 中报错 ~[classes/:na] java.lang.NullPointerException: null at org.asu.pro.bean.Hr.getAuthorities(Hr.java:31) ~[classes/:na] at org.springframework.security.authentication.dao....

    java 中报错 ~[classes/:na]

    java.lang.NullPointerException: null
    	at org.asu.pro.bean.Hr.getAuthorities(Hr.java:31) ~[classes/:na]
    	at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.createSuccessAuthentication(AbstractUserDetailsAuthenticationProvider.java:225) ~[spring-security-core-5.3.2.RELEASE.jar:5.3.2.RELEASE]
    	at org.springframework.security.authentication.dao.DaoAuthenticationProvider.createSuccessAuthentication(DaoAuthenticationProvider.java:137) ~[spring-security-core-5.3.2.RELEASE.jar:5.3.2.RELEASE]
    	at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:197) ~[spring-security-core-5.3.2.RELEASE.jar:5.3.2.RELEASE]
    	at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:199) ~[spring-security-core-5.3.2.RELEASE.jar:5.3.2.RELEASE]
    	
    

    主要需要值得注意的是NullPointerException空指针异常,去getAttributes()方法中:

    List<SimpleGrantedAuthority> authorities = new ArrayList<>();
    for(Role role:roles){
        authorities.add(new SimpleGrantedAuthority(role.getName()));
    }
    return authorities;
    

    空指针异常报错的是第31行,也就是:

    for(Role role:roles){}
    

    那么就是其中的roles是空的,里面没有值所以会报这个错误,也就是前面忘了进行赋值。

    展开全文
  • 在运行程序的时候出现大致如下的报错: ... at com.example.demo.aop.DemoAOP.doBefore(DemoAOP.java:66) ~[classes/:na]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ...

    在运行程序的时候出现大致如下的报错:
    java.lang.NullPointerException: null
        at com.example.demo.aop.DemoAOP.doBefore(DemoAOP.java:66) ~[classes/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_171]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_171]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_171]

    卡断点卡在userName:

    String userName = request.getSession().getAttribute("userName").toString();
    String password = (String) request.getSession().getAttribute("password");

    思考后发现在session的作用域中没有userName这一变量,所以他是null,则不能使用toString()方法将其转成String,所以程序报错,解决方法是在赋值的时候使用强转型方式,也就是password变量的赋值方式,这样就算session作用域中获取到的变量为null,赋值时不会报出[classes/:na]错,并将被赋的变量值初始为null;

    另外的,在if语句判断变量是否为空,常用的如:userName!=null 和 !userName.equals("")同时判断,这里的判断null和equals("")的前后执行顺序也可能出现[classes/:na]错误,解决的方法是永远将userName!=null先于!userName.equals("")执行,即if(userName!=null && !userName.equals(""))。

    展开全文
  • 73) ~[classes/:na]

    2020-03-16 23:02:28
    1.场景 启动springboot整合shiro项目,开始正常,登录用户验证报异常,如下: ... at com.realm.UserRealm.doGetAuthenticationInfo(UserRealm.java:73) ~[classes/:na] 报错代码 UserBean bean = userServic...

    1.场景

    启动springboot整合shiro项目,开始正常,登录用户验证报异常,如下:

     java.lang.NullPointerException: null
    	at com.realm.UserRealm.doGetAuthenticationInfo(UserRealm.java:73) ~[classes/:na]
    

    报错代码

      UserBean bean = userService.findByName(token.getUsername()); 
    

    2.分析:NullPointerException, 说明userService没有注入进来,为什么?

    解释shiro 的realm本身相当于过滤器,而在登录访问时会先走过滤器,再执行service注入,realm在前调用还没注入service这就会出现还没有进行service注入,已经再realm中调用注入的对象,因此就会出现上述异常

    3.解决:

    将realm声明bean的形式生成,那么再生成时就会强制注入service对象,这样就避免了上述异常,代码如下:
    在这里插入图片描述

    展开全文
  • at com.atguigu.springcloud.EurekaMain7001.main(EurekaMain7001.java:16) [classes/:na] 2020-07-17 12:55:13.851 INFO 703 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ...
  • JPA 懒加载的一个坑 大神可绕路 ..._name as login_na2_2_ from tbl_uac_user ..._name as login_na2_2_1_ from tbl_uac_role_user users0_ inner join tbl_uac_user uacuser1_ on users0_ .user _id=uacuser1...

    JPA 懒加载的一个坑 大神可绕路

    package com.liuzm.controller;
    
    import com.liuzm.entity.UacRole;
    import com.liuzm.entity.UacUser;
    import com.liuzm.service.UacUserService;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.RestController;
    
    import javax.annotation.Resource;
    import java.util.Set;
    
    @RestController
    public class UserController {
    
        @Resource
        private UacUserService uacUserService;
    
        @GetMapping("/")
        public Set<UacRole> findByLoginName() {
            UacUser uacUser = this.uacUserService.findByLoginName("admin");
            System.out.println(uacUser);
            Set<UacRole> roles = uacUser.getRoles();
            System.out.println(roles.size());
            return roles;
        }
    }
    

    package com.liuzm.entity;
    
    import com.fasterxml.jackson.annotation.JsonIgnore;
    
    import javax.persistence.*;
    import java.io.Serializable;
    import java.util.HashSet;
    import java.util.Set;
    
    @Entity
    @Table(name = "tbl_uac_role")
    public class UacRole implements Serializable {
        /**
         * serialVersionUID:用一句话描述这个变量表示什么.
         * @since JDK 1.7
         */
        private static final long serialVersionUID = -6263200210499558891L;
    
        /**
         * ID
         */
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private Long id;
    
        /**
         * 角色编码
         */
        @Column(name = "role_code")
        private String roleCode;
        @JsonIgnore
        @ManyToMany
        @JoinTable(name = "tbl_uac_role_user", joinColumns = {@JoinColumn(name = "role_id", referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")})
        private Set<UacUser> users = new HashSet<>();
    
        public UacRole() {
        }
    
        public UacRole(Long id) {
            this.id = id;
        }
    
        public Long getId() {
            return id;
        }
    
        public void setId(Long id) {
            this.id = id;
        }
    
        public String getRoleCode() {
            return roleCode;
        }
    
        public void setRoleCode(String roleCode) {
            this.roleCode = roleCode;
        }
    
        public Set<UacUser> getUsers() {
            return users;
        }
    
        public void setUsers(Set<UacUser> users) {
            this.users = users;
        }
    
        @Override
        public String toString() {
            return "UacRole{" +
                    "id=" + id +
                    ", roleCode='" + roleCode + '\'' +
                    ", users=" + users +
                    '}';
        }
    }
    package com.liuzm.entity;
    
    import com.fasterxml.jackson.annotation.JsonIgnore;
    
    import javax.persistence.*;
    import java.io.Serializable;
    import java.util.HashSet;
    import java.util.Set;
    
    @Entity
    @Table(name = "tbl_uac_user")
    public class UacUser implements Serializable {
        /**
         * serialVersionUID:用一句话描述这个变量表示什么.
         * @since JDK 1.7
         */
        private static final long serialVersionUID = 3439493474130693948L;
    
        /**
         * ID
         */
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private Long id;
    
        /**
         * 登录名
         */
        @Column(name = "login_name")
        private String loginName;
        @ManyToMany(mappedBy = "users")
        @JsonIgnore
        private Set<UacRole> roles = new HashSet<>();
    
        @Override
        public String toString() {
            return "UacUser{" +
                    "id='" + id + '\'' +
                    ", loginName='" + loginName + '\'' +
                    ", roles=" + roles +
                    '}';
        }
    
    
    
        public UacUser() {
        }
        public UacUser(Long id) {
            this.id = id;
        }
    
    
        public Long getId() {
            return id;
        }
    
        public void setId(Long id) {
            this.id = id;
        }
    
        public String getLoginName() {
            return loginName;
        }
    
        public void setLoginName(String loginName) {
            this.loginName = loginName;
        }
    
        public Set<UacRole> getRoles() {
            return roles;
        }
    
        public void setRoles(Set<UacRole> roles) {
            this.roles = roles;
        }
    }

    package com.liuzm.repository;
    
    import com.liuzm.entity.UacUser;
    import org.springframework.data.jpa.repository.JpaRepository;
    
    
    public interface UacUserRepository extends JpaRepository<UacUser, Long> {
    
        UacUser findByLoginName(String loginName);
    }
    

    package com.liuzm.service;
    
    import com.liuzm.entity.UacUser;
    
    public interface UacUserService {
    
        UacUser findByLoginName(String loginName);
    }
    

    server:
      port: 8000
      tomcat:
        uri-encoding: UTF-8
    spring:
      application:
        name: jpa-test
      jpa:
          generate-ddl: false
          show-sql: true
          hibernate:
            ddl-auto: update
          properties:
            hibernate:
              dialect: org.hibernate.dialect.MySQL5Dialect
      datasource:
        driver-class-name: com.mysql.jdbc.Driver
        url: jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=UTF-8
        username: root
        password: 123456
    logging:
      level:
        root: INFO
        org.hibernate: INFO
        org.hibernate.type.descriptor.sql.BasicBinder: TRACE
        org.hibernate.type.descriptor.sql.BasicExtractor: TRACE

    错误如下

    Hibernate: select uacuser0_.id as id1_2_, uacuser0_.login_name as login_na2_2_ from tbl_uac_user uacuser0_ where uacuser0_.login_name=?
    2017-04-19 13:49:46.187 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [VARCHAR] - [admin]
    2017-04-19 13:49:46.191 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([id1_2_] : [BIGINT]) - [222]
    2017-04-19 13:49:46.195 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([login_na2_2_] : [VARCHAR]) - [admin]
    Hibernate: select roles0_.user_id as user_id2_1_0_, roles0_.role_id as role_id1_1_0_, uacrole1_.id as id1_0_1_, uacrole1_.role_code as role_cod2_0_1_ from tbl_uac_role_user roles0_ inner join tbl_uac_role uacrole1_ on roles0_.role_id=uacrole1_.id where roles0_.user_id=?
    2017-04-19 13:49:46.208 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [222]
    2017-04-19 13:49:46.213 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([id1_0_1_] : [BIGINT]) - [1234]
    2017-04-19 13:49:46.213 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([role_cod2_0_1_] : [VARCHAR]) - [admin]
    2017-04-19 13:49:46.214 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([user_id2_1_0_] : [BIGINT]) - [222]
    2017-04-19 13:49:46.214 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([role_id1_1_0_] : [BIGINT]) - [1234]
    Hibernate: select users0_.role_id as role_id1_1_0_, users0_.user_id as user_id2_1_0_, uacuser1_.id as id1_2_1_, uacuser1_.login_name as login_na2_2_1_ from tbl_uac_role_user users0_ inner join tbl_uac_user uacuser1_ on users0_.user_id=uacuser1_.id where users0_.role_id=?
    2017-04-19 13:49:46.217 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [1234]
    2017-04-19 13:49:46.218 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([id1_2_1_] : [BIGINT]) - [222]
    2017-04-19 13:49:46.218 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([role_id1_1_0_] : [BIGINT]) - [1234]
    2017-04-19 13:49:46.218 TRACE 14504 --- [nio-8000-exec-1] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([user_id2_1_0_] : [BIGINT]) - [222]
    2017-04-19 13:49:46.271 ERROR 14504 --- [nio-8000-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.StackOverflowError] with root cause
    
    java.lang.StackOverflowError: null
        at java.util.AbstractCollection.toString(AbstractCollection.java:454) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacUser.toString(UacUser.java:37) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacRole.toString(UacRole.java:69) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacUser.toString(UacUser.java:37) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacRole.toString(UacRole.java:69) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacUser.toString(UacUser.java:37) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacRole.toString(UacRole.java:69) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacUser.toString(UacUser.java:37) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at com.liuzm.entity.UacRole.toString(UacRole.java:69) ~[classes/:na]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]
        at java.lang.StringBuilder.append(StringBuilder.java:131) ~[na:1.8.0_60]
        at java.util.AbstractCollection.toString(AbstractCollection.java:462) ~[na:1.8.0_60]
        at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
        at java.lang.String.valueOf(String.java:2994) ~[na:1.8.0_60]

    在网上查了一下,和大神们的问题略有不同,这里具体原因是 两个类都有toString(), 而两个类中同时使用了懒加载(默认)这样在A类toString的时候会发sql查询B类,而B类toString()又会发sql查A类这样会发生死循环最后导致java.lang.StackOverflowError.初用JPA 出现问题引以为鉴.

    完整代码

    demo

    最后做一下说明 如果是springmvc jackson报response错误 那么最好是 多对多维护关系都不要toString() Set集合对象, 然后使用 dto 或者 vo 去做数据的传输去解决这个问题. 具体原因有待日后解决

    展开全文
  •  at hbhb.demo.Services.ClassifyServicesImpl.repale(ClassifyServicesImpl.java:21) ~[classes/:na]<br />  at hbhb.demo.Services.ClassifyServicesImpl.update(ClassifyServicesImpl.java:15) ~[classes/:na]...
  • 64) ~[classes/:na] at com.qcd.MQConsumer.Q_WebAPI_TakeImage_on_WCMS_CMDTakeImage.run(Q_WebAPI_TakeImage_on_WCMS_CMDTakeImage.java:141) ~[classes/:na] at org.springframework.boot.SpringApplication....
  • java.lang.NullPointerException:null

    千次阅读 2019-03-12 18:59:44
    java.lang.NullPointerException: ... at com.tendecss.service.impl.CartServiceImpl.getCartVoLimit(CartServiceImpl.java:145) ~[classes/:na] at com.tendecss.service.impl.CartServiceImpl.list(CartServi...
  • at cn.id5.service.impl.ZtryServiceImpl.queryZtryListByPage(ZtryServiceImpl.java:56) ~[classes/:na] at cn.id5.controller.ZtryController.query(ZtryController.java:93) ~[classes/:na] at sun.reflect....
  • springboot 启动报错

    2019-05-12 17:26:53
     at com.alan.SpringbootApplication.main(SpringbootApplication.java:14) [classes/:na] Caused by: java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot....
  • java 异常处理

    千次阅读 2014-10-02 16:57:56
    at com.github.jdk7.Excetion1.test_3(Excetion1.java:44) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11] at sun.reflect.NativeMethodAccessorImpl.invoke...
  • at com.example.demo.DemoApplication.main(DemoApplication.java:16) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_231] at sun.reflect....
  • SpringCloud Eureka 报错 无法启动问题

    千次阅读 2018-02-24 14:34:09
    at com.example.EurekaApplication.main(EurekaApplication.java:13) [classes/:na] 2017-05-25 21:41:04.337 ERROR 20736 — [ main] o.s.boot.SpringApplication : Application startup failed org.spring...
  • 10) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_281] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_281] at sun...
  • 在Spring中遇到的一个坑

    千次阅读 2020-02-18 11:21:19
    20) ~[classes/:na] at com.hzy.service.UserServiceImpl.queryUserByName(UserServiceImpl.java:20) ~[classes/:na] at com.hzy.service.UserServiceImpl.queryUserByName(UserServiceImpl.java:20) ~[classes/:na]...
  • Spring Cloud Eureka

    千次阅读 2017-06-26 10:22:44
    at com.battle.EurekaServerApplication.main(EurekaServerApplication.java:12) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111] at sun.reflect....
  • boot-2.0.7.RELEASE.jar:2.0.7.RELEASE] at com.huang.microservicesimpleprovideruser.MicroserviceSimpleProviderUserApplication.main(MicroserviceSimpleProviderUserApplication.java:17) ~[classes/:...
  • at cn.***.demo.Application.main(Application.java:11) [classes/:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '...
  • at com.geek.UserserviceApplication.main(UserserviceApplication.java:14) ~[classes/:na] Caused by: java.net.ConnectException: Connection refused: connect at java.base/java.net.PlainSocketImpl....
  • Dubbo 启动报错 CLassNotFondException

    千次阅读 2018-07-20 16:00:35
     at com.tuhu.product.ProductApplication.main(ProductApplication.java:12) [classes/:na] Caused by: java.lang.IllegalStateException: Failed to introspect Class ...
  • springboot 统一异常处理

    千次阅读 2018-08-23 16:39:46
    一. 简介 统一异常处理,一般会将dao,service层的异常均向上抛到controller层,springboot提供了@ControllerAdvice注解,用于处理统一异常处理类,常用做法是创建一个BaseController类,标注@ControllerAdvice注解...
  • at com.example.demo.SpringbootdemoApplication.main(SpringbootdemoApplication.java:22) [classes/:na], 复制第一行错误日志,在谷歌上搜索答案,需要该项目的pom.xml文件注释Mongo相关的启动语句,如下: ...
  • at com.jiyx.util.MyshiroRealm.doGetAuthenticationInfo(MyshiroRealm.java:49) ~[classes/:na] at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:568) ~[shiro-...
  • Sping Cloud Eureka 报错

    2017-08-14 21:19:49
    ) [classes/:na]    2017 - 05 - 25   21 : 41 : 04.337  ERROR  20736  --- [ main] o.s.boot.SpringApplication : Application startup failed    org.springframework.beans.factory...
  • classes / : na ] Caused by : javax . persistence . PersistenceException : [ PersistenceUnit : default ] Unable to build Hibernate SessionFactory at org . hibernate . jpa . boot . internal . ...
  • 63) ~[classes/:na] at com.spbee.sys.service.impl.WXGZHMessageSrvImpl$$FastClassBySpringCGLIB$$2514e426.invoke() ~[classes/:na] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 8,661
精华内容 3,464
关键字:

~[classes/:na]