Skip to content

Instantly share code, notes, and snippets.

@dnebing
dnebing / Comment_Test_Structure.json
Created September 28, 2023 17:04
This is the JSON for the structure used with the comment custom fragment
{
"availableLanguageIds": [
"en_US"
],
"contentType": "journal",
"dataDefinitionFields": [
{
"customProperties": {
"labelAtStructureLevel": true,
"confirmationErrorMessage": {
@dnebing
dnebing / rename.sql
Created May 13, 2020 21:43
SQL For renaming Liferay tables to mixed case.
RENAME TABLE account_ TO Account_;
RENAME TABLE address TO Address;
RENAME TABLE announcementsdelivery TO AnnouncementsDelivery;
RENAME TABLE announcementsentry TO AnnouncementsEntry;
RENAME TABLE announcementsflag TO AnnouncementsFlag;
RENAME TABLE assetcategory TO AssetCategory;
RENAME TABLE assetcategoryproperty TO AssetCategoryProperty;
RENAME TABLE assetentries_assetcategories TO AssetEntries_AssetCategories;
RENAME TABLE assetentries_assettags TO AssetEntries_AssetTags;
RENAME TABLE assetentry TO AssetEntry;
04-Nov-2019 12:06:59.000 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Framework Event Dispatcher: Equinox Container: e743df6a-d310-496b-9895-8268e33fb53f] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)
04-Nov-2019 12:06:59.001 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Refresh Thread: Equinox Container: e743df6a-d310-496b-9895-8268e33fb53f] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Obje
@dnebing
dnebing / rest-openapi.yaml
Created September 3, 2019 15:28
This is my OpenAPI Yaml file for the Headless Vitamins API.
components:
schemas:
Vitamin:
description: Contains all of the data for a single vitamin or mineral.
properties:
name:
description: The vitamin or mineral name.
type: string
id:
description: The vitamin or mineral internal ID.
name=UHGPortlets
module-group-id=CHPortlets
module-incremental-version=1
short-description=IHR Portlets
change-log=Adapted to the latest version of Liferay
page-url=http://ihr.uhg.com
author=UHG, Inc.
licenses=CHIHR
liferay-versions=7.1.0+
@dnebing
dnebing / chportlets.log
Created July 10, 2019 15:27
Failure to load...
2019-07-10 15:02:57.410 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:261] Processing CHPortlets.war
2019-07-10 15:03:05.352 INFO [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][BaseAutoDeployListener:43] Copying portlets for /Users/dnebinger/liferay/71ee/bundle/tomcat-9.0.6/temp/20190710150305329VPNFBPNZ/CHPortlets.war
2019-07-10 15:03:05.473 INFO [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][BaseDeployer:877] Deploying CHPortlets.war
2019-07-10 15:03:06.527 INFO [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][BaseAutoDeployListener:50] Portlets for /Users/dnebinger/liferay/71ee/bundle/tomcat-9.0.6/temp/20190710150305329VPNFBPNZ/CHPortlets.war copied successfully
2019-07-10 15:03:08.802 ERROR [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][org_apache_felix_fileinstall:97] Error while starting bundle: webbundle:/Users/dnebinger/liferay/71ee/bundle/osgi/war/CHPortlets.war?Bundle-SymbolicName=CHPortlets&Web-ContextPath=/CHPortl
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
******************** DYNAMIC ***************************************
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
******************** DYNAMIC ***************************************
ajp-nio-8009-exec-57 - priority:5 - threadId:0x00007fcbb0be0830 - nativeId:0x1cba0 - nativeId (decimal):117664 - state:RUNNABLE
stackTrace:
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1983)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6494)
- locked <0x000000068515c8c0> (a com.microsoft.sqlserver.jdbc.TDSReader)
@dnebing
dnebing / touch.groovy
Last active December 6, 2018 23:20
Touch script for both basic and advanced filesystem stores.
import com.liferay.portal.kernel.service.GroupLocalServiceUtil
import com.liferay.portal.kernel.util.PortalUtil
import com.liferay.document.library.kernel.exception.NoSuchFileException
import com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil;
import com.liferay.document.library.kernel.service.DLFolderLocalServiceUtil;
import com.liferay.document.library.kernel.model.DLFileEntry;
import com.liferay.document.library.kernel.model.DLFolder;
import com.liferay.portal.kernel.util.StackTraceUtil
import java.io.File