Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Can someone clear up the "Step 2: Servlet container" part?

118 views
Skip to first unread message

John Doe

unread,
Sep 6, 2016, 3:33:06 PM9/6/16
to jobsworth
Step 2: Servlet container

Install Apache Tomcat (or another java servlet container) and make sure you can get to the default installation home page. How to install Tomcat or some other servlet container is beyond the scope of these instructions but the basic details can be found in the documentation. Don't be afraid of all those XML configuration files in Tomcat; mostly they can be left to default values.

There is one file you will need to edit and that is context.xml. This file defines all the configuration for your application. Copy the example into the tomcat configuration folder and set all the variables to reasonable choices for your system.

That one file needs to be cleared up where it is and the "example" as well needs to be better documented. I'm stuck on that step of inserting the correct context.xml and where.  

Aristedes Maniatis

unread,
Sep 6, 2016, 8:55:20 PM9/6/16
to jobs...@googlegroups.com
On 7/09/2016 5:33am, John Doe wrote:
> That one file needs to be cleared up where it is and the "example" as well needs to be better documented. I'm stuck on that step of inserting the correct context.xml and where.

So the file is here:

https://github.com/ari/jobsworth/blob/master/config/context.example.xml

Ask us questions about which parts don't make sense.


--
-------------------------->
Aristedes Maniatis
CEO, ish
https://www.ish.com.au
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A

signature.asc

John Doe

unread,
Sep 7, 2016, 3:02:53 AM9/7/16
to jobsworth
Where do I put that? I think that is my main question

Im using


To Access this

Tomcat is installed at

/opt/tomcat/

Webapp folders is at

/opt/tomcat/webapps

Basically Im stuck there. I know how to use the WAR but...

Aristedes Maniatis

unread,
Sep 7, 2016, 3:04:15 AM9/7/16
to jobs...@googlegroups.com
Probably /opt/tomcat/config/

On 7/09/2016 5:02pm, John Doe wrote:
> Where do I put that? I think that is my main question
>
> Im using
>
> tasks.mydomain.com
>
> To Access this
>
> Tomcat is installed at
>
> /opt/tomcat/
>
> Webapp folders is at
>
> /opt/tomcat/webapps
>
> Basically Im stuck there. I know how to use the WAR but...
>
>
> On Wednesday, September 7, 2016 at 2:55:20 AM UTC+2, Ari Maniatis wrote:
>
> On 7/09/2016 5:33am, John Doe wrote:
> > That one file needs to be cleared up where it is and the "example" as well needs to be better documented. I'm stuck on that step of inserting the correct context.xml and where.
>
> So the file is here:
>
> https://github.com/ari/jobsworth/blob/master/config/context.example.xml <https://github.com/ari/jobsworth/blob/master/config/context.example.xml>
>
> Ask us questions about which parts don't make sense.
>
>
> --
> -------------------------->
> Aristedes Maniatis
> CEO, ish
> https://www.ish.com.au
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "jobsworth" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jobsworth+...@googlegroups.com <mailto:jobsworth+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
signature.asc

John Doe

unread,
Sep 7, 2016, 3:43:55 AM9/7/16
to jobsworth
Thank you for the quick reply.

I believe I already placed it there once and nothing.....Ill give it another go.

John Doe

unread,
Sep 8, 2016, 6:16:13 AM9/8/16
to jobsworth
How much memory is needed?

When I deployed the ROOT.war, it just gives me out of memory errors.

John Doe

unread,
Sep 8, 2016, 6:18:35 AM9/8/16
to jobsworth
Also I cannot Access the Apache Tomcat page anymore.

John Doe

unread,
Sep 8, 2016, 6:52:37 AM9/8/16
to jobsworth
OK I forced using lower memory and I get this:


08-Sep-2016 10:49:16.764 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/ROOT.war
08-Sep-2016 10:49:20.088 WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "100" for "maxActive" property, which is being ignored.
08-Sep-2016 10:49:20.089 WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Property removeAbandoned is not used in DBCP2, use one or both of removeAbandonedOnBorrow or removeAbandonedOnMaintenance instead. Both have default value set to false. You have set value of "true" for "removeAbandoned" property, which is being ignored.
08-Sep-2016 10:49:20.089 WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
08-Sep-2016 10:49:20.089 INFO [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Ignoring unknown property: value of "-1" for "batchSize" property
08-Sep-2016 10:49:20.831 INFO [localhost-startStop-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.
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
08-Sep-2016 10:49:39.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.4
08-Sep-2016 10:49:39.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jul 6 2016 08:43:30 UTC
08-Sep-2016 10:49:39.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.4.0
08-Sep-2016 10:49:39.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
08-Sep-2016 10:49:39.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.4.0-36-generic
08-Sep-2016 10:49:39.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
08-Sep-2016 10:49:39.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
08-Sep-2016 10:49:39.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14
08-Sep-2016 10:49:39.704 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
08-Sep-2016 10:49:39.704 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat
08-Sep-2016 10:49:39.704 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat
08-Sep-2016 10:49:39.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
08-Sep-2016 10:49:39.707 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
08-Sep-2016 10:49:39.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
08-Sep-2016 10:49:39.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
08-Sep-2016 10:49:39.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true
08-Sep-2016 10:49:39.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Addresses=true
08-Sep-2016 10:49:39.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
08-Sep-2016 10:49:39.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
08-Sep-2016 10:49:39.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024M
08-Sep-2016 10:49:39.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
08-Sep-2016 10:49:39.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms256m
08-Sep-2016 10:49:39.714 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
08-Sep-2016 10:49:39.716 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=256m
08-Sep-2016 10:49:39.716 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
08-Sep-2016 10:49:39.723 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
08-Sep-2016 10:49:39.723 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
08-Sep-2016 10:49:39.724 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: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
08-Sep-2016 10:49:39.941 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
08-Sep-2016 10:49:40.026 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Sep-2016 10:49:40.030 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
08-Sep-2016 10:49:40.035 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Sep-2016 10:49:40.037 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2161 ms
08-Sep-2016 10:49:40.089 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
08-Sep-2016 10:49:40.090 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.4
08-Sep-2016 10:49:40.124 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor /opt/tomcat/conf/Catalina/localhost/manager.xml
08-Sep-2016 10:49:40.192 WARNING [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase /opt/tomcat/webapps/manager inside the host appBase has been specified, and will be ignored
08-Sep-2016 10:49:40.961 WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "100" for "maxActive" property, which is being ignored.
08-Sep-2016 10:49:40.961 WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Property removeAbandoned is not used in DBCP2, use one or both of removeAbandonedOnBorrow or removeAbandonedOnMaintenance instead. Both have default value set to false. You have set value of "true" for "removeAbandoned" property, which is being ignored.
08-Sep-2016 10:49:40.963 WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
08-Sep-2016 10:49:40.964 INFO [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Ignoring unknown property: value of "-1" for "batchSize" property
08-Sep-2016 10:49:41.165 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor /opt/tomcat/conf/Catalina/localhost/manager.xml has finished in 1,038 ms
08-Sep-2016 10:49:41.171 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/ROOT.war

It loops over and over again.

Aristedes Maniatis

unread,
Sep 8, 2016, 6:59:24 AM9/8/16
to jobs...@googlegroups.com
On 8/09/2016 8:52pm, John Doe wrote:
> 08-Sep-2016 10:49:20.088 WARNING [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = jobsworth Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "100" for "maxActive" property, which is being ignored.

I think that's beyond the help we can provide here. You need to get tomcat working and your database adapter correct. After that, the application should be easy enough to deploy.

Ari
signature.asc

John Doe

unread,
Sep 8, 2016, 7:07:18 AM9/8/16
to jobsworth
Tomcat Works. I get the basic Tomcat working image: http://blog.linoxide.com/wp-content/uploads/2016/05/tomcat.png

But when I put the ROOT.war in the webapps folder, everything goes to hell.

Thats why I wanted to ask what are the memory requirements for this?
Message has been deleted

John Doe

unread,
Sep 8, 2016, 7:09:34 AM9/8/16
to jobsworth
Also Im using this because its basically the latest as stated on your site. Having said that, I have no problem deploying the older ClockingIT if I need to

Aristedes Maniatis

unread,
Sep 8, 2016, 7:20:13 AM9/8/16
to jobs...@googlegroups.com
On 8/09/2016 9:07pm, John Doe wrote:
> Thats why I wanted to ask what are the memory requirements for this?

I run it in 1Gb of ram, but I'm guessing you could go down to 500Mb. I've not really tried to see how much RAM rails uses at a minimum.
signature.asc

John Doe

unread,
Sep 9, 2016, 3:12:35 AM9/9/16
to jobsworth
Im trying it on 512mb
Reply all
Reply to author
Forward
0 new messages