You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by zia mohades <zi...@gmail.com> on 2008/12/22 21:43:41 UTC

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
------------------------------

*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 <
devlists@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-howto.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(DatasourceConnectionProvider.java:75)
>>        at
>>
>> org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(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:2101)
>>        at
>>
>> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
>>        at
>>
>> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
>>        at
>>
>> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
>>        at
>>
>> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: [OT] Tomcat 5.5 error

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mojumdar, Biswajit [mailto:Biswajit.Mojumdar@hud.gov]
> Subject: RE: Tomcat 5.5 error
>
> When I tried to open the attachments, I got an error 'File not found'.

Likely a security policy imposed by the IT department of your employer (or Homeland Security, in your case).  Here, I can't directly open attached .zip files for that reason, regardless of the e-mail origin.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

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


RE: Tomcat 5.5 error

Posted by "Mojumdar, Biswajit" <Bi...@hud.gov>.
OK. 

When I tried to open the attachments, I got an error 'File not found'.

But I was able to save and open the files later on from my desktop.

Thanks for the clarification.

- Biswajit

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Tuesday, December 23, 2008 5:32 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 error

> From: Mojumdar, Biswajit [mailto:Biswajit.Mojumdar@hud.gov]
> Subject: RE: Tomcat 5.5 error
>
> Remember, this list automatically deletes the attachments.

No, it only deletes certain attachments, but not .xml files.  The ones
included by ZM came through fine.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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


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


RE: Tomcat 5.5 error

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mojumdar, Biswajit [mailto:Biswajit.Mojumdar@hud.gov]
> Subject: RE: Tomcat 5.5 error
>
> Remember, this list automatically deletes the attachments.

No, it only deletes certain attachments, but not .xml files.  The ones included by ZM came through fine.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

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


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
Hi steve,

Before starting the server, I used sudo -s to loggin as root. and then run
the server and then access tomcat online(http://localhost:8080/)
when i do ls -l /usr/local/tomcat/webapps/ROOT i get:

-rw-r--r-- 1 mohadesz mohadesz  5866 2007-07-19 22:20 asf-logo-wide.gif
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 betaNeighbours.js~
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 Beta.xml~
-rw-r--r-- 1 mohadesz mohadesz  2625 2007-07-19 22:20 build.xml
-rw-r--r-- 1 mohadesz mohadesz 21630 2007-07-19 22:20 favicon.ico
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 hecontact.html~
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 helixNeighbours.js~
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 hesearch.html~
-rwx------ 1 mohadesz mohadesz  9040 2008-12-19 17:54 index.html
-rw-r--r-- 1 mohadesz mohadesz  7819 2007-07-19 22:20 index.jsp
-rw-r--r-- 1 mohadesz mohadesz  6656 2007-07-19 22:20 RELEASE-NOTES.txt
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 showme.html~
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 test1.html~
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 test.html~
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 test.js~
-rw-r--r-- 1 mohadesz mohadesz  1934 2007-07-19 22:20 tomcat.gif
-rw-r--r-- 1 mohadesz mohadesz  2324 2007-07-19 22:20 tomcat-power.gif
-rw-r--r-- 1 mohadesz mohadesz 65428 2007-07-19 22:20 tomcat.svg
-rwx------ 1 mohadesz mohadesz     0 2008-10-01 18:34 turnNeighbours.js~
drwxr-xr-x 4 mohadesz mohadesz  4096 2008-12-22 18:48 WEB-INF
-rw-r--r-- 1 mohadesz mohadesz  1213 2007-07-19 22:20 web.xml

and when I try ls -l /usr/local/tomcat/webapps/ROOT/mms_test" I get error:
ls: cannot access /usr/local/tomcat/webapps/ROOT/mms_test: No such file or
directory. because mms_test is not in this directory is located at:
/usr/local/tomcat/webapps/mms_test( as you have told me , I should do last
time).

Do I need to change the permission of some files, or is mms_test in the
wrong directory?

thank u again for all the help!









On Tue, Dec 23, 2008 at 4:33 PM, Gregor Schneider <rc...@googlemail.com>wrote:

>
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
>
>
> This message is pretty obvious:
>
> Is it possible that you've started Tomcat as root incidently and now
> try to run Tomcat as another user (such as "tomcat")?
>
> Looks as if there is at least one file where the rights are not set
> correctly.
>
> What give "ls -l /usr/local/tomcat/webapps/ROOT"  and "ls -l
> /usr/local/tomcat/webapps/ROOT/mms_test" ?
>
> Gregor
> --
> just because your paranoid, doesn't mean they're not after you...
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 5.5 error

Posted by Gregor Schneider <rc...@googlemail.com>.
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)


This message is pretty obvious:

Is it possible that you've started Tomcat as root incidently and now
try to run Tomcat as another user (such as "tomcat")?

Looks as if there is at least one file where the rights are not set correctly.

What give "ls -l /usr/local/tomcat/webapps/ROOT"  and "ls -l
/usr/local/tomcat/webapps/ROOT/mms_test" ?

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
Thank you Biswajit,

following my previous email , here is the content of the two files:

web.xml:

**********************************************************************************************
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

  <!-- ======================== Introduction ==============================
-->
  <!-- This document defines default values for *all* web applications
-->
  <!-- loaded into this instance of Tomcat.  As each application is
-->
  <!-- deployed, this file is processed, followed by the
-->
  <!-- "/WEB-INF/web.xml" deployment descriptor from your own
-->
  <!-- applications.
-->
  <!--
-->
  <!-- WARNING:  Do not configure application-specific resources here!
-->
  <!-- They should go in the "/WEB-INF/web.xml" file in your application.
-->


  <!-- ================== Built In Servlet Definitions ====================
-->


  <!-- The default servlet for all web applications, that serves static
-->
  <!-- resources.  It processes all requests that are not mapped to other
-->
  <!-- servlets with servlet mappings (defined either here or in your own
-->
  <!-- web.xml file.  This servlet supports the following initialization
-->
  <!-- parameters (default values are in square brackets):
-->
  <!--
-->
  <!--   debug               Debugging detail level for messages logged
-->
  <!--                       by this servlet.  [0]
-->
  <!--
-->
  <!--   fileEncoding        Encoding to be used to read static resources
-->
  <!--                       [platform default]
-->
  <!--
-->
  <!--   input               Input buffer size (in bytes) when reading
-->
  <!--                       resources to be served.  [2048]
-->
  <!--
-->
  <!--   listings            Should directory listings be produced if there
-->
  <!--                       is no welcome file in this directory?  [false]
-->
  <!--                       WARNING: Listings for directories with many
-->
  <!--                       entries can be slow and may consume
-->
  <!--                       significant proportions of server resources.
-->
  <!--
-->
  <!--   output              Output buffer size (in bytes) when writing
-->
  <!--                       resources to be served.  [2048]
-->
  <!--
-->
  <!--   readonly            Is this context "read only", so HTTP
-->
  <!--                       commands like PUT and DELETE are
-->
  <!--                       rejected?  [true]
-->
  <!--
-->
  <!--   readmeFile          File name to display with the directory
-->
  <!--                       contents. [null]
-->
  <!--
-->
  <!--   sendfileSize        If the connector used supports sendfile, this
-->
  <!--                       represents the minimal file size in KB for
-->
  <!--                       which sendfile will be used. Use a negative
-->
  <!--                       value to always disable sendfile.  [48]
-->
  <!--
-->
  <!--  For directory listing customization. Checks localXsltFile, then
-->
  <!--  globalXsltFile, then defaults to original behavior.
-->
  <!--
-->
  <!--   localXsltFile       Make directory listings an XML doc and
-->
  <!--                       pass the result to this style sheet residing
-->
  <!--                       in that directory. This overrides
-->
  <!--                        globalXsltFile[null]
-->
  <!--
-->
  <!--   globalXsltFile      Site wide configuration version of
-->
  <!--                       localXsltFile This argument is expected
-->
  <!--                       to be a physical file. [null]
-->
  <!--
-->
  <!--
-->

    <servlet>
        <servlet-name>default</servlet-name>

<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>


  <!-- The "invoker" servlet, which executes anonymous servlet classes
-->
  <!-- that have not been defined in a web.xml file.  Traditionally, this
-->
  <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map
-->
  <!-- it to other patterns as well.  The extra path info portion of such a
-->
  <!-- request must be the fully qualified class name of a Java class that
-->
  <!-- implements Servlet (or extends HttpServlet), or the servlet name
-->
  <!-- of an existing servlet definition.     This servlet supports the
-->
  <!-- following initialization parameters (default values are in square
-->
  <!-- brackets):
-->
  <!--
-->
  <!--   debug               Debugging detail level for messages logged
-->
  <!--                       by this servlet.  [0]
-->

<!--
    <servlet>
        <servlet-name>invoker</servlet-name>
        <servlet-class>
          org.apache.catalina.servlets.InvokerServlet
        </servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
-->


  <!-- The JSP page compiler and execution servlet, which is the mechanism
-->
  <!-- used by Tomcat to support JSP pages.  Traditionally, this servlet
-->
  <!-- is mapped to the URL pattern "*.jsp".  This servlet supports the
-->
  <!-- following initialization parameters (default values are in square
-->
  <!-- brackets):
-->
  <!--
-->
  <!--   checkInterval       If development is false and checkInterval is
-->
  <!--                       greater than zero, background compilations are
-->
  <!--                       enabled. checkInterval is the time in seconds
-->
  <!--                       between checks to see if a JSP page needs to
-->
  <!--                       be recompiled. [0]
-->
  <!--
-->
  <!--   modificationTestInterval
-->
  <!--                       Causes a JSP (and its dependent files) to not
-->
  <!--                       be checked for modification during the
-->
  <!--                       specified time interval (in seconds) from the
-->
  <!--                       last time the JSP was checked for
-->
  <!--                       modification. A value of 0 will cause the JSP
-->
  <!--                       to be checked on every access.
-->
  <!--                       Used in development mode only. [4]
-->
  <!--
-->
  <!--   compiler            Which compiler Ant should use to compile JSP
-->
  <!--                       pages.  See the jasper documentation for more
-->
  <!--                       information.
-->
  <!--
-->
  <!--   classdebuginfo      Should the class file be compiled with
-->
  <!--                       debugging information?  [true]
-->
  <!--
-->
  <!--   classpath           What class path should I use while compiling
-->
  <!--                       generated servlets?  [Created dynamically
-->
  <!--                       based on the current web application]
-->
  <!--
-->
  <!--   development         Is Jasper used in development mode? If true,
-->
  <!--                       the frequency at which JSPs are checked for
-->
  <!--                       modification may be specified via the
-->
  <!--                       modificationTestInterval parameter. [true]
-->
  <!--
-->
  <!--   enablePooling       Determines whether tag handler pooling is
-->
  <!--                       enabled  [true]
-->
  <!--
-->
  <!--   fork                Tell Ant to fork compiles of JSP pages so that
-->
  <!--                       a separate JVM is used for JSP page compiles
-->
  <!--                       from the one Tomcat is running in. [true]
-->
  <!--
-->
  <!--   ieClassId           The class-id value to be sent to Internet
-->
  <!--                       Explorer when using <jsp:plugin> tags.
-->
  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]
-->
  <!--
-->
  <!--   javaEncoding        Java file encoding to use for generating java
-->
  <!--                       source files. [UTF8]
-->
  <!--
-->
  <!--   keepgenerated       Should we keep the generated Java source code
-->
  <!--                       for each page instead of deleting it? [true]
-->
  <!--
-->
  <!--   mappedfile          Should we generate static content with one
-->
  <!--                       print statement per input line, to ease
-->
  <!--                       debugging?  [true]
-->
  <!--
-->
  <!--   trimSpaces          Should white spaces in template text between
-->
  <!--                       actions or directives be trimmed?  [false]
-->
  <!--
-->
  <!--   suppressSmap        Should the generation of SMAP info for JSR45
-->
  <!--                       debugging be suppressed?  [false]
-->
  <!--
-->
  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be
-->
  <!--                       dumped to a file? [false]
-->
  <!--                       False if suppressSmap is true
-->
  <!--
-->
  <!--   genStrAsCharArray   Should text strings be generated as char
-->
  <!--                       arrays, to improve performance in some cases?
-->
  <!--                       [false]
-->
  <!--
-->
  <!--   errorOnUseBeanInvalidClassAttribute
-->
  <!--                       Should Jasper issue an error when the value of
-->
  <!--                       the class attribute in an useBean action is
-->
  <!--                       not a valid bean class?  [true]
-->
  <!--
-->
  <!--   scratchdir          What scratch directory should we use when
-->
  <!--                       compiling JSP pages?  [default work directory
-->
  <!--                       for the current web application]
-->
  <!--
-->
  <!--   xpoweredBy          Determines whether X-Powered-By response
-->
  <!--                       header is added by generated servlet  [false]
-->
  <!--
-->
  <!--   compilerTargetVM    Compiler target VM
-->
  <!--                       default is System.properties
-->
  <!--                        java.specification.version > 1.4
-->
  <!--                        [1.5] else [1.4]
-->
  <!--
-->
  <!--   compilerSourceVM    Compiler source VM
-->
  <!--                       default is System.properties
-->
  <!--                        java.specification.version > 1.4
-->
  <!--                        [1.5] else [1.4]
-->
  <!--
-->
  <!-- If you wish to use Jikes to compile JSP pages:
-->
  <!--   Please see the "Using Jikes" section of the Jasper-HowTo
-->
  <!--   page in the Tomcat documentation.
-->

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>


  <!-- NOTE: An SSI Filter is also available as an alternative SSI
-->
  <!-- implementation. Use either the Servlet or the Filter but NOT both.
-->
  <!--
-->
  <!-- Server Side Includes processing servlet, which processes SSI
-->
  <!-- directives in HTML pages consistent with similar support in web
-->
  <!-- servers like Apache.  Traditionally, this servlet is mapped to the
-->
  <!-- URL pattern "*.shtml".  This servlet supports the following
-->
  <!-- initialization parameters (default values are in square brackets):
-->
  <!--
-->
  <!--   buffered            Should output from this servlet be buffered?
-->
  <!--                       (0=false, 1=true)  [0]
-->
  <!--
-->
  <!--   debug               Debugging detail level for messages logged
-->
  <!--                       by this servlet.  [0]
-->
  <!--
-->
  <!--   expires             The number of seconds before a page with SSI
-->
  <!--                       directives will expire.  [aNo default]
-->
  <!--
-->
  <!--   isVirtualWebappRelative
-->
  <!--                       Should "virtual" paths be interpreted as
-->
  <!--                       relative to the context root, instead of
-->
  <!--                       the server root?  (0=false, 1=true) [0]
-->
  <!--
-->
  <!--   inputEncoding       The encoding to assume for SSI resources if
-->
  <!--                       one is not available from the resource.
-->
  <!--                       [Platform default]
-->
  <!--
-->
  <!--   outputEncoding      The encoding to use for the page that results
-->
  <!--                       from the SSI processing. [UTF-8]
-->
  <!--
-->
  <!--
-->
  <!-- IMPORTANT: To use the SSI servlet, you also need to rename the
-->
  <!--            $CATALINA_HOME/server/lib/servlets-ssi.renametojar file
-->
  <!--            to $CATALINA_HOME/server/lib/servlets-ssi.jar
-->

<!--
    <servlet>
        <servlet-name>ssi</servlet-name>
        <servlet-class>
          org.apache.catalina.ssi.SSIServlet
        </servlet-class>
        <init-param>
          <param-name>buffered</param-name>
          <param-value>1</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>expires</param-name>
          <param-value>666</param-value>
        </init-param>
        <init-param>
          <param-name>isVirtualWebappRelative</param-name>
          <param-value>0</param-value>
        </init-param>
        <load-on-startup>4</load-on-startup>
    </servlet>
-->


  <!-- Common Gateway Includes (CGI) processing servlet, which supports
-->
  <!-- execution of external applications that conform to the CGI spec
-->
  <!-- requirements.  Typically, this servlet is mapped to the URL pattern
-->
  <!-- "/cgi-bin/*", which means that any CGI applications that are
-->
  <!-- executed must be present within the web application.  This servlet
-->
  <!-- supports the following initialization parameters (default values
-->
  <!-- are in square brackets):
-->
  <!--
-->
  <!--   cgiPathPrefix        The CGI search path will start at
-->
  <!--                        webAppRootDir + File.separator + this prefix.
-->
  <!--                        [WEB-INF/cgi]
-->
  <!--
-->
  <!--   debug                Debugging detail level for messages logged
-->
  <!--                        by this servlet.  [0]
-->
  <!--
-->
  <!--   executable           Name of the exectuable used to run the
-->
  <!--                        script. [perl]
-->
  <!--
-->
  <!--   parameterEncoding    Name of parameter encoding to be used with
-->
  <!--                        CGI servlet.
-->
  <!--                        [System.getProperty("file.encoding","UTF-8")]
-->
  <!--
-->
  <!--   passShellEnvironment Should the shell environment variables (if
-->
  <!--                        any) be passed to the CGI script? [false]
-->
  <!--
-->
  <!-- IMPORTANT: To use the CGI servlet, you also need to rename the
-->
  <!--            $CATALINA_HOME/server/lib/servlets-cgi.renametojar file
-->
  <!--            to $CATALINA_HOME/server/lib/servlets-cgi.jar
-->

<!--
    <servlet>
        <servlet-name>cgi</servlet-name>

<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>cgiPathPrefix</param-name>
          <param-value>WEB-INF/cgi</param-value>
        </init-param>
         <load-on-startup>5</load-on-startup>
    </servlet>
-->


  <!-- ================ Built In Servlet Mappings =========================
-->


  <!-- The servlet mappings for the built in servlets defined above.  Note
-->
  <!-- that, by default, the CGI and SSI servlets are *not* mapped.  You
-->
  <!-- must uncomment these mappings (or add them to your application's own
-->
  <!-- web.xml deployment descriptor) to enable these services
-->

    <!-- The mapping for the default servlet -->
    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    <!-- The mapping for the invoker servlet -->
<!--
    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
-->

    <!-- The mapping for the JSP servlet -->
    <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>

    <!-- The mapping for the SSI servlet -->
<!--
    <servlet-mapping>
        <servlet-name>ssi</servlet-name>
        <url-pattern>*.shtml</url-pattern>
    </servlet-mapping>
-->

    <!-- The mapping for the CGI Gateway servlet -->

<!--
    <servlet-mapping>
        <servlet-name>cgi</servlet-name>
        <url-pattern>/cgi-bin/*</url-pattern>
    </servlet-mapping>
-->


  <!-- ================== Built In Filter Definitions =====================
-->

  <!-- NOTE: An SSI Servlet is also available as an alternative SSI
-->
  <!-- implementation. Use either the Servlet or the Filter but NOT both.
-->
  <!--
-->
  <!-- Server Side Includes processing filter, which processes SSI
-->
  <!-- directives in HTML pages consistent with similar support in web
-->
  <!-- servers like Apache.  Traditionally, this filter is mapped to the
-->
  <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will
-->
  <!-- selectively enable/disable SSI processing based on mime types. For
-->
  <!-- this to work you will need to uncomment the .shtml mime type
-->
  <!-- definition towards the bottom of this file.
-->
  <!-- The contentType init param allows you to apply SSI processing to JSP
-->
  <!-- pages, javascript, or any other content you wish.  This filter
-->
  <!-- supports the following initialization parameters (default values are
-->
  <!-- in square brackets):
-->
  <!--
-->
  <!--   contentType         A regex pattern that must be matched before
-->
  <!--                       SSI processing is applied.
-->
  <!--                       [text/x-server-parsed-html(;.*)?]
-->
  <!--
-->
  <!--   debug               Debugging detail level for messages logged
-->
  <!--                       by this servlet.  [0]
-->
  <!--
-->
  <!--   expires             The number of seconds before a page with SSI
-->
  <!--                       directives will expire.  [No default]
-->
  <!--
-->
  <!--   isVirtualWebappRelative
-->
  <!--                       Should "virtual" paths be interpreted as
-->
  <!--                       relative to the context root, instead of
-->
  <!--                       the server root?  (0=false, 1=true) [0]
-->
  <!--
-->
  <!--
-->
  <!-- IMPORTANT: To use the SSI filter, you also need to rename the
-->
  <!--            $CATALINA_HOME/server/lib/servlets-ssi.renametojar file
-->
  <!--            to $CATALINA_HOME/server/lib/servlets-ssi.jar
-->

<!--
    <filter>
        <filter-name>ssi</filter-name>
        <filter-class>
          org.apache.catalina.ssi.SSIFilter
        </filter-class>
        <init-param>
          <param-name>contentType</param-name>
          <param-value>text/x-server-parsed-html(;.*)?</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>expires</param-name>
          <param-value>666</param-value>
        </init-param>
        <init-param>
          <param-name>isVirtualWebappRelative</param-name>
          <param-value>0</param-value>
        </init-param>
    </filter>
-->


  <!-- ==================== Built In Filter Mappings ======================
-->

  <!-- The mapping for the SSI Filter -->
<!--
    <filter-mapping>
        <filter-name>ssi</filter-name>
        <url-pattern>*.shtml</url-pattern>
    </filter-mapping>
-->


  <!-- ==================== Default Session Configuration =================
-->
  <!-- You can set the default session timeout (in minutes) for all newly
-->
  <!-- created sessions by modifying the value below.
-->

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>


  <!-- ===================== Default MIME Type Mappings ===================
-->
  <!-- When serving static resources, Tomcat will automatically generate
-->
  <!-- a "Content-Type" header based on the resource's filename extension,
-->
  <!-- based on these mappings.  Additional mappings can be added here (to
-->
  <!-- apply to all web applications), or in your own application's web.xml
-->
  <!-- deployment descriptor.
-->

    <mime-mapping>
        <extension>abs</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ai</extension>
        <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aif</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aifc</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aiff</extension>
        <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>aim</extension>
        <mime-type>application/x-aim</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>art</extension>
        <mime-type>image/x-jg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>asf</extension>
        <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>asx</extension>
        <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>au</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>avi</extension>
        <mime-type>video/x-msvideo</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>avx</extension>
        <mime-type>video/x-rad-screenplay</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>bcpio</extension>
        <mime-type>application/x-bcpio</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>bin</extension>
        <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>bmp</extension>
        <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>body</extension>
        <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cdf</extension>
        <mime-type>application/x-cdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cer</extension>
        <mime-type>application/x-x509-ca-cert</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>class</extension>
        <mime-type>application/java</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>cpio</extension>
        <mime-type>application/x-cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>csh</extension>
        <mime-type>application/x-csh</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>css</extension>
        <mime-type>text/css</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dib</extension>
        <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>doc</extension>
        <mime-type>application/msword</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dtd</extension>
        <mime-type>application/xml-dtd</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dv</extension>
        <mime-type>video/x-dv</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>dvi</extension>
        <mime-type>application/x-dvi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>eps</extension>
        <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>etx</extension>
        <mime-type>text/x-setext</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>exe</extension>
        <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>gif</extension>
        <mime-type>image/gif</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>gtar</extension>
        <mime-type>application/x-gtar</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>gz</extension>
        <mime-type>application/x-gzip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>hdf</extension>
        <mime-type>application/x-hdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>hqx</extension>
        <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>htc</extension>
        <mime-type>text/x-component</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>htm</extension>
        <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>html</extension>
        <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>hqx</extension>
        <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ief</extension>
        <mime-type>image/ief</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jad</extension>
        <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jar</extension>
        <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>java</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jnlp</extension>
        <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jpe</extension>
        <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jpeg</extension>
        <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jpg</extension>
        <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>js</extension>
        <mime-type>text/javascript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jsf</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>jspf</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>kar</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>latex</extension>
        <mime-type>application/x-latex</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>m3u</extension>
        <mime-type>audio/x-mpegurl</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mac</extension>
        <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>man</extension>
        <mime-type>application/x-troff-man</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mathml</extension>
        <mime-type>application/mathml+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>me</extension>
        <mime-type>application/x-troff-me</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mid</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>midi</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mif</extension>
        <mime-type>application/x-mif</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mov</extension>
        <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>movie</extension>
        <mime-type>video/x-sgi-movie</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mp1</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mp2</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mp3</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mp4</extension>
        <mime-type>video/mp4</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpa</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpe</extension>
        <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpeg</extension>
        <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpega</extension>
        <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpg</extension>
        <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>mpv2</extension>
        <mime-type>video/mpeg2</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ms</extension>
        <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>nc</extension>
        <mime-type>application/x-netcdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>oda</extension>
        <mime-type>application/oda</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Database -->
        <extension>odb</extension>
        <mime-type>application/vnd.oasis.opendocument.database</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Chart -->
        <extension>odc</extension>
        <mime-type>application/vnd.oasis.opendocument.chart</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Formula -->
        <extension>odf</extension>
        <mime-type>application/vnd.oasis.opendocument.formula</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Drawing -->
        <extension>odg</extension>
        <mime-type>application/vnd.oasis.opendocument.graphics</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Image -->
        <extension>odi</extension>
        <mime-type>application/vnd.oasis.opendocument.image</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Master Document -->
        <extension>odm</extension>

<mime-type>application/vnd.oasis.opendocument.text-master</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Presentation -->
        <extension>odp</extension>

<mime-type>application/vnd.oasis.opendocument.presentation</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Spreadsheet -->
        <extension>ods</extension>

<mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Text -->
        <extension>odt</extension>
        <mime-type>application/vnd.oasis.opendocument.text</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ogg</extension>
        <mime-type>application/ogg</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Drawing Template -->
        <extension>otg </extension>

<mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- HTML Document Template -->
        <extension>oth</extension>
        <mime-type>application/vnd.oasis.opendocument.text-web</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Presentation Template -->
        <extension>otp</extension>

<mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Spreadsheet Template -->
        <extension>ots</extension>
        <mime-type>application/vnd.oasis.opendocument.spreadsheet-template
</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Text Template -->
        <extension>ott</extension>

<mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pbm</extension>
        <mime-type>image/x-portable-bitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pct</extension>
        <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pdf</extension>
        <mime-type>application/pdf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pgm</extension>
        <mime-type>image/x-portable-graymap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pic</extension>
        <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pict</extension>
        <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pls</extension>
        <mime-type>audio/x-scpls</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>png</extension>
        <mime-type>image/png</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pnm</extension>
        <mime-type>image/x-portable-anymap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>pnt</extension>
        <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ppm</extension>
        <mime-type>image/x-portable-pixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ppt</extension>
        <mime-type>application/powerpoint</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ps</extension>
        <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>psd</extension>
        <mime-type>image/x-photoshop</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>qt</extension>
        <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>qti</extension>
        <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>qtif</extension>
        <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ras</extension>
        <mime-type>image/x-cmu-raster</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rdf</extension>
        <mime-type>application/rdf+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rgb</extension>
        <mime-type>image/x-rgb</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rm</extension>
        <mime-type>application/vnd.rn-realmedia</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>roff</extension>
        <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rtf</extension>
        <mime-type>application/rtf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>rtx</extension>
        <mime-type>text/richtext</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>sh</extension>
        <mime-type>application/x-sh</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>shar</extension>
        <mime-type>application/x-shar</mime-type>
    </mime-mapping>
<!--
    <mime-mapping>
        <extension>shtml</extension>
        <mime-type>text/x-server-parsed-html</mime-type>
    </mime-mapping>
-->
    <mime-mapping>
        <extension>smf</extension>
        <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>sit</extension>
        <mime-type>application/x-stuffit</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>snd</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>src</extension>
        <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>sv4cpio</extension>
        <mime-type>application/x-sv4cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>sv4crc</extension>
        <mime-type>application/x-sv4crc</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>swf</extension>
        <mime-type>application/x-shockwave-flash</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>t</extension>
        <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tar</extension>
        <mime-type>application/x-tar</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tcl</extension>
        <mime-type>application/x-tcl</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tex</extension>
        <mime-type>application/x-tex</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>texi</extension>
        <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>texinfo</extension>
        <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tif</extension>
        <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tiff</extension>
        <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tr</extension>
        <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>tsv</extension>
        <mime-type>text/tab-separated-values</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>txt</extension>
        <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ulw</extension>
        <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ustar</extension>
        <mime-type>application/x-ustar</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>vxml</extension>
        <mime-type>application/voicexml+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xbm</extension>
        <mime-type>image/x-xbitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xht</extension>
        <mime-type>application/xhtml+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xhtml</extension>
        <mime-type>application/xhtml+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xml</extension>
        <mime-type>application/xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xpm</extension>
        <mime-type>image/x-xpixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xsl</extension>
        <mime-type>application/xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xslt</extension>
        <mime-type>application/xslt+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xul</extension>
        <mime-type>application/vnd.mozilla.xul+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xwd</extension>
        <mime-type>image/x-xwindowdump</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>wav</extension>
        <mime-type>audio/x-wav</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>svg</extension>
        <mime-type>image/svg+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>svgz</extension>
        <mime-type>image/svg+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>vsd</extension>
        <mime-type>application/x-visio</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- Wireless Bitmap -->
        <extension>wbmp</extension>
        <mime-type>image/vnd.wap.wbmp</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- WML Source -->
        <extension>wml</extension>
        <mime-type>text/vnd.wap.wml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- Compiled WML -->
        <extension>wmlc</extension>
        <mime-type>application/vnd.wap.wmlc</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- WML Script Source -->
        <extension>wmls</extension>
        <mime-type>text/vnd.wap.wmlscript</mime-type>
    </mime-mapping>
    <mime-mapping>
        <!-- Compiled WML Script -->
        <extension>wmlscriptc</extension>
        <mime-type>application/vnd.wap.wmlscriptc</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>wmv</extension>
        <mime-type>video/x-ms-wmv</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>wrl</extension>
        <mime-type>x-world/x-vrml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>Z</extension>
        <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>z</extension>
        <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>zip</extension>
        <mime-type>application/zip</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xls</extension>
        <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>doc</extension>
        <mime-type>application/vnd.ms-word</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ppt</extension>
        <mime-type>application/vnd.ms-powerpoint</mime-type>
    </mime-mapping>

  <!-- ==================== Default Welcome File List =====================
-->
  <!-- When a request URI refers to a directory, the default servlet looks
-->
  <!-- for a "welcome file" within that directory and, if present,
-->
  <!-- to the corresponding resource URI for display.  If no welcome file
-->
  <!-- is present, the default servlet either serves a directory listing,
-->
  <!-- or returns a 404 status, depending on how it is configured.
-->
  <!--
-->
  <!-- If you define welcome files in your own application's web.xml
-->
  <!-- deployment descriptor, that list *replaces* the list configured
-->
  <!-- here, so be sure that you include any of the default values that
-->
  <!-- you wish to include.
-->

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

</web-app>
********************************************************************************************************

content.xml:

<!-- The contents of this file will be loaded for each web application -->
<Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat
restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve
className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>
*****************************************************************************************************

Thank you again

daniel







On Tue, Dec 23, 2008 at 4:12 PM, Mojumdar, Biswajit <
Biswajit.Mojumdar@hud.gov> wrote:

> Remember, this list automatically deletes the attachments. You might
> want to copy and paste the contents of the web and context.xml and
> repost them again.
>
>
>
> - Biswajit
>
>
>
>
>
> ________________________________
>
> From: zia mohades [mailto:zia.simab@gmail.com]
> Sent: Tuesday, December 23, 2008 3:56 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 5.5 error
>
>
>
> 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(InternalOutputB
> uffer.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(InternalOutputBuff
> er.java:576)
>
>
>
>
>        org.apache.coyote.Response.doWrite(Response.java:560)
>
>
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.j
> ava:361)
>
>        org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)
>
>
> org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.j
> ava: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:12
> 8)
>
>
> org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.j
> ava: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:1
> 19)
>
>
>
>
>
> 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.jav
> a:39)
>
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.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.jav
> a: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_test
> again, 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 <oc...@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 <oc...@ncc.edu>
> > wrote:
> >
> > > On 22 Dec 2008 at 18:28, zia mohades wrote:
> > >
> > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
> > > From:   zia mohades <zi...@gmail.com>
> > > To:     Tomcat Users List <us...@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
> > <oc...@ncc.edu>
> > > > wrote:
> > > >
> > > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
> > > > >
> > > > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > > > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
> > > > > From:   zia mohades <zi...@gmail.com>
> > > > > To:     Tomcat Users List <us...@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
> > <
> > > > > > devlists@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-unsubscribe@tomcat.apache.org
> > > > > > > For additional commands, e-mail:
> > > > users-help@tomcat.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > -
> > > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > --------------------------------------------------------------------
> > -
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>
>
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>

RE: Tomcat 5.5 error

Posted by "Mojumdar, Biswajit" <Bi...@hud.gov>.
Remember, this list automatically deletes the attachments. You might
want to copy and paste the contents of the web and context.xml and
repost them again.

 

- Biswajit

 

 

________________________________

From: zia mohades [mailto:zia.simab@gmail.com] 
Sent: Tuesday, December 23, 2008 3:56 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5 error

 

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(InternalOutputB
uffer.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(InternalOutputBuff
er.java:576)




        org.apache.coyote.Response.doWrite(Response.java:560)

 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.j
ava:361)

        org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)

 
org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.j
ava: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:12
8)

 
org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.j
ava: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:1
19)




 
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.jav
a:39)

 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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.jav
a: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_test
again, 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 <oc...@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 <oc...@ncc.edu>
> wrote:
>
> > On 22 Dec 2008 at 18:28, zia mohades wrote:
> >
> > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
> > From:   zia mohades <zi...@gmail.com>
> > To:     Tomcat Users List <us...@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
> <oc...@ncc.edu>
> > > wrote:
> > >
> > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
> > > >
> > > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
> > > > From:   zia mohades <zi...@gmail.com>
> > > > To:     Tomcat Users List <us...@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
> <
> > > > > devlists@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-unsubscribe@tomcat.apache.org
> > > > > > For additional commands, e-mail:
> > > users-help@tomcat.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> --------------------------------------------------------------------
> > > -
> > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail:
> users-help@tomcat.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> >
> --------------------------------------------------------------------
> -
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>




---------------------------------------------------------------------

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

 


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
Hi kees,

Thank you for your help! Just to remind you:

I have deleted my previous apache tomcat( the default one) by using : rm -r
-f /usr/local/tomcat

and I installed the binary version on my desktop. I then start the apach
tomcat( using ./startup.sh) and when i access the webserver:
http://localhost:8080 , I can see the apache logo. However when I try to
access my own page: http://localhost:8080/mms_test, I get the same error:
I get the same error as always:
HTTP Status 404 - /mms_test/index.html
------------------------------

*type* Status report

*message* */mms_test/index.html*

*description* *The requested resource (/mms_test/index.html) is not
available.*


As i mentioned in my previous message when I access the log ,there is only
one file:

catalina.out and here it's its content:
 ./catalina.sh: 357: /usr/bin/java/bin/java: not found
 ./catalina.sh: 357: /usr/bin/java/bin/java: not found
./catalina.sh: 357: /usr/bin/java/bin/java: not found

>
when i do  echo $JAVA_HOME, I get this : /usr/bin/java and when I check the
.bashrc I do see this line as well: export JAVA_HOME=/usr/bin/java

Is it possible that there is another version of tomcat running and I don't
know about. How do i make sure that there the default tomcat is successfully
deleted and there is only one tomcat running.

this error is making me a bit frustrated, thank u again for all your helps.

Best regards

zia




>
> You did set JAVA_HME?
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkoster@kjkoster.org
> 06-51838192
>
> The secret of success lies in the stability of the goal. -- Benjamin
> Disraeli
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 5.5 error

Posted by Kees Jan Koster <kj...@gmail.com>.
> thank u again. I have downloaded the binary version and placed it on  
> my
> desktop and And ran it using sh startup.sh.
> and  then I access the http://localhost:8080/ site successfully. but  
> when i
> try to access  http://localhost:8080/mms_test. I get the same error as
> before. However when I try to access the log file, there is only one  
> file:
> catalina.out and here it's its content:
> ./catalina.sh: 357: /usr/bin/java/bin/java: not found
> ./catalina.sh: 357: /usr/bin/java/bin/java: not found
> ./catalina.sh: 357: /usr/bin/java/bin/java: not found

You did set JAVA_HOME?
--
Kees Jan

http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192

The secret of success lies in the stability of the goal. -- Benjamin  
Disraeli


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


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
Hi steve,

thank u again. I have downloaded the binary version and placed it on my
desktop and And ran it using sh startup.sh.
and  then I access the http://localhost:8080/ site successfully. but when i
try to access  http://localhost:8080/mms_test. I get the same error as
before. However when I try to access the log file, there is only one file:
catalina.out and here it's its content:
./catalina.sh: 357: /usr/bin/java/bin/java: not found
./catalina.sh: 357: /usr/bin/java/bin/java: not found
./catalina.sh: 357: /usr/bin/java/bin/java: not found

There seems to be a new problem. Just to let u know , I get this error when
I try to shutdown the server using :
sh shutdown.sh

Do I need to set up the java path somewhere? the java that I use is located
in /usr/bin/java.

This is getting a bit frustrating!

Thank u for all your help!


daniel



On Wed, Dec 24, 2008 at 7:24 PM, Steve Ochani <o=...@ncc.edu> wrote:

> Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> Date sent:      Wed, 24 Dec 2008 18:33:17 -0500
> From:   zia mohades <zi...@gmail.com>
> To:     Tomcat Users List <us...@tomcat.apache.org>
> Subject:        Re: Tomcat 5.5 error
>
> > 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
>
> don't use the source code, just get the binary version.
>
>
>
>
> >  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 <wb...@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" <zi...@gmail.com> wrote in message
> > > news:ee00484d0812231256g1185ae42r4b977bb236009ed3@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(AccessControlCon
> > >  text.java:323)
> > >
> > >  java.security.AccessController.checkPermission(AccessController.jav
> > >  a:546)
> > >     java.lang.SecurityManager.checkPermission(SecurityManager.java:5
> > >     32)
> > > java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:15
> > > 12)
> > >        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(InternalOut
> > > putBuffer.java:452)
> > > org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Proce
> > > ssor.java:1617)
> > >
> > >  org.apache.coyote.http11.Http11Processor.action(Http11Processor.jav
> > >  a:967)
> > >     org.apache.coyote.Response.action(Response.java:181)
> > >  org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutpu
> > >  tBuffer.java:576)
> > >        org.apache.coyote.Response.doWrite(Response.java:560)
> > > org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuff
> > > er.java:361)
> > >        org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:32
> > >        3)
> > > org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConvert
> > > er.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:18
> > > 5)
> > >  org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.ja
> > >  va:128)
> > >
> > >  org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuf
> > >  fer.java:536)
> > >        org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:25
> > >        6)
> > > org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:4
> > > 56)
> > > org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:1
> > > 43)
> > > org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.ja
> > > va:119)
> > >
> > >  org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:32
> > >  6)
> > > 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(DelegatingMethodAcce
> > > ssorImpl.java:25)
> > >        java.lang.reflect.Method.invoke(Method.java:597)
> > >  org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:2
> > >  44) 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(SecurityUti
> > >  l.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 <oc...@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 <oc...@ncc.edu>
> > >    > wrote:
> > >    >
> > >    > > On 22 Dec 2008 at 18:28, zia mohades wrote:
> > >    > >
> > >    > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > >    > > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500 From:   zia
> > >    > > mohades <zi...@gmail.com> To:     Tomcat Users List
> > >    > > <us...@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
> > >    > <oc...@ncc.edu>
> > >    > > > wrote:
> > >    > > >
> > >    > > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
> > >    > > > >
> > >    > > > > Send reply to:  Tomcat Users List
> > >    > > > > <us...@tomcat.apache.org> Date sent:      Mon, 22 Dec
> > >    > > > > 2008 15:43:41 -0500 From:   zia mohades
> > >    > > > > <zi...@gmail.com> To:     Tomcat Users List
> > >    > > > > <us...@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
> > >    > <
> > >    > > > > > devlists@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-example
> > >    > s-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=tr
> > >    > ue"/>
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > > >> 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:1
> > >    > 37)
> > >    > > > > > >>        at
> > >    > > > > >
> > >    > javax.naming.InitialContext.lookup(InitialContext.java:392)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.connection.DatasourceConnectionProvider.configure
> > >    > (Data
> > >    > > > > > sourceConnectionProvider.java:75)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.connection.ConnectionProviderFactory.newConnectio
> > >    > nProv
> > >    > > > > > ider(ConnectionProviderFactory.java:137)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.ejb.InjectionSettingsFactory.createConnectionProv
> > >    > ider(
> > >    > > > > > InjectionSettingsFactory.java:29)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory
> > >    > .java
> > >    > > > > > :89)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.cfg.Configuration.buildSettings(Configuration.jav
> > >    > a:210
> > >    > > > > > 1)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.cfg.Configuration.buildSessionFactory(Configurati
> > >    > on.ja
> > >    > > > > > va:1325)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(A
> > >    > nnota
> > >    > > > > > tionConfiguration.java:867)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(E
> > >    > jb3Co
> > >    > > > > > nfiguration.java:669)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > org.hibernate.ejb.HibernatePersistence.createEntityManagerFacto
> > >    > ry(Hi
> > >    > > > > > bernatePersistence.java:126)
> > >    > > > > > >>        at
> > >    > > > > > >>
> > >    > > > > > >>
> > >    > > > > >
> > >    > > >
> > >    > javax.persistence.Persistence.createEntityManagerFactory(Persis
> > >    > tence
> > >    > > > > > .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-unsubscribe@tomcat.apache.org
> > >    > > > > > > For additional commands, e-mail:
> > >    > > > users-help@tomcat.apache.org
> > >    > > > > > >
> > >    > > > > > >
> > >    > > > > >
> > >    > > > >
> > >    > > > >
> > >    > > > >
> > >    > > > >
> > >    > > >
> > >    > ---------------------------------------------------------------
> > >    > -----
> > >    > > > -
> > >    > > > > To unsubscribe, e-mail:
> > >    > > > > users-unsubscribe@tomcat.apache.org For additional
> > >    > > > > commands, e-mail:
> > >    > users-help@tomcat.apache.org
> > >    > > > >
> > >    > > > >
> > >    > > >
> > >    > >
> > >    > >
> > >    > >
> > >    > >
> > >    > ---------------------------------------------------------------
> > >    > ----- -
> > >    > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > >    > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >    > >
> > >    > >
> > >    >
> > >
> > >
> > >
> > >
> > >    -----------------------------------------------------------------
> > >    ----
> > >
> > >    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > >    For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > ----------
> > >
> > >
> > >  -------------------------------------------------------------------
> > >  --
> > >   To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > >  For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 5.5 error

Posted by Steve Ochani <oc...@ncc.edu>.
Send reply to:	Tomcat Users List <us...@tomcat.apache.org>
Date sent:	Wed, 24 Dec 2008 18:33:17 -0500
From:	zia mohades <zi...@gmail.com>
To:	Tomcat Users List <us...@tomcat.apache.org>
Subject:	Re: Tomcat 5.5 error

> 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

don't use the source code, just get the binary version.




>  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 <wb...@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" <zi...@gmail.com> wrote in message
> > news:ee00484d0812231256g1185ae42r4b977bb236009ed3@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(AccessControlCon
> >  text.java:323)
> >
> >  java.security.AccessController.checkPermission(AccessController.jav
> >  a:546)
> >     java.lang.SecurityManager.checkPermission(SecurityManager.java:5
> >     32)
> > java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:15
> > 12)
> >        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(InternalOut
> > putBuffer.java:452)
> > org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Proce
> > ssor.java:1617)
> >
> >  org.apache.coyote.http11.Http11Processor.action(Http11Processor.jav
> >  a:967)
> >     org.apache.coyote.Response.action(Response.java:181)
> >  org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutpu
> >  tBuffer.java:576)
> >        org.apache.coyote.Response.doWrite(Response.java:560)
> > org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuff
> > er.java:361)
> >        org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:32
> >        3)
> > org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConvert
> > er.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:18
> > 5)
> >  org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.ja
> >  va:128)
> >
> >  org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuf
> >  fer.java:536)
> >        org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:25
> >        6)
> > org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:4
> > 56)
> > org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:1
> > 43)
> > org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.ja
> > va:119)
> >
> >  org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:32
> >  6)
> > 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(DelegatingMethodAcce
> > ssorImpl.java:25)
> >        java.lang.reflect.Method.invoke(Method.java:597)
> >  org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:2
> >  44) 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(SecurityUti
> >  l.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 <oc...@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 <oc...@ncc.edu>
> >    > wrote:
> >    >
> >    > > On 22 Dec 2008 at 18:28, zia mohades wrote:
> >    > >
> >    > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> >    > > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500 From:   zia
> >    > > mohades <zi...@gmail.com> To:     Tomcat Users List
> >    > > <us...@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
> >    > <oc...@ncc.edu>
> >    > > > wrote:
> >    > > >
> >    > > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
> >    > > > >
> >    > > > > Send reply to:  Tomcat Users List
> >    > > > > <us...@tomcat.apache.org> Date sent:      Mon, 22 Dec
> >    > > > > 2008 15:43:41 -0500 From:   zia mohades
> >    > > > > <zi...@gmail.com> To:     Tomcat Users List
> >    > > > > <us...@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
> >    > <
> >    > > > > > devlists@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-example
> >    > s-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=tr
> >    > ue"/>
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > > >> 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:1
> >    > 37)
> >    > > > > > >>        at
> >    > > > > >
> >    > javax.naming.InitialContext.lookup(InitialContext.java:392)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.connection.DatasourceConnectionProvider.configure
> >    > (Data
> >    > > > > > sourceConnectionProvider.java:75)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.connection.ConnectionProviderFactory.newConnectio
> >    > nProv
> >    > > > > > ider(ConnectionProviderFactory.java:137)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.ejb.InjectionSettingsFactory.createConnectionProv
> >    > ider(
> >    > > > > > InjectionSettingsFactory.java:29)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory
> >    > .java
> >    > > > > > :89)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.cfg.Configuration.buildSettings(Configuration.jav
> >    > a:210
> >    > > > > > 1)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.cfg.Configuration.buildSessionFactory(Configurati
> >    > on.ja
> >    > > > > > va:1325)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(A
> >    > nnota
> >    > > > > > tionConfiguration.java:867)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(E
> >    > jb3Co
> >    > > > > > nfiguration.java:669)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > org.hibernate.ejb.HibernatePersistence.createEntityManagerFacto
> >    > ry(Hi
> >    > > > > > bernatePersistence.java:126)
> >    > > > > > >>        at
> >    > > > > > >>
> >    > > > > > >>
> >    > > > > >
> >    > > >
> >    > javax.persistence.Persistence.createEntityManagerFactory(Persis
> >    > tence
> >    > > > > > .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-unsubscribe@tomcat.apache.org
> >    > > > > > > For additional commands, e-mail:
> >    > > > users-help@tomcat.apache.org
> >    > > > > > >
> >    > > > > > >
> >    > > > > >
> >    > > > >
> >    > > > >
> >    > > > >
> >    > > > >
> >    > > >
> >    > ---------------------------------------------------------------
> >    > -----
> >    > > > -
> >    > > > > To unsubscribe, e-mail:
> >    > > > > users-unsubscribe@tomcat.apache.org For additional
> >    > > > > commands, e-mail:
> >    > users-help@tomcat.apache.org
> >    > > > >
> >    > > > >
> >    > > >
> >    > >
> >    > >
> >    > >
> >    > >
> >    > ---------------------------------------------------------------
> >    > ----- -
> >    > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >    > > For additional commands, e-mail: users-help@tomcat.apache.org
> >    > >
> >    > >
> >    >
> >
> >
> >
> >
> >    -----------------------------------------------------------------
> >    ----
> >
> >    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >    For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> >
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > ----------
> >
> >
> >  -------------------------------------------------------------------
> >  --
> >   To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >  For additional commands, e-mail: users-help@tomcat.apache.org
> >
> 



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


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
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 <wb...@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" <zi...@gmail.com> wrote in message
> news:ee00484d0812231256g1185ae42r4b977bb236009ed3@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 <oc...@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 <oc...@ncc.edu>
>    > wrote:
>    >
>    > > On 22 Dec 2008 at 18:28, zia mohades wrote:
>    > >
>    > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
>    > > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
>    > > From:   zia mohades <zi...@gmail.com>
>    > > To:     Tomcat Users List <us...@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
>    > <oc...@ncc.edu>
>    > > > wrote:
>    > > >
>    > > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
>    > > > >
>    > > > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
>    > > > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
>    > > > > From:   zia mohades <zi...@gmail.com>
>    > > > > To:     Tomcat Users List <us...@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
>    > <
>    > > > > > devlists@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-unsubscribe@tomcat.apache.org
>    > > > > > > For additional commands, e-mail:
>    > > > users-help@tomcat.apache.org
>    > > > > > >
>    > > > > > >
>    > > > > >
>    > > > >
>    > > > >
>    > > > >
>    > > > >
>    > > >
>    > --------------------------------------------------------------------
>    > > > -
>    > > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>    > > > > For additional commands, e-mail:
>    > users-help@tomcat.apache.org
>    > > > >
>    > > > >
>    > > >
>    > >
>    > >
>    > >
>    > >
>    > --------------------------------------------------------------------
>    > -
>    > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>    > > For additional commands, e-mail: users-help@tomcat.apache.org
>    > >
>    > >
>    >
>
>
>
>
>    ---------------------------------------------------------------------
>
>    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>    For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>  ---------------------------------------------------------------------
>   To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: users-help@tomcat.apache.org
>

Re: Tomcat 5.5 error

Posted by Bill Barker <wb...@wilshire.com>.
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" <zi...@gmail.com> wrote in message news:ee00484d0812231256g1185ae42r4b977bb236009ed3@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_test again, 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 <oc...@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 <oc...@ncc.edu>
    > wrote:
    >
    > > On 22 Dec 2008 at 18:28, zia mohades wrote:
    > >
    > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
    > > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
    > > From:   zia mohades <zi...@gmail.com>
    > > To:     Tomcat Users List <us...@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
    > <oc...@ncc.edu>
    > > > wrote:
    > > >
    > > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
    > > > >
    > > > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
    > > > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
    > > > > From:   zia mohades <zi...@gmail.com>
    > > > > To:     Tomcat Users List <us...@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
    > <
    > > > > > devlists@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-unsubscribe@tomcat.apache.org
    > > > > > > For additional commands, e-mail:
    > > > users-help@tomcat.apache.org
    > > > > > >
    > > > > > >
    > > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > --------------------------------------------------------------------
    > > > -
    > > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    > > > > For additional commands, e-mail:
    > users-help@tomcat.apache.org
    > > > >
    > > > >
    > > >
    > >
    > >
    > >
    > >
    > --------------------------------------------------------------------
    > -
    > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    > > For additional commands, e-mail: users-help@tomcat.apache.org
    > >
    > >
    >




    ---------------------------------------------------------------------

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






------------------------------------------------------------------------------


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

Re: Tomcat 5.5 error

Posted by zia mohades <zi...@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_test again,
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 <oc...@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 <oc...@ncc.edu>
> > wrote:
> >
> > > On 22 Dec 2008 at 18:28, zia mohades wrote:
> > >
> > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
> > > From:   zia mohades <zi...@gmail.com>
> > > To:     Tomcat Users List <us...@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
> > <oc...@ncc.edu>
> > > > wrote:
> > > >
> > > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
> > > > >
> > > > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > > > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
> > > > > From:   zia mohades <zi...@gmail.com>
> > > > > To:     Tomcat Users List <us...@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
> > <
> > > > > > devlists@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-unsubscribe@tomcat.apache.org
> > > > > > > For additional commands, e-mail:
> > > > users-help@tomcat.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > -
> > > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > --------------------------------------------------------------------
> > -
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 5.5 error

Posted by Steve Ochani <oc...@ncc.edu>.
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 <oc...@ncc.edu>
> wrote:
> 
> > On 22 Dec 2008 at 18:28, zia mohades wrote:
> >
> > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
> > From:   zia mohades <zi...@gmail.com>
> > To:     Tomcat Users List <us...@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
> <oc...@ncc.edu>
> > > wrote:
> > >
> > > > On 22 Dec 2008 at 15:43, zia mohades wrote:
> > > >
> > > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
> > > > From:   zia mohades <zi...@gmail.com>
> > > > To:     Tomcat Users List <us...@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
> <
> > > > > devlists@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-unsubscribe@tomcat.apache.org
> > > > > > For additional commands, e-mail:
> > > users-help@tomcat.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> --------------------------------------------------------------------
> > > -
> > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail:
> users-help@tomcat.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> >
> --------------------------------------------------------------------
> -
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> 



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


Re: Tomcat 5.5 error

Posted by Gregor Schneider <rc...@googlemail.com>.
One more thought to ease up things:

- stop Tomcat
- delete ALL / MOVE logfiles
- restart server
- resdtart Tomcat

Now, please post the contents of all log-files.

This procedure will make sure that the logs are as short as possible
but contain the important things - if any.

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
Hi gregor,

Thank you kindly for your help!

1) when I run the server and then access the http://localhost:8080 I do see
the page which on top it has this message:

" If you're seeing this page via a web browser, it means you've setup Tomcat
successfully. Congratulations!"

but when I try to access http://localhost:8080/mms_test , I get the same
error message.

2) when I try netstat -lnp , I don't see any application listening on port
8080! but i see lots of other ports! :(

3) to follow your other email , I stopped the server, then deleted all the
log files, restarted the server, accessed the site again:
http://localhost:8080/mms_test, but when I try to access the log
/usr/local/tomcat/logs , I noticed that the directory is empty. no logs
files!!

It is absolutely strange!!!! I don't get it, if i col access the
http://localhost:8080 successfully , how come there is no application
listening on 8080???

I really appreciate your help!

Best regards






On Tue, Dec 23, 2008 at 4:10 AM, Gregor Schneider <rc...@googlemail.com>wrote:

> Is Tomcat running?
>
> Do you see the welcome-page when opening http://localhost:8080?
>
> What gives "netstat -lnp"? Do you see any application listening on port
> 8080?
>
> Gregor
>
> PS.: To help keep messages readable, please do not fullquote the whole
> thread but only the necessary details.
> --
> just because your paranoid, doesn't mean they're not after you...
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 5.5 error

Posted by Gregor Schneider <rc...@googlemail.com>.
Is Tomcat running?

Do you see the welcome-page when opening http://localhost:8080?

What gives "netstat -lnp"? Do you see any application listening on port 8080?

Gregor

PS.: To help keep messages readable, please do not fullquote the whole
thread but only the necessary details.
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
hello steve,

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

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 <oc...@ncc.edu> wrote:

> On 22 Dec 2008 at 18:28, zia mohades wrote:
>
> Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> Date sent:      Mon, 22 Dec 2008 18:28:12 -0500
> From:   zia mohades <zi...@gmail.com>
> To:     Tomcat Users List <us...@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 <oc...@ncc.edu>
> > wrote:
> >
> > > On 22 Dec 2008 at 15:43, zia mohades wrote:
> > >
> > > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
> > > From:   zia mohades <zi...@gmail.com>
> > > To:     Tomcat Users List <us...@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 <
> > > > devlists@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-unsubscribe@tomcat.apache.org
> > > > > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > --------------------------------------------------------------------
> > -
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 5.5 error

Posted by Steve Ochani <oc...@ncc.edu>.
On 22 Dec 2008 at 18:28, zia mohades wrote:

Send reply to:	Tomcat Users List <us...@tomcat.apache.org>
Date sent:	Mon, 22 Dec 2008 18:28:12 -0500
From:	zia mohades <zi...@gmail.com>
To:	Tomcat Users List <us...@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 <oc...@ncc.edu>
> wrote:
> 
> > On 22 Dec 2008 at 15:43, zia mohades wrote:
> >
> > Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> > Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
> > From:   zia mohades <zi...@gmail.com>
> > To:     Tomcat Users List <us...@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 <
> > > devlists@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-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail:
> users-help@tomcat.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> >
> --------------------------------------------------------------------
> -
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> 



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


Re: Tomcat 5.5 error

Posted by zia mohades <zi...@gmail.com>.
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?

thank you for your time!


On Mon, Dec 22, 2008 at 4:03 PM, Steve Ochani <oc...@ncc.edu> wrote:

> On 22 Dec 2008 at 15:43, zia mohades wrote:
>
> Send reply to:  Tomcat Users List <us...@tomcat.apache.org>
> Date sent:      Mon, 22 Dec 2008 15:43:41 -0500
> From:   zia mohades <zi...@gmail.com>
> To:     Tomcat Users List <us...@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 <
> > devlists@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-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 5.5 error

Posted by Steve Ochani <oc...@ncc.edu>.
On 22 Dec 2008 at 15:43, zia mohades wrote:

Send reply to:	Tomcat Users List <us...@tomcat.apache.org>
Date sent:	Mon, 22 Dec 2008 15:43:41 -0500
From:	zia mohades <zi...@gmail.com>
To:	Tomcat Users List <us...@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 <
> devlists@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-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> 



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