WAR deployment problems

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

WAR deployment problems

Postby steve1376656734 » Sun Oct 25, 2015 3:38 pm

Hi All,

I am trying to get my first WAR deployment to work and have run into a number of problems that I cannot seem to find any documentation on to help me resolve. In summary they are:

1. When I deploy the WAR file I get an error in the catalina.out file that says:
Code: Select all
log4j:WARN No appenders could be found for logger (com.servoy.j2db.util.Debug).

I have tries putting the log4j properties into the servoy.properties file but this seems to have no effect on the message. If I create a separate log4j.properties file in the WEB-INF folder then the error goes away but I suspect that this is not the way to deal with this issue.

2. I created the WAR file on my developer and did not tick the box to include the active solution and modules as I wanted to start with a very basic Servoy installation. However when I try to access http://localhost:8080/{my context}/servoy-admin I simply see a blank page - which is not what I expected!

Can anyone give me any pointers on what I have done wrong please?

FYI I am using Servoy 7.4.4, Tomcat 8.0.28, Java 1.8.0_66 and Centos 6.7

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: WAR deployment problems

Postby Ruben79 » Mon Oct 26, 2015 12:55 pm

About your second problem, does the repository_server specified in your servoy.properties contain a valid repository and are the right credentials being used?
I think that needs to be generated first, for example using a servoy_server.bat -upgradeRepository.

Maybe you can also check for errors in the servoy_log.txt located in your .servoy\server\{context} folder.
Ruben de Jong
Stb Software Development
SAN Partner

Stb Software Development - http://www.stb.nl
User avatar
Ruben79
 
Posts: 97
Joined: Wed Apr 18, 2007 12:43 pm

Re: WAR deployment problems

Postby steve1376656734 » Mon Oct 26, 2015 1:49 pm

Hi Ruben,

I managed to figure out that the repository server had to be created manually (really ought to be in the documentation I think!) and it is definitely there, the correct version and I can connect to it using the credentials in the servoy.properties file from pgAdmin so I'm guessing that is all OK. Unfortunately I cannot find the .servoy/server/{context} folder (I have run a find as the root user and nothing shows up) so I have no idea what is going wrong.

Any other pointers you may have would be welcomed.

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: WAR deployment problems

Postby Andrei Costescu » Tue Oct 27, 2015 3:27 pm

".servoy" should be located in your user home dir (~). Check any logs in there + your war deployment server's logs (for example tomcat/logs) for hints about what is going on (maybe remove the log4j changes you made for making the warning disappear as well - just in case those are disabling some more logging).
When you deploy the war, all needed database services must already be ready/operational. So the repository database + whatever your solution uses.

It could be other reasons as well. For example you could see in the logs something like "Repository found in database too new for this software version. Repository version: 47, software version: 44. Upgrade Servoy first." - which could happen if you deployed a Servoy 8 war with a Servoy 7 repository DB active, the repository got upgraded and then you try to deploy a Servoy 7 war again - but the repository is then no longer compatible.

You could start fresh with a new empty repository DB. (which you could also initialise as Ruben pointed above using a developer or normal app. server)

Indeed the wiki page doesn't make it very obvious that you need the DB servers running already before deploying the war (it just says "Doesn't contain the database engine or database files"). But also in the normal application server you would have to start your DB before starting the server right? Making a more visible comment about this in the docs is a good idea I think.

Edit: wiki now has a new info box about this.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: WAR deployment problems

Postby steve1376656734 » Tue Oct 27, 2015 4:24 pm

Hi Andrei,

I have searched the entire system (using find / -name .servoy -print) and that directory is not found anywhere on the system. Should it be in the home directory of the Tomcat system user? I am suspecting that the lack of a log file is related to the log4j problems but I'm not sure.

My database services are all started and available prior to starting the Tomcat server and I created two brand new repository databases (one for V7 and one for V8) using the developer installations on my local machine. According to the log file the repositories were created successfully so I have then created a WAR file from each developer. I have included no solutions in the WAR file as I wanted a very simple starting point to learn from. Both WAR files were deployed to the server and I have the following results:

The version 7 WAR deploys correctly but shows warnings when starting up relating to the log4j properties. Accessing the / directory for this context gives the usual Servoy Client Launcher page but if I try to access http://test.tmlep.com:8080/basic/servoy-admin I just get a blank screen.

When I try to deploy the version 8 WAR it fails to deploy correctly and in the Tomcat log file I get the following error:

Code: Select all
27-Oct-2015 14:02:56.994 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter com.servoy.j2db.server.ngclient.NGClientEntryFilter
java.lang.NullPointerException
        at com.servoy.j2db.server.ngclient.NGClientEntryFilter.init(NGClientEntryFilter.java:102)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4583)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1798)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

27-Oct-2015 14:02:59.928 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
27-Oct-2015 14:02:59.928 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()


The full catalina.out log file is:

Code: Select all
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
27-Oct-2015 14:02:50.126 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.28
27-Oct-2015 14:02:50.128 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Oct 7 2015 18:25:21 UTC
27-Oct-2015 14:02:50.128 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.28.0
27-Oct-2015 14:02:50.129 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
27-Oct-2015 14:02:50.129 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            2.6.32-042stab108.2
27-Oct-2015 14:02:50.129 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
27-Oct-2015 14:02:50.129 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/java/jre1.8.0_66
27-Oct-2015 14:02:50.129 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_66-b17
27-Oct-2015 14:02:50.129 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
27-Oct-2015 14:02:50.130 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/apache-tomcat-8.0.28
27-Oct-2015 14:02:50.130 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/apache-tomcat-8.0.28
27-Oct-2015 14:02:50.130 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat-latest/conf/logging.properties
27-Oct-2015 14:02:50.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
27-Oct-2015 14:02:50.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
27-Oct-2015 14:02:50.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dnet.sf.ehcache.skipUpdateCheck=true
27-Oct-2015 14:02:50.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dlog4j.debug
27-Oct-2015 14:02:50.131 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseConcMarkSweepGC
27-Oct-2015 14:02:50.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+CMSClassUnloadingEnabled
27-Oct-2015 14:02:50.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParNewGC
27-Oct-2015 14:02:50.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=128m
27-Oct-2015 14:02:50.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512m
27-Oct-2015 14:02:50.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512m
27-Oct-2015 14:02:50.132 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/opt/tomcat-latest/endorsed
27-Oct-2015 14:02:50.133 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat-latest
27-Oct-2015 14:02:50.133 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat-latest
27-Oct-2015 14:02:50.133 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat-latest/temp
27-Oct-2015 14:02:50.133 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/lib64:/lib64:/lib:/usr/lib
27-Oct-2015 14:02:50.335 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
27-Oct-2015 14:02:50.357 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Oct-2015 14:02:50.360 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
27-Oct-2015 14:02:50.365 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Oct-2015 14:02:50.365 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 772 ms
27-Oct-2015 14:02:50.401 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
27-Oct-2015 14:02:50.401 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.28
27-Oct-2015 14:02:50.439 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/apache-tomcat-8.0.28/webapps/basic.war
27-Oct-2015 14:02:54.675 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.
log4j: Trying to find [log4j.xml] using context classloader WebappClassLoader
  context: basic
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
.
log4j: Trying to find [log4j.xml] using WebappClassLoader
  context: basic
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader WebappClassLoader
  context: basic
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
.
log4j: Trying to find [log4j.properties] using WebappClassLoader
  context: basic
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
class loader.
log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource().
log4j: Could not find resource: [null].
log4j:WARN No appenders could be found for logger (com.servoy.j2db.util.Debug).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
27-Oct-2015 14:02:55.353 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/apache-tomcat-8.0.28/webapps/basic.war has finished in 4,913 ms
27-Oct-2015 14:02:55.354 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/apache-tomcat-8.0.28/webapps/basic8.war
27-Oct-2015 14:02:56.382 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.
log4j: Trying to find [log4j.xml] using context classloader WebappClassLoader
  context: basic8
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
.
log4j: Trying to find [log4j.xml] using WebappClassLoader
  context: basic8
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader WebappClassLoader
  context: basic8
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
.
log4j: Trying to find [log4j.properties] using WebappClassLoader
  context: basic8
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@6b884d57
class loader.
log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource().
log4j: Could not find resource: [null].
log4j:WARN No appenders could be found for logger (com.servoy.j2db.util.Debug).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
27-Oct-2015 14:02:57.182 SEVERE [localhost-startStop-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
27-Oct-2015 14:02:57.183 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/basic8] startup failed due to previous errors
27-Oct-2015 14:02:59.686 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/apache-tomcat-8.0.28/webapps/basic8.war has finished in 4,332 ms
27-Oct-2015 14:02:59.688 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.0.28/webapps/examples
27-Oct-2015 14:02:59.938 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.0.28/webapps/examples has finished in 250 ms
27-Oct-2015 14:02:59.938 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.0.28/webapps/ROOT
27-Oct-2015 14:02:59.960 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.0.28/webapps/ROOT has finished in 22 ms
27-Oct-2015 14:02:59.960 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.0.28/webapps/host-manager
27-Oct-2015 14:02:59.989 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.0.28/webapps/host-manager has finished in 28 ms
27-Oct-2015 14:02:59.989 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.0.28/webapps/manager
27-Oct-2015 14:03:00.037 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.0.28/webapps/manager has finished in 48 ms
27-Oct-2015 14:03:00.038 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.0.28/webapps/docs
27-Oct-2015 14:03:00.058 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.0.28/webapps/docs has finished in 20 ms
27-Oct-2015 14:03:00.070 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
27-Oct-2015 14:03:00.078 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
27-Oct-2015 14:03:00.079 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 9713 ms


Needless to say all the standard Tomcat apps (manager, host-manager, docs, examples etc.) all work fine.

Can you give me any idea what I should do next as this is very frustrating :(

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: WAR deployment problems

Postby Andrei Costescu » Tue Oct 27, 2015 4:47 pm

Can you post the sample .war that you are trying to test? I want to see if it reproduces for me. (of course maybe configure some in-mem DBs or something instead of giving any private DB info in servoy.properties file of war)
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: WAR deployment problems

Postby steve1376656734 » Tue Oct 27, 2015 5:20 pm

The WAR files are 70Mb each so I can't post them here - I will send you a PM with some links.

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: WAR deployment problems

Postby Andrei Costescu » Tue Oct 27, 2015 6:41 pm

Just tested the Servoy 7 version and admin page is accessible as expected.
Clean Servoy 7.4.4 Developer with DB install. Tomcat 8.0.28 zip version on Windows.
I started Postgres and ran servoy_server.bat -upgradeRepository. Then deployed your war and accessed it through http://localhost:8080/basic/servoy-admin/

Tried my own war export and it works the same... I just needed to make sure I closed Servoy Developer before starting Tomcat 8.0.28 because I didn't modify the ports and they had port conflicts. (developer already used 8080)

Also I did have messages in the servoy log file at c:\Users\[myuser]\.servoy\server\basic\servoy_log.txt - so something is fishy in your case if you don't get the log file in the home dir of the user running your Tomcat. Of course, there is also the difference of OS and I ran it with Java 7... I should try it with 8 as well. Also I did notice the -Dlog4j.debug=true; did you change other start arguments/settings for your Tomcat?

Btw, I also get the log4j warnings/debug messages if I enable debug mode. So that is not the problem.
Update: works as well with Java 8. So right now I would start with a new Tomcat, maybe see why the log file doesn't apear (I guess it does have write permissions). Maybe someone on Linux can help some more.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: WAR deployment problems

Postby steve1376656734 » Tue Oct 27, 2015 7:56 pm

Hi Andrei,

Can you try accessing http://test.tmlep.com:8080/basic/servoy-admin where you can see the issue I am having. Whereas http://test.tmlep.com:8080/basic brings up the launcher screen as expected.

Without any log files to look at and with no errors showing in the catalina.out file I am struggling to know what to do.

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: WAR deployment problems

Postby Andrei Costescu » Tue Oct 27, 2015 8:01 pm

None of the two URL actually loads for me. They time out. You might have a firewall or something.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: WAR deployment problems

Postby steve1376656734 » Tue Oct 27, 2015 8:17 pm

Ooops - you are quite correct. Port 8080 has now been opened for you to try. Sorry - I really appreciate the assistance.

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: WAR deployment problems

Postby Andrei Costescu » Wed Oct 28, 2015 2:37 pm

Yes, I can see now the blank page. That suggests to me that an exception of some kind happened, and that we should see in the Servoy log - the one that we can't find...
Also I noticed that currently you have both the basic and basic8 wars deployed in Tomcat - try to not deploy both if they are using the same repo DB.

- do you have a system property defined with name "SERVOY_USER_HOME"?
- in Servoy8 you can define a servoy.properties entry in the war file for auto-upgrading: "automaticallyUpgradeRepository=true"

If none of the two pointers above brings something new, I suggest you start clean.
Try it first with the .zip version of Tomcat.

So:
- stop and uninstall/disable your current Tomcat
- close all Servoy Developers / Servoy App. Servers
- download .zip or .tar.gz version of Tomcat and expand it somewhere under your user dir (~/Tomcat_8_0_28 maybe)
- clean old repository DB usign PGAdmin or delete that completely to be sure and create/configure a new one. Run 'servoy_server.bat -upgradeRepository' using Servoy 7.4.4 when the new Repo is started and will be used
- close all Servoy Developers / Servoy App. Servers
- start Tomcat from [expanded_dir]/bin using the command line - something like 'catalina.sh start'
- deploy only basic.war and see if it works
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: WAR deployment problems

Postby steve1376656734 » Wed Oct 28, 2015 4:03 pm

Hi Andrei,

The basic and basic8 deployments were pointing to separate repository DBs (servoy_repository and servoy_repository_v8). I have now removed both and recreated only the V7 one as servoy_repository. I am going to try to get just the V7 one running first and if that is successful then move to the V8 one :).

1. I have disabled the current Tomcat installation and created a fresh one in an arbitrary directory.
2. There is currently no Servoy software deployed on the server (neither developer nor app server)
3. I have created a brand new repository database and populated it remotely using my local developer. I have checked the servoy_user_properties file and can see a record for the repository version indicating it is at version 44.
4. The local Servoy developer was then closed completely.
5. Tomcat was started from the new directory as the root user and I am able to access the servoy admin page without issue :)
6. The .servoy directory was created and populated in the root users home directory
7. I then stopped the Tomcat server and restarted it (the local install) as a service owned by a user called tomcat and I immediately got the blank page issue again.
8. No .servoy directory was created in the tomcat user directory and hence no log file.

This seems to point to a problem with how the Tomcat server has been started but there is nothing in any of the tomcat log files to indicate an issue and no servoy log file has been created. I would like to try the SERVOY_USER_HOME property to try and force the log file to a specific location but it is unclear if the SERVOY_USER_HOME is an entry in the servoy.properties file or an environment variable (I am running on Centos 6.7)?

Can you give me a pointer on this and hopefully we will get some log that will point me in the direction of the problem.

Thanks again for your assistance with this.
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: WAR deployment problems

Postby Andrei Costescu » Wed Oct 28, 2015 4:57 pm

Yw. Great so we have something now. :)
Yes, it seems to be a problem with file access permissions - probably war deployment fails to write log files/properties.
I would expect tomcat user to be able to write to it's own home dir. Maybe it has something to do with running Tomcat with root initially and afterwards with tomcat. (some files being created by root interfearing). That is if you did start this Tomcat with root before.

SERVOY_USER_HOME is an environment variable. You can add it through tomcat's java opts with -D...
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: WAR deployment problems

Postby steve1376656734 » Wed Oct 28, 2015 5:35 pm

We have a result!!

When I set the SERVOY_USER_HOME property to a directory I know exists and has the correct permissions we get a log file created with an error relating to not being able to create the uploads directory. I can see now that this is a permissions issue and once I resolved this I was able to start Tomcat as a service and I can access the admin page with no issues :D :D

Next problem is to get the V8 WAR working though I suspect that by fixing the V7 issues it should be a lot easier to get the V8 working.

Many many thanks for the assistance and once I have everything working I might even get around to writing a tutorial for it all!

It may also be worth mentioning the SERVOY_USER_HOME property in the wiki and stating that it should be set in the java options as being a Unix bod an environment variable is set at the shell level not the Java level!

Thanks again
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Next

Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 3 guests

cron