서버에서 Jenkins -> Tomcat 7을 사용하는 CI 배포 Java Wicket 애플리케이션이 있습니다. 모든 것은 브라우저를 통해 응용 프로그램에 액세스하려고 할 때까지는 괜찮은 것처럼 보입니다 (관리자 응용 프로그램에 배포 된 응용 프로그램의 목록을 통해). 그런 다음 404 오류가 발생합니다. 로그에서 tomcat7-stdout-.log에서 응용 프로그램이 잘 시작되는지 확인할 수 있습니다. 설정 한 스프링 빈은 내 코드에서 init 디버그 문을 출력하므로 아무런 오류없이 진행할 준비가되었습니다.Tomcat 7에 배포되었지만 애플리케이션에 액세스 할 수 없음
내 컴퓨터는 32 비트 win7입니다. 서버가 64 비트 Windows Server 2008 R2
Jenkins가 war 파일을 작성하거나 32/64 비트 버전간에 호환되지 않는 방법 일 수 있다고 생각하여 Tomcat 7을 로컬에 설치하여 모든 컴퓨터가 동일한 시스템에 있도록했습니다. 관리자 응용 프로그램에서 배포 할 때도 동일한 결과가 나타납니다. 나는 바람둥이를 종료하고 액세스 localhost를 시도
- : 8080, 아무것도 그래서 내부
<Context path="/system4" />
와 META-INF/context.xml을 만들기 - 을 볼 수 포트에 대해 경쟁하는 다른 앱이없는 나타납니다 배치에 영향을 미치지 않습니다 (즉, 여전히 전쟁 이름으로 지정된 경로에 있음).
- 일부 오류 listenerStart 문제를 제거하기 위해 here 지침을 따랐지만 생성 된 로그 파일은 비어 있습니다.
- mvn 부두로 로컬 실행 : run을 실행해도 문제없이 응용 프로그램이 시작됩니다. 그런 다음 localhost에서 앱으로 성공적으로 이동할 수 있습니다. 8080
- 로그 파일에 오류가 없습니다. 아래는 (로컬) 배포에서 각 파일의 총 출력입니다.
localhost..log :
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compil[email protected]')
localhost_access_log.log : (빈)
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/html/list?org.apache.catalina.filters.CSRF_NONCE=DBBBE417970CCAAB039E98C236CB177A HTTP/1.1" 200 15822
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/images/asf-logo.gif HTTP/1.1" 304 -
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/images/tomcat.gif HTTP/1.1" 304 -
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:16 +0100] "GET /manager/html/list?org.apache.catalina.filters.CSRF_NONCE=634AA4131BBA0B7368023C32CD653FC8 HTTP/1.1" 200 15822
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:34 +0100] "POST /manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=AA80212A2557D18475CB621F165BD24E HTTP/1.1" 200 17716
호스트 manager..log
catalina..log :
Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.27 using APR version 1.4.6.
Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1152 ms
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.41
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\docs
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\examples
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\host-manager
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\manager
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\ROOT
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 440 ms
Jul 01, 2013 11:48:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat-7.0.41\webapps\system4-ui-0.0.1-SNAPSHOT.war
서블릿 examples..log (빈 - 로깅 수준이 ALL로 설정) (링크에서 제시 한)
manager..log : 바람둥이 창에서
Jul 01, 2013 11:48:11 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
Jul 01, 2013 11:48:11 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Jul 01, 2013 11:48:11 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Jul 01, 2013 11:48:16 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Jul 01, 2013 11:48:34 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
출력 :
나는 바람둥이 관리자 응용 프로그램에서 응용 프로그램에 대한 링크를 클릭하면Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.27 using APR version 1.4
.6.
Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], ra
ndom [true].
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.AprLifecycleListener initializ
eSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1152 ms
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.41
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\docs
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\exampl
es
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\host-m
anager
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\manage
r
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\ROOT
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 440 ms
Jul 01, 2013 11:48:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat-7.0.41\webapps\system4-
ui-0.0.1-SNAPSHOT.war
Jul 01, 2013 11:48:31 AM org.apache.catalina.core.StandardContext listenerStart
FINE: Sending application start events
Jul 01, 2013 11:48:31 AM org.apache.catalina.core.StandardContext filterStart
FINE: Starting filters
Jul 01, 2013 11:48:31 AM org.apache.catalina.core.StandardContext filterStart
FINE: Starting filter 'wicket.system4-ui'
INFO - WebXmlFile - web.xml: url mapping found for filter with
name wicket.system4-ui: [/*]
INFO - Application - [wicket.system4-ui] init: Wicket core libra
ry initializer
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IBehaviorListener, method=public abstract void org.apache.wick
et.behavior.IBehaviorListener.onRequest()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IFormSubmitListener, method=public abstract void org.apache.wi
cket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=ILinkListener, method=public abstract void org.apache.wicket.m
arkup.html.link.ILinkListener.onLinkClicked()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IOnChangeListener, method=public abstract void org.apache.wick
et.markup.html.form.IOnChangeListener.onSelectionChanged()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IRedirectListener, method=public abstract void org.apache.wick
et.IRedirectListener.onRedirect()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IResourceListener, method=public abstract void org.apache.wick
et.IResourceListener.onResourceRequested()]
INFO - Application - [wicket.system4-ui] init: Wicket extensions
initializer
INFO - sPathXmlApplicationContext - Refreshing org.springframework.context.supp
[email protected]: startup date [Mon Jul 01 11:48:32 BS
T 2013]; root of context hierarchy
INFO - XmlBeanDefinitionReader - Loading XML bean definitions from class pat
h resource [META-INF/applicationContext-data.xml]
INFO - sPathBeanDefinitionScanner - JSR-330 'javax.inject.Named' annotation fou
nd and supported for component scanning
INFO - nnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation fo
und and supported for autowiring
INFO - sPathXmlApplicationContext - Bean 'org.springframework.orm.jpa.vendor.Hi
bernateJpaVendorAdapter#5d2d9b' of type [class org.springframework.orm.jpa.vendo
r.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPo
stProcessors (for example: not eligible for auto-proxying)
INFO - sPathXmlApplicationContext - Bean 'org.springframework.instrument.classl
oading.InstrumentationLoadTimeWeaver#f003c0' of type [class org.springframework.
instrument.classloading.InstrumentationLoadTimeWeaver] is not eligible for getti
ng processed by all BeanPostProcessors (for example: not eligible for auto-proxy
ing)
INFO - erEntityManagerFactoryBean - Building JPA container EntityManagerFactory
for persistence unit 'com.sw.system4.core.persistence'
INFO - Version - HCANN000001: Hibernate Commons Annotations
{4.0.1.Final}
INFO - Version - HHH000412: Hibernate Core {4.2.0.Final}
INFO - Environment - HHH000206: hibernate.properties not found
INFO - Environment - HHH000021: Bytecode provider name : javassi
st
INFO - Ejb3Configuration - HHH000204: Processing PersistenceUnitInfo [
name: com.sw.system4.core.persistence
...]
INFO - agerConnectionProviderImpl - HHH000402: Using Hibernate built-in connect
ion pool (not for production use!)
INFO - agerConnectionProviderImpl - HHH000115: Hibernate connection pool size:
20
INFO - agerConnectionProviderImpl - HHH000006: Autocommit mode: true
INFO - agerConnectionProviderImpl - HHH000401: using driver [com.mysql.jdbc.Dri
ver] at URL [jdbc:mysql://localhost:3306/system4_live]
INFO - agerConnectionProviderImpl - HHH000046: Connection properties: {user=sys
tem4_user, password=****, autocommit=true, release_mode=auto}
INFO - Dialect - HHH000400: Using dialect: org.hibernate.dia
lect.MySQL5Dialect
INFO - ransactionFactoryInitiator - HHH000268: Transaction strategy: org.hibern
ate.engine.transaction.internal.jdbc.JdbcTransactionFactory
INFO - ASTQueryTranslatorFactory - HHH000397: Using ASTQueryTranslatorFactory
INFO - SchemaUpdate - HHH000228: Running hbm2ddl schema update
INFO - SchemaUpdate - HHH000102: Fetching database metadata
INFO - SchemaUpdate - HHH000396: Updating schema
INFO - TableMetadata - HHH000261: Table found: system4_live.user
INFO - TableMetadata - HHH000037: Columns: [id, enabled, username,
preferences_id, lastlogin, lastname, firstname, password, changepasswordrequire
d]
INFO - TableMetadata - HHH000108: Foreign keys: [fk285feb559233ea]
INFO - TableMetadata - HHH000126: Indexes: [primary, fk285feb55923
3ea]
INFO - TableMetadata - HHH000261: Table found: system4_live.userpr
eferences
INFO - TableMetadata - HHH000037: Columns: [id]
INFO - TableMetadata - HHH000108: Foreign keys: []
INFO - TableMetadata - HHH000126: Indexes: [primary]
INFO - SchemaUpdate - HHH000232: Schema update complete
INFO - sPathXmlApplicationContext - Bean 'entityManagerFactory' of type [class
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] is not eligi
ble for getting processed by all BeanPostProcessors (for example: not eligible f
or auto-proxying)
INFO - DefaultListableBeanFactory - Pre-instantiating singletons in org.springf
[email protected]: defining beans
[entityManagerFactory,transactionManager,org.springframework.orm.jpa.support.Pe
rsistenceAnnotationBeanPostProcessor#0,org.springframework.aop.config.internalAu
toProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionA
ttributeSource#0,org.springframework.transaction.interceptor.TransactionIntercep
tor#0,org.springframework.transaction.config.internalTransactionAdvisor,persiste
nceExceptionTranslationPostProcessor,org.springframework.context.annotation.inte
rnalConfigurationAnnotationProcessor,org.springframework.context.annotation.inte
rnalAutowiredAnnotationProcessor,org.springframework.context.annotation.internal
RequiredAnnotationProcessor,org.springframework.context.annotation.internalCommo
nAnnotationProcessor,org.springframework.context.annotation.internalPersistenceA
nnotationProcessor,userJpaDAO,user-service,encryption-service,org.springframewor
k.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root
of factory hierarchy
INFO - MD5EncryptionStrategy - EncryptionStrategy: Using MD5 for encryptio
n
INFO - WebApplication - [wicket.system4-ui] Started Wicket version
6.8.0 in DEVELOPMENT mode
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode. ***
*** ^^^^^^^^^^^ ***
*** Do NOT deploy to your live server(s) without changing this. ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************
, 내가 얻을 :
type Status report
message /system4%2Dui%2D0.0.1%2DSNAPSHOT/
description The requested resource is not available.
이 로컬 호스트 액세스 로그에 나타납니다.
127.0.0.1 - - [01/Jul/2013:11:54:38 +0100] "GET /system4%2Dui%2D0.0.1%2DSNAPSHOT/ HTTP/1.1" 404 1015
아무도 도와 줄 수 있습니까?
내게있어 앱에 액세스하는 데 잘못된 URL이 있음을 알 수 있습니다. – duffymo
그럴 수도 있다고 생각했는데 올바른 URL을 찾는 방법은 무엇입니까? 나는 Tomcat 관리자 GUI 목록 응용 프로그램 탭에서 링크를 사용하고 있었으므로 사용하기에 적합한 도구라고 생각했을 것입니다. – fancyplants
귀하의 응용 프로그램을 WAR 파일로 패키징하고/webapps 디렉토리에 추가하고 모든 것을/ROOT 디렉토리에 쌓아 두지 않았 으면합니다. 당신 물건은 거기에 속해 있지 않습니다. 그렇다면 http : // localhost : 8080/ /index.html –
duffymo