[logback-user] Help Logback and postgreSQL

Mohammad Haider mohammadh at lashpoint.com
Thu Mar 4 17:59:49 CET 2010


Thank you for quick reply.

I got the following output after putting the <statusListener> tag

12:58:33,750 |-ERROR in ch.qos.logback.classic.db.DBAppender[DB] - 
problem appending event org.postgresql.util.PSQLException: ERROR: column 
"EVENT_ID" does not exist
  Position: 231
    at org.postgresql.util.PSQLException: ERROR: column "EVENT_ID" does 
not exist
  Position: 231
    at     at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
    at     at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
    at     at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at     at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
    at     at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
    at     at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:321)
    at     at 
ch.qos.logback.classic.db.DBAppender.subAppend(DBAppender.java:86)
    at     at 
ch.qos.logback.core.db.DBAppenderBase.append(DBAppenderBase.java:98)
    at     at 
ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:91)
    at     at 
ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:64)
    at     at 
ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:275)
    at     at ch.qos.logback.classic.Logger.callAppenders(Logger.java:262)
    at     at 
ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:465)
    at     at 
ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:419)
    at     at ch.qos.logback.classic.Logger.debug(Logger.java:526)
    at     at 
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:130)
    at     at 
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
    at     at org.hibernate.loader.Loader.doQuery(Loader.java:752)
    at     at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
    at     at org.hibernate.loader.Loader.doList(Loader.java:2232)
    at     at 
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
    at     at org.hibernate.loader.Loader.list(Loader.java:2124)
    at     at 
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
    at     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1597)
    at     at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
    at     at 
ca.bids.tips.bl.persistence.UserInfoDAO.fetch(UserInfoDAO.java:62)
    at     at 
ca.bids.tips.action.LoginActionBean.validateLogin(LoginActionBean.java:69)
    at     at 
ca.bids.tips.action.LoginActionBean.login(LoginActionBean.java:86)
    at     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at     at java.lang.reflect.Method.invoke(Method.java:597)
    at     at 
net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:467)
    at     at 
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
    at     at 
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
    at     at 
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
    at     at 
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
    at     at 
net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:465)
    at     at 
net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:278)
    at     at 
net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:160)
    at     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at     at 
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
    at     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    at     at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at     at java.lang.Thread.run(Thread.java:619)

Ceki Gülcü wrote:
>
> Try placing the following at the beginning of your config file. You 
> can also safely set debug attribute of the config element to false. 
> Example:
>
> <configuration scan="true" scanPeriod="30 seconds">
>   <statusListener
>      class="ch.qos.logback.core.status.OnConsoleStatusListener"/>
>   ...
> /configuration>
>
> this will print status messages throughout the life of your 
> application, not only after the configuration file is read.
>
> On 04/03/2010 4:05 PM, Mohammad Haider wrote:
>>
>> Yes, the status message is:
>>
>> Driver name=PostgreSQL Native Driver
>> Driver version=PostgreSQL 8.4 JDBC3 (build 701)
>> supportsGetGeneratedKeys=true
>> true
>> 11:01:54,843 |-INFO in ch.qos.logback.classic.LoggerContext[default] -
>> Found resource [logback-test.xml] at
>> [file:/C:/Bids_WrkSpace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TIPS/WEB-INF/classes/logback-test.xml] 
>>
>>
>> 11:01:55,015 |-INFO in
>> ch.qos.logback.classic.joran.action.ConfigurationAction - Setting
>> ReconfigureOnChangeFilter scanning period to 30 seconds
>> 11:01:55,015 |-INFO in
>> ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter at 17e845a - Will
>> scan for changes in file
>> [C:\Bids_WrkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\TIPS\WEB-INF\classes\logback-test.xml] 
>>
>> every 30 seconds.
>> 11:01:55,015 |-INFO in
>> ch.qos.logback.classic.joran.action.ConfigurationAction - Adding
>> ReconfigureOnChangeFilter as a turbo filter
>> 11:01:55,140 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
>> About to instantiate appender of type
>> [ch.qos.logback.classic.db.DBAppender]
>> 11:01:55,140 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
>> Naming appender as [DB]
>> 11:01:55,156 |-INFO in
>> ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing
>> component [connectionSource] on top of the object stack.
>> 11:01:55,296 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
>> Popping appender named [DB] from the object stack
>> 11:01:55,296 |-INFO in
>> ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of
>> ROOT logger to DEBUG
>> 11:01:55,296 |-INFO in
>> ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
>> named [DB] to Logger[ROOT]
>> 11:01:55,312 |-INFO in
>> ch.qos.logback.classic.joran.action.ConfigurationAction - End of
>> configuration.
>>
>>
>> Ceki Gülcü wrote:
>>>
>>> Are you seeing any status messages?
>>>
>>> On 04/03/2010 3:49 PM, Mohammad Haider wrote:
>>>> Hi,
>>>>
>>>> I have created three tables for logback according to documentation.
>>>>
>>>> I have the following config. file:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <configuration debug="true" scan="true" scanPeriod="30 seconds">
>>>> <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
>>>> <connectionSource
>>>> class="ch.qos.logback.core.db.DriverManagerConnectionSource">
>>>> <driverClass>org.postgresql.Driver</driverClass>
>>>> <url>jdbc:postgresql://localhost:5432/tips_log</url>
>>>> <user>postgres</user>
>>>> <password>test</password>
>>>> </connectionSource>
>>>> </appender>
>>>>
>>>> <root level="debug">
>>>> <appender-ref ref="DB"/>
>>>> </root>
>>>> </configuration>
>>>>
>>>> In my code I have put simple logger.debug("DB test");.
>>>> However, I did not see any log data in the tables.
>>>>
>>>> Can anyone please help about this issue? Why am I not getting any log
>>>> data in the table?
>>>
>>> _______________________________________________
>>> Logback-user mailing list
>>> Logback-user at qos.ch
>>> http://qos.ch/mailman/listinfo/logback-user
>>
>>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user


-- 
Thanks
* Mohammad Firoj Haider*
 Software Developer
 LashPoint Inc <http://www.lashpoint.com>
 Email: mohammadh at lashpoint.com <mailto:mohammadh at lashpoint.com>
 Blog: The Daily Programming <http://www.codinglogs.blogspot.com/>

  Lashpoint mini logo




More information about the Logback-user mailing list