Skip to content

Instantly share code, notes, and snippets.

package com.dotmarketing.viewtools;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.xml.transform.Source;
<h1>MACRO TEST</h1>
<div>#helloWorld()</div>
<h1>Velocity Viewtool Test</h1>
<div>$helloWorld</div>
<div>$helloWorld.hello()</div>
<div>$helloWorld.hello(1)</div>
<div>$helloWorld.hello("2")</div>
<h1>Test DWR</h1>
org.springframework.jdbc.datasource.embedded,
com.dotcms.publisher.mapper,
org.apache.velocity.runtime.parser.node,
com.liferay.util.resin,
org.elasticsearch.river.cluster,
org.elasticsearch.rest.action.count,
net.sf.jasperreports.engine.export,
com.google.common.util.concurrent,
com.dotmarketing.cms.content.submit,
com.dotmarketing.portlets.templates.ajax,
org.springframework.jdbc.datasource.embedded,
com.dotcms.publisher.mapper,
com.liferay.util.resin,
org.apache.velocity.runtime.parser.node,
org.elasticsearch.river.cluster,
org.elasticsearch.rest.action.count,
net.sf.jasperreports.engine.export,
com.google.common.util.concurrent,
com.dotmarketing.cms.content.submit,
.Users.jasontesser.dev.git.dotcms.dotCMS.WEB-INF.classes.com.liferay.util.mail,
@jtesser
jtesser / 0_reuse_code.js
Created June 19, 2017 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
"http-nio-8080-exec-200 {/opt/dotcms/shared/assets/current/d/a/dabc5616-2a7f-459f-96f0-efc91fd3fbdd.vtl}" #805 daemon prio=5 os_prio=0 tid=0x00007f4a140bc000 nid=0x3cfa waiting on condition [0x00007f48d7f85000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00007f4d84641018> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at org.redisson.command.CommandAsyncService.get(bo:146)
This file has been truncated, but you can view the full file.
2017-10-13 14:21:57
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.144-b01 mixed mode):
"Attach Listener" #884 daemon prio=9 os_prio=0 tid=0x00007f4cb8005800 nid=0x4071 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"globalEventExecutor-2-8" #883 prio=5 os_prio=0 tid=0x00007f4c092d4000 nid=0x402a runnable [0x00007f4b6caf6000]
clusterServersConfig:
idleConnectionTimeout: 10000
pingTimeout: 1000
connectTimeout: 10000
timeout: 3000
retryAttempts: 3
retryInterval: 1500
reconnectionTimeout: 3000
failedAttempts: 3
password: null
[13/10/17 14:18:26:728 CDT] ERROR provider.CacheProviderAPIImpl: Error getting record from CacheProvider [Redisson Pro]: group [categorycache] - key [categorycachea7b168fb-4501-4fe9-9b1e-f3ac5e97285a].
org.redisson.client.WriteRedisConnectionException: Can't write command: (HGET), params: [categorycache, categorycachea7b168fb-4501-4fe9-9b1e-f3ac5e97285a] to channel: null
at org.redisson.command.CommandAsyncService.checkWriteFuture(bo:622) ~[redisson-3.5.3.jar:?]
at org.redisson.command.CommandAsyncService.access$100(bo:29) ~[redisson-3.5.3.jar:?]
at org.redisson.command.CommandAsyncService$9$1.operationComplete(bo:499) ~[redisson-3.5.3.jar:?]
at org.redisson.command.CommandAsyncService$9$1.operationComplete(bo:657) ~[redisson-3.5.3.jar:?]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:507) ~[DefaultPromise.class:?]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:481) ~[DefaultPromise.class:?]
at io.netty.util.concurrent.DefaultPromise.no
{"entity":{
"canCreateTemplate" : true,
"containers" : {
"5a07f889-4536-4956-aa6e-e7967969ec3f" : {
"containerStructures" : [ {
"id" : "7656d454-7c38-4bad-9c9a-bed92217612b",
"structureId" : "4c441ada-944a-43af-a653-9bb4f3f0cb2b",
"containerInode" : "386ca94e-f7fe-4615-9aa2-799f9f7fb25b",
"containerId" : "5a07f889-4536-4956-aa6e-e7967969ec3f",
"code" : "#dotParse(\"/application/containers/default/banner.vtl\")\r\n",