@PostConstruct annotation supported?


at the moment I am trying to load an instance of a java class which uses
the @PostConstruct annotation.
I am getting a NullPointerException when I try to call a method where an
object is referenced which is called in the annotated (@PostConstruct)

Short example:


public class MyJavaClass {

MyType mt;

void init() {
    mt = new MyType("aString");

public String getAllDescriptions() {
    return mt.findAllOfAnything();


…(jar loading etc.)
obj = MyJavaClass.new

–> NativeException: java.lang.NullPointerException: null
from … class name:line:in ‘getAllDescriptions’

Do I have to treat these classes in a special way?

thanks & kind regards,

To unsubscribe from this list, please visit:


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs