我正在 Tomcat 8、IntelliJ IDEA 14 上部署 Spring Web 应用程序。但是,部署失败并显示以下错误日志:
""C:\Program Files (x86)\apache-tomcat-8.0.22\bin\catalina.bat" run
[2015-05-20 08:19:25,312] Artifact bookmanager:war exploded: Server is not connected. Deploy is not available.
Using CATALINA_BASE: "C:\Users\svetlana\.IntelliJIdea14\system\tomcat\Tomcat_8_0_22_bookmanager"
Using CATALINA_HOME: "C:\Program Files (x86)\apache-tomcat-8.0.22"
Using CATALINA_TMPDIR: "C:\Program Files (x86)\apache-tomcat-8.0.22\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_05"
Using CLASSPATH: "C:\Program Files (x86)\apache-tomcat-8.0.22\bin\bootstrap.jar;C:\Program Files (x86)\apache-tomcat-8.0.22\bin\tomcat-juli.jar"
20-May-2015 20:19:26.942 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.22
20-May-2015 20:19:26.945 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Apr 29 2015 11:46:15 UTC
20-May-2015 20:19:26.945 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.22.0
20-May-2015 20:19:26.945 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 8
20-May-2015 20:19:26.945 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.2
20-May-2015 20:19:26.945 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
20-May-2015 20:19:26.945 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_05\jre
20-May-2015 20:19:26.946 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_05-b13
20-May-2015 20:19:26.947 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
20-May-2015 20:19:26.947 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\svetlana\.IntelliJIdea14\system\tomcat\Tomcat_8_0_22_bookmanager
20-May-2015 20:19:26.947 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files (x86)\apache-tomcat-8.0.22
20-May-2015 20:19:26.948 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
20-May-2015 20:19:26.948 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
20-May-2015 20:19:26.948 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
20-May-2015 20:19:26.948 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
20-May-2015 20:19:26.948 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
20-May-2015 20:19:26.948 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\svetlana\.IntelliJIdea14\system\tomcat\Tomcat_8_0_22_bookmanager\conf\logging.properties
20-May-2015 20:19:26.949 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
20-May-2015 20:19:26.949 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files (x86)\apache-tomcat-8.0.22\endorsed
20-May-2015 20:19:26.949 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\svetlana\.IntelliJIdea14\system\tomcat\Tomcat_8_0_22_bookmanager
20-May-2015 20:19:26.949 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files (x86)\apache-tomcat-8.0.22
20-May-2015 20:19:26.949 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files (x86)\apache-tomcat-8.0.22\temp
20-May-2015 20:19:26.949 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.
20-May-2015 20:19:26.950 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
20-May-2015 20:19:28.021 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1m 19 Mar 2015)
20-May-2015 20:19:28.201 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
20-May-2015 20:19:28.216 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
20-May-2015 20:19:28.218 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2202 ms
20-May-2015 20:19:28.274 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
20-May-2015 20:19:28.274 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.22
20-May-2015 20:19:28.286 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
20-May-2015 20:19:28.308 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
20-May-2015 20:19:28.309 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 91 ms
Connected to server
[2015-05-20 08:19:28,372] Artifact bookmanager:war exploded: Artifact is being deployed, please wait...
20-May-2015 20:19:31.035 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
20-May-2015 20:19:31.151 INFO [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
20-May-2015 20:19:31.343 INFO [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Wed May 20 20:19:31 EEST 2015]; root of context hierarchy
20-May-2015 20:19:31.403 INFO [RMI TCP Connection(3)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/application-context.xml]
20-May-2015 20:19:31.523 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
...
Caused by: org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 110; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'.
20-May-2015 20:19:31.530 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
...
20-May-2015 20:19:31.532 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
20-May-2015 20:19:31.536 INFO [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.doClose Closing Root WebApplicationContext: startup date [Wed May 20 20:19:31 EEST 2015]; root of context hierarchy
20-May-2015 20:19:31.537 WARNING [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.doClose Exception thrown from ApplicationListener handling ContextClosedEvent
...
Caused by: org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 110; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'.
...
20-May-2015 20:19:31.649 WARNING [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.doClose Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Wed May 20 20:19:31 EEST 2015]; root of context hierarchy
...
[2015-05-20 08:19:31,935] Artifact bookmanager:war exploded: Error during artifact deployment. See server log for details.
...
20-May-2015 20:19:38.284 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\apache-tomcat-8.0.22\webapps\manager
20-May-2015 20:19:38.359 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\apache-tomcat-8.0.22\webapps\manager has finished in 74 ms
这是/WEB-INF/application-context.xml:
<context:property-placeholder location="classpath:jdbc.properties" system-properties-mode="ENVIRONMENT"/>
<context:component-scan base-package="com.svetlana.bookmanager.repository"/>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.databaseurl}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:hibernate.cfg.xml"/>
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.dialect">${jdbc.dialect}</prop>
<prop key="hibernate.connection.charSet">UTF-8</prop>
</props>
</property>
</bean>
外部库(在创意项目中)
< 1.8 >
Maven: antlr:antlr:2.7.6
Maven: aopalliance:aopalliance:1.0
Maven: asm:asm:1.5.3
Maven: asm:asm-attrs:1.5.3
Maven: cglib:cglib:2.1_3
Maven: commons-collections:commons-collections:3.1
Maven: commons-logging:commons-logging:1.1.3
Maven: dom4j:dom4j:1.6.1
Maven: javax.persistence:persistence-api:1.0
Maven: javax.servlet.jsp:jsp-api:2.1
Maven: javax.servlet:javax.servlet-api:3.1.0
Maven: javax.transaction:jta:1.1
Maven: jstl:jstl:1.2
Maven: junit:junit:4.11
Maven: mysql:mysql-connector-java:5.1.34
Maven: net.sf.ehcache:ehcache:1.2.3
Maven: org.hamcrest:hamcrest-core:1.3
Maven: org.hibernate:ejb3-persistence:1.0.1.GA
Maven: org.hibernate:hibernate:3.2.6.ga
Maven: org.hibernate:hibernate-annotations:3.3.1.GA
Maven: org.hibernate:hibernate-commons-annotations:3.3.0.ga
Maven: org.hibernate:hibernate-core:3.3.2.GA
Maven: org.slf4j:slf4j-api:1.5.8
Maven: org.springframework:spring-aop:4.1.1.RELEASE
Maven: org.springframework:spring-beans:4.1.1.RELEASE
Maven: org.springframework:spring-context:4.1.1.RELEASE
Maven: org.springframework:spring-core:4.1.1.RELEASE
Maven: org.springframework:spring-expression:4.1.1.RELEASE
Maven: org.springframework:spring-jdbc:4.1.1.RELEASE
Maven: org.springframework:spring-orm:4.1.1.RELEASE
Maven: org.springframework:spring-test:4.1.1.RELEASE
Maven: org.springframework:spring-tx:4.1.1.RELEASE
Maven: org.springframework:spring-web:4.1.1.RELEASE
Maven: org.springframework:spring-webmvc:4.1.1.RELEASE
Maven: xml-apis:xml-apis:1.0.b2
我认为问题在于 JAR 的使用版本和指定版本之间的差异。我从视频类(class)中制作了这个项目,并且使用的旧版本比我的计算机中的版本还多,但不知道如何检查它。
最佳答案
问题出在 application-context.xml 的声明中。首先它看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
然后我改变了它,添加了上下文声明:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache.xsd ">
关于 java 。工件部署 Tomcat 8 期间出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30356597/
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我真的很习惯使用Ruby编写以下代码:my_hash={}my_hash['test']=1Java中对应的数据结构是什么? 最佳答案 HashMapmap=newHashMap();map.put("test",1);我假设? 关于java-等价于Java中的RubyHash,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/22737685/
我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie
我正在尝试使用boilerpipe来自JRuby。我看过guide从JRuby调用Java,并成功地将它与另一个Java包一起使用,但无法弄清楚为什么同样的东西不能用于boilerpipe。我正在尝试基本上从JRuby中执行与此Java等效的操作:URLurl=newURL("http://www.example.com/some-location/index.html");Stringtext=ArticleExtractor.INSTANCE.getText(url);在JRuby中试过这个:require'java'url=java.net.URL.new("http://www
我只想对我一直在思考的这个问题有其他意见,例如我有classuser_controller和classuserclassUserattr_accessor:name,:usernameendclassUserController//dosomethingaboutanythingaboutusersend问题是我的User类中是否应该有逻辑user=User.newuser.do_something(user1)oritshouldbeuser_controller=UserController.newuser_controller.do_something(user1,user2)我
什么是ruby的rack或python的Java的wsgi?还有一个路由库。 最佳答案 来自Python标准PEP333:Bycontrast,althoughJavahasjustasmanywebapplicationframeworksavailable,Java's"servlet"APImakesitpossibleforapplicationswrittenwithanyJavawebapplicationframeworktoruninanywebserverthatsupportstheservletAPI.ht
我可以在Azure网站上部署RubyonRails吗? 最佳答案 还没有。目前仅支持.NET和PHP。 关于ruby-on-rails-RubyonRails可以部署在Azure网站上吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/12964010/
这篇文章是继上一篇文章“Observability:从零开始创建Java微服务并监控它(一)”的续篇。在上一篇文章中,我们讲述了如何创建一个Javaweb应用,并使用Filebeat来收集应用所生成的日志。在今天的文章中,我来详述如何收集应用的指标,使用APM来监控应用并监督web服务的在线情况。源码可以在地址 https://github.com/liu-xiao-guo/java_observability 进行下载。摄入指标指标被视为可以随时更改的时间点值。当前请求的数量可以改变任何毫秒。你可能有1000个请求的峰值,然后一切都回到一个请求。这也意味着这些指标可能不准确,你还想提取最小/
HashMap中为什么引入红黑树,而不是AVL树呢1.概述开始学习这个知识点之前我们需要知道,在JDK1.8以及之前,针对HashMap有什么不同。JDK1.7的时候,HashMap的底层实现是数组+链表JDK1.8的时候,HashMap的底层实现是数组+链表+红黑树我们要思考一个问题,为什么要从链表转为红黑树呢。首先先让我们了解下链表有什么不好???2.链表上述的截图其实就是链表的结构,我们来看下链表的增删改查的时间复杂度增:因为链表不是线性结构,所以每次添加的时候,只需要移动一个节点,所以可以理解为复杂度是N(1)删:算法时间复杂度跟增保持一致查:既然是非线性结构,所以查询某一个节点的时候
运行bundleinstall后出现此错误:Gem::Package::FormatError:nometadatafoundin/Users/jeanosorio/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gemAnerroroccurredwhileinstallinglibv8(3.11.8.13),andBundlercannotcontinue.Makesurethat`geminstalllibv8-v'3.11.8.13'`succeedsbeforebundling.我试试gemin