win10安装jdk出现could not open 'D:\software\JAVA\lib\amd64\jvm.cfg'

在win10下安装jdk后,命令行测试java出现could not open XXX\jvm.cfg
因为用matlab打包jar包需要,就按照教程安装了个jdk,但出现这个问题还是一脸懵。我安装的是1.7版本的,最开始是装的1.7.0_13,出现问题后我以为是太陈旧了,就卸载掉重新安装1.7.0_79。但还是出现了同样的问题。我报错前的环境变量时这样的: 


画框的那两个就是我安装后新增的。 
此时命令行javac没有报错,但是java会报错:

这里写图片描述
通过数次摸索,最后找到原因,是环境变量的顺序问题,把新增的两个jdk和jre放在环境变量的最前面,问题马上解决: 

这里写图片描述
切记,环境变量修改后重新测试时一定要关闭命令再重新打开才生效 

这里写图片描述


--------------------- 
作者:DoubleTrees_L 
来源:CSDN 
原文:https://blog.csdn.net/lin1314yuan/article/details/82379906 

展开阅读全文

could not open ServletContext

10-11

在线等,希望各位大大指导!!rnrn2011-10-11 23:43:53 org.apache.catalina.core.ApplicationContext logrn严重: StandardWrapper.Throwablernorg.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/conf/dispatcherServlet-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/conf/dispatcherServlet-servlet.xml]rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)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.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)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.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)rn at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/conf/dispatcherServlet-servlet.xml]rn at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:117)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)rn ... 26 morern2011-10-11 23:43:53 org.apache.catalina.core.StandardWrapperValve invokern严重: Allocate exception for servlet dispatcherrnjava.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/conf/dispatcherServlet-servlet.xml]rn at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:117)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)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.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)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.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)rn at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn 论坛

org.springframework.transaction.CannotCreateTransactionException: Could not open

12-16

21:02:03 [ERROR] com.landray.kmss.util.KmssMessageWriter.DrawMessages(123)rn 未定义的错误rnrnorg.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.SessionException: Session is closed!rnCaused by: rnorg.hibernate.SessionException: Session is closed!rn at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)rn at org.hibernate.impl.SessionImpl.connection(SessionImpl.java:358)rn at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:443)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:349)rn at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:255)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:102)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)rn at $Proxy42.getTrainPlanId(Unknown Source)rn at com.landray.kmss.hrt.exam.actions.HrtExamActionExamineeAction.getTrainPlanId(HrtExamActionExamineeAction.java:858)rn at com.landray.kmss.hrt.exam.actions.HrtExamActionExamineeAction.ifStudyCourseOver(HrtExamActionExamineeAction.java:879)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)rn at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:160)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)rn at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)rn at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:79)rn at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)rn at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:143)rn at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)rn at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:121)rn at com.landray.kmss.sys.sso4yt.EKPSSOClientChgUserEventFilter.doFilter(EKPSSOClientChgUserEventFilter.java:35)rn at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:124)rn at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246)rn at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:124)rn at com.landray.kmss.sys.sso4yt.EKPSSOClientAuthenticationFilter.doFilter(EKPSSOClientAuthenticationFilter.java:45)rn at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:124)rn at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy.doFilter(KmssProcessingFilterProxy.java:45)rn at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)rn at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)rn at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)rn at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)rn at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)rn at com.landray.kmss.web.filter.AcegiFilterToBeanProxy.doFilter(AcegiFilterToBeanProxy.java:34)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.landray.kmss.web.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:43)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:173)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.landray.sso.client.EKPSSOClient.doFilter(EKPSSOClient.java:115)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rn21:02:03 [ERROR] com.landray.kmss.util.KmssMessageWriter.DrawMessages(142)rn 保存错误日志信息时发生错误 论坛

没有更多推荐了,返回首页