springboot整合报错java.lang.NullPointerException: null是什么原因?
ERRORcom.alibaba.druid.pool.DruidDataSource-{dataSource-1}initerrorjava.lang.NullPoin...
ERROR com.alibaba.druid.pool.DruidDataSource - {dataSource-1} init error
java.lang.NullPointerException: null
at org.apache.catalina.loader.WebappClassLoaderBase.binaryNameToPath(WebappClassLoaderBase.java:2300)
at org.apache.catalina.loader.WebappClassLoaderBase.findLoadedClass0(WebappClassLoaderBase.java:2358)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedWebappClassLoader.findExistingLoadedClass(TomcatEmbeddedWebappClassLoader.java:58)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:49)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:585)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:815)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1222)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1218)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:90)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:336)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:84) 展开
java.lang.NullPointerException: null
at org.apache.catalina.loader.WebappClassLoaderBase.binaryNameToPath(WebappClassLoaderBase.java:2300)
at org.apache.catalina.loader.WebappClassLoaderBase.findLoadedClass0(WebappClassLoaderBase.java:2358)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedWebappClassLoader.findExistingLoadedClass(TomcatEmbeddedWebappClassLoader.java:58)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:49)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:585)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:815)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1222)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1218)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:90)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:336)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:84) 展开
1个回答
展开全部
按照网上资料搭建(兼容jsp),成功启动,正常遇见 helloworld
但页面一直不让用EL表达式,报错如下:
java.lang.NullPointerException: null
at javax.el.CompositeELResolver.add(CompositeELResolver.java:117) ~[javaee-api-8.0.jar:na]
at org.apache.jasper.el.ELContextImpl.<clinit>(ELContextImpl.java:87) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
at org.apache.jasper.compiler.Validator$ValidateVisitor.prepareExpression(Validator.java:1617) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:750) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
at org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:959) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
.....
但页面一直不让用EL表达式,报错如下:
java.lang.NullPointerException: null
at javax.el.CompositeELResolver.add(CompositeELResolver.java:117) ~[javaee-api-8.0.jar:na]
at org.apache.jasper.el.ELContextImpl.<clinit>(ELContextImpl.java:87) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
at org.apache.jasper.compiler.Validator$ValidateVisitor.prepareExpression(Validator.java:1617) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:750) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
at org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:959) ~[tomcat-embed-jasper-8.5.23.jar:8.5.23]
.....
追问
错误好像不一样
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询