bennidi / mbassador

Powerful event-bus optimized for high throughput in multi-threaded applications. Features: Sync and Async event publication, weak/strong references, event filtering, annotation driven
MIT License
955 stars 146 forks source link

How to avoid : "java.lang.reflect.InvocationTargetException There might be an access rights problem. ...'" #160

Closed Gerry33 closed 5 years ago

Gerry33 commented 5 years ago

Hi there and thanks for this nice lib. I've problem where I'm stuck. On sending I get this error message:

cause=java.lang.reflect.InvocationTargetException
    message='Error during invocation of message handler. There might be an access rights problem. Do you use non public inner classes?'
    handler=public void com.... eventBusReceived_Reader(....Reader4GUI)
    listener=...ui.MainView@d4e920
    publishedMessage=...Reader4GUI@7c18b07b}

I use inner classes for the object transferred on the bus, but they are all declared as public as far as I can see the object hierarachy. Any hint is welcome ! Thanks Gerry

Gerry33 commented 5 years ago

Found the problem: The error message is misleading, it has nothing to do with public or inner classes. The problem was an unset enum- value. Once initialised and everything is fine.

Hopefully it may help someone.

Gerry