[logback-user] FW: LOGBACK JNDI CONNECTIONSOURCE NOT WORKING

Harish Kumar Rayasam hrayasam at sapient.com
Tue Jan 4 10:29:19 CET 2011


 

-----Original Message-----
From: Ceki Gulcu [mailto:ceki at qos.ch] 
Sent: Tuesday, January 04, 2011 2:48 PM
To: Harish Kumar Rayasam
Subject: Re: LOGBACK JNDI CONNECTIONSOURCE NOT WORKING

Please send your message to the logback-user mailing list.

Best regards,

On 04.01.2011 10:19, Harish Kumar Rayasam wrote:
> Hi,
> My logback is not working check and report me any error
> I am getting classcastexception (wlcontextimpl cannot be cast to
> javax.sql.datasource)
> Check my configuration
> <!--<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
> <connectionSource class="ch.qos.logback.core.db.JNDIConnectionSource">
> <param name="jndiLocation" value="${datasource.jndi.URL}" />
> <param name="username" value="saa_dev"/>
> <param name="password" value="saa_dev"/>
> </connectionSource>
> </appender>
> -->
> <!--<appender name="DB" class="ch.qos.logback.access.db.DBAppender">
> <connectionSource class="ch.qos.logback.core.db.JNDIConnectionSource">
> <param name="jndiLocation" value="${datasource.jndi.URL}" />
> <param name="username" value="saa_dev"/>
> <param name="password" value="saa_dev"/>
> </connectionSource>
> <insertHeaders>true</insertHeaders>
> </appender>
> --><!--<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
> <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
> <dataSource class="${datasource.name.string}">
> Joran cannot substitute variables
> that are not attribute values. Therefore, we cannot
> declare the next parameter like the others.
> <param name="${url-key:-url}" value="${datasource.jndi.URL}"/>
> <serverName>bangsia-dev</serverName>
> <databaseName>SIADEVDB</databaseName>
> </dataSource>
> <user>saa_dev</user>
> <password>saa_dev</password>
> </connectionSource>
> </appender>
> **************************************************************
> END - APPENDERS
> **************************************************************
> --><appendername=/"DB1"/class=/"ch.qos.logback.access.db.DBAppender"/>
> <connectionSource class=/"ch.qos.logback.core.db.JNDIConnectionSource"/>
> <param name=/"jndiLocation"/ value=/"java:comp/env/t3://localhost:7001"/ />
> <param name=/"dataSource"/ value=/"java:comp/env/saa_datasource"//>
> <param name=/"user"/ value=/"weblogic"/ />
> <param name=/"password"/ value=/"weblogic"/ />
> </connectionSource>
> </appender>
> <appendername=/"DB"/class=/"ch.qos.logback.access.db.DBAppender"/>
> <connectionSourceclass=/"ch.qos.logback.core.db.JNDIConnectionSource"/>
> <param name=/"jndiLocation"/ value=/"t3://localhost:7001"/ />
> <param name=/"user"/ value=/"saa_dev"//>
> <param name=/"password"/ value=/"saa_dev"//>
> </connectionSource>
> <insertHeaders>true</insertHeaders>
> </appender>
> With regards..
> V.S.N.HARISH.RAYASAM




More information about the Logback-user mailing list