Problem with tutorial web deployment

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with tutorial web deployment

Leighton Pritchard-3
Hi,

I’m coming across a problem in deploying the tutorial webapp that isn’t covered in troubleshooting (http://intermine.readthedocs.org/en/latest/support/troubleshooting-tips/) or that I’ve been able to find in the mailing list archive, or via Google.

I’m deploying on OS X 10.10 (Yosemite), using homebrew installations of postgresql and tomcat:

$ brew info tomcat
tomcat: stable 8.0.14
$ brew info postgres
postgresql: stable 9.3.5 (bottled), devel 9.4beta3

with the Java 8 JDK:

$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

The webapp apparently deploys correctly:

“””
[…]
-set-deploy-url:
[determine-tomcat-version] Setting deploy url -tomcat-manager-url = http://localhost:8080/manager/text
[determine-tomcat-version] Setting deploy url -tomcat-manager-url = http://localhost:8080/manager/text
[determine-tomcat-version] Setting deploy url -tomcat-manager-url = http://localhost:8080/manager/text
[determine-tomcat-version] Setting deploy url -tomcat-manager-url = http://localhost:8080/manager/text
[determine-tomcat-version] Setting deploy url -tomcat-manager-url = http://localhost:8080/manager/text
[determine-tomcat-version] Setting deploy url -tomcat-manager-url = http://localhost:8080/manager/text

release-webapp:
[tomcat-deploy] OK - Deployed application at context path /malariamine

BUILD SUCCESSFUL
Total time: 31 seconds
“”"

and shows up in the Tomcat manager, but attempting to access it takes me to a blank page with no source at http://localhost:8080/malariamine/begin.do

Checking the Tomcat logs indicates that the webapp isn’t starting correctly:

“””
04-Nov-2014 19:58:20.391 INFO [http-nio-8080-exec-12] org.apache.catalina.core.ApplicationContext.log  [CompressingFilter/1.7] CompressingFilter is being destroyed...
04-Nov-2014 19:58:25.626 INFO [http-nio-8080-exec-18] org.apache.catalina.core.ApplicationContext.log  [CompressingFilter/1.7] CompressingFilter has initialized
04-Nov-2014 19:58:25.900 SEVERE [http-nio-8080-exec-18] org.apache.catalina.core.ApplicationContext.log action: null
 java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at org.intermine.web.struts.ResourceFinder.findResourcesMatching(ResourceFinder.java:54)
at org.intermine.web.struts.InitialiserPlugin.loadWebProperties(InitialiserPlugin.java:578)
at org.intermine.web.struts.InitialiserPlugin.init(InitialiserPlugin.java:141)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:871)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
[…]
04-Nov-2014 19:58:25.901 INFO [http-nio-8080-exec-18] org.apache.catalina.core.ApplicationContext.log Marking servlet action as unavailable
04-Nov-2014 19:58:25.901 SEVERE [http-nio-8080-exec-18] org.apache.catalina.core.StandardContext.loadOnStartup Servlet /malariamine threw load() exception
 javax.servlet.UnavailableException
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1041)
[…]
04-Nov-2014 19:58:56.964 SEVERE [35] org.apache.catalina.session.StandardSession.tellNew Session event listener threw exception
 java.lang.NullPointerException
at org.intermine.web.logic.session.SessionMethods.initSession(SessionMethods.java:460)
at org.intermine.web.logic.session.SessionListener.sessionCreated(SessionListener.java:31)
at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:414)
at org.apache.catalina.session.StandardSession.setId(StandardSession.java:386)
“””

I *think* my malariamine.properties file is correctly formed, but Java webapps area little out of my comfort zone for debugging, so if there’s any other information I can give that’s of use in determining what’s going wrong, please let me know.

I’d appreciate any thoughts or advice on what I should be doing to fix this/get the webapp to deploy.

Many thanks,

L.

-- 
Leighton Pritchard
gpg/pgp:0xDECACFFC




_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Julie Sullivan
Hi Leighton,

Sorry you are having problems. Can you try using Java 7? I know someone
else reported problems with Java 8:

https://github.com/intermine/intermine/issues/681

Otherwise, the error message listed said it can't find the
web.properties file. Can you check to see if that's there?

Here's the file in FlyMine:

https://github.com/intermine/intermine/blob/beta/flymine/webapp/resources/web.properties

Julie

On 04/11/14 20:12, Leighton Pritchard wrote:

> Hi,
>
> I’m coming across a problem in deploying the tutorial webapp that isn’t
> covered in troubleshooting
> (http://intermine.readthedocs.org/en/latest/support/troubleshooting-tips/)
> or that I’ve been able to find in the mailing list archive, or via Google.
>
> I’m deploying on OS X 10.10 (Yosemite), using homebrew installations of
> postgresql and tomcat:
>
> $ brew info tomcat
> tomcat: stable 8.0.14
> $ brew info postgres
> postgresql: stable 9.3.5 (bottled), devel 9.4beta3
>
> with the Java 8 JDK:
>
> $ java -version
> java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
>
> The webapp apparently deploys correctly:
>
> “””
> […]
> -set-deploy-url:
> [determine-tomcat-version] Setting deploy url -tomcat-manager-url =
> http://localhost:8080/manager/text
> [determine-tomcat-version] Setting deploy url -tomcat-manager-url =
> http://localhost:8080/manager/text
> [determine-tomcat-version] Setting deploy url -tomcat-manager-url =
> http://localhost:8080/manager/text
> [determine-tomcat-version] Setting deploy url -tomcat-manager-url =
> http://localhost:8080/manager/text
> [determine-tomcat-version] Setting deploy url -tomcat-manager-url =
> http://localhost:8080/manager/text
> [determine-tomcat-version] Setting deploy url -tomcat-manager-url =
> http://localhost:8080/manager/text
>
> release-webapp:
> [tomcat-deploy] OK - Deployed application at context path /malariamine
>
> BUILD SUCCESSFUL
> Total time: 31 seconds
> “”"
>
> and shows up in the Tomcat manager, but attempting to access it takes me
> to a blank page with no source at http://localhost:8080/malariamine/begin.do
>
> Checking the Tomcat logs indicates that the webapp isn’t starting correctly:
>
> “””
> 04-Nov-2014 19:58:20.391 INFO [http-nio-8080-exec-12]
> org.apache.catalina.core.ApplicationContext.log  [CompressingFilter/1.7] CompressingFilter
> is being destroyed...
> 04-Nov-2014 19:58:25.626 INFO [http-nio-8080-exec-18]
> org.apache.catalina.core.ApplicationContext.log  [CompressingFilter/1.7] CompressingFilter
> has initialized
> 04-Nov-2014 19:58:25.900 SEVERE [http-nio-8080-exec-18]
> org.apache.catalina.core.ApplicationContext.log action: null
>   java.lang.NullPointerException
> at java.io.File.<init>(File.java:277)
> at
> org.intermine.web.struts.ResourceFinder.findResourcesMatching(ResourceFinder.java:54)
> at
> org.intermine.web.struts.InitialiserPlugin.loadWebProperties(InitialiserPlugin.java:578)
> at
> org.intermine.web.struts.InitialiserPlugin.init(InitialiserPlugin.java:141)
> at
> org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:871)
> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
> at javax.servlet.GenericServlet.init(GenericServlet.java:158)
> at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
> […]
> 04-Nov-2014 19:58:25.901 INFO [http-nio-8080-exec-18]
> org.apache.catalina.core.ApplicationContext.log Marking servlet action
> as unavailable
> 04-Nov-2014 19:58:25.901 SEVERE [http-nio-8080-exec-18]
> org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> /malariamine threw load() exception
>   javax.servlet.UnavailableException
> at
> org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)
> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
> at javax.servlet.GenericServlet.init(GenericServlet.java:158)
> at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1041)
> […]
> 04-Nov-2014 19:58:56.964 SEVERE [35]
> org.apache.catalina.session.StandardSession.tellNew Session event
> listener threw exception
>   java.lang.NullPointerException
> at
> org.intermine.web.logic.session.SessionMethods.initSession(SessionMethods.java:460)
> at
> org.intermine.web.logic.session.SessionListener.sessionCreated(SessionListener.java:31)
> at
> org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:414)
> at
> org.apache.catalina.session.StandardSession.setId(StandardSession.java:386)
> “””
>
> I *think* my malariamine.properties file is correctly formed, but Java
> webapps area little out of my comfort zone for debugging, so if there’s
> any other information I can give that’s of use in determining what’s
> going wrong, please let me know.
>
> I’d appreciate any thoughts or advice on what I should be doing to fix
> this/get the webapp to deploy.
>
> Many thanks,
>
> L.
>
> --
> Leighton Pritchard
> [hidden email] <mailto:[hidden email]>
> gpg/pgp:0xDECACFFC
>
>
>
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Leighton Pritchard-3
Hi Julie,

On 5 Nov 2014, at 09:43, Julie Sullivan <[hidden email]> wrote:

Sorry you are having problems.

No problem, and thank you for the  - I’m just anxious to give InterMine a spin ;)

Can you try using Java 7? I know someone else reported problems with Java 8:

https://github.com/intermine/intermine/issues/681

I did see that issue earlier in the process, and I tried JDK 7, but with no success.

As it happens, I was able to resolve that issue with JDK 8 by making two manual changes to javadoc text; there were three remaining warnings, but otherwise building was successful at that stage.

Otherwise, the error message listed said it can't find the web.properties file. Can you check to see if that's there?

Here's the file in FlyMine:

https://github.com/intermine/intermine/blob/beta/flymine/webapp/resources/web.properties

Yes, the file is present:

“”"
intermine/malariamine/webapp$ tree -L 2
.
├── build
│   ├── classes
│   ├── depend.cache
│   ├── main
│   ├── tmp
│   └── webapp
├── build.xml
├── dist
│   └── malariamine-webapp.war
├── intermine.log
├── project.properties
├── resources
│   ├── default-template-queries.xml
│   ├── model.properties
│   ├── struts-config-form-model.xml
│   ├── struts-config-model.xml
│   ├── tiles-defs-model.xml
│   ├── web-model.xml
│   ├── web.properties
│   └── webapp
└── src
“”"

Cheers,

L.

-- 
Leighton Pritchard
gpg/pgp:0xDECACFFC




_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Julie Sullivan
Can you look in the WAR file? web.properties should be in the WEB-INF
directory.

I would also recommend restarting tomcat, and running the ant clean
target in the webapp directory.

On 05/11/14 12:03, Leighton Pritchard wrote:

> Hi Julie,
>
>> On 5 Nov 2014, at 09:43, Julie Sullivan <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Sorry you are having problems.
>
> No problem, and thank you for the  - I’m just anxious to give InterMine
> a spin ;)
>
>> Can you try using Java 7? I know someone else reported problems with
>> Java 8:
>>
>> https://github.com/intermine/intermine/issues/681
>
> I did see that issue earlier in the process, and I tried JDK 7, but with
> no success.
>
> As it happens, I was able to resolve that issue with JDK 8 by making two
> manual changes to javadoc text; there were three remaining warnings, but
> otherwise building was successful at that stage.
>
>> Otherwise, the error message listed said it can't find the
>> web.properties file. Can you check to see if that's there?
>>
>> Here's the file in FlyMine:
>>
>> https://github.com/intermine/intermine/blob/beta/flymine/webapp/resources/web.properties
>
> Yes, the file is present:
>
> “”"
> intermine/malariamine/webapp$ tree -L 2
> .
> ├── build
> │   ├── classes
> │   ├── depend.cache
> │   ├── main
> │   ├── tmp
> │   └── webapp
> ├── build.xml
> ├── dist
> │   └── malariamine-webapp.war
> ├── intermine.log
> ├── project.properties
> ├── resources
> │   ├── default-template-queries.xml
> │   ├── model.properties
> │   ├── struts-config-form-model.xml
> │   ├── struts-config-model.xml
> │   ├── tiles-defs-model.xml
> │   ├── web-model.xml
> │   ├── web.properties
> │   └── webapp
> └── src
> “”"
>
> Cheers,
>
> L.
>
> --
> Leighton Pritchard
> [hidden email] <mailto:[hidden email]>
> gpg/pgp:0xDECACFFC
>
>
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Leighton Pritchard-3
Hi Julie,

On 5 Nov 2014, at 13:39, Julie Sullivan <[hidden email]> wrote:

Can you look in the WAR file? web.properties should be in the WEB-INF directory.

web.properties is there under the build directory:

intermine/malariamine/webapp$ ls -l build/webapp/WEB-INF/
total 528
-rw-r--r--  1 lpritc  staff   1.0K  4 Nov 19:37 aspects.xml
drwxr-xr-x  5 lpritc  staff   170B  4 Nov 19:37 classes/
drwxr-xr-x  3 lpritc  staff   102B  4 Nov 19:37 lib/
-rw-r--r--  1 lpritc  staff    18K  4 Nov 19:58 objectstoresummary.properties
-rw-r--r--  1 lpritc  staff    33K  4 Nov 19:58 struts-config.xml
-rw-r--r--  1 lpritc  staff    17K  4 Nov 19:58 tiles-defs.xml
-rw-r--r--  1 lpritc  staff    10K  4 Nov 19:58 web.properties
-rw-r--r--  1 lpritc  staff   158K  4 Nov 19:58 web.xml
-rw-r--r--  1 lpritc  staff   9.5K  4 Nov 19:37 webconfig-model.xml

and is also present in the .war file. The two are identical:

$ diff WEB-INF/web.properties ~/Development/GitHub/intermine/malariamine/webapp/build/webapp/WEB-INF/web.properties

I would also recommend restarting tomcat, and running the ant clean target in the webapp directory.

Unfortunately, that doesn’t help. I tried variations on this, including ant clean-all, and rebuilds of the webapp, but without success.

Might it be a permissions issue?

Cheers,

L.

-- 
Leighton Pritchard
gpg/pgp:0xDECACFFC




_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Julie Sullivan
Can you try tomcat 7?

https://github.com/intermine/intermine/issues/745

It looks like I got it to work with tomcat 8 but it was slow. This will
be fixed in the next InterMine!

On 05/11/14 13:59, Leighton Pritchard wrote:

> Hi Julie,
>
>> On 5 Nov 2014, at 13:39, Julie Sullivan <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Can you look in the WAR file? web.properties should be in the WEB-INF
>> directory.
>
> web.properties is there under the build directory:
>
> intermine/malariamine/webapp$ ls -l build/webapp/WEB-INF/
> total 528
> -rw-r--r--  1 lpritc  staff   1.0K  4 Nov 19:37 aspects.xml
> drwxr-xr-x  5 lpritc  staff   170B  4 Nov 19:37 classes/
> drwxr-xr-x  3 lpritc  staff   102B  4 Nov 19:37 lib/
> -rw-r--r--  1 lpritc  staff    18K  4 Nov 19:58
> objectstoresummary.properties
> -rw-r--r--  1 lpritc  staff    33K  4 Nov 19:58 struts-config.xml
> -rw-r--r--  1 lpritc  staff    17K  4 Nov 19:58 tiles-defs.xml
> -rw-r--r--  1 lpritc  staff    10K  4 Nov 19:58 web.properties
> -rw-r--r--  1 lpritc  staff   158K  4 Nov 19:58 web.xml
> -rw-r--r--  1 lpritc  staff   9.5K  4 Nov 19:37 webconfig-model.xml
>
> and is also present in the .war file. The two are identical:
>
> $ diff WEB-INF/web.properties
> ~/Development/GitHub/intermine/malariamine/webapp/build/webapp/WEB-INF/web.properties
>
>> I would also recommend restarting tomcat, and running the ant clean
>> target in the webapp directory.
>
> Unfortunately, that doesn’t help. I tried variations on this, including
> ant clean-all, and rebuilds of the webapp, but without success.
>
> Might it be a permissions issue?
>
> Cheers,
>
> L.
>
> --
> Leighton Pritchard
> [hidden email] <mailto:[hidden email]>
> gpg/pgp:0xDECACFFC
>
>
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Leighton Pritchard-3
Hi Julie,

On 5 Nov 2014, at 14:16, Julie Sullivan <[hidden email]> wrote:

Can you try tomcat 7?

https://github.com/intermine/intermine/issues/745

It looks like I got it to work with tomcat 8 but it was slow. This will be fixed in the next InterMine!

I have success with Tomcat 7.0.56, installed via homebrew!

It’s not entirely perfect: I get a modal dialog on the Home page that reads: “The page at localhost:8080 says: Session Error” (I get a cascade of these on the gene search result page), catalina.out reports quite a few errors, and the Data Sources page appears to be corrupted, but the search function works.

I’ll have another go at building with JDK 7 to see if that helps, but I’m happy to be able to see the webapp, at this point.

Many thanks,

L.

-- 
Leighton Pritchard
gpg/pgp:0xDECACFFC




_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Julie Sullivan
1. session errors - might need a tomcat setting:

http://intermine.readthedocs.org/en/latest/system-requirements/software/tomcat/?#session-errors

2. data sources

You need this fix:

https://github.com/intermine/intermine/commit/53254edc879cd7fb6d9feeb716b1c767af766fb1#diff-0a106f7a73d0d71ba065440a81cded1b

I'll push this change to the master branch as well

Let me know if you see any more errors!

On 05/11/14 17:11, Leighton Pritchard wrote:

> Hi Julie,
>
>> On 5 Nov 2014, at 14:16, Julie Sullivan <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Can you try tomcat 7?
>>
>> https://github.com/intermine/intermine/issues/745
>>
>> It looks like I got it to work with tomcat 8 but it was slow. This
>> will be fixed in the next InterMine!
>
> I have success with Tomcat 7.0.56, installed via homebrew!
>
> It’s not entirely perfect: I get a modal dialog on the Home page that
> reads: “The page at localhost:8080 says: Session Error” (I get a cascade
> of these on the gene search result page), catalina.out reports quite a
> few errors, and the Data Sources page appears to be corrupted, but the
> search function works.
>
> I’ll have another go at building with JDK 7 to see if that helps, but
> I’m happy to be able to see the webapp, at this point.
>
> Many thanks,
>
> L.
>
> --
> Leighton Pritchard
> [hidden email] <mailto:[hidden email]>
> gpg/pgp:0xDECACFFC
>
>
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with tutorial web deployment

Leighton Pritchard-3
Thanks Julie,

On 5 Nov 2014, at 17:23, Julie Sullivan <[hidden email]> wrote:

1. session errors - might need a tomcat setting:

http://intermine.readthedocs.org/en/latest/system-requirements/software/tomcat/?#session-errors

2. data sources

You need this fix:

https://github.com/intermine/intermine/commit/53254edc879cd7fb6d9feeb716b1c767af766fb1#diff-0a106f7a73d0d71ba065440a81cded1b

Those changes work perfectly - thank you!

I tried a pull request (787) with my two minor JavaDoc changes to make issue 681 go away, but it looks like some earlier commits from others also carried over - sorry about that, you’ll probably only want to take the working bits, at best ;)

Cheers,

L.

-- 
Leighton Pritchard
gpg/pgp:0xDECACFFC




_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev