Showing posts with label annotation. Show all posts
Showing posts with label annotation. Show all posts

May 4, 2014

How to expose spring ehcache 2.8.2 to jmx

In this version ehcache statistics is enabled by default.

I am using ehcache as spring cache.

it's easy

find the place where you define your config
like 'net.sf.ehcache.config.Configuration config = new net.sf.ehcache.config.Configuration()'

in my case i use annotations therefore i got this line in the code, in your case, maybe defined as bean inside the xml .

add the following :
      'config.setMonitoring(net.sf.ehcache.config.Configuration.Monitoring.ON.name());'

Yeah i wondered too why it's not possible to give the enum only .. maybe in the next version... '

Worked for me .
Dor

Jan 6, 2011

java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter

I got this error while using maven, jetty, wicket, spring and hibernate all with annotations.
Found two solutions
1) Get the java assist jar using maven, but them i got into some other problems.

2) Use this :

 <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
  </dependency>
It seems that it solved the issue since the jaxrs contains this method filter.

If you know other or better solution, i am here to listen.

Hoped it helped,
Dor

Nov 23, 2010

Fail to convert to internal representation

Hi,
Once it happened to me, you figure out what's wrong, write it down for just in case.
Then it happens to your friend.
It means that one of the types defined in your hibernate hbm file or annotated is wrong.
For example if you need to represent in your hbm file a boolean as the primitive type or it's appropriate wrapper, you may use "yes_no" as the type.
Dor