Skip to content

Instantly share code, notes, and snippets.

@jmkgreen
jmkgreen / gist:5046890
Created February 27, 2013 10:17
Crash of docx4j when converting to pdf
Heap size: 619970560
09:53:34,867 ERROR org.docx4j.jaxb.NamespacePrefixMapperUtils:63 getPrefixMapper() - name: com.sun.xml.internal.bind.namespacePrefixMapper, value: org.docx4j.jaxb.NamespacePrefixMapperSunInternal@394cec7b .. trying RI.
09:53:34,876 INFO org.docx4j.jaxb.NamespacePrefixMapperUtils:75 tryUsingRI() - Using NamespacePrefixMapper, which is suitable for the JAXB RI
09:53:34,876 INFO org.docx4j.jaxb.Context:61 <clinit>() - Using JAXB Reference Implementation
09:53:34,877 INFO org.docx4j.jaxb.Context:76 <clinit>() - loading Context jc
@jmkgreen
jmkgreen / gist:5465489
Created April 26, 2013 07:12
simple test of saving and loading 3m records with mongodb and morphia
package com.github.jmkgreen.morphia;
import com.github.jmkgreen.morphia.annotations.Entity;
import com.github.jmkgreen.morphia.annotations.Id;
import org.bson.types.ObjectId;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.util.Date;
@jmkgreen
jmkgreen / simplecamel.java
Created August 12, 2014 13:46
Simplest Camel route ever
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.example.camel.test;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
14:44:11,134 DEBUG org.apache.camel.impl.DefaultConsumer:139 doStart() - Starting consumer: Consumer[http4://www.google.com?initialDelay=0]
14:44:11,137 DEBUG org.apache.camel.util.IntrospectionSupport:528 setProperty() - Configured property: initialDelay on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@48834a71 with value: 0
14:44:11,137 DEBUG org.apache.camel.util.IntrospectionSupport:518 setProperty() - Configured property: timeUnit on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@48834a71 with value: MILLISECONDS
14:44:11,137 DEBUG org.apache.camel.util.IntrospectionSupport:518 setProperty() - Configured property: scheduledExecutorService on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@48834a71 with value: null
14:44:11,138 DEBUG org.apache.camel.util.IntrospectionSupport:528 setProperty() - Configured property: useFixedDelay on bean: org.apache.camel.impl.DefaultScheduledPollConsumerScheduler@48834a71 with value: true
14:44:11,138 DEBUG org.apa
@jmkgreen
jmkgreen / ResourceConfig
Created September 24, 2014 13:47
Configuration that fails to override
@Configuration
@PropertySources({
@PropertySource(value = {"classpath:myapp.properties", "classpath:hibernate.properties"}),
@PropertySource(value = {"file:${server.properties}"}, ignoreResourceNotFound = true)
})
public class ResourceConfig {
@Value("${hibernate.show_sql}")
private String properties;
@jmkgreen
jmkgreen / mongo-stacktrace.log
Created February 1, 2016 15:49
mongo 3.2 wiredtiger permission denied docker
2016-02-01T15:18:07.425+0000 I NETWORK [initandlisten] connection accepted from 172.17.0.23:48344 #40 (11 connections now open)
2016-02-01T15:18:14.374+0000 I NETWORK [conn40] AssertionException handling request, closing client connection: 17132 SSL handshake received but server is started without SSL support
2016-02-01T15:20:13.165+0000 I NETWORK [initandlisten] connection accepted from 172.17.0.23:48368 #41 (11 connections now open)
2016-02-01T15:21:04.992+0000 I NETWORK [conn41] end connection 172.17.0.23:48368 (10 connections now open)
2016-02-01T15:28:56.379+0000 I NETWORK [conn10] end connection 172.17.0.23:48170 (9 connections now open)
2016-02-01T15:28:56.379+0000 I NETWORK [conn9] end connection 172.17.0.23:48169 (9 connections now open)
2016-02-01T15:28:56.379+0000 I NETWORK [conn8] end connection 172.17.0.23:48168 (9 connections now open)
2016-02-01T15:28:56.379+0000 I NETWORK [conn7] end connection 172.17.0.23:48167 (9 connections now open)
2016-02-01T15:28:56.379+0000 I NETWORK [conn6] e
@jmkgreen
jmkgreen / threaddump.log
Created April 27, 2016 12:27
camel redis thread dump
2016-04-27 12:07:06
Full thread dump OpenJDK 64-Bit Server VM (25.72-b15 mixed mode):
"Attach Listener" #104 daemon prio=9 os_prio=0 tid=0x00007f3f98001000 nid=0xd4 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"ActiveMQ InactivityMonitor Worker" #101 daemon prio=5 os_prio=0 tid=0x00007f3f50001800 nid=0x86 waiting on condition [0x00007f3f47631000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006c7b22240> (a java.util.concurrent.SynchronousQueue$TransferStack)
@jmkgreen
jmkgreen / DropWizardMetricSets.java
Created October 24, 2016 10:20
Why does postContruct() get called twice...
package com.foo.server;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.jvm.GarbageCollectorMetricSet;
import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@jmkgreen
jmkgreen / log.txt
Created December 21, 2016 11:37
Docker Windows 10 Uninstall hang
Version: 1.12.3 (8488)
Channel: Stable
Sha1: d63ec34a49019d2e0b29d7706e57ccfc721ddb8f
Started on: 2016/12/21 11:30:03.216
Resources: C:\Program Files\Docker\Docker\Resources
OS: Windows 10 Pro
Edition: Professional
Id: 1511
Build: 10586
BuildLabName: 10586.672.amd64fre.th2_release_sec.161024-1825
@jmkgreen
jmkgreen / spring-boot-camel-hung-threads.log
Created July 27, 2017 09:33
Thread dump from a Spring Boot 1.3 / Camel application that has ceased operating
2017-07-27 09:23:50
Full thread dump OpenJDK 64-Bit Server VM (25.111-b14 mixed mode):
"ActiveMQ InactivityMonitor Worker" #712794 daemon prio=5 os_prio=0 tid=0x00007f0ecc73c000 nid=0x7a87 waiting on condition [0x00007f0ea47bb000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c1318b00> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)