java.lang.IllegalAccessException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Reflection access rules
    via by Ernest Friedman-Hill,
  • Reflection access rules
    via by Maulin Vasavada,
  • Chapter 2. The JBoss JMX Microkernel
    via by Unknown author,
  • Chapter 2. The JBoss JMX Microkernel
    via by Unknown author,
  • Chapter 2. The JBoss JMX Microkernel
    via by Unknown author,
  • Chapter 2. The JBoss JMX Microkernel
    via by Unknown author,
  • I'm trying to wire up an application using netty 1.5.0(http://gleamynode.net/dev/projects/netty2) and getting an exception when I put the following bean in my application context xml file: <bean id="eventDispatcher" class="net.gleamynode.netty2.OrderedEventDispatcher" init-method="start"> <property name="threadPoolSize"> <value>1</value> </property> </bean> The exception I get is: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventDispatcher' defined in file [V:\dev\projects\sumup\config\serverContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.MethodInvocationException: Property 'threadPoolSize' threw exception; nested exception is java.lang.IllegalAccessException: Class org.springframework.beans.BeanWrapperImpl can not access a member of class net.gleamynode.netty2.AbstractThreadPooledEventDispatcher with modifiers "public synchronized"] PropertyAccessExceptionsException (1 errors) org.springframework.beans.MethodInvocationException: Property 'threadPoolSize' threw exception; nested exception is java.lang.IllegalAccessException: Class org.springframework.beans.BeanWrapperImpl can not access a member of class net.gleamynode.netty2.AbstractThreadPooledEventDispatcher with modifiers "public synchronized" java.lang.IllegalAccessException: Class org.springframework.beans.BeanWrapperImpl can not access a member of class net.gleamynode.netty2.AbstractThreadPooledEventDispatcher with modifiers "public synchronized" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57) at java.lang.reflect.Method.invoke(Method.java:317) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:718) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:624) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:755) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:782) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:771) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:763) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:604) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:267) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:209) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:279) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:83) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:68) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:59) at com.baesystems.etss.etpg.listener.Server.main(Server.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) This was working with netty 1.4.0. The only difference that I can see is that the method setThreadPoolSize has been moved to an abstract base class.
    via by Michael Brown,
    • java.lang.IllegalAccessException: Class pack2.Other can not access a member of class pack1.Base with modifiers "public" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57) at java.lang.reflect.Method.invoke(Method.java:317) at pack2.Other.main(Other.java:10)

    Users with the same issue

    Handemelindo
    8 times, last one,
    musketyr
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    34 more bugmates