I'm using JDK 11 with Tomcat 9.0.52, I'd like to route my outbound requests to other host except for azure.net host. If I use the following, all requests are going to dummy.com but azure.net is not exempted.
http.proxyHost=https://dummy.com
http.proxyPort=443
https.proxyHost=https://www.dummy.com
https.proxyPort=443
http.nonProxyHosts=localhost|*.azure.net
Any leads on how to fix it?
This is how my tomcat log looks like -
23-Sep-2022 23:00:10.818 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
23-Sep-2022 23:00:10.818 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dspring.profiles.active=dev
23-Sep-2022 23:00:10.818 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.proxyHost=https://www.dummy.com
23-Sep-2022 23:00:10.818 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.*|[::1]|*.azure.net
Related
I have configures Kerberos Authentication Module(Windows Desktop SSO Node) with AWS Aurora Kerberos Details.
I have followed this doc - https://backstage.forgerock.com/marketplace/entry/AWyLw-zpDPiiBBbH4Pu-
Below are the errors from Logs.
I have followed the this doc to resolve – https://backstage.forgerock.com/knowledge/kb/article/a62965844 but couldnt resolve after following the solutions.
Keytab file is created with this command - ktpass -out fileName.keytab -princ HTTP/openam.forgerock.com#AD_DOMAIN.COM -pass +rdnPass -maxPass 256 -mapuser amKerberos#frdpcloud.com -crypto AES256-SHA1 -ptype KRB5_NT_PRINCIPAL -kvno 0
SPN is : HTTP/danvledwse01.xyz.com#XYZ.COM
Kerberos Configuration
18-Oct-2021 13:27:20.840 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [openam] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal#7bbd38c1]) and a value of type [org.forgerock.openam.audit.context.AuditRequestContext] (value [org.forgerock.openam.audit.context.AuditRequestContext#407cbfdc]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
18-Oct-2021 13:27:20.840 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [openam] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal#79238e6a]) and a value of type [org.forgerock.opendj.ldap.AttributeDescription$1] (value [{objectclass=Pair [Schema Core Schema-0 mr=773 syntaxes=45 at=109, objectclass]}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
18-Oct-2021 13:27:20.874 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["https-jsse-nio-8444"]
18-Oct-2021 13:27:20.926 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["https-jsse-nio-8444"]
18-Oct-2021 13:27:48.078 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [sslVerifyClient] to [optional]
18-Oct-2021 13:27:48.157 WARNING [main] org.apache.tomcat.util.net.SSLHostConfig.setProtocols The protocol [TLSv1.1] was added to the list of protocols on the SSLHostConfig named [_default_]. Check if a +/- prefix is missing.
18-Oct-2021 13:27:48.157 WARNING [main] org.apache.tomcat.util.net.SSLHostConfig.setProtocols The protocol [SSLv2Hello] was added to the list of protocols on the SSLHostConfig named [_default_]. Check if a +/- prefix is missing.
18-Oct-2021 13:27:48.193 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.52
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 31 2021 04:12:17 UTC
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.52.0
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.18.0-305.17.1.el8_4.x86_64
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el8_4.x86_64/jre
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_302-b08
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Red Hat, Inc.
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/forgerock/data/stage/apache-tomcat-9.0.52
18-Oct-2021 13:27:48.194 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /home/forgerock/data/stage/apache-tomcat-9.0.52
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/forgerock/data/stage/apache-tomcat-9.0.52/conf/logging.properties
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.security.krb5.debug=true
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.security.jgss.debug=true
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsun.security.spnego.debug=true
18-Oct-2021 13:27:48.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
18-Oct-2021 13:27:48.197 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/forgerock/data/stage/apache-tomcat-9.0.52
18-Oct-2021 13:27:48.197 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/home/forgerock/data/stage/apache-tomcat-9.0.52
18-Oct-2021 13:27:48.197 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/forgerock/data/stage/apache-tomcat-9.0.52/temp
18-Oct-2021 13:27:48.198 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
18-Oct-2021 13:27:48.718 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-8444"]
18-Oct-2021 13:27:49.135 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1192] milliseconds
18-Oct-2021 13:27:49.174 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
18-Oct-2021 13:27:49.175 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.52]
18-Oct-2021 13:27:50.326 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/openam.war]
18-Oct-2021 13:28:02.421 INFO [main] 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.
Starting up OpenAM at Oct 18, 2021 1:28:05 PM
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.
18-Oct-2021 13:28:14.928 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/openam.war] has finished in [24,602] ms
18-Oct-2021 13:28:14.985 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/ROOT]
18-Oct-2021 13:28:15.004 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/ROOT] has finished in [19] ms
18-Oct-2021 13:28:15.004 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/docs]
18-Oct-2021 13:28:15.020 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/docs] has finished in [16] ms
18-Oct-2021 13:28:15.021 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/examples]
18-Oct-2021 13:28:15.535 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/examples] has finished in [514] ms
18-Oct-2021 13:28:15.535 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/host-manager]
18-Oct-2021 13:28:15.568 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/host-manager] has finished in [32] ms
18-Oct-2021 13:28:15.568 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/manager]
18-Oct-2021 13:28:15.600 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/forgerock/data/stage/apache-tomcat-9.0.52/webapps/manager] has finished in [32] ms
18-Oct-2021 13:28:15.612 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-jsse-nio-8444"]
18-Oct-2021 13:28:15.626 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [26490] milliseconds
>>> KeyTabInputStream, readName(): XYZ.COM
>>> KeyTabInputStream, readName(): HTTP
>>> KeyTabInputStream, readName(): danvledwse01.xyz.com
>>> KeyTab: load() entry length: 72; type: 23
Looking for keys for: HTTP/danvledwse01.xyz.com#XYZ.COM
Java config name: /home/forgerock/openam/krb5.conf
Loaded from Java config
Added key: 23version: 0
>>> KdcAccessibility: reset
Looking for keys for: HTTP/danvledwse01.xyz.com#XYZ.COM
Added key: 23version: 0
Using builtin default etypes for default_tkt_enctypes
default etypes for default_tkt_enctypes: 18 17 16 23.
>>> KrbAsReq creating message
>>> KrbKdcReq send: kdc=172.20.2.196 UDP:88, timeout=30000, number of retries =3, #bytes=153
>>> KDCCommunication: kdc=172.20.2.196 UDP:88, timeout=30000,Attempt =1, #bytes=153
>>> KrbKdcReq send: #bytes read=175
>>>Pre-Authentication Data:
PA-DATA type = 11
PA-ETYPE-INFO etype = 23, salt =
>>>Pre-Authentication Data:
PA-DATA type = 19
PA-ETYPE-INFO2 etype = 23, salt = null, s2kparams = null
>>>Pre-Authentication Data:
PA-DATA type = 2
PA-ENC-TIMESTAMP
>>>Pre-Authentication Data:
PA-DATA type = 16
>>>Pre-Authentication Data:
PA-DATA type = 15
>>> KdcAccessibility: remove 172.20.2.196
>>> KDCRep: init() encoding tag is 126 req type is 11
>>>KRBError:
sTime is Mon Oct 18 13:28:37 UTC 2021 1634563717000
suSec is 124522
error code is 25
error Message is Additional pre-authentication required
sname is krbtgt/XYZ.COM#XYZ.COM
eData provided.
msgType is 30
>>>Pre-Authentication Data:
PA-DATA type = 11
PA-ETYPE-INFO etype = 23, salt =
>>>Pre-Authentication Data:
PA-DATA type = 19
PA-ETYPE-INFO2 etype = 23, salt = null, s2kparams = null
>>>Pre-Authentication Data:
PA-DATA type = 2
PA-ENC-TIMESTAMP
>>>Pre-Authentication Data:
PA-DATA type = 16
>>>Pre-Authentication Data:
PA-DATA type = 15
KrbAsReqBuilder: PREAUTH FAILED/REQ, re-send AS-REQ
Using builtin default etypes for default_tkt_enctypes
default etypes for default_tkt_enctypes: 18 17 16 23.
Looking for keys for: HTTP/danvledwse01.xyz.com#XYZ.COM
Added key: 23version: 0
Looking for keys for: HTTP/danvledwse01.xyz.com#XYZ.COM
Added key: 23version: 0
Using builtin default etypes for default_tkt_enctypes
default etypes for default_tkt_enctypes: 18 17 16 23.
>>> EType: sun.security.krb5.internal.crypto.ArcFourHmacEType
>>> KrbAsReq creating message
>>> KrbKdcReq send: kdc=172.20.2.196 UDP:88, timeout=30000, number of retries =3, #bytes=235
>>> KDCCommunication: kdc=172.20.2.196 UDP:88, timeout=30000,Attempt =1, #bytes=235
>>> KrbKdcReq send: #bytes read=90
>>> KrbKdcReq send: kdc=172.20.2.196 TCP:88, timeout=30000, number of retries =3, #bytes=235
>>> KDCCommunication: kdc=172.20.2.196 TCP:88, timeout=30000,Attempt =1, #bytes=235
>>>DEBUG: TCPClient reading 1474 bytes
>>> KrbKdcReq send: #bytes read=1474
>>> KdcAccessibility: remove 172.20.2.196
Looking for keys for: HTTP/danvledwse01.xyz.com#XYZ.COM
Added key: 23version: 0
>>> EType: sun.security.krb5.internal.crypto.ArcFourHmacEType
>>> KrbAsRep cons in KrbAsReq.getReply HTTP/danvledwse01.xyz.com
I have been trying to configure Tomcat 10.0.4 alongside IntelliJ Idea for my Java Web project. However, I am unable to run the project using SSL on port 8443. I have also included the Tomcat Native Library dll in the tomcat bin folder. Under build configuration settings in IntelliJ, I have also included the port number for HTTPS.
Upon building and running the server, https://localhost:8443 works as expected. However, when I try to access the web server using the local ip address (192.168.1.2) or through my external IP address, chrome spits ERR_CONNECTION_REFUSED. Port 80 works perfectly fine through both means.
I have port forwarding enabled for the ports 80, 443 and 8443 (which works considering Port 80 works fine) but 8443 does not work. On Windows 10, I have also allowed inbound and outbound connection to 8443 in firewall settings.
The following is my server.xml
<?xml version="1.0" encoding="UTF-8"?>
<Server port="-1" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" useAprConnector="true" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1"
executor="tomcatThreadPool"
connectionTimeout="20000"
redirectPort="8443"
useIPVHosts="true"
address="0.0.0.0"/>
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" URIEncoding="UTF-8"
secure="true" SSLEngine="true" scheme="https" clientAuth="false"
sslProtocol="TLS">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate
certificateKeyFile="conf/privkey1.pem"
certificateFile="conf/cert1.pem"
certificateChainFile="conf/chain1.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b"
resolveHosts="true"/>
</Host>
</Engine>
</Service>
</Server>
Any assistance would be greatly appreciated!
Update (04/24/2021 # 5:07 PM
The following is log messages upon startup:
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-Apr-2021 17:00:26.698 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Listener] failed to set property [useAprConnector] to [true]
24-Apr-2021 17:00:26.811 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [SSLEngine] to [true]
24-Apr-2021 17:00:26.811 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [clientAuth] to [false]
24-Apr-2021 17:00:26.812 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [sslProtocol] to [TLS]
24-Apr-2021 17:00:26.868 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host/Valve] failed to set property [resolveHosts] to [true]
24-Apr-2021 17:00:26.871 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.0.4
24-Apr-2021 17:00:26.871 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar 5 2021 11:07:15 UTC
24-Apr-2021 17:00:26.871 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.0.4.0
24-Apr-2021 17:00:26.871 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
24-Apr-2021 17:00:26.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
24-Apr-2021 17:00:26.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
24-Apr-2021 17:00:26.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk-11.0.10
24-Apr-2021 17:00:26.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.10+8-LTS-162
24-Apr-2021 17:00:26.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
24-Apr-2021 17:00:26.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\MicroTechTon\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\6454be16-6e63-47f0-9175-b6e43d48845f
24-Apr-2021 17:00:26.872 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 10.0
24-Apr-2021 17:00:26.873 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
24-Apr-2021 17:00:26.873 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
24-Apr-2021 17:00:26.873 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
24-Apr-2021 17:00:26.873 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\MicroTechTon\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\6454be16-6e63-47f0-9175-b6e43d48845f\conf\logging.properties
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\MicroTechTon\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\6454be16-6e63-47f0-9175-b6e43d48845f\jmxremote.password
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\MicroTechTon\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\6454be16-6e63-47f0-9175-b6e43d48845f\jmxremote.access
24-Apr-2021 17:00:26.874 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
24-Apr-2021 17:00:26.875 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
24-Apr-2021 17:00:26.875 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
24-Apr-2021 17:00:26.875 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
24-Apr-2021 17:00:26.875 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\MicroTechTon\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\6454be16-6e63-47f0-9175-b6e43d48845f
24-Apr-2021 17:00:26.875 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 10.0
24-Apr-2021 17:00:26.875 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 10.0\temp
24-Apr-2021 17:00:26.879 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.28] using APR version [1.7.0].
24-Apr-2021 17:00:26.880 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
24-Apr-2021 17:00:26.884 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1k 25 Mar 2021]
24-Apr-2021 17:00:27.200 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-0.0.0.0-80"]
24-Apr-2021 17:00:27.228 INFO [main] org.apache.coyote.http11.AbstractHttp11Protocol.configureUpgradeProtocol The ["https-openssl-apr-8443"] connector has been configured to support negotiation to [h2] via ALPN
24-Apr-2021 17:00:27.228 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-openssl-apr-8443"]
24-Apr-2021 17:00:27.339 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [783] milliseconds
24-Apr-2021 17:00:27.411 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
24-Apr-2021 17:00:27.411 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.0.4]
24-Apr-2021 17:00:27.428 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-0.0.0.0-80"]
24-Apr-2021 17:00:27.449 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-openssl-apr-8443"]
24-Apr-2021 17:00:27.457 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [117] milliseconds
Connected to server
I am using Intellij ultimate to start up a simple service. The structure of the project is like this:
My tomcat configuration as following:
When launching, the console shows no errors:
/tmp/apache-tomcat-8.5.38/bin/catalina.sh run
[2019-02-24 11:24:53,412] Artifact InsbotTomcat:war: Waiting for server connection to start artifact deployment...
[2019-02-24 11:24:53,412] Artifact web:war exploded: Waiting for server connection to start artifact deployment...
24-Feb-2019 23:24:54.294 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.38
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 5 2019 11:42:42 UTC
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.38.0
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.12.6
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_201-b09
24-Feb-2019 23:24:54.296 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat
24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /private/tmp/apache-tomcat-8.5.38
24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat/conf/logging.properties
24-Feb-2019 23:24:54.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
24-Feb-2019 23:24:54.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
24-Feb-2019 23:24:54.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat/jmxremote.password
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat/jmxremote.access
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
24-Feb-2019 23:24:54.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/diyu/Library/Caches/IntelliJIdea2018.3/tomcat/Tomcat_8_5_38_InsbotTomcat
24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/tmp/apache-tomcat-8.5.38
24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/tmp/apache-tomcat-8.5.38/temp
24-Feb-2019 23:24:54.301 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/diyu/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
24-Feb-2019 23:24:54.457 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
24-Feb-2019 23:24:54.477 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Feb-2019 23:24:54.494 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
24-Feb-2019 23:24:54.496 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Feb-2019 23:24:54.497 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 591 ms
24-Feb-2019 23:24:54.527 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
24-Feb-2019 23:24:54.527 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.38
24-Feb-2019 23:24:54.537 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
24-Feb-2019 23:24:54.548 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
24-Feb-2019 23:24:54.549 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 52 ms
Connected to server
[2019-02-24 11:24:55,011] Artifact InsbotTomcat:war: Artifact is being deployed, please wait...
[2019-02-24 11:24:55,012] Artifact web:war exploded: Artifact is being deployed, please wait...
24-Feb-2019 23:24:58.220 INFO [RMI TCP Connection(2)-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.
[2019-02-24 11:24:58,277] Artifact InsbotTomcat:war: Artifact is deployed successfully
[2019-02-24 11:24:58,277] Artifact InsbotTomcat:war: Deploy took 3,266 milliseconds
[2019-02-24 11:24:58,342] Artifact web:war exploded: Artifact is deployed successfully
[2019-02-24 11:24:58,342] Artifact web:war exploded: Deploy took 3,330 milliseconds
24-Feb-2019 23:25:04.541 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/private/tmp/apache-tomcat-8.5.38/webapps/manager]
24-Feb-2019 23:25:04.573 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/private/tmp/apache-tomcat-8.5.38/webapps/manager] has finished in [32] ms
While the auto-opened page shows like this:
I also tried http://localhost:8080/web_war_exploded/index.html, showing the same output.
After Open Module Settings, I have changed the configuration to be this:
And it works.
The problem might be that the deployment directory is "webapps/manager" (/private/tmp/apache-tomcat-8.5.38/webapps/manager) and not "webapps".
I followed the doc:https://www.jetbrains.com/help/idea/preparing-to-use-struts-2.html
Step 1. New Project
Step 2. Finish and fix problem in project stucture panel
Step 3. Run 'Tomcat'
Step 4. Get error
Some details:
Tomcat 8.5.14 / Struts 2 2.5.13(auto-download)
Server Log Output:
"C:\Program Files\Java\apache-tomcat-8.5.14\bin\catalina.bat" run
[2017-11-22 02:52:46,624] Artifact HelloStruts:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_HOME: "C:\Program Files\Java\apache-tomcat-8.5.14"
Using CATALINA_TMPDIR: "C:\Program Files\Java\apache-tomcat-8.5.14\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_111"
Using CLASSPATH: "C:\Program Files\Java\apache-tomcat-8.5.14\bin\bootstrap.jar;C:\Program Files\Java\apache-tomcat-8.5.14\bin\tomcat-juli.jar"
22-Nov-2017 14:52:47.451 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.14
22-Nov-2017 14:52:47.454 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Apr 13 2017 12:55:45 UTC
22-Nov-2017 14:52:47.454 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.14.0
22-Nov-2017 14:52:47.454 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
22-Nov-2017 14:52:47.454 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
22-Nov-2017 14:52:47.454 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
22-Nov-2017 14:52:47.454 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_111\jre
22-Nov-2017 14:52:47.454 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_111-b14
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\dram2\.IntelliJIdea2017.2\system\tomcat\Tomcat_8_5_14_HelloStruts
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Java\apache-tomcat-8.5.14
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\dram2\.IntelliJIdea2017.2\system\tomcat\Tomcat_8_5_14_HelloStruts\conf\logging.properties
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
22-Nov-2017 14:52:47.455 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\dram2\.IntelliJIdea2017.2\system\tomcat\Tomcat_8_5_14_HelloStruts
22-Nov-2017 14:52:47.456 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Java\apache-tomcat-8.5.14
22-Nov-2017 14:52:47.456 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Java\apache-tomcat-8.5.14\temp
22-Nov-2017 14:52:47.456 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2.
22-Nov-2017 14:52:47.456 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
22-Nov-2017 14:52:47.456 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
22-Nov-2017 14:52:48.183 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2k 26 Jan 2017)
22-Nov-2017 14:52:48.278 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
22-Nov-2017 14:52:48.302 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
22-Nov-2017 14:52:48.305 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
22-Nov-2017 14:52:48.307 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
22-Nov-2017 14:52:48.308 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1186 ms
22-Nov-2017 14:52:48.344 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
22-Nov-2017 14:52:48.344 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.14
22-Nov-2017 14:52:48.355 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
22-Nov-2017 14:52:48.367 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
22-Nov-2017 14:52:48.371 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 63 ms
Connected to server
[2017-11-22 02:52:48,749] Artifact HelloStruts:war exploded: Artifact is being deployed, please wait...
22-Nov-2017 14:52:49.400 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.
22-Nov-2017 14:52:49.424 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
22-Nov-2017 14:52:49.424 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
[2017-11-22 02:52:49,437] Artifact HelloStruts:war exploded: Error during artifact deployment. See server log for details.
22-Nov-2017 14:52:58.363 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Java\apache-tomcat-8.5.14\webapps\manager
22-Nov-2017 14:52:58.414 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Java\apache-tomcat-8.5.14\webapps\manager has finished in 50 ms
These lines might be important:
22-Nov-2017 14:52:49.400 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.
22-Nov-2017 14:52:49.424 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
22-Nov-2017 14:52:49.424 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
[2017-11-22 02:52:49,437] Artifact HelloStruts:war exploded: Error during artifact deployment. See server log for details.
Tomcat Localhost Log
24-Nov-2017 10:40:21.993 严重 [RMI TCP Connection(4)-127.0.0.1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:511)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:492)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4590)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5233)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:482)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:431)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Project Structure - Modules
Project Structure - Facets
And Artifacts
Which might be important is that, I fix a problem showed in 'Project Structue - Problem' panel, but it still cannot run.
The tomcat cannot working and I cannot access 'http://localhost:8080/index.jsp'.
But if I new a project without struts 2, tomcat is working.
If there's any other info should I provide, please let me know by comments.
How can I fix it, any advice would be helpful, thank you!
My solution to solve it is not direct but simple enough.
Just download the struts 2 on its website.
Choose 'Use library' when newing a project.
Everything works right.
I still don't know why IntelliJ downloaded struts 2 cannot work, but at least I can do my stuff on.
Here is step by step Segment Fault
package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
System.out.println("xxxx");
SpringApplication.run(DemoApplication.class, args);
}
}
other class
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
#RestController
public class SampleController {
#RequestMapping("/")
public String index() {
return "Greetings from Spring Boot!";
}
}
I made tomcat working on port 8181, because when I used 8080 and run in intellj, it says 8080 is already in use and can not start it.
So, I use 8181 and after executing, it opens localhost:8181 page but it is a white page, nothing there.
These are logs of output
06-Mar-2016 14:38:16.383 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/manager
06-Mar-2016 14:38:16.977 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/manager has finished in 593 ms
These are catalina log
06-Mar-2016 14:38:05.878 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.32
06-Mar-2016 14:38:05.887 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 2 2016 19:34:53 UTC
06-Mar-2016 14:38:05.888 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.32.0
06-Mar-2016 14:38:05.888 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
06-Mar-2016 14:38:05.891 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.2.0-30-generic
06-Mar-2016 14:38:05.892 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
06-Mar-2016 14:38:05.893 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-oracle/jre
06-Mar-2016 14:38:05.893 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_74-b02
06-Mar-2016 14:38:05.894 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
06-Mar-2016 14:38:05.894 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/caneraydin/.IntelliJIdea16/system/tomcat/Unnamed_Last5
06-Mar-2016 14:38:05.895 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
06-Mar-2016 14:38:05.896 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/caneraydin/.IntelliJIdea16/system/tomcat/Unnamed_Last5/conf/logging.properties
06-Mar-2016 14:38:05.897 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
06-Mar-2016 14:38:05.898 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
06-Mar-2016 14:38:05.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
06-Mar-2016 14:38:05.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
06-Mar-2016 14:38:05.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
06-Mar-2016 14:38:05.901 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
06-Mar-2016 14:38:05.901 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/opt/tomcat/endorsed
06-Mar-2016 14:38:05.902 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/caneraydin/.IntelliJIdea16/system/tomcat/Unnamed_Last5
06-Mar-2016 14:38:05.905 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
06-Mar-2016 14:38:05.905 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
06-Mar-2016 14:38:05.906 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/caneraydin/Downloads/idea-IU-144.4199.23/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
06-Mar-2016 14:38:06.265 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8181"]
06-Mar-2016 14:38:06.296 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Mar-2016 14:38:06.302 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-34294"]
06-Mar-2016 14:38:06.304 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Mar-2016 14:38:06.305 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1704 ms
06-Mar-2016 14:38:06.353 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
06-Mar-2016 14:38:06.353 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32
06-Mar-2016 14:38:06.370 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8181"]
06-Mar-2016 14:38:06.433 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-34294"]
06-Mar-2016 14:38:06.448 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 142 ms
06-Mar-2016 14:38:16.383 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/manager
06-Mar-2016 14:38:16.977 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/manager has finished in 593 ms
What am i doing wrong?
change the port in application.properties file to 8181 it will be default 8080
Regards,
Nitin