On 7/14/2015 1:50 PM, Joakim Erdfelt wrote:
What does your jetty-env.xml look like (the contents)?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd";> <Call class="org.eclipse.jetty.util.log.Log" name="info"><Arg>Starting my super test application%%%%%%%%%%%%%%%%%%%%</Arg></Call>
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <New id="prDataSource" class="org.eclipse.jetty.plus.jndi.Resource">
   <Arg></Arg>
   <Arg>java:comp/env/jdbc/pr</Arg>
   <Arg>
    <New class="com.mchange.v2.c3p0.ComboPooledDataSource">
       <Set name="driverClass">com.mysql.jdbc.Driver</Set>
       <Set name="jdbcUrl">jdbc:mysql://localhost:3306/pr</Set>
       <Set name="user">pr</Set>
       <Set name="password">@pr</Set>
    </New>
   </Arg>
  </New>
</Configure>

What version of Jetty?

Current 9.3.1-SNAPSHOT - I find I have to change the code to get logs I can use (as you first suggested), so I have kept to this version.


What you are doing is sane, at face value, but there's a lot of unknowns still. We need to know more about your setup, and desired/expected outcome to have any hope in helping you.

I described that in detail in another thread, but since I was getting no response, I broke it down to this one unknown that I need to confirm to make it simple. Please see "Getting JNDI/ db connection pool to work" for setup, previous progress, documentation errata I've found, and other possible issues.

On that bigger picture, here is why I am trying with java:comp/env/ in

    <Arg>java:comp/env/jdbc/pr</Arg>

http://stackoverflow.com/questions/2131798/jetty-mysql-connection-pool-configuration-error-javax-naming-namenotfoundexcept

And they say at one point,

"The problem is you're missing ONE extra layer of indirection. Even though you've configured Jetty in your webapp, you still need to tell the Jetty container that it needs to look for jetty-env.xml in your webapp. "

This is for an old version, and contradicts what is said above.
However, it is consistent with the lack of evidence that jetty-env.xml
is being seen.


Thanks,
Bill



Right now your question is along the lines of "My car isn't running, I added gasoline, but it still doesn't run. I verified that what I added was gasoline by testing that it was flammable."
A bit hard to troubleshoot when you can't see/touch/hear the car.


Joakim Erdfelt / [email protected] <mailto:[email protected]>

On Tue, Jul 14, 2015 at 1:42 PM, Bill Ross <[email protected] <mailto:[email protected]>> wrote:

    Copying the war to $jetty-base/webapps/.


    On 7/14/2015 1:34 PM, Joakim Erdfelt wrote:
    How are you deploying that webapp?

    Joakim Erdfelt / [email protected] <mailto:[email protected]>

    On Tue, Jul 14, 2015 at 1:25 PM, Bill Ross <[email protected]
    <mailto:[email protected]>> wrote:

        Per

        http://www.eclipse.org/jetty/documentation/current/jetty-env-xml.html

        "Using jetty-env.xml

        Place the jetty-env.xml file in your web application's
        WEB-INF folder."

        -- I see it there when I unpack the war file.
        -- should there be any logging when this is seen?
        -- I added this to it, but still see no log:

        <Call class="org.eclipse.jetty.util.log.Log"
        name="info"><Arg>Starting my super test application</Arg></Call>

        Thanks,
        Bill
        _______________________________________________
        jetty-users mailing list
        [email protected] <mailto:[email protected]>
        To change your delivery options, retrieve your password, or
        unsubscribe from this list, visit
        https://dev.eclipse.org/mailman/listinfo/jetty-users




    _______________________________________________
    jetty-users mailing list
    [email protected] <mailto:[email protected]>
    To change your delivery options, retrieve your password, or unsubscribe 
from this list, visit
    https://dev.eclipse.org/mailman/listinfo/jetty-users


    _______________________________________________
    jetty-users mailing list
    [email protected] <mailto:[email protected]>
    To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    https://dev.eclipse.org/mailman/listinfo/jetty-users




_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to