Problem with Tomcat 9 WAR file to deploy

Questions and answers for all installation-related topics for Servoy products

Problem with Tomcat 9 WAR file to deploy

Postby huber » Tue Oct 15, 2019 12:08 pm

Hi All

We installed Tomcat 9.0.26 on a fresh installation of Windows Server 2019 using Java 1.8.0. Tomcat is starting up as expected. But when we want to deploy a WAR file, there is the WAR file including the path displayed in the field: "Select WAR file to upload". Consequently, this doesn't work.

Anyone knows how to fix this?

Thanks and regards,
Attachments
war to deploy.png
war to deploy.png (52.63 KiB) Viewed 735 times
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 350
Joined: Mon May 14, 2012 11:31 pm

Re: Problem with Tomcat 9 WAR file to deploy

Postby jcompagner » Tue Oct 15, 2019 1:49 pm

any errors in the tomcat log at the moment you press deploy? (or "what doesn't really work")

i guess you could just deploy by copy it manually in the tomcat\webapps folder.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8214
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Problem with Tomcat 9 WAR file to deploy

Postby huber » Tue Oct 15, 2019 3:58 pm

Thanks, Johan, following is the first part of the Catalina log. I replaced my username by <username> in the log. Problem is that instead of having the context name 7r, the context name is here C:Users<username>Desktop7r.war, That of course is wrong and can't work.

You are right, I can deploy the context by putting it in the tomcat/webapps folder. Although I am surprised as I tried exactly that yesterday and it didn't work. May be a restart changed it.

But I can't access the context 7r by entering http:\localhost:8080/7r/servoy-admin or ip-address:8080/7r/servoy-admin in the Browser. I also noticed that there is no .servoy folder yet in my C:\Users\<username>\ folder. But I remember it may be written only when the properties file is the first time saved (after a change).

Code: Select all
15-Oct-2019 14:42:44.316 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [792] milliseconds
15-Oct-2019 14:45:31.597 INFO [http-nio-8080-exec-8] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\C:Users<username>Desktop7r.war]
15-Oct-2019 14:45:31.597 WARNING [http-nio-8080-exec-8] org.apache.catalina.util.LifecycleMBeanBase.register Failed to register object [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/C:Users<username>Desktop7r]] with name [Catalina:j2eeType=WebModule,name=//localhost/C:Users<username>Desktop7r,J2EEApplication=none,J2EEServer=none] during component initialisation
   javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
      at javax.management.ObjectName.construct(Unknown Source)
      at javax.management.ObjectName.<init>(Unknown Source)
      at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:157)
      at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:59)
      at org.apache.catalina.core.ContainerBase.initInternal(ContainerBase.java:864)
      at org.apache.catalina.core.StandardContext.initInternal(StandardContext.java:6188)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1642)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
      at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1590)
      at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294)
      at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643)
      at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
      at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
      at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:289)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Unknown Source)
15-Oct-2019 14:45:31.597 WARNING [http-nio-8080-exec-8] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'clearReferencesStatic' to 'true' did not find a matching property.
15-Oct-2019 14:45:31.612 SEVERE [http-nio-8080-exec-8] org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing docBase for context [/C:Users<username>Desktop7r]
   java.io.IOException: Unable to create the directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\C:Users<username>Desktop7r]
      at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:115)
      at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:615)
      at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:747)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
      at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:182)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1642)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
      at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1590)
      at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294)
      at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643)
      at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
      at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
      at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:289)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Unknown Source)
15-Oct-2019 14:45:31.722 WARNING [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.postWorkDirectory Failed to create work directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\work\Catalina\localhost\C:Users<username>Desktop7r] for context [/C:Users<username>Desktop7r]
15-Oct-2019 14:45:31.722 WARNING [http-nio-8080-exec-8] org.apache.catalina.util.LifecycleMBeanBase.register Failed to register object [org.apache.catalina.webresources.StandardRoot@66d3e5e9] with name [Catalina:type=WebResourceRoot,host=localhost,context=/C:Users<username>Desktop7r] during component initialisation
   javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
      at javax.management.ObjectName.construct(Unknown Source)
      at javax.management.ObjectName.<init>(Unknown Source)
      at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:157)
      at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:59)
      at org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:679)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
      at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4800)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4935)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1642)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
      at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1590)
      at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294)
      at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643)
      at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
      at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:53)
      at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:289)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Unknown Source)
...
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 350
Joined: Mon May 14, 2012 11:31 pm

Re: Problem with Tomcat 9 WAR file to deploy

Postby jcompagner » Tue Oct 15, 2019 6:27 pm

the problem is that your context: context=/C:Users<username>Desktop7r

is completely wrong, isn't there also something where you can specify the context? It seems that the browser sends over your full filename (which is wrong it shouldnt do that!)

Can you use a different browser to upload your war?

because it really just should use the war filename itself, not the full path..
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8214
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Problem with Tomcat 9 WAR file to deploy

Postby huber » Tue Oct 15, 2019 7:04 pm

Yes, the path in the context is the problem. I do not know (and did not find) anything about a configuration in Tomcat to "remove" the path from the context part. Will try with another Browser to do the deploy.

Regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 350
Joined: Mon May 14, 2012 11:31 pm

Re: Problem with Tomcat 9 WAR file to deploy

Postby huber » Thu Oct 17, 2019 9:28 am

Internet Explorer adds the path to the context. Changed to Firefox and all is fine. Another problem was exactly the same as described in the thread viewtopic.php?f=5&t=21577

Thanks and regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 350
Joined: Mon May 14, 2012 11:31 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests