大家晚安,
在Tomcat 7服务器上运行时,会出现警告。我可以访问我的资源(http:// localhost:8080 / CountryCode / v1 / E212 / 33),但它显示一个空白页面(知道我只显示一个字符串)。我想知道这不是这个警告......
日志
déc. 31, 2015 8:40:57 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
AVERTISSEMENT: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:CountryCode' did not find a matching property.
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server version: Apache Tomcat/7.0.65
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server built: Oct 9 2015 08:36:58 UTC
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server number: 7.0.65.0
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: OS Name: Windows 7
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: OS Version: 6.1
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Architecture: x86
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Java Home: C:\Program Files\Java\jre7
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: JVM Version: 1.7.0_60-b19
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: JVM Vendor: Oracle Corporation
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: CATALINA_BASE: C:\Users\MAJORELLE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: CATALINA_HOME: C:\Users\MAJORELLE\Desktop\apache-tomcat-7.0.65
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: - Dcatalina.base=C:\Users\MAJORELLE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dcatalina.home=C:\Users\MAJORELLE\Desktop\apache-tomcat-7.0.65
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dwtp.deploy=C:\Users\MAJORELLE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Djava.endorsed.dirs=C:\Users\MAJORELLE\Desktop\apache-tomcat-7.0.65\endorsed
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dfile.encoding=Cp1252
déc. 31, 2015 8:40:57 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFOS: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_31/bin/client;C:/Program Files/Java/jre1.8.0_31/bin;C:/Program Files/Java/jre1.8.0_31/lib/i386;C:\Program Files\WinRAR;D:\app\MAJORELLE\product\11.2.0\dbhome_1\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter\Driver;C:\Users\MAJORELLE\AppData\Local\Smartbar\Application\;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\;C:\Program Files\erl6.2\bin;C:\Program Files\doxygen\bin;C:\Program Files\Skype\Phone\;;C:\Users\MAJORE~1\AppData\Local\Temp\Rar$EX66.272\eclipse;;.
déc. 31, 2015 8:40:57 PM org.apache.coyote.AbstractProtocol init
INFOS: Initializing ProtocolHandler ["http-bio-8080"]
déc. 31, 2015 8:40:57 PM org.apache.coyote.AbstractProtocol init
INFOS: Initializing ProtocolHandler ["ajp-bio-8009"]
déc. 31, 2015 8:40:57 PM org.apache.catalina.startup.Catalina load
INFOS: Initialization processed in 775 ms
déc. 31, 2015 8:40:57 PM org.apache.catalina.core.StandardService startInternal
INFOS: Démarrage du service Catalina
déc. 31, 2015 8:40:57 PM org.apache.catalina.core.StandardEngine startInternal
INFOS: Starting Servlet Engine: Apache Tomcat/7.0.65
déc. 31, 2015 8:40:58 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFOS: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [276] milliseconds.
déc. 31, 2015 8:40:58 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFOS: validateJarFile(C:\Users\MAJORELLE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\CountryCode\WEB-INF\lib\javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
déc. 31, 2015 8:40:58 PM org.apache.tomcat.util.scan.StandardJarScanner scan
déc. 31, 2015 8:41:15 PM org.apache.catalina.startup.ContextConfig processResourceJARs
GRAVE: Failed to processes JAR found at URL [jar:file:/C:/Users/MAJORELLE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/CountryCode/WEB-INF/lib/scala-compiler-2.10.0.jar!/] for static resources to be included in context with name [jar:file:/C:/Users/MAJORELLE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/CountryCode/WEB-INF/lib/scala-compiler-2.10.0.jar!/]
déc. 31, 2015 8:41:15 PM org.apache.catalina.startup.TldConfig tldScanJar
AVERTISSEMENT: Failed to process JAR [jar:file:/C:/Users/MAJORELLE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/CountryCode/WEB-INF/lib/scala-compiler-2.10.0.jar!/] for TLD files
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
at org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:41)
at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:502)
at org.apache.catalina.startup.TldConfig.access$200(TldConfig.java:61)
at org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:300)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:258)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:177)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:271)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:590)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5405)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4020)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1344)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1545)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1555)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1555)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1523)
at java.lang.Thread.run(Unknown Source)
déc. 31, 2015 8:41:15 PM org.apache.catalina.startup.TldConfig execute
INFOS: 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.
0 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO main.java.CountriesUtil -
déc. 31, 2015 8:41:16 PM org.apache.catalina.core.StandardContext reload
INFOS: Le rechargement de ce contexte est terminé
496 [http-bio-8080-exec-4] DEBUG org.jboss.resteasy.core.SynchronousDispatcher - PathInfo: /e212/33
496 [http-bio-8080-exec-6] DEBUG org.jboss.resteasy.core.SynchronousDispatcher - PathInfo: /e212/33
512 [http-bio-8080-exec-6] INFO main.java.e212 - start
512 [http-bio-8080-exec-4] INFO main.java.e212 - start
512 [http-bio-8080-exec-4] DEBUG main.java.e212 - Start getSomething
513 [http-bio-8080-exec-4] DEBUG main.java.e212 - data: '33'
512 [http-bio-8080-exec-6] DEBUG main.java.e212 - Start getSomething
513 [http-bio-8080-exec-6] DEBUG main.java.e212 - data: '33'
513 [http-bio-8080-exec-6] INFO main.java.CountriesUtil - i: 3, number: 2, key: 33
513 [http-bio-8080-exec-6] INFO main.java.CountriesUtil - i: 2, number: 2, key: 3
513 [http-bio-8080-exec-6] INFO main.java.CountriesUtil - i: 1, number: 2, key:
513 [http-bio-8080-exec-4] INFO main.java.CountriesUtil - i: 3, number: 2, key: 33
513 [http-bio-8080-exec-4] INFO main.java.CountriesUtil - i: 2, number: 2, key: 3
513 [http-bio-8080-exec-4] INFO main.java.CountriesUtil - i: 1, number: 2, key:
的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<listener>
<listener-class>main.java.ContextListener</listener-class>
</listener>
<context-param>
<param-name>resteasy.resources</param-name>
<param-value>
main.java.e212
</param-value>
</context-param>
<listener>
<listener-class>
org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
</listener-class>
</listener>
<servlet-mapping>
<servlet-name>resteasy-servlet</servlet-name>
<url-pattern>/v1/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>resteasy-servlet</servlet-name>
<servlet-class>
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
</servlet-class>
</servlet>
<!-- this should be the same URL pattern as the servlet-mapping property -->
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/v1</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.javacodegeeks.enterprise.rest.resteasy</groupId>
<artifactId>CountryCode</artifactId>
<version>0.0.1-SNAPSHOT</version>
<repositories>
<repository>
<id>JBoss repository</id>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-jaxrs_2.10</artifactId>
<version>1.3.12</version>
</dependency>
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.3-M1</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.0.1.Final</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.8</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.1.Final</version>
</dependency>
</dependencies>
非常感谢和美好的一年。