Alright well, I am having a hell of a time getting this to work. I am adding all my pertinent xml files so that maybe someone has some time to help me get this straightened out. I know everyone is busy and it is Sunday so I'll let it sit after this but at this point, I have pages that work but no database connectivity.

My web.xml file @ /home/######/public_html/WEB-INF/

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
<web-app>

<display-name>Mushroom</display-name>
<description>
   Snap Media Mushroom Site
</description>

<context-param>
<param-name>webmaster</param-name>
<param-value>support@######.com</param-value>
<description>
Please contact Nick should any questions or issues arise about this application.
</description>
</context-param>

<context-param>
<param-name>root</param-name>
<param-value>/home/######/public_html</param-value>
<description>
      Path to where the system begins
</description>
</context-param>

<context-param>
<param-name>xmlprops</param-name>
<param-value>/home/######/public_html/WEB-INF/conf/environment.xml</param-value>
<description>
      Used to find path to local XML props file.
</description>
</context-param>

<servlet>
<servlet-name>WebSystemController</servlet-name>
<servlet-class>com.snapmedia.WebSystemController</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>WebSystemController</servlet-name>
<url-pattern>/servlet/WebSystemController</url-pattern>
</servlet-mapping>

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

<resource-ref>
<description>Connection Pool</description>
<res-ref-name>jdbc/exodus</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

</web-app>

My environment.xml file @ /home/######/public_html/WEB-INF/conf/

<?xml version="1.0"?>
<mushroom>

<environment>
<systemVersion>2.0</systemVersion>
<systemBuildCode>005523</systemBuildCode>
<systemLastUpdate>April 29, 2005</systemLastUpdate>
<systemIPAddress>127.0.0.1</systemIPAddress>
<SMTPHost>174.122.30.18</SMTPHost> <!-- Used by JavaMail -->
<mailFrom>it-...@quickplay.com</mailFrom>
<sysAdmin>N. Dingle</sysAdmin>
<debug>true</debug>
</environment>

<!--
This node contains the paths to "static systems". These should always be Fully-qualified URLs to the system in question, including domain, context root and any pertinent subdirectory. If code references any system which
      does not exist here, "base" will be used as a default.
   -->
<staticSystems>
<base>http://www.exodusdecoded.com</base>
<admin>http://www.exodusdecoded.com/tools</admin>
</staticSystems>

<!--
This node is recursive so that any paths set here will be automatically
      loaded into the environment class. Paths end up being converted into
      Name/Value pairs and are dumped into a Hashtable
   -->
<paths>
<loginJSP>/login.jsp</loginJSP>
<parentControlJSP>/parentControl.jsp</parentControlJSP>

<baseRoot>/home/exodus/public_html/</baseRoot>
<dataRoot>/data</dataRoot>
<instanceFile></instanceFile>
<systemLogFolder>/home/exodus/public_html/WEB-INF/logs/</systemLogFolder>
<systemArchiveFolder>/home/exodus/public_html/WEB-INF/logs/archive/</systemArchiveFolder>
<logFile>/home/exodus/public_html/WEB-INF/logs/codelog.txt</logFile>
<cronLog>/home/exodus/public_html/WEB-INF/logs/scheduler.txt</cronLog>
<broadcastLog>/home/exodus/public_html/WEB-INF/logs/broadcast.txt</broadcastLog>
<memoryLog>/home/exodus/public_html/WEB-INF/logs/memory.txt</memoryLog>
<securityLog>/home/exodus/public_html/WEB-INF/logs/security.txt</securityLog>
<ipmanifestlog>/home/exodus/public_html/WEB-INF/logs/ipmanifest.txt</ipmanifestlog>
<forumArchiveLog>/home/exodus/public_html/WEB-INF/logs/forum.txt</forumArchiveLog>
</paths>

<logging>
<connectionPool>false</connectionPool>
<memoryManager>false</memoryManager>
<cronSystem>true</cronSystem>
<broadcastSystem>false</broadcastSystem>
</logging>

<users>
<UserCookie1>AEFK67897PI30</UserCookie1>
<UserCookie2>AEFK6S897PI50</UserCookie2>
<SessionTimeout>30</SessionTimeout>
<CookieDomain>exodusdecoded.com</CookieDomain>
<MaxHandleLength>25</MaxHandleLength>
<DiskQuota>204800</DiskQuota>
<emailVerifyTimeout>0</emailVerifyTimeout>
</users>

<!-- BELOW, FIND CONFIGURATION FOR MUSHROOM'S SUB-SYSTEMS -->

<CronScheduler>
<enabled>true</enabled>
<instanceSensitive>false</instanceSensitive>
<runForInstance>1</runForInstance>
<scanForJobs>10</scanForJobs>
</CronScheduler>

<BroadcastSystem>
<enabled>true</enabled>
<interval>5</interval>
</BroadcastSystem>

<ParentalGuidance>
<enabled>true</enabled>
<MinRegistrationAge>13</MinRegistrationAge>
</ParentalGuidance>

<MemoryManager>
<enabled>false</enabled>
<frequency>15</frequency>
<warnLevel>450</warnLevel>
<notifyEnabled>true</notifyEnabled>
<notifyGroup>sdeb...@snapmedia.com</notifyGroup>
</MemoryManager>

<BlockedUserManager>
<enabled>true</enabled>
<daysBlocked>3</daysBlocked>
</BlockedUserManager>

<SecurityWatcher>
<enabled>false</enabled>
<rftEnabled>true</rftEnabled>
<rftThreshold>10</rftThreshold>
<rftActionPoint>1500</rftActionPoint>
<rftClearPoint>4000</rftClearPoint>
<rftHoldTime>10</rftHoldTime>
<rftDailyMaxViolations>5</rftDailyMaxViolations>
<autoLogoutEnabled>true</autoLogoutEnabled>
</SecurityWatcher>

<!-- BELOW, FIND CONFIGURATION FOR THE SYSTEM'S DATABASE ## Note that I have commented this out in order to try configuring the dB connection using methods I found online or in a book that I have - but to no avail -->

<!-- <jdbc-config>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://www.exodusdecoded.com/exodus_exodus</url>
<user>exodus_exodus</user>
<password>simcha</password>
<max>10</max>
<init>10</init>
<queueQuery>select now()</queueQuery>
<logFile>/home/exodus/public_html/WEB-INF/logs/pool.txt</logFile>
</jdbc-config> -->

</mushroom>

My server.xml file at /home/#####/public_html/conf/

<?xml version='1.0' encoding='utf-8'?>

<Server port='8105' shutdown='SHUTDOWN' debug='0'>
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<Service name='Catalina'>
<Connector port="8180" protocol="HTTP/1.1"
           maxThreads="150" connectionTimeout="20000"
               redirectPort="8443" address="/home/exodus/public_html" />

<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" address="/home/exodus/public_html" />

<Engine name="Catalina" defaultHost="www.exodusdecoded.com">

<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
<Host name="www.exodusdecoded.com"  appBase="/home/exodus/public_html"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="exodus_access" suffix=".log" pattern="common" resolveHosts="false"/>
<Logger className='org.apache.catalina.logger.FileLogger'
directory="logs" prefix="exodus_catalina" suffix=".log" timestamp="true" />

<!-- Here I tried to define a context based on information I again fould in a book that I have and online -->
<Context path='' docBase='/home/#####/public_html/' debug='0'
<Resource name="jdbc/exodus" auth="Container" type="javax.sql.DataSource"
             username="#####_#####"
             password="#####"
             driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/#####_#####?useUnicode=true&amp;characterEncoding=utf8"
             maxActive="15"
             maxIdle="7"
             defaultTransactionIsolation="READ_COMMITTED"
             validationQuery="Select 1" />
    />
</Host>
</Engine>
</Service>
</Server>

My context file, which I created while again trying to solve why the database connection fails at /home/#####/public_html/META-INF/

<Context>
<Resource name="jdbc/exodus"
    auth="Container"
    type=javax.sql.DataSource
    maxActive="10"
    maxIdle="20"
    macWait="10000"
    username="#####_######"
    password="#####"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/#####_######?autoReconnect=true"
    removeAbandoned="true"
    removeAbandonedTomeout="120"
    />
</Context>

I know this is probably screwed up now so I appreciate the help I have had so far and would seriously appreciate any input as to how to straighten this out and get the connection to the database functional. I really need to get the site up and running today.

Thanks for your consideration and your time.

Dave

On 22/07/64 2:59 PM, Dave Filchak wrote:
Ok, perhaps this will be more helpful. To follow is the way the db
connection is set up now, and I am not sure it is correct because, as I
understand it, you are supposed to add a context to the server.xml file
defining the db connection through jdbc/mysql ( which I am not sure of
the format yet ), either in the main system one or the application
specific one, OR to the META-INF/content.xml file, which I do not have.
What I do have is this, in my application directory at
/home/XXXXXX/public_html/WEB-INF/conf/environment.xml:

<jdbc-config>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://###.###.###.###:3306/#######_exodus</url>
<user>#########_exodus</user>
<password>#####</password>
<max>10</max>
<init>10</init>
<queueQuery>select now()</queueQuery>
<logFile>/home/#####/public_html/WEB-INF/logs/pool.txt</logFile>
</jdbc-config>

When I modify the<url>, it does show up in the error that is generated
so the app must be reading from this entry while trying to make the
connection to the database. I do not believe there is any other location
where a reference to the database is made.

Apparently, you are also supposed
to add an entry in the</*CONTEXT_HOME*/>/WEB-INF/web.xml and I am not
sure if this is true but in my/home/#####/public_html/WEB-INF/web.xml
there is no reference to the database. However, this used to work on the
old server. So, in a nutshell, the only reference to a database
connection is in the environment.xml file.

Dave



On 22/07/64 2:59 PM, Dave Filchak wrote:
Hi André,

Sorry about the comments. Wasn't thinking. So, I did find that one of
the closing comment tags in my web.xml was entered as ==>. Fixing that
gave me some progress in that the site's homepage now comes up. However,
I now get the following error when clicking on a few links, which
obviously refer to a connection to the database:

Error initializing sub-systems:
Please check the following:
1. That your machine has a valid connection to jdbc:mysql://localhost/########_exodus Using:
    Username: ########_exodus
    Password: ######
    Driver: com.mysql.jdbc.Driver


*DETAILS FOLLOW:*
java.lang.Exception: Unable to Initialize Environment:
java.lang.NoClassDefFoundError: javax/mail/Address
    at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
    at com.snapmedia.degrassi.base.BroadcastSystem.(Unknown Source)
    at com.snapmedia.SystemController.init(SystemController.java:86)
at com.snapmedia.WebSystemController.init(WebSystemController.java:39) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219)
Caused by: java.lang.ClassNotFoundException: javax.mail.Address
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
    ... 25 more

I have verified that thew username and password are correct by logging
into the MySQL server from the command line. Something with the driver?

Dave



On 22/07/64 2:59 PM, André Warnier wrote:
Hi.

One thing at a time..

1) When you send XML configuration files, please remove everything that is a comment. XML files are already being wrapped by the email program, and are difficult to read as it is. Having plenty of comments in them in addition makes is really a hassle to figure out what is being used or not.
(Note: an XML comment is anything between a pair of <!-- and --> )

2) one error message below talks about an invalid XML file.
Inside one of the comments (between a leading <!-- and a trailing -->), there is another pair of -- . That is incorrect and causes the entire file to be rejected/ignored.
Inspect that file carefully, remove the offending --, and try again.

(Note: the extra -- may also be due to a previous bad edit of the file. It may have been a <!-- or a --> , where someone tried to comment or de-comment something, and either removed too much or added not enough. Remember that everything between a pair of <!-- and --> is a comment (normally ignored), and inside of such a comment, you cannot have another pair of -- )

Do this carefully, as it may be the basic cause why the whole thing is not working.
Keep a backup of the original, for each file that you start editing.

(Another note: there exist text editors which can show you if a file is correct XML or not. For a windows PC, look up Notepad++ in Google)

3) what happens when, in your browser, you enter the URL :

http://your-host-name:8180

?
(replace your-host-name by .. your real host name (or its IP address))



<snip>


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

Reply via email to