Thứ Tư, 6 tháng 7, 2016

com.fasterxml.jackson.databind.JsonMappingException: could not initialize proxy - no Session



http://stackoverflow.com/a/21760361

http://stackoverflow.com/a/28179906

I search and the above links are solutions but if collection in hibernate is infinite recursion, it isn't completed solution.

Thứ Ba, 21 tháng 6, 2016

linuxbrew linux_amd64/compile: signal: killed


~/.linuxbrew/Cellar/go/1.6.2/libexec/pkg/tool/linux_amd64/compile: signal: killed

FIX: https://forum.golangbridge.org/t/go-build-exits-with-signal-killed/513/2

Copy:
It turns out that the computer ran out of memory. It takes ~1GB of RAM to build that package (!) but I only had 512 MB available. Lifting the memory limit solved the issue.



linuxbrew: Warning: "config" scripts exist outside your system or Homebrew directories



Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
    /bin/pkg-config

FIX:
https://github.com/Homebrew/legacy-homebrew/issues/17769#issuecomment-13399589

PATH=$(getconf PATH)
and re-sourcing .bash_profile
and then, remove PATH=$(getconf PATH)and re-sourcing .bash_profile

Fix: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE


Centos 7 minimal, linuxbrew

brew install git docker docker-machine docker-compose
==> Installing dependencies for git: openssl, pkg-config, curl, expat
==> Installing git dependency: openssl
/home/tung/.linuxbrew/opt/gcc/bin/gcc-5: relocation error: /home/tung/.linuxbrew/lib/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference
/home/tung/.linuxbrew/opt/gcc/bin/gcc: relocation error: /home/tung/.linuxbrew/lib/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference

brew list
binutils  gcc  glibc  gmp  gpatch

=>> FIX
run:
brew uninstall glibc
Uninstalling /home/tung/.linuxbrew/Cellar/glibc/2.19... (1,391 files, 37.5M)


Thứ Ba, 31 tháng 5, 2016

Spring Data JPA: @Query Annotation

I create simple JpaRepository with @Query Annotation.

But, it throws an exception:

Caused by: java.lang.IllegalArgumentException: Validation failed for query for method

Fix: with link http://javabeat.net/spring-data-jpa-query/
Like that, add nativeQuery = true
@Query(value = "select * from #{#entityName} b where b.name=?1", nativeQuery = true) List<Book> findByName(String name);


Thứ Ba, 3 tháng 5, 2016

Git: revert in Eclipse

Link:
http://stackoverflow.com/a/26000970

Copy from the above link:
Go to the "Syncronize" view (if you don't have it opened, it's in "Window" / "Show View"), populate the list in case it's not loaded, right click the file you want to revert and in the context menu select "Overwrite" to revert to the latest file in the Git server.
You can also check the changes you're going to discard before reverting by selecting "Open In Compare Editor" in the context menu.


Thứ Tư, 2 tháng 3, 2016

CORS

Read more at
https://github.com/cyu/rack-cors


Continous ...