Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Osmar Leon Ingaruca jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / log4j.properties
Last active Aug 29, 2015
Very simple console log4j.properties file
View log4j.properties
log4j.rootCategory=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m %n
@jrichardsz
jrichardsz / log4j.properties
Created May 30, 2014
File appender log4j.properties
View log4j.properties
log4j.rootCategory=INFO, file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/log/my-webapp.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p [%c] - %m %n
@jrichardsz
jrichardsz / log4j.properties
Created May 30, 2014
File and Console stdout log4j.properties
View log4j.properties
log4j.rootCategory=INFO, stdout, file
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m %n
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/log/jforum-webapp.log
log4j.appender.file.MaxFileSize=5MB
@jrichardsz
jrichardsz / xml
Created Oct 21, 2014
Spring log4j path configuration
View xml
<!-- In Log4jPropertyConfigurer put : PropertyConfigurator.configure(../../mylog4j.properties)-->
<bean id="applicationLog4j" class="my.package.structure.properties.log4j.Log4jPropertyConfigurer">
<constructor-arg index="0" ref="log4jPropertyConfigurer" />
</bean>
@jrichardsz
jrichardsz / xml
Created Oct 21, 2014
Direct Spring log4j path configuration
View xml
<bean id="log4jInitialization"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass"
value="org.springframework.util.Log4jConfigurer" />
<property name="targetMethod" value="initLogging" />
<property name="arguments">
<list>
<value>../../conf/log4j.properties</value>
</list>
</property>
@jrichardsz
jrichardsz / ireport-01-example-xml
Last active Aug 29, 2015
Report 01 example in Ireport 4.5.0
View ireport-01-example-xml
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="template.type" value="columnar"/>
<style name="Title" forecolor="#000000" fontName="Times New Roman" fontSize="50" isBold="false" pdfFontName="Times-Bold"/>
<style name="SubTitle" forecolor="#666666" fontName="Times New Roman" fontSize="18" isBold="false" pdfFontName="Times-Roman"/>
<style name="Column header" forecolor="#666666" fontName="Times New Roman" fontSize="14" isBold="true" pdfFontName="Times-Roman"/>
<style name="Detail" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"/>
<style name="Row" mode="Transparent" fontName
@jrichardsz
jrichardsz / ireport-02-example.xml
Created Jan 11, 2015
Report 02 in Ireport 4.5.0
View ireport-02-example.xml
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<style name="Title" fontName="Arial" fontSize="26" isBold="true" pdfFontName="Helvetica-Bold"/>
<style name="SubTitle" forecolor="#666666" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Detail" fontName="Arial" fontSize="12"/>
<group name="Group1">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression>
<groupHeader>
<band height="40">
@jrichardsz
jrichardsz / autoit random HotKeySet mouse move.au3
Created Feb 3, 2015
This script shows how use this autoit functions: autoit random HotKeySet mouseMove random MsgBox
View autoit random HotKeySet mouse move.au3
HotKeySet("{ESC}", "stop")
main()
Func main()
; Set the counter
$count = 0
; Execute the loop "While" the counter is less than 5
@jrichardsz
jrichardsz / pdi-spoon-error-java.lang.ClassNotFoundException: org.osjava.sj.SimpleContextFactory.log
Last active Oct 6, 2015
Error produced when a transformation that uses a jndi datasource is invoked from java : javax.naming.NoInitialContextException: Cannot instantiate class: org.osjava.sj.SimpleContextFactory [Root exception is java.lang.ClassNotFoundException: org.osjava.sj.SimpleContextFactory]
View pdi-spoon-error-java.lang.ClassNotFoundException: org.osjava.sj.SimpleContextFactory.log
2015/10/06 12:26:36 - transformation_with_jndi - Dispatching started for transformation [transformation_with_jndi]
2015/10/06 12:26:36 - Table input.0 - ERROR (version 5.0.0.1.19046, build 1 from 2013-09-11_13-51-13 by buildguy) : An error occurred, processing will be stopped:
2015/10/06 12:26:36 - Table input.0 - Error occured while trying to connect to the database
2015/10/06 12:26:36 - Table input.0 -
2015/10/06 12:26:36 - Table input.0 - javax.naming.NoInitialContextException: Cannot instantiate class: org.osjava.sj.SimpleContextFactory [Root exception is java.lang.ClassNotFoundException: org.osjava.sj.SimpleContextFactory]
2015/10/06 12:26:36 - Table input.0 - Cannot instantiate class: org.osjava.sj.SimpleContextFactory
2015/10/06 12:26:36 - transformation_with_jndi - ERROR (version 5.0.0.1.19046, build 1 from 2013-09-11_13-51-13 by buildguy) : Something went wrong while trying to stop the transformation: org.pentaho.di.core.exception.KettleDatabaseException:
2015/10/06 12:26:36 - transformation_with_
@jrichardsz
jrichardsz / pdi-spoon-error-Unable to get database metadata from this database connection.log
Created Oct 6, 2015
Error produced when a transformation that uses a jndi datasource is invoked from java : Error occured while trying to connect to the database, Unable to get database metadata from this database connection
View pdi-spoon-error-Unable to get database metadata from this database connection.log
2015/10/06 12:30:01 - transformation_with_jndi - Dispatching started for transformation [transformation_with_jndi]
2015/10/06 12:30:01 - Table input.0 - ERROR (version 5.0.0.1.19046, build 1 from 2013-09-11_13-51-13 by buildguy) : An error occurred, processing will be stopped:
2015/10/06 12:30:01 - Table input.0 - Error occured while trying to connect to the database
2015/10/06 12:30:01 - Table input.0 - java.io.File parameter must be a directory. [D:\opt\workspace-eclipse\invoke-ktr-jndi\simple-jndi]
2015/10/06 12:30:01 - transformation_with_jndi - ERROR (version 5.0.0.1.19046, build 1 from 2013-09-11_13-51-13 by buildguy) : Something went wrong while trying to stop the transformation: org.pentaho.di.core.exception.KettleDatabaseException:
2015/10/06 12:30:01 - transformation_with_jndi - Unable to get database metadata from this database connection
2015/10/06 12:30:01 - transformation_with_jndi - at java.lang.Thread.run (null:-1)
2015/10/06 12:30:01 - transformation_with_jndi - at org.pentaho.di.trans.st