mapped-name/lookup/jndi-name and any ResourceProvider could’t process resource-env-ref named

本文针对JBoss6.0环境下启动出现的特定异常进行了详细分析,并提供了检查SessionBean配置的方法来解决问题。

环境

JBoss 6.0 + MyEclipse 8.6 + MySQL 5.1 + Struts 2.3 + EJB 3.0

 

问题

启动JBoss出现如下异常:

 

java.lang.RuntimeException: Neither any mapped-name/lookup/jndi-name specified nor any ResourceProvider could process resource-env-ref named env/com.axt.action.user.UserAction/tbRecordDao of type com.axt.dao.TbRecordDao


 

 

解决

检查SessionBean是否配置正确,简单的SessionBean配置,请点击这里

 

 

katoonSina  CSDN
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]
"E:\buka resource\Tomcat 9.0\Tomcat 9.0\bin\catalina.bat" run [2025-09-15 02:17:00,236] Artifact 9.14_homework:war: Waiting for server connection to start artifact deployment... Using CATALINA_BASE: "C:\Users\asus\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\571f7d60-cc7b-4657-a774-118f50351c2c" Using CATALINA_HOME: "E:\buka resource\Tomcat 9.0\Tomcat 9.0" Using CATALINA_TMPDIR: "E:\buka resource\Tomcat 9.0\Tomcat 9.0\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_211" Using CLASSPATH: "E:\buka resource\Tomcat 9.0\Tomcat 9.0\bin\bootstrap.jar;E:\buka resource\Tomcat 9.0\Tomcat 9.0\bin\tomcat-juli.jar" Using CATALINA_OPTS: "" Connected to the target VM, address: '127.0.0.1:59280', transport: 'socket' 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.54 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建: Sep 28 2021 13:51:49 UTC 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器版本号: 9.0.54.0 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 操作系统名称: Windows 10 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构: amd64 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: C:\Program Files\Java\jdk1.8.0_211\jre 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java虚拟机版本: 1.8.0_211-b12 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\asus\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\571f7d60-cc7b-4657-a774-118f50351c2c 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: E:\buka resource\Tomcat 9.0\Tomcat 9.0 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.util.logging.config.file=C:\Users\asus\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\571f7d60-cc7b-4657-a774-118f50351c2c\conf\logging.properties 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59280,suspend=y,server=n 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -javaagent:C:\Users\asus\AppData\Local\JetBrains\IntelliJIdea2021.1\captureAgent\debugger-agent.jar 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcom.sun.management.jmxremote= 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcom.sun.management.jmxremote.port=1099 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcom.sun.management.jmxremote.ssl=false 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcom.sun.management.jmxremote.password.file=C:\Users\asus\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\571f7d60-cc7b-4657-a774-118f50351c2c\jmxremote.password 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcom.sun.management.jmxremote.access.file=C:\Users\asus\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\571f7d60-cc7b-4657-a774-118f50351c2c\jmxremote.access 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.rmi.server.hostname=127.0.0.1 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djdk.tls.ephemeralDHKeySize=2048 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dignore.endorsed.dirs= 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcatalina.base=C:\Users\asus\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\571f7d60-cc7b-4657-a774-118f50351c2c 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Dcatalina.home=E:\buka resource\Tomcat 9.0\Tomcat 9.0 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数: -Djava.io.tmpdir=E:\buka resource\Tomcat 9.0\Tomcat 9.0\temp 15-Sep-2025 14:17:01.205 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 在java.library.path:[C:\Program Files\Java\jdk1.8.0_211\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;D:\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Bandizip\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;E:\MYSql\mysql-8.0.30-winx64\bin;D:\app\mysql xx\bc\bin;C:\Program Files\NVIDIA Corporation\NVIDIA App\NvDLISR;C:\Users\asus\AppData\Local\Microsoft\WindowsApps;C:\Users\asus\.dotnet\tools;D:\app\idea\IntelliJ IDEA 2023.3.4\bin;;;.]上找不到基于APR的Apache Tomcat本机库,该库允许在生产环境中获得最佳性能 15-Sep-2025 14:17:01.380 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"] 15-Sep-2025 14:17:01.380 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[333]毫秒内初始化 15-Sep-2025 14:17:01.411 信息 [main] org.apache.catalina.core.StandardService.startInternal 正在启动服务[Catalina] 15-Sep-2025 14:17:01.411 信息 [main] org.apache.catalina.core.StandardEngine.startInternal 正在启动 Servlet 引擎:[Apache Tomcat/9.0.54] 15-Sep-2025 14:17:01.417 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"] 15-Sep-2025 14:17:01.427 信息 [main] org.apache.catalina.startup.Catalina.start [40]毫秒后服务器启动 Connected to server [2025-09-15 02:17:01,807] Artifact 9.14_homework:war: Artifact is being deployed, please wait... 15-Sep-2025 14:17:04.092 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 14:17:04.188 [RMI TCP Connection(3)-127.0.0.1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started 14:17:04.267 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext 14:17:04.457 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\com\buka\service\ClassService.class] 14:17:04.457 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\com\buka\service\StuService.class] 14:17:04.489 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loaded 11 bean definitions from class path resource [application.xml] 14:17:04.537 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' 14:17:04.584 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' 14:17:04.631 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. 14:17:04.631 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner - Identified candidate component class: file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\com\buka\dao\ClassDao.class] 14:17:04.631 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner - Identified candidate component class: file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\com\buka\dao\Studao.class] 14:17:04.631 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner - Creating MapperFactoryBean with name 'classDao' and 'com.buka.dao.ClassDao' mapperInterface 14:17:04.631 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner - Creating MapperFactoryBean with name 'studao' and 'com.buka.dao.Studao' mapperInterface 14:17:04.647 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0' 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/jdbc.driver] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/jdbc.driver] not found - trying original name [jdbc.driver]. javax.naming.NameNotFoundException: 名称[jdbc.driver]未在此上下文中绑定。找不到[jdbc.driver]。 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [jdbc.driver] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [jdbc.driver] threw NamingException with message: 名称[jdbc.driver]未在此上下文中绑定。找不到[jdbc.driver]。. Returning null. 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'jdbc.driver' in PropertySource 'localProperties' with value of type String 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/jdbc.password] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/jdbc.password] not found - trying original name [jdbc.password]. javax.naming.NameNotFoundException: 名称[jdbc.password]未在此上下文中绑定。找不到[jdbc.password]。 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [jdbc.password] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [jdbc.password] threw NamingException with message: 名称[jdbc.password]未在此上下文中绑定。找不到[jdbc.password]。. Returning null. 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'jdbc.password' in PropertySource 'localProperties' with value of type String 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/jdbc.url] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/jdbc.url] not found - trying original name [jdbc.url]. javax.naming.NameNotFoundException: 名称[jdbc.url]未在此上下文中绑定。找不到[jdbc.url]。 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [jdbc.url] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [jdbc.url] threw NamingException with message: 名称[jdbc.url]未在此上下文中绑定。找不到[jdbc.url]。. Returning null. 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'jdbc.url' in PropertySource 'localProperties' with value of type String 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/jdbc.username] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/jdbc.username] not found - trying original name [jdbc.username]. javax.naming.NameNotFoundException: 名称[jdbc.username]未在此上下文中绑定。找不到[jdbc.username]。 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [jdbc.username] 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [jdbc.username] threw NamingException with message: 名称[jdbc.username]未在此上下文中绑定。找不到[jdbc.username]。. Returning null. 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'jdbc.username' in PropertySource 'localProperties' with value of type String 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor' 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory' 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' 14:17:04.663 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor' 14:17:04.679 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.ui.context.support.UiApplicationContextUtils - Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@3a0a0d1e] 14:17:04.679 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'classService' 14:17:04.710 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'classDao' 14:17:04.726 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'sqlsessionFactory' 14:17:04.726 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'dataSource' Logging initialized using 'class org.apache.ibatis.logging.stdout.StdOutImpl' adapter. 14:17:04.901 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.mybatis.spring.SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis-config.xml]' 14:17:04.965 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.mybatis.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\mapper\ClassMapper.xml]' 14:17:04.965 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.mybatis.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\mapper\StuMapper.xml]' 14:17:04.981 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'stuService' 14:17:04.981 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'studao' 14:17:05.020 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain] 14:17:05.020 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found - trying original name [spring.liveBeansView.mbeanDomain]. javax.naming.NameNotFoundException: 名称[spring.liveBeansView.mbeanDomain]未在此上下文中绑定。找不到[spring.liveBeansView.mbeanDomain]。 14:17:05.020 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [spring.liveBeansView.mbeanDomain] 14:17:05.020 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with message: 名称[spring.liveBeansView.mbeanDomain]未在此上下文中绑定。找不到[spring.liveBeansView.mbeanDomain]。. Returning null. 14:17:05.020 [RMI TCP Connection(3)-127.0.0.1] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext initialized in 832 ms 14:17:05.028 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.springframework.web.filter.CharacterEncodingFilter - Filter 'charset' configured for use [2025-09-15 02:17:05,044] Artifact 9.14_homework:war: Artifact is deployed successfully [2025-09-15 02:17:05,044] Artifact 9.14_homework:war: Deploy took 3,237 milliseconds 14:17:06.043 [http-nio-8080-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'springMVC' 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/spring.profiles.active] 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/spring.profiles.active] not found - trying original name [spring.profiles.active]. javax.naming.NameNotFoundException: 名称[spring.profiles.active]未在此上下文中绑定。找不到[spring.profiles.active]。 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [spring.profiles.active] 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [spring.profiles.active] threw NamingException with message: 名称[spring.profiles.active]未在此上下文中绑定。找不到[spring.profiles.active]。. Returning null. 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/spring.profiles.default] 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/spring.profiles.default] not found - trying original name [spring.profiles.default]. javax.naming.NameNotFoundException: 名称[spring.profiles.default]未在此上下文中绑定。找不到[spring.profiles.default]。 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [spring.profiles.default] 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [spring.profiles.default] threw NamingException with message: 名称[spring.profiles.default]未在此上下文中绑定。找不到[spring.profiles.default]。. Returning null. 14:17:06.043 [http-nio-8080-exec-2] DEBUG org.springframework.web.context.support.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'springMVC-servlet' 14:17:06.073 [http-nio-8080-exec-2] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\com\buka\controller\ClassController.class] 14:17:06.073 [http-nio-8080-exec-2] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\ROOT\WEB-INF\classes\com\buka\controller\StuController.class] 14:17:06.120 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loaded 26 bean definitions from class path resource [springmvc-config.xml] 14:17:06.120 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor' 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory' 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor' 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.ui.context.support.UiApplicationContextUtils - Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.DelegatingThemeSource@2e74de95] 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'classController' 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'stuController' 14:17:06.170 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'mvcContentNegotiationManager' 14:17:06.183 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping' 14:17:06.231 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'mvcCorsConfigurations' 14:17:06.231 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.handler.MappedInterceptor#0' 14:17:06.231 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.format.support.FormattingConversionServiceFactoryBean#0' 14:17:06.320 [http-nio-8080-exec-2] DEBUG _org.springframework.web.servlet.HandlerMapping.Mappings - c.b.c.ClassController: { [/menu]}: index(Clazz,ModelAndView) { [/addClass]}: addClass(Clazz,ModelAndView) { [/]}: home() 14:17:06.325 [http-nio-8080-exec-2] DEBUG _org.springframework.web.servlet.HandlerMapping.Mappings - c.b.c.StuController: { [/addStu]}: addStu(Student,ModelAndView) 14:17:06.325 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - 4 mappings in 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping' 14:17:06.325 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter' 14:17:06.373 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - ControllerAdvice beans: none 14:17:06.420 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'mvcUriComponentsContributor' 14:17:06.420 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - ControllerAdvice beans: none 14:17:06.420 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0' 14:17:06.436 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver - ControllerAdvice beans: none 14:17:06.436 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0' 14:17:06.436 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0' 14:17:06.436 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping' 14:17:06.452 [http-nio-8080-exec-2] DEBUG _org.springframework.web.servlet.HandlerMapping.Mappings - 'org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping' {} 14:17:06.452 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter' 14:17:06.452 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter' 14:17:06.452 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'localeResolver' 14:17:06.452 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'themeResolver' 14:17:06.452 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'viewNameTranslator' 14:17:06.452 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'flashMapManager' 14:17:06.452 [http-nio-8080-exec-2] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'multipartResolver' 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - Detected CommonsMultipartResolver 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - Detected AcceptHeaderLocaleResolver 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - Detected FixedThemeResolver 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - Detected org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator@2bd4fa16 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - Detected org.springframework.web.servlet.support.SessionFlashMapManager@53592927 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain] 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found - trying original name [spring.liveBeansView.mbeanDomain]. javax.naming.NameNotFoundException: 名称[spring.liveBeansView.mbeanDomain]未在此上下文中绑定。找不到[spring.liveBeansView.mbeanDomain]。 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [spring.liveBeansView.mbeanDomain] 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with message: 名称[spring.liveBeansView.mbeanDomain]未在此上下文中绑定。找不到[spring.liveBeansView.mbeanDomain]。. Returning null. 14:17:06.468 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - enableLoggingRequestDetails='false': request parameters and headers will be masked to prevent unsafe logging of potentially sensitive data 14:17:06.468 [http-nio-8080-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 425 ms 14:17:06.492 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - GET "/menu", parameters={} 14:17:06.496 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped to com.buka.controller.ClassController#index(Clazz, ModelAndView) Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@50162767] was not registered for synchronization because synchronization is not active 14:17:06.548 [http-nio-8080-exec-2] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource 14:17:06.594 [http-nio-8080-exec-2] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@d2e8721] will not be managed by Spring ==> Preparing: select cid,cname,teacher from class ==> Parameters: <== Columns: cid, cname, teacher <== Row: 1, 1班, zhangsan <== Row: 19, 2班, lisi <== Total: 2 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@50162767] 14:17:07.225 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.view.JstlView - View name 'menu.jsp', model {clazz=Clazz{cid=0, cname='null', teacher='null'}, org.springframework.validation.BindingResult.clazz=org.springframework.validation.BeanPropertyBindingResult: 0 errors, modelAndView=ModelAndView [view="menu.jsp"; model={classist=[Clazz{cid=1, cname='1班', teacher='zhangsan'}, Clazz{cid=19, cname='2班', teacher='lisi'}]}], org.springframework.validation.BindingResult.modelAndView=org.springframework.validation.BeanPropertyBindingResult: 0 errors, classist=[Clazz{cid=1, cname='1班', teacher='zhangsan'}, Clazz{cid=19, cname='2班', teacher='lisi'}]} 14:17:07.243 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.view.JstlView - Forwarding to [menu.jsp] 14:17:07.370 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet - Completed 200 OK 14:17:07.386 [http-nio-8080-exec-4] DEBUG org.springframework.web.servlet.DispatcherServlet - GET "/menu", parameters={} 14:17:07.386 [http-nio-8080-exec-4] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped to com.buka.controller.ClassController#index(Clazz, ModelAndView) Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@726f97db] was not registered for synchronization because synchronization is not active 14:17:07.386 [http-nio-8080-exec-4] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@d2e8721] will not be managed by Spring ==> Preparing: select cid,cname,teacher from class ==> Parameters: <== Columns: cid, cname, teacher <== Row: 1, 1班, zhangsan <== Row: 19, 2班, lisi <== Total: 2 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@726f97db] 14:17:07.386 [http-nio-8080-exec-4] DEBUG org.springframework.web.servlet.view.JstlView - View name 'menu.jsp', model {clazz=Clazz{cid=0, cname='null', teacher='null'}, org.springframework.validation.BindingResult.clazz=org.springframework.validation.BeanPropertyBindingResult: 0 errors, modelAndView=ModelAndView [view="menu.jsp"; model={classist=[Clazz{cid=1, cname='1班', teacher='zhangsan'}, Clazz{cid=19, cname='2班', teacher='lisi'}]}], org.springframework.validation.BindingResult.modelAndView=org.springframework.validation.BeanPropertyBindingResult: 0 errors, classist=[Clazz{cid=1, cname='1班', teacher='zhangsan'}, Clazz{cid=19, cname='2班', teacher='lisi'}]} 14:17:07.386 [http-nio-8080-exec-4] DEBUG org.springframework.web.servlet.view.JstlView - Forwarding to [menu.jsp] 14:17:07.386 [http-nio-8080-exec-4] DEBUG org.springframework.web.servlet.DispatcherServlet - Completed 200 OK 14:17:07.540 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.DispatcherServlet - GET "/menu", parameters={} 14:17:07.542 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped to com.buka.controller.ClassController#index(Clazz, ModelAndView) Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@600acfdb] was not registered for synchronization because synchronization is not active 14:17:07.542 [http-nio-8080-exec-6] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@d2e8721] will not be managed by Spring ==> Preparing: select cid,cname,teacher from class ==> Parameters: <== Columns: cid, cname, teacher <== Row: 1, 1班, zhangsan <== Row: 19, 2班, lisi <== Total: 2 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@600acfdb] 14:17:07.547 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.view.JstlView - View name 'menu.jsp', model {clazz=Clazz{cid=0, cname='null', teacher='null'}, org.springframework.validation.BindingResult.clazz=org.springframework.validation.BeanPropertyBindingResult: 0 errors, modelAndView=ModelAndView [view="menu.jsp"; model={classist=[Clazz{cid=1, cname='1班', teacher='zhangsan'}, Clazz{cid=19, cname='2班', teacher='lisi'}]}], org.springframework.validation.BindingResult.modelAndView=org.springframework.validation.BeanPropertyBindingResult: 0 errors, classist=[Clazz{cid=1, cname='1班', teacher='zhangsan'}, Clazz{cid=19, cname='2班', teacher='lisi'}]} 14:17:07.549 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.view.JstlView - Forwarding to [menu.jsp] 14:17:07.549 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.DispatcherServlet - Completed 200 OK 15-Sep-2025 14:17:11.430 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\manager] 14:17:11.459 [http-nio-8080-exec-9] DEBUG org.springframework.web.servlet.DispatcherServlet - POST "/addStu", parameters={masked} 14:17:11.461 [http-nio-8080-exec-9] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped to com.buka.controller.StuController#addStu(Student, ModelAndView) 14:17:11.469 [http-nio-8080-exec-9] DEBUG org.springframework.web.method.HandlerMethod - Could not resolve parameter [0] in public org.springframework.web.servlet.ModelAndView com.buka.controller.StuController.addStu(com.buka.po.Student,org.springframework.web.servlet.ModelAndView): org.springframework.validation.BeanPropertyBindingResult: 1 errors Field error in object 'student' on field 'sid': rejected value [null]; codes [typeMismatch.student.sid,typeMismatch.sid,typeMismatch.int,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [student.sid,sid]; arguments []; default message [sid]]; default message [Failed to convert value of type 'null' to required type 'int'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [null] to type [int] for value 'null'; nested exception is java.lang.IllegalArgumentException: A null value cannot be assigned to a primitive type] 14:17:11.472 [http-nio-8080-exec-9] WARN org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.method.annotation.ModelAttributeMethodProcessor$1: org.springframework.validation.BeanPropertyBindingResult: 1 errors<EOL>Field error in object 'student' on field 'sid': rejected value [null]; codes [typeMismatch.student.sid,typeMismatch.sid,typeMismatch.int,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [student.sid,sid]; arguments []; default message [sid]]; default message [Failed to convert value of type 'null' to required type 'int'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [null] to type [int] for value 'null'; nested exception is java.lang.IllegalArgumentException: A null value cannot be assigned to a primitive type]] 14:17:11.472 [http-nio-8080-exec-9] DEBUG org.springframework.web.servlet.DispatcherServlet - Completed 400 BAD_REQUEST 15-Sep-2025 14:17:11.490 信息 [Catalina-utility-1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 15-Sep-2025 14:17:11.492 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Web应用程序目录[E:\buka resource\Tomcat 9.0\Tomcat 9.0\webapps\manager]的部署已在[62]毫秒内完成
最新发布
09-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值