Skip to content

Instantly share code, notes, and snippets.

View olivermt's full-sized avatar

Oliver Severin Mulelid-Tynes olivermt

  • AMOI / OMT Tech AS
  • Hamar, Norway
  • 05:44 (UTC +01:00)
View GitHub Profile
properties {
minEvictableIdleTimeMillis=1800000
timeBetweenEvictionRunsMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery="SELECT 1"
}
@olivermt
olivermt / gist:1418088
Created December 1, 2011 16:43
Grails startup mongoDB error
| Error 2011-12-01 17:37:35,282 [Thread-16] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'mongoDatastore': Cannot resolve reference to bean 'mongoMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoMappingContext': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
Message: Error creating bean with name 'mongoDatastore': Cannot resolve reference to bean 'mongoMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoMappingContext': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
Line | Method
->> 100 | postProcessBeanFactory in org.grails.datastore.gorm.plugin.support.PersistenceContextInterceptorAggregator
- - - - - - - -
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 21 + '-chart',
defaultSeriesType: 'scatter',
zoomType: 'xy'
},
title:{
text: 'Scatter plot - width vs thickness'
<html>
<head>
</head>
<body>
<img src="/bildefilen"/>
</body>
</html>
2012-02-17 16:25:06,342 [ajp-bio-8009-exec-10] ERROR errors.GrailsExceptionResolver - MySQLIntegrityConstraintViolationException occurred when processing request: [POST] /standard/doEditEnum/1
Duplicate entry 'OutcropLithologyKind' for key 'name'. Stacktrace follows:
org.springframework.dao.DataIntegrityViolationException: could not update: [no.cipr.safari.standard.StandardEnum#1]; SQL [update standard_enum set version=?, description=?, name=?, standard_version_id=? where id=? and version=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not update: [no.cipr.safari.standard.StandardEnum#1]
def doAddEntity() {
withStandard { StandardVersion standard ->
StandardEntity entity = new StandardEntity()
entity.initialPopulation(params.entity.name, params.entity.description, params.list("attribute.name"), params.list("attribute.description"), params.list("attribute.required"), params.list("attribute.dataType"), standard)
if (entity.validate()) {
entity.save(flush: true)
entity.updateEntityChildren(params.list('standardEntity.id'), params.list('standardEntity.required'), params.list('standardEntity.plurality'))
entity.updateEnumChildren(params.list('standardEnum.id'), params.list('standardEnum.required'),)
redirect(action: "showEntity", id: entity.id)
/**
* Enumeration of modern system outcrop types
* @author Oliver Severin Tynes, Uni CIPR
*
*/
enum ModernSystemKindEnum {
FLUVIAL_SYSTEM('fluvial system'),
CLASTIC_SHORELINE('clastic shoreline'),
DESERT('desert'),
cipr064245:subway oliver$ node subway
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module './build/Release/bcrypt_lib'
<?php
class gPDO{
public static function init(){
$GLOBALS['gPDO'] = array();
$GLOBALS['gPDO']['server'] = 'localhost';
$GLOBALS['gPDO']['user'] = '';
$GLOBALS['gPDO']['password'] = '';
$GLOBALS['gPDO']['db'] = '';
$GLOBALS['gPDO']['charset'] = 'UTF-8';
}
void parseXML(xml) {
//println "Now parsing ${this.class.name}"
name = xml.name
println "Now parsing ${name}"
site = xml.site
setCountry(xml.country.text())
region = xml.region
if(!xml.dateStartCollection.isEmpty()){
dateStartCollection = new Date().parse("yyyy-MM-dd", xml.dateStartCollection.text())