log4j parser error

Notes, tips, and other usefull things on how to use LogMX

Moderator: admin

Post Reply
awcastile
Posts: 2
Joined: Mon Oct 20, 2008 10:51 pm

log4j parser error

Post by awcastile »

I am (very) new to LogMX so please pardon the naive post however, every time I attempt to load a log4j log file I receive the following message:

"No suitable parser found for this file (check Options for available parsers).
File content will be displayed in raw text only."

I created a log4j parser thus:

Code: Select all

%d{ISO8601} %-7p [ %t ] ( %c{1} )  -->  %m%n
and made this the only active parser.

Below is a sample of the log file:

Code: Select all

2008-10-16 20:42:56,849 INFO    [ main ] ( ContextLoader )  -->  Root WebApplicationContext: initialization started
2008-10-16 20:42:56,849 INFO    [ main ] ( [/qbi] )  -->  Loading Spring root WebApplicationContext
2008-10-16 20:42:56,969 INFO    [ main ] ( CollectionFactory )  -->  JDK 1.4+ collections available
2008-10-16 20:42:56,982 INFO    [ main ] ( CollectionFactory )  -->  Commons Collections 3.x available
2008-10-16 20:42:56,991 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-license.xml]
2008-10-16 20:42:57,422 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
2008-10-16 20:42:57,811 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-profiling.xml]
2008-10-16 20:42:57,834 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]
2008-10-16 20:42:58,004 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-mondrian.xml]
2008-10-16 20:42:58,019 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-security.xml]
2008-10-16 20:42:58,132 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-logging.xml]
2008-10-16 20:42:58,169 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-adhoc.xml]
2008-10-16 20:42:58,205 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-olap-connection.xml]
2008-10-16 20:42:58,218 INFO    [ main ] ( DefaultListableBeanFactory )  -->  Overriding bean definition for bean 'olapConnectionService': replacing [Root bean: class [com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapConnectionServiceImpl]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/applicationContext.xml]] with [Root bean: class [com.jaspersoft.ji.license.OlapConnectionServiceLicImpl]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/applicationContext-olap-connection.xml]]
2008-10-16 20:42:58,218 INFO    [ main ] ( XmlBeanDefinitionReader )  -->  Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext-jpivot.xml]
2008-10-16 20:42:58,227 INFO    [ main ] ( DefaultListableBeanFactory )  -->  Overriding bean definition for bean 'jpivot-resources': replacing [Root bean: class [com.tonbeller.tbutils.res.Resources]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/applicationContext.xml]] with [Root bean: class [com.tonbeller.tbutils.res.Resources]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/applicationContext-jpivot.xml]]
2008-10-16 20:42:58,228 INFO    [ main ] ( XmlWebApplicationContext )  -->  Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [licContr,licParamResolver,JILicenseFilter,licenseBean,propertyConfigurer,dataSource,sessionFactory,hibernateCompositeDeleteListener,metadataRepositoryDeleteListener,transactionManager,objectFactory,mappingResourceFactory,persistentMappings,hibernateRepositoryService,hibernateRepoServiceTransactionInterceptor,repositoryService,beanForInterfaceFactory,dataSourceServiceFactories,dataSourceObjectPoolFactory,dbcpJdbcDataSourceFactory,jdbcDataSourceServiceFactory,jndiJdbcDataSourceServiceFactory,beanDataSourceServiceFactory,qaplDataSourceServiceFactory,hibernateRepositoryCacheBean,hibernateRepositoryCache,engineService,userAuthorityServiceTarget,userAuthorityService,objectPermissionServiceTarget,cacheManager,aclCache,objectPermissionService,messageSource,olapConnectionService,engineCacheDeleteListener,securityContextProvider,hyperlinkDateParameterFormatter,encodingProvider,characterEncodingFilter,baseReportExecutionHyperlinkProducer,collatorFactory,configurationBean,jpivot-resources,QedConnectionUtil,profilingSessionFactory,profilingRecorder,profilingAspect,reportJobsPersistenceHibernateService,reportJobsPersistenceTransactionInterceptor,reportJobsPersistenceService,reportSchedulerMailSender,quartzScheduler,schedulerReportExecutionHyperlinkProducer,reportQuartzScheduler,reportScheduler,defaultReportJobValidator,reportSchedulingFacade,reportSchedulingService,schedulingReportDeleteListener,quartzSchedulerControl,reportJobAclDao,reportJobAclProvider,reportJobUpdateVoter,reportJobDeletionVoter,reportJobLoadVoter,reportJobAccessDecisionManager,reportJobAclManager,reportJobAfterList,reportJobAfterInvocationManager,reportJobSecurity,reportJobAclCache,reportJobAclEntryCache,i18nMondrianAspect,filterChainProxy,authenticationManager,daoAuthenticationProvider,passwordEncoder,anonymousProcessingFilter,anonymousAuthenticationProvider,JIAuthenticationSynchronizer,loggerListener,userLocalesList,userPreferencesFilter,basicProcessingFilter,basicAuthExceptionTranslationFilter,basicProcessingFilterEntryPoint,authenticationProcessingFilter,authenticationProcessingFilterEntryPoint,httpSessionContextIntegrationFilter,exceptionTranslationFilter,httpRequestAccessDecisionManager,requestMethodsFilter,roleVoter,filterInvocationInterceptor,SimpleAclEntry.ADMINISTRATION,SimpleAclEntry.READ_WRITE,SimpleAclEntry.READ,SimpleAclEntry.DELETE,aclUserAdminVoter,aclUserUpdateVoter,aclUserReadVoter,aclAccessDecisionManager,aclManager,hibernateRepoServiceSecurity,afterInvocationManager,afterAclCollectionRead,afterAclRead,hibernateLoggingService,loggingService,logPurgerJob,logPurgerTrigger,maintenanceScheduler,adhocEngineService]; root of BeanFactory hierarchy
2008-10-16 20:42:58,240 INFO    [ main ] ( XmlWebApplicationContext )  -->  114 beans defined in application context [Root WebApplicationContext]
2008-10-16 20:42:58,295 INFO    [ main ] ( PropertyPlaceholderConfigurer )  -->  Loading properties file from ServletContext resource [/WEB-INF/hibernate.properties]
2008-10-16 20:42:58,295 INFO    [ main ] ( PropertyPlaceholderConfigurer )  -->  Loading properties file from ServletContext resource [/WEB-INF/js.mail.properties]
2008-10-16 20:42:58,315 INFO    [ main ] ( XmlWebApplicationContext )  -->  Using MessageSource [org.springframework.context.support.ReloadableResourceBundleMessageSource: basenames=[WEB-INF/bundles/jasperserver_messages,WEB-INF/bundles/jasperserver_config,WEB-INF/bundles/jpivot_messages,WEB-INF/internal/jpivot_internal_messages,WEB-INF/bundles/LicenseMessages,WEB-INF/bundles/pro_nav_messages,WEB-INF/bundles/ja-pro_messages,WEB-INF/bundles/ja_mondrian_messages,WEB-INF/bundles/mondrian_exception_messages,WEB-INF/internal/ja-pro_internal_messages,WEB-INF/bundles/adhoc_messages,WEB-INF/bundles/adhoc_masks]]
2008-10-16 20:42:58,318 INFO    [ main ] ( XmlWebApplicationContext )  -->  Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1c63e8c]
2008-10-16 20:42:58,324 INFO    [ main ] ( UiApplicationContextUtils )  -->  Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@3fa6cd]
2008-10-16 20:42:58,329 INFO    [ main ] ( DefaultListableBeanFactory )  -->  Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [licContr,licParamResolver,JILicenseFilter,licenseBean,propertyConfigurer,dataSource,sessionFactory,hibernateCompositeDeleteListener,metadataRepositoryDeleteListener,transactionManager,objectFactory,mappingResourceFactory,persistentMappings,hibernateRepositoryService,hibernateRepoServiceTransactionInterceptor,repositoryService,beanForInterfaceFactory,dataSourceServiceFactories,dataSourceObjectPoolFactory,dbcpJdbcDataSourceFactory,jdbcDataSourceServiceFactory,jndiJdbcDataSourceServiceFactory,beanDataSourceServiceFactory,qaplDataSourceServiceFactory,hibernateRepositoryCacheBean,hibernateRepositoryCache,engineService,userAuthorityServiceTarget,userAuthorityService,objectPermissionServiceTarget,cacheManager,aclCache,objectPermissionService,messageSource,olapConnectionService,engineCacheDeleteListener,securityContextProvider,hyperlinkDateParameterFormatter,encodingProvider,characterEncodingFilter,baseReportExecutionHyperlinkProducer,collatorFactory,configurationBean,jpivot-resources,QedConnectionUtil,profilingSessionFactory,profilingRecorder,profilingAspect,reportJobsPersistenceHibernateService,reportJobsPersistenceTransactionInterceptor,reportJobsPersistenceService,reportSchedulerMailSender,quartzScheduler,schedulerReportExecutionHyperlinkProducer,reportQuartzScheduler,reportScheduler,defaultReportJobValidator,reportSchedulingFacade,reportSchedulingService,schedulingReportDeleteListener,quartzSchedulerControl,reportJobAclDao,reportJobAclProvider,reportJobUpdateVoter,reportJobDeletionVoter,reportJobLoadVoter,reportJobAccessDecisionManager,reportJobAclManager,reportJobAfterList,reportJobAfterInvocationManager,reportJobSecurity,reportJobAclCache,reportJobAclEntryCache,i18nMondrianAspect,filterChainProxy,authenticationManager,daoAuthenticationProvider,passwordEncoder,anonymousProcessingFilter,anonymousAuthenticationProvider,JIAuthenticationSynchronizer,loggerListener,userLocalesList,userPreferencesFilter,basicProcessingFilter,basicAuthExceptionTranslationFilter,basicProcessingFilterEntryPoint,authenticationProcessingFilter,authenticationProcessingFilterEntryPoint,httpSessionContextIntegrationFilter,exceptionTranslationFilter,httpRequestAccessDecisionManager,requestMethodsFilter,roleVoter,filterInvocationInterceptor,SimpleAclEntry.ADMINISTRATION,SimpleAclEntry.READ_WRITE,SimpleAclEntry.READ,SimpleAclEntry.DELETE,aclUserAdminVoter,aclUserUpdateVoter,aclUserReadVoter,aclAccessDecisionManager,aclManager,hibernateRepoServiceSecurity,afterInvocationManager,afterAclCollectionRead,afterAclRead,hibernateLoggingService,loggingService,logPurgerJob,logPurgerTrigger,maintenanceScheduler,adhocEngineService]; root of BeanFactory hierarchy]
2008-10-16 20:42:58,478 INFO    [ main ] ( DefaultAopProxyFactory )  -->  CGLIB2 available: proxyTargetClass feature enabled
2008-10-16 20:42:58,611 INFO    [ main ] ( Environment )  -->  Hibernate 3.1.2
2008-10-16 20:42:58,616 INFO    [ main ] ( Environment )  -->  hibernate.properties not found
2008-10-16 20:42:58,619 INFO    [ main ] ( Environment )  -->  using CGLIB reflection optimizer
2008-10-16 20:42:58,619 INFO    [ main ] ( Environment )  -->  using JDK 1.4 java.sql.Timestamp handling
Any suggestions ? ? ?
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

Sorry for the late reply.
Your post has been modified: Log4j pattern and log file sample have been added to "Code" sections to display all white-space characters (when several white-space characters were used, only one was displayed in this HTML forum)


This pattern seems to work well with LogMX v1.1.0 and v1.2.5. Which version do you use?
Another idea: does your file begin with an header or blank lines?
Else, be carefull with white-space characters at the end or at the beginning of the pattern.

Feel free to let me know if your parser still doesn't work.

Xavier
awcastile
Posts: 2
Joined: Mon Oct 20, 2008 10:51 pm

Post by awcastile »

Xavier,

Thank you! Sometimes (most times?) it is the small things that complicate our efforts.

The solution for this issue was to remove the 'crlf' from the parser string - so the original parser statement was:

%d{ISO8601} %-7p [ %t ] ( %c{1} ) --> %m%n

and the functional statement is now:

%d{ISO8601} %-7p [ %t ] ( %c{1} ) --> %m

. . . my production environment is a Sun Solaris 10.x and the ubiquitous ^M so prevalent in the MS Windows world just doesn't exist.

Thanks again for the hint.

Tony
Post Reply