Skip to content

Instantly share code, notes, and snippets.

View kuntapong's full-sized avatar

Kuntapong Nitiworanan kuntapong

View GitHub Profile
@kuntapong
kuntapong / JSON-API.json
Created October 8, 2015 08:33
JSON-API
{
"data": [{
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON API paints my bikeshed!"
},
"links": {
"self": "http://example.com/articles/1"
},
{
"data": [{
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON API paints my bikeshed!"
},
"links": {
"self": "http://example.com/articles/1"
},
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apiPublicationManager' defined in class path resource [META-INF/apiproperties-applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public no.api.properties.api.ApiPublicationManager no.api.properties.api.spring.ApiPublicationsServiceLocator.createPublicationManager() throws no.api.properties.api.ApiPublicationException] threw exception; nested exception is java.lang.RuntimeException: Already have an value in the map for unknown = Publication{name='live.sandnesposten.no', id=-4, wwwDomain='live.sandnesposten.no', mobDomain='', nedstatCode='unknown', displayName='', cms='-', escenicFlag=0, medusaFlag=0, ece5PublicationName=null, ece5BackendKey=null, ece5AcpPubKey=0}
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ~[spring-beans-3.0.6.RELEASE.jar:3.
@kuntapong
kuntapong / gist:0179da0be1b092b7789b
Created August 8, 2014 06:47
Semimeter problem when request with specific article in String
13:45:27 [DEBUG] [app=mittari-0.23-SNAPSHOT] [no.api.mittari.service.MittariService][getOrderedResults][68] - maxArticles: 10, resolution: total, endAt: 1407480307016, startAt: 0, publicationId: www.tangotidende.no, sectionId: _
13:45:29 [ERROR] [app=mittari-0.23-SNAPSHOT] [org.semispace.semimeter.space.listener.SpacePQListener][retrieveAndTreatData][82] - invalid query parameter
java.lang.NumberFormatException: For input string: "www.tangotidende.no"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_11]
at java.lang.Integer.parseInt(Integer.java:580) ~[na:1.8.0_11]
at java.lang.Integer.valueOf(Integer.java:766) ~[na:1.8.0_11]
at org.semispace.semimeter.dao.mongo.SemiMeterDaoMongo.getGroupedSums(SemiMeterDaoMongo.java:189) ~[semimeter-web-0.19.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_11]
@kuntapong
kuntapong / gist:0800f740ac7f6328b9f3
Created August 6, 2014 08:38
Semimeter Exception when request using /c/article/www.tangotidende.no/sectionId/5-30001-46.gif
Exception in thread "pool-2-thread-14" java.lang.NumberFormatException: For input string: "5-30001-46"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at org.semispace.semimeter.dao.mongo.SemiMeterDaoMongo.performInsertion(SemiMeterDaoMongo.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)