Skip to content

Instantly share code, notes, and snippets.

@rafarocha
rafarocha / error.project.similar.mongodb-music
Created September 3, 2011 12:34
error when run project with 'CrudRepository' and 'QueryDslPredicateExecutor'
23:57:52,652 ERROR ramework.test.context.TestContextManager: 324 - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@3bc486f2] to prepare test instance [com.bisai.common.repository.QuestionRepositoryTest@63779885]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.bisai.common.repository.QuestionRepositoryTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.bisai.server.repository.QuestionRepository com.bisai.common.repository.QuestionRepositoryTest.questionRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.bisai.server.repository.QuestionRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframew
@rafarocha
rafarocha / Main.java
Created September 27, 2011 23:53
Problem on FastJSON when generate no public classes and no methods getters and setters
import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.JSON;
public class Main {
public static void main(String[] args) {
Structure structure = new Structure();
List<Group> groups = new ArrayList<Group>();
@rafarocha
rafarocha / draw_image_canvas.cpp
Created November 19, 2011 03:34
preview sample image on canvas
Image* pImage = new Image();
pImage->Construct();
Rectangle rect(FORM_X, FORM_Y, FORM_WIDTH, FORM_HEIGHT);
Bitmap* pBitmap = pImage->DecodeN(L"/Res/bada.jpg", BITMAP_PIXEL_FORMAT_RGB565, 50, 50 );
r = __pOverlayCanvas -> DrawBitmap(rect, *pBitmap);
if (IsFailed(r)){
AppLog("nao carregou imagem");
}
120120 16:14:06 [Warning] Can't create test file /usr/local/mysql-5.6.4-m7-osx10.6-x86_64/data/rafarocha.lower-test
120120 16:14:06 [Warning] Can't create test file /usr/local/mysql-5.6.4-m7-osx10.6-x86_64/data/rafarocha.lower-test
120120 16:14:06 [Note] Plugin 'FEDERATED' is disabled.
./mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
120120 16:14:06 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120120 16:14:06 InnoDB: The InnoDB memory heap is disabled
120120 16:14:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120120 16:14:06 InnoDB: Compressed tables use zlib 1.2.3
120120 16:14:06 InnoDB: CPU does not support crc32 instructions
120120 16:14:06 InnoDB: Initializing buffer pool, size = 128.0M
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lineRepository': Cannot resolve reference to bean 'neo4jTemplate' while setting bean property 'neo4jTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jTemplate' defined in class path resource [org/springframework/data/neo4j/aspects/config/Neo4jAspectConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public final org.springframework.data.neo4j.support.Neo4jTemplate org.springframework.data.neo4j.aspects.config.Neo4jAspectConfiguration$$EnhancerByCGLIB$$98628053.neo4jTemplate() throws java.lang.Exception] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mappingInfrastructure' defined in class path resource [org/springframework/data/neo4j/aspects/config/
package com.rafarocha.sample.domain;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.annotation.Resource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.rest.support.RestTestBase;
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
11:52:42 [main] br.com.eb.app.client.AppClient initializing - (AppClient.java:28)
11:52:42 [main] Creating one PeerId control... - (ClientNodeController.java:25)
11:52:42 [main] Removing cache files... - (JxtaNode.java:67)
27/02/2012 11:52:43 net.jxta.platform.NetworkManager configure
INFO: Loading existing configuration. mode = EDGE
11:52:43 [main] HTTP PORT: [Ljava.lang.String;@5464ea66 - (JxtaNode.java:102)
11:52:43 [main] Adding seeds... - (JxtaNode.java:109)
11:52:43 [main] HTTP SELECTED TRANSPORT MODE - (JxtaNode.java:117)
11:52:43 [main] RENDEZVOUS URL: http://127.0.0.1:9901 - (JxtaNode.java:144)
11:52:43 [main] RELAY URL: http://127.0.0.1:9901 - (JxtaNode.java:181)
11:51:58 [main] Removing cache files... - (JxtaNode.java:67)
27/02/2012 11:51:58 net.jxta.platform.NetworkManager configure
INFO: Loading existing configuration. mode = EDGE
11:51:58 [main] HTTP PORT: [Ljava.lang.String;@9c0ec97 - (JxtaNode.java:102)
11:51:58 [main] Adding seeds... - (JxtaNode.java:109)
11:51:58 [main] HTTP SELECTED TRANSPORT MODE - (JxtaNode.java:117)
11:51:58 [main] RENDEZVOUS URL: http://127.0.0.1:9901 - (JxtaNode.java:144)
11:51:58 [main] RELAY URL: http://127.0.0.1:9901 - (JxtaNode.java:181)
27/02/2012 11:51:58 net.jxta.platform.NetworkManager startNetwork
INFO: Starting JXTA Network! MODE = EDGE, HOME = file:/Users/rafaelrocha/Documents/workspace/ustore/p2p_proxy/.cache%5C/ProxyService/
11:49:48 [main] Removing cache files... - (JxtaNode.java:67)
27/02/2012 11:49:48 net.jxta.platform.NetworkManager configure
INFO: Loading existing configuration. mode = EDGE
11:49:48 [main] HTTP PORT: [Ljava.lang.String;@5975d6ab - (JxtaNode.java:102)
11:49:48 [main] Adding seeds... - (JxtaNode.java:109)
11:49:48 [main] HTTP SELECTED TRANSPORT MODE - (JxtaNode.java:117)
11:49:48 [main] RENDEZVOUS URL: http://127.0.0.1:9901 - (JxtaNode.java:144)
11:49:48 [main] RELAY URL: http://127.0.0.1:9901 - (JxtaNode.java:181)
27/02/2012 11:49:48 net.jxta.platform.NetworkManager startNetwork
INFO: Starting JXTA Network! MODE = EDGE, HOME = file:/Users/rafaelrocha/Documents/workspace/ustore/p2p_server/.cache%5C/manager/