The OpenShift forums have been retired, but you can still read and search them.
For the most up-to-date information about how to use OpenShift please visit

Can't deploy Spring MVC app on Tomcat 7 (23MB)

adminlibrarist has created a thread in the OpenShift forum:

Hi there,

I'm trying to deploy my war (precompiled) to jbossews-2.0 instance and from
the logs I can see the server is experiencing heavy load on deployment
(getting above 10+ for 60+ secs) - then I get error in the log and that's it:

Apr 16, 2013 5:38:38 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive
{...}app-root/runtime/repo/webapps/ROOT.war Apr 16, 2013 5:40:34 AM org.apache.catalina.core.StandardContext
startInternal SEVERE: Error listenerStart Apr 16, 2013 5:40:34 AM org.apache.catalina.core.StandardContext
startInternal SEVERE: Context [] startup failed due to previous errors Apr 16, 2013 5:40:34 AM org.apache.coyote.AbstractProtocol start

It seems like memory erros but I'm not able to change the logging of the
server itself (as far as I know - can't sude and
thejbossews-2.0/jbossews-2.0/conf/ is read only) so can't
see what really happening.

Can you try adding the metrics-0.1 cartridge to validate your initial interpretation of memory being the culprit? See

Once confirmed that it's memory, you can put in a request for medium gear access using:
and try your app again.

Note that small gears have a limit of 512MB of memory and medium gears have 1GB memory.

I'll look into the jbossews config and get back...

The can be modified in your local repo's .openshift/config/ directory. There are many configurable files there:
/Users/nduong/express/tctest/.openshift/config: context.xml server.xml tomcat-users.xml web.xml

Once modified, do a git commit/push and the files on the gear should then reflect the changes.


1) tried to crank up the logging to ALL but can't see any error there 2) the memory cartridge show 100-120MB current usage (BTW I'm quite impressed how nicely it works, well done!) 3) the top command shows 20-30+ on deploy, the server does something for 2 minutes, then I can see it's trying to deploy the ROOT.war but it gives up with SEVERE: Error listenerStart 'due to previous errors' - the only previous error is missing tomcat APR lib in you dist (which shouldn't be an issue)

I've tried to deploy the same war to your tomcat6 instance but it behaves pretty the same. At home I run it on Tomcat6 in Eclipse (using ivy for dependencies) - I've just tried to run in as a standalone war on jetty from command line and it's just fine.

Just to be complete I use - Spring MVC + Velocity + ehcache (in memory for now) + jackson/rest. All logging bridged through slf4j to log4j (Including jul).

Not really sure what can I do next (BTW the war runs fine on Appfog/Tomcat6 as well) so I guess maybe there is some weird issue with app server?

Okay I got it working:

I had to comment the logback listener in the web.xml (the listener doesn't work with the unexploded wars) - the similar applies for the log4j listener.


There was also other issue in the log later as the velocity was complaining about running from unexploded war as well but seems working now.

Anyway, I got another issue related to apache http client unable to bind to local IP - it was discussed elsewhere, the solution is to upgrade to http4 (but I do remember I had some other issues with spring mvc and client 4 - will have a look).

Anyway thanks a lot for your help, really appreciate it!

Thank you for posting your findings. I'm sure it will help others who run into this.

hi i want to create a permanent folder in php using mkdir . and after this, want to upload data in that folder. and want to access uploaded data. how i will create folder .? and what will b path of created folder permanently.?