Hello bill and everyone else,

thank you again for all your help. as per your last email, due to the bug, i
have decided to download the newer version of tomcat , version 6. However
once i have downloaded( source code : tar.gz) it and tried to run it using
 sh startup.sh  , I get this error :
              Cannot find ./catalina.sh
            This file is needed to run this program, however the
"catalina.sh" exist.

Any idea what can cause this?? thank you again for all your help!!!

best regards

daniel



On Tue, Dec 23, 2008 at 9:44 PM, Bill Barker <wbar...@wilshire.com> wrote:

> I've confirmed that yes, this is a bug in 5.5.x.  Go ahead and enter in a
> bug report at http://issues.apache.org/bugzilla.  I haven't checked on 6.x
> and 7.x.
>
> The problem is that the compiler optimizes out references to
> o.a.coyote.Constants so the class isn't loaded in trusted code (with the
> default catalina.policy).  As a result of a recent security fix (and
> ironically only when running with a SecurityManager), the class is loaded
> now by un-trusted code, resulting in the exception below.
>
> To reproduce, simply have a JSP page bigger than 16kb and run with a
> SecurityManager with the default catalina.policy settings (or possibly
> modifying for read access to logging.properties only).  Then access this
> page as your first request after starting Tomcat.
>  "zia mohades" <zia.si...@gmail.com> wrote in message
> news:ee00484d0812231256g1185ae42r4b977bb236009...@mail.gmail.com...
>   Hi steve,
>
>  first before telling what I have done in regards to your previous email, I
> need to inform about this issue:
>
>  1) when I restart the server and try to access the website:
> http://localhost:8080/ I get this error:
>
>
>  
> *******************************************************************************************************
>
>  HTTP Status 500 -
>
>
> ------------------------------------------------------------------------------
>
>  type Exception report
>
>  message
>
>  description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
>  exception
>
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission accessClassInPackage.org.apache.coyote)
>  
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
>
>  java.security.AccessController.checkPermission(AccessController.java:546)
>     java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
> java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512)
>        sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:273)
> java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:452)
> org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1617)
>
>  org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:967)
>     org.apache.coyote.Response.action(Response.java:181)
>  
> org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:576)
>        org.apache.coyote.Response.doWrite(Response.java:560)
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)
>        org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)
> org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:236)
>        sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
> sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
>  sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
>  sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
>        java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
> org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:185)
>  org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:128)
>
>  
> org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:536)
>        org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:256)
> org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:456)
> org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:143)
> org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:119)
>
>  org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:326)
> org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:342)
> org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        java.lang.reflect.Method.invoke(Method.java:597)
>  org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
>  java.security.AccessController.doPrivileged(Native Method)
>  javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>
>  org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
>
>  
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)note
> The full stack trace of the root cause is available in the Apache Tomcat/5.5
> logs.
>
>
>  
> ****************************************************************************************************
>
>  but the funny part is that when I press enter again the page loads
> successfully. but anyways here is the result of what  have done according to
> your last email:
>
>  1)  as you said , the log part was commented so uncommented it in the
> server.xml,
>
>  2) restarted the server, accessed the http://localhost:8080/mms_testagain, 
> but however the log directory is still empty , no files.
>
>  i have attached both web.xml and content.xml files as you have asked me
> before!
>
>  please let me know if it is easier to reinstall the apach from the
> website, I will delete this one and reinstall it.
>
>  Thank you again for all your help
>
>
>  Best Regards,
>
>
>
>
>
>
>
>  On Tue, Dec 23, 2008 at 3:25 PM, Steve Ochani <ocha...@ncc.edu> wrote:
>
>    On 22 Dec 2008 at 22:16, zia mohades wrote:
>
>    > hello steve,
>
>    Hi,
>
>
>    >
>    > Thank you again. I have done the following
>    >
>    > 1) restarted the server
>    >
>    > 2) accessed the http://localhost:8080/mms_test again
>    >
>    > however once I tried to access the log at /usr/local/tomcat/logs ,
>    > I
>    > realized that there is no log file for today, the last one is dated
>    > for
>    > "localhost.2008-10-17.log". But the only thing that I have found for
>    > today's
>    > date( which doesn't show the correct time) is:
>    >
>    > -rw-r--r-- 1 root root 127530 2008-12-22 15:40 catalina.out
>
>
>    Hmm, you may not have the AccessLogValve enabled in server.xml.
>
>    I'm not sure where ubuntu keeps the tomcat config files (you may want to
> remove the ubuntu
>    packaged one and download and use the one from apache.org) but in the
> tomcat server.xml
>    look for
>
>           <!-- Access log processes all example.
>                Documentation at: /docs/config/valve.html -->
>
>           <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs"
>                  prefix="localhost_access_log." suffix=".txt"
> pattern="common"
>    resolveHosts="false"/>
>
>    towards the end of the host element.
>
>    If the valve is commented out then uncomment it, restart tomcat and try
> to access the
>    webapp again.
>
>    Check the logs and post the web.xml of your app, and any context.xml if
> you have them for
>    that webapp.
>
>
>    -Steve O.
>
>
>
>
>    >
>    > I have looked inside , there are bunch of errors for different
>    > dates, but
>    > again wasn't able to find any error for today's date(let me know if
>    > you
>    > want, I can copy paste the contents in the file). This is very
>    > strange, it
>    > seems like the tomcat is unable to register the errors!!!!
>    >
>    > Any ideas what's going on??? I have however using the default tomcat
>    > in the
>    > ubuntu, do i need to change something else, or reinstall another
>    > version??
>    >
>    > Thank you kindly for all your help.
>    >
>    > Daniel
>    >
>    >
>    >
>    >
>    >
>    > On Mon, Dec 22, 2008 at 9:49 PM, Steve Ochani <ocha...@ncc.edu>
>    > wrote:
>    >
>    > > On 22 Dec 2008 at 18:28, zia mohades wrote:
>    > >
>    > > Send reply to:  Tomcat Users List <users@tomcat.apache.org>
>    > > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
>    > > From:   zia mohades <zia.si...@gmail.com>
>    > > To:     Tomcat Users List <users@tomcat.apache.org>
>    > > Subject:        Re: Tomcat 5.5 error
>    > >
>    > > > Hello steve,
>    > > >
>    > > > thank you for your message! when I try to place mms_test in
>    > > > /usr/local/tomcat/webapps, I get the same error:
>    > > >
>    > > > HTTP Status 404 - /mms_test
>    > > >
>    > > > Any Idea why?
>    > > >
>    > >
>    > > Try restarting tomcat, then try to access the webapp again and
>    > look at the
>    > > logs.
>    > >
>    > >
>    > >
>    > >
>    > >
>    > > > thank you for your time!
>    > > >
>    > > >
>    > > > On Mon, Dec 22, 2008 at 4:03 PM, Steve Ochani
>    > <ocha...@ncc.edu>
>    > > > wrote:
>    > > >
>    > > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
>    > > > >
>    > > > > Send reply to:  Tomcat Users List <users@tomcat.apache.org>
>    > > > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
>    > > > > From:   zia mohades <zia.si...@gmail.com>
>    > > > > To:     Tomcat Users List <users@tomcat.apache.org>
>    > > > > Subject:        Tomcat 5.5 error
>    > > > >
>    > > > > > hello all!
>    > > > > >
>    > > > > > I am currently using tomcat 5.5 on my labtop which is
>    > running
>    > > > on
>    > > > > > ubuntu.
>    > > > > > When I access http://localhost:8080/ , i get the default
>    > page,
>    > > > which
>    > > > > > is a
>    > > > > > good news( meaning tomcat is running) However when I try
>    > to
>    > > > place my
>    > > > > > own
>    > > > > > html folder(called mms_test) in
>    > /usr/local/tomcat/webapps/ROOT
>    > > > and
>    > > > > > then try
>    > > > > > to reload the page using  http://localhost:8080/mms_test ,
>    > i
>    > > > get
>    > > > > > this error:
>    > > > > > HTTP Status 404 - /mms_test
>    > > > >
>    > > > > You can't put one webapp into another webapp.
>    > > > >
>    > > > > Put mms_test in /usr/local/tomcat/webapps
>    > > > >
>    > > > >
>    > > > > -Steve O.
>    > > > >
>    > > > >
>    > > > >
>    > > > >
>    > > > > > ------------------------------
>    > > > > >
>    > > > > > *type* Status report
>    > > > > >
>    > > > > > *message* */mms_test*
>    > > > > >
>    > > > > > *description* *The requested resource (/mms_test) is not
>    > > > > > available.*
>    > > > > >
>    > > > > > any idea why?
>    > > > > >
>    > > > > >
>    > > > > > your help is very much appreciated!
>    > > > > >
>    > > > > > best regards
>    > > > > >
>    > > > > > On Mon, Dec 22, 2008 at 11:08 AM, Filip Hanik - Dev Lists
>    > <
>    > > > > > devli...@hanik.com> wrote:
>    > > > > >
>    > > > > > > here is the name you specify
>    > > > > > >
>    > > > > > > <res-ref-name>jdbc/my_jdbc_name</res-ref-name>
>    > > > > > >
>    > > > > > > and here is your error
>    > > > > > > Could not find datasource:jdbc/workout_logger
>    > > > > > >
>    > > > > > > as you can see, somewhere you have configured the string
>    > > > > > workout_logger,
>    > > > > > > and that one doesn't exist
>    > > > > > >
>    > > > > > > Filip
>    > > > > > >
>    > > > > > >
>    > > > > > > arturoguedez wrote:
>    > > > > > >
>    > > > > > >> Hi!
>    > > > > > >>
>    > > > > > >> I have been reading how to setup datasources for Tomcat
>    > > > 6.0.18
>    > > > > > in
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-how
>    > > > > > to.html
>    > > > > > >> and nothing I have done has allowed my web application
>    > to
>    > > > view
>    > > > > > the
>    > > > > > >> datasource i have created.
>    > > > > > >>
>    > > > > > >> Here are some snippets of my web.xml, and my server.xml
>    > > > > > >> In the web.xml
>    > > > > > >>
>    > > > > > >> <resource-ref>
>    > > > > > >>        <description>DB Connection</description>
>    > > > > > >>        <res-ref-name>jdbc/my_jdbc_name</res-ref-name>
>    > > > > > >>        <res-type>javax.sql.DataSource</res-type>
>    > > > > > >>        <res-auth>Container</res-auth>
>    > > > > > >> </resource-ref>
>    > > > > > >>
>    > > > > > >> In server.xml
>    > > > > > >> I have tried to place the following snip it anywhere I
>    > saw in
>    > > > the
>    > > > > > docs it
>    > > > > > >> could belong to (ei, in the GlobalNamingResources,
>    > inside
>    > > > the
>    > > > > > Host tag, or
>    > > > > > >> inside the Context tag in all possible locations (under
>    > > > > > >> META-INF/context.xml, under
>    > > > > > >> $CATALINA_BASE/conf/[engine]/[host]/[path].xml)
>    > > > > > >> and I haven't been successful.
>    > > > > > >>
>    > > > > > >>  <Resource name="jdbc/my_jdbc_name" auth="Container"
>    > > > > > >> type="javax.sql.DataSource"
>    > > > > > >>               maxActive="100" maxIdle="30"
>    > maxWait="10000"
>    > > > > > >>               username="user" password="password"
>    > > > > > >> driverClassName="com.mysql.jdbc.Driver"
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > url="jdbc:mysql://localhost:3306/database_name?autoReconnect=true"/>
>    > > > > > >>
>    > > > > > >>
>    > > > > > >> I am using Entity Managers to get my connections opened,
>    > here
>    > > > is
>    > > > > > the snip
>    > > > > > >> it
>    > > > > > >> of my persistence.xml
>    > > > > > >>
>    > > > > > >>       <persistence-unit name="my_pu_name"
>    > > > > > >> transaction-type="RESOURCE_LOCAL">
>    > > > > > >>
>    > > > > > >>
>    > > > <non-jta-data-source>jdbc/my_jdbc_name</non-jta-data-source>
>    > > > > > >>        </persistence-unit>
>    > > > > > >>
>    > > > > > >> Here is what I get in my tomcat logs:
>    > > > > > >>
>    > > > > > >> 08/12/21 17:32:17 ERROR ceConnectionProvider: Could not
>    > > > find
>    > > > > > datasource:
>    > > > > > >> jdbc/workout_logger
>    > > > > > >> javax.naming.NameNotFoundException: Name jdbc is not
>    > bound
>    > > > in
>    > > > > > this Context
>    > > > > > >>        at
>    > > > > >
>    > org.apache.naming.NamingContext.lookup(NamingContext.java:770)
>    > > > > > >>        at
>    > > > > >
>    > org.apache.naming.NamingContext.lookup(NamingContext.java:153)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
>    > > > > > >>        at
>    > > > > >
>    > javax.naming.InitialContext.lookup(InitialContext.java:392)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.connection.DatasourceConnectionProvider.configure(Data
>    > > > > > sourceConnectionProvider.java:75)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.connection.ConnectionProviderFactory.newConnectionProv
>    > > > > > ider(ConnectionProviderFactory.java:137)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(
>    > > > > > InjectionSettingsFactory.java:29)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java
>    > > > > > :89)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.cfg.Configuration.buildSettings(Configuration.java:210
>    > > > > > 1)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.ja
>    > > > > > va:1325)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(Annota
>    > > > > > tionConfiguration.java:867)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Co
>    > > > > > nfiguration.java:669)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hi
>    > > > > > bernatePersistence.java:126)
>    > > > > > >>        at
>    > > > > > >>
>    > > > > > >>
>    > > > > >
>    > > >
>    > javax.persistence.Persistence.createEntityManagerFactory(Persistence
>    > > > > > .java:52)
>    > > > > > >> ....
>    > > > > > >>
>    > > > > > >>
>    > > > > > >>
>    > > > > > >> Does anybody know what I am doing wrong? Is there any
>    > way
>    > > > to
>    > > > > > check which
>    > > > > > >> resources Tomcat makes avaiable? I am having a really
>    > hard
>    > > > time
>    > > > > > >> understanding what I am doing wrong.
>    > > > > > >>
>    > > > > > >>
>    > > > > > >
>    > > > > > >
>    > > > > > >
>    > > > > >
>    > > >
>    > --------------------------------------------------------------------
>    > > > > > -
>    > > > > > > To unsubscribe, e-mail:
>    > users-unsubscr...@tomcat.apache.org
>    > > > > > > For additional commands, e-mail:
>    > > > users-h...@tomcat.apache.org
>    > > > > > >
>    > > > > > >
>    > > > > >
>    > > > >
>    > > > >
>    > > > >
>    > > > >
>    > > >
>    > --------------------------------------------------------------------
>    > > > -
>    > > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>    > > > > For additional commands, e-mail:
>    > users-h...@tomcat.apache.org
>    > > > >
>    > > > >
>    > > >
>    > >
>    > >
>    > >
>    > >
>    > --------------------------------------------------------------------
>    > -
>    > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>    > > For additional commands, e-mail: users-h...@tomcat.apache.org
>    > >
>    > >
>    >
>
>
>
>
>    ---------------------------------------------------------------------
>
>    To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>    For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>  ---------------------------------------------------------------------
>   To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>  For additional commands, e-mail: users-h...@tomcat.apache.org
>

Reply via email to