Jason- where is hibernate.properties? did you grant access for catalina to read hibernate.properties in this location?
Martin ----- Original Message ----- Wrom: BLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMY To: <axis-user@ws.apache.org> Sent: Wednesday, October 17, 2007 9:07 AM Subject: RE: IllegalAccessError I tried your suggestion but I still get the same error. Note that class in the stacktrace HibernateUtil is my utility class to initialize a hibernate session. It lives in a jar under my aar/lib dir. The hibernate classes all live in jars under axis2/WEB-INF/lib. Is that a problem ? java.lang.IllegalAccessError: tried to access method org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/ut il/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava /util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/ Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/Map;Ljava/u til/Map;)V from class org.hibernate.cfg.ExtendedMappings at org.hibernate.cfg.ExtendedMappings.<init>(ExtendedMappings.java:65) at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(Annotat ionConfiguration.java:175) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationCo nfiguration.java:263) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1 283) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(Annotation Configuration.java:915) at com.bae.nedc.wfnp.util.HibernateUtil.<clinit>(HibernateUtil.java:26) at com.bae.nedc.wfnp.configuration.WFNPConfiguration.catalogConfigExists(WF NPConfiguration.java:79) at com.bae.nedc.wfnp.configuration.WFNPConfiguration.getConfig(WFNPConfigur ation.java:56) at com.bae.nedc.wfnp.configuration.WFNPConfiguration.getStagingPath(WFNPCon figuration.java:172) at com.bae.nedc.wfnp.create.HoldingManager.<init>(HoldingManager.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA ccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons tructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:84) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:60) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.in stantiate(SimpleInstantiationStrategy.java:52) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:640) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:626) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBean(AbstractAutowireCapableBeanFactory.java:381) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec t(AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g etSingleton(DefaultSingletonBeanRegistry.java:140) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:156) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.re solveReference(BeanDefinitionValueResolver.java:248) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.re solveValueIfNecessary(BeanDefinitionValueResolver.java:128) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.populateBean(AbstractAutowireCapableBeanFactory.java:740) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBean(AbstractAutowireCapableBeanFactory.java:417) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec t(AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g etSingleton(DefaultSingletonBeanRegistry.java:140) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:156) at org.springframework.beans.factory.support.DefaultListableBeanFactory.pre InstantiateSingletons(DefaultListableBeanFactory.java:273) at org.springframework.context.support.AbstractApplicationContext.refresh(A bstractApplicationContext.java:346) at wfnp.SpringInit.startUp(SpringInit.java:23) at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(Ser viceBuilder.java:469) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilde r.java:184) at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(Ser viceGroupBuilder.java:101) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr oup(ArchiveReader.java:103) at org.apache.axis2.deployment.repository.util.ArchiveReader.processService Group(ArchiveReader.java:172) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java: 78) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(De ploymentFileData.java:137) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.j ava:571) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList java:141) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener java:318) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryL istener.java:220) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngi ne.java:118) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBas edAxisConfigurator.java:272) at org.apache.axis2.context.ConfigurationContextFactory.createConfiguration Context(ConfigurationContextFactory.java:78) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServle t.java:500) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:1139) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3956) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31 1) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) -----Original Message----- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 18, 2000 8:55 AM To: axis-user@ws.apache.org Subject: Re: IllegalAccessError Jason- This means the (catalina) container is not allowing access to the hibernate code try granting the necessary permissions in $CATALINA_HOME/conf/catalina.policy e.g. grant codeBase "file:${catalina.home}/webapps/axis2/WEB-INF/LIB/-" { permission java.lang.RuntimePermission "accessClassInPackage.org.hibernate.*"; }; HTH/ Martin-- ----- Original Message ----- From: "Kahler, Jason J (US SSA)" <[EMAIL PROTECTED]> To: <axis-user@ws.apache.org> Sent: Wednesday, October 17, 2007 8:12 AM Subject: IllegalAccessError So I am very close to getting my Web Service ported to Axis2. I am using hibernate so I put the hibernate jars under axis2/WEB-INF/lib As well as a jar with my mapping files. When the jar with mapping files was in The aar my hibernate session loading code couldn't find them. Now that the jar w/ mapping files is under WEB-INF Lib it finds them, but I get an IllegalAccessError Caused by: java.lang.IllegalAccessError: tried to access method org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/ut il/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava /util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/ Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/Map;Ljava/u til/Map;)V from class org.hibernate.cfg.ExtendedMappings at org.hibernate.cfg.ExtendedMappings.<init>(ExtendedMappings.java:65) at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(Annotat ionConfiguration.java:175) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationCo nfiguration.java:263) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1 283) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(Annotation Configuration.java:915) at com.bae.nedc.wfnp.util.HibernateUtil.<clinit>(HibernateUtil.java:26) Do I need to do something with security settings or something ? Thanks; Jay --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]