Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / log4j.properties
Last active August 29, 2015 14:02
Very simple console log4j.properties file
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 05:02
File appender 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 05:03
File and Console stdout 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 October 21, 2014 15:10
Spring log4j path configuration
<!-- 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 October 21, 2014 15:11
Direct Spring log4j path configuration
<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 August 29, 2015 14:13
Report 01 example in Ireport 4.5.0
<?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 January 11, 2015 15:54
Report 02 in Ireport 4.5.0
<?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 February 3, 2015 03:42
This script shows how use this autoit functions: autoit random HotKeySet mouseMove random MsgBox
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 October 6, 2015 17:29
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]
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 October 6, 2015 17:36
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
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