This week's book giveaway is in the Open Source Projects forum.
We're giving away four copies of Eclipse Collections Categorically: Level up your programming game and have Donald Raab on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Illegal Access Exception

 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to deploy my app on JBOSS.


My ear file contains a jar file which contains the class QAProWebSearch ( this is a public class).

My EJB tries to instantiate this class via another class B8FlexSearch using class.Forname.

I am getting exception like following. If I just change the name of the class to QAProWebSearchTest (or for that matter make it QAProwebsearch) then I do not get any error at all. Any other classes in the same package also work fine and get instantiated.

What could be the problem?
Is there any I can get a look at how JBOSS class loader is loading the classes?

Any help is appreciated.
=======================================

10:06:39,984 INFO [STDOUT] exception occured = java.lang.IllegalAccessException: com.blue8compass.flexsearch.secondarysearch.qaproweb.QAPro

WebSearch

10:06:39,984 INFO [STDOUT] exception occured message = com.blue8compass.flexsearch.secondarysearch.qaproweb.QAProWebSearch

10:06:39,984 ERROR [STDERR] java.lang.IllegalAccessException: com.blue8compass.flexsearch.secondarysearch.qaproweb.QAProWebSearch

10:06:39,984 ERROR [STDERR] at java.lang.Class.newInstance0(Native Method)

10:06:39,984 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:237)

10:06:39,984 ERROR [STDERR] at com.blue8compass.flexsearch.B8FlexibleSearch.secondarySearch(B8FlexibleSearch.java:506)

10:06:39,984 ERROR [STDERR] at com.blue8compass.flexsearch.B8FlexibleSearch.search(B8FlexibleSearch.java:456)

10:06:39,984 ERROR [STDERR] at com.blue8compass.flexsearch.B8AddrFlexibleSearchBean.search(B8AddrFlexibleSearchBean.java:67)

10:06:39,984 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)

10:06:39,984 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:

185)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java

:72)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)

10:06:39,984 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:700)

10:06:39,984 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)

10:06:39,984 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

10:06:39,984 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)

10:06:39,984 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)

10:06:39,984 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java


.............
========================================
 
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic