Skip to content

Instantly share code, notes, and snippets.

07:28:50.930 [tomcat-http--4] ERROR o.s.d.r.w.RepositoryRestController - Could not create an instance of Machine from input.
org.springframework.http.converter.HttpMessageNotReadableException: Could not create an instance of Machine from input.
at org.springframework.data.rest.webmvc.RepositoryRestController.createOrUpdate(RepositoryRestController.java:887) ~[spring-data-rest-webmvc-1.0.0.BUILD-SNAPSHOT.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_01]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_01]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_01]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_01]
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213) ~[spring-web-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.j
MediaType acceptType = config.getDefaultMediaType();
HttpMessageConverter converter = findWriteConverter(resource.getClass(), acceptType);
// If an Accept header is specified that isn't the catch-all, try and find a converter for it.
if(null == converter) {
for(MediaType mt : request.getHeaders().getAccept()) {
if(MediaType.ALL.equals(mt)) {
continue;
}
ServiceType ist die Basis
ServiceType
Pro ServiceType gibt es verschiedene Statistiken
Statisken
(servicetype_id)
Auf Basis des ServiceTypes kann man Metriken zum Monitoren entwickeln
@jhiemer
jhiemer / main.js
Last active December 12, 2015 06:39
Testacular Configuration for AngularJS in usage with require.js
'use strict';
require.config({
paths: {
underscore: '../libs/underscore/underscore',
angular: '../libs/angular/angular.min',
angularResource: '../libs/angular/angular-resource.min',
angularCookies: '../libs/angular/angular-cookies.min',
text: '../libs/require/text',
moment: '../libs/moment/moment.min',
@jhiemer
jhiemer / homeController.js
Last active December 13, 2015 23:49
Testing Controller and Services with require.js and Angular
/**
* HomeController
**/
define(function () {
'use strict';
function HomeController($scope, homeService) {
$scope.variable = 'empty';
$scope.initUser = function(id) {
$scope.user = {};
if (id !== undefined) {
$scope.user = user.get();
} else {
$scope.user = {};
$scope.user.addresses = [];
$scope.user.addresses.push({});
}
}
/**
* CustomerController
**/
define(function () {
'use strict';
function CustomerController($scope, customerService, userService,
addressService, credentialService, responseService, customer) {
@jhiemer
jhiemer / event.java
Last active December 14, 2015 06:58
@Override
public void handleEvent(final Event event) throws OperationsException {
Object object = configurationTargetRepository
.findOne(event.getStateChangingEntity());
Object objectOrigin = searchInOriginalDatabase(event);
createAndSaveEvent(event, object);
package org.springframework.data.rest.webmvc;
import static java.util.Collections.*;
import static org.springframework.data.rest.repository.support.ResourceMappingUtils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.ConversionService;
import org.springframework.data.repository.support.DomainClassConverter;
import org.springframework.data.repository.support.Repositories;
import org.springframework.data.rest.config.RepositoryRestConfiguration;
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->