Re: Issue with sudo + init script

2012-08-02 Thread André Warnier

Stefan Mayr wrote:

Am 01.08.2012 19:10, schrieb Shaw, Ray V CTR (US):

I'm starting up Tomcat 7.0 on RHEL6 with the following init script:

#!/bin/bash
#
# chkconfig: 235 80 20
# description: Takes care of starting and stopping Tomcat.

CATALINA_HOME=/opt/tomcat7
export JAVA_HOME=/usr/java/jdk6-64/

case $1 in
 'start')
 /bin/su tomcat -c $CATALINA_HOME/bin/startup.sh 
-security

 ;;
 'stop')
 /bin/su tomcat -c $CATALINA_HOME/bin/shutdown.sh
 ;;
 *)
 echo usage: $0 {start|stop}
 ;;
esac

If I use sudo -s (or -i) to get a root shell, I can use this script to 
start and stop Tomcat.


If I invoke this script directly via sudo, i.e. sudo /sbin/service 
tomcat7 stop, stopping Tomcat works.  Starting does not; Tomcat gives 
the usual output to the terminal, creates or touches catalina.out (but 
writes nothing to it), and then instantly exits.  This is a problem, 
because I need to allow the Web admin to start/stop Tomcat without 
giving them everything.


Has anyone seen anything similar to this before?  /var/log/secure 
isn't showing anything out of the ordinary (and obviously, the 
commands are being run).




Could you post your tomcat output when you try to start it? You should 
also check differences in your environment variables when using 
different methods.


I have not really worked this out in detail, but something up there is making me 
suspicious : you are not exporting $CATALINA_HOME, and you are using one additional level 
of quotes in your start command, as compared to your stop command.

Are you sure that when the start command actually runs, it sees the same 
CATALINA_HOME value ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Large webapps in 7.0.29 and Annotation Scanning not respecting metadata-complete

2012-08-02 Thread Mark Thomas
Andreas Pålsson wpt2...@hotmail.com wrote:

I have been thinking about this issue all day, and I think the
specification needs more work on this area.


There is certainly no need for a container to wade through hundreds
maybe even thousands of classes in search of something that does not
exist.
It is an unnecessary task which consumes both time and resources.


I am all for making it easier for a developer, and make the container
scan everything by default.

But there is also an obvious need for a solution to specifically define
where a container should look for annotations when we have web
applications with very large amount of classes.

Even if it has to be an XML-file, such as in Spring where you can
instruct  the framework where to look for beans, entities, controllers
and such.


Mark, is there a way we can influence the EG to change this?

Thanks.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

The bad news is that this is a 3.0 feature so we are way past being able to 
influence it. Personally I dislike most of the 3.0 pluggability featutes.

If you have ideas how to improve things then the EG lists Rainer pointed you to 
is the place to take them.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

2012-08-02 Thread Dale Ogilvie
Hi,

I'm seeing this problem below appearing now with one of our web-apps, google 
has not helped me so far... There have been no changes with the web app in 
question, which was working, so I'm picking something is going on with either 
the tomcat or OS (virtualized) environment, but what? Any tips as to how to 
figure out what is going on?

root cause 

java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be 
cast to org.apache.jasper.el.ELContextImpl

org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:982)

org.apache.jsp.WEB_002dINF.views.promoCodeWelcome_jsp._jspx_meth_c_005fout_005f0(promoCodeWelcome_jsp.java:301)

org.apache.jsp.WEB_002dINF.views.promoCodeWelcome_jsp._jspService(promoCodeWelcome_jsp.java:171)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)

org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)

org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)

org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)

org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:125)

The app is deployed on Tomcat 7.0.27, java 1.6_026, erroring jsp line: 

c:out value=${fn:length(promoCodeSpecCommand.user)} /

Thanks

Dale




RE: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

2012-08-02 Thread THIND Mansukhdeep
May be this particular line in JSP is attempting to perform an action which the 
container is unable to process as a Servlet class. Just cross check the JSP 
code once. What does the c:out value=${fn:length(promoCodeSpecCommand.user)} 
/ do? Is it a directive? Or a call to some function?

Regards
Mansukhdeep

-Original Message-
From: Dale Ogilvie [mailto:dale_ogil...@trimble.com]
Sent: Friday, August 03, 2012 11:10 AM
To: Tomcat Users List
Subject: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be 
cast to org.apache.jasper.el.ELContextImpl

Hi,

I'm seeing this problem below appearing now with one of our web-apps, google 
has not helped me so far... There have been no changes with the web app in 
question, which was working, so I'm picking something is going on with either 
the tomcat or OS (virtualized) environment, but what? Any tips as to how to 
figure out what is going on?

root cause

java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be 
cast to org.apache.jasper.el.ELContextImpl

org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:982)

org.apache.jsp.WEB_002dINF.views.promoCodeWelcome_jsp._jspx_meth_c_005fout_005f0(promoCodeWelcome_jsp.java:301)

org.apache.jsp.WEB_002dINF.views.promoCodeWelcome_jsp._jspService(promoCodeWelcome_jsp.java:171)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)

org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)

org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)

org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)

org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:125)

The app is deployed on Tomcat 7.0.27, java 1.6_026, erroring jsp line:

c:out value=${fn:length(promoCodeSpecCommand.user)} /

Thanks

Dale


B�CB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systemes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.

For other languages, go to http://www.3ds.com/terms/email-disclaimer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org