avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajendra Ghorpade" <rghorp...@voiceobjects.com>
Subject RE: Avalon Apache Database configuration
Date Fri, 04 Jun 2004 08:12:54 GMT
Priya,

If you look in the source code of JDBCTargetFactory it tries to get the DataSource from the
javax.naming.InitialContext.If you do not have it there it will throw this configuration exception.You
have intialize the DataSourceComponent and give it to the log target factory.

Simple solution without using the naming context is to extends the JDBCTargetFactory and 
configure and intialize by your own the datasource component in your extended factory.


Raj
 

-----Original Message-----
From: Priya Soparkar [mailto:priyasoparkar@yahoo.com]
Sent: Friday, June 04, 2004 8:39 AM
To: dev@avalon.apache.org
Cc: users@avalon.apache.org; user@avalon.apache.org
Subject: Avalon Apache Database configuration


Hi,
Can someone send me the detailed configuration required for logging messages into MySQL database
using Avalon logkit  ? 
 
I could successfully log messages into file .
 
When i specify 
 
<target>
 <jdbc id="database">
        <datasource>java:/LogTargetDataSource</datasource>
        <normalized>true</normalized>
        <table name="log">
       <time>TIME</time>
       <priority>PRIORITY</priority>
       <category>CATEGORY</category>
       <message>MESSAGE</message>
       <throwable>THROWABLE</throwable>      
       <hostname>HOSTNAME</hostname>
     </table>
  </jdbc>
</target>
It gives me "org.apache.avalon.framework.configuration.ConfigurationException: Cannot lookup
data source"  Exception .
 
I have already created a table named "log" in my "MySQL" database.
 

Please correct me if i am missing some settings of setting something wrong .
Any pointers on this will be a great help .
 
 
Thanks,
Priya
 





		
---------------------------------
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message