Announcement Announcement Module
Collapse
No announcement yet.
Startup problem (using the "expenses" sample + GWT setup) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Startup problem (using the "expenses" sample + GWT setup)

    Hello,

    I am having a problem with the "expenses" sample Roo app. When it starts up, it throws the following error:

    Code:
    java.lang.IllegalAccessException: Class org.hibernate.cfg.Configuration can not access a member of class org.hibernate.cfg.beanvalidation.TypeSafeActivator with modifiers "public static"
    	at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
    	at com.google.appengine.tools.development.agent.runtime.Runtime$22.run(Runtime.java:446)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at com.google.appengine.tools.development.agent.runtime.Runtime.checkAccess(Runtime.java:444)
    	at com.google.appengine.tools.development.agent.runtime.Runtime.checkAccess(Runtime.java:438)
    	at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:96)
    	at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:118)
    	at org.hibernate.cfg.Configuration.applyBeanValidationConstraintsOnDDL(Configuration.java:1674)
    	at org.hibernate.cfg.Configuration.applyConstraintsToDDL(Configuration.java:1624)
    	at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1415)
    	at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1345)
    	at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1477)
    	at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193)
    	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1096)
    	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:685)
    	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
    	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
    	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$5.run(AbstractAutowireCapableBeanFactory.java:1467)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1465)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
    	at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    	at org.mortbay.jetty.Server.doStart(Server.java:224)
    	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    	at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)
    	at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:149)
    	at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
    	at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:119)
    	at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:494)
    	at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1058)
    	at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:800)
    	at com.google.gwt.dev.DevMode.main(DevMode.java:304)
    I am using Spring Tool Suite 2.6.0 + Google Plugin 2.2.1. As SDK I am using: GWT 2.2.0 and AppEngine 1.4.0.

    I saw a post regarding this kind of error here https://forum.hibernate.org/viewtopi...f=26&t=1005829 but the cause seems to be unknown.

    Any ideas?

    Thank you in advance,
    Cristian.

  • #2
    After some debug, I have noticed the following. In BeanValidationActivator, line 118 (82 as well), in method applyDDL(), the following line fails:

    Code:
    applyDDL.invoke( null, persistentClasses, properties );
    because
    applyDDL.isAccessible()
    returns false.

    I don't understand why this happens (I mean it is a public method). May it be caused by the appengine SDK? I don't know if it alters the default class loading and/or reflection logic of the Sun JRE.

    Comment


    • #3
      appengine

      I got the similar problem. I got the same Hibernate call works in none Google App engine environment such as Tomcat but got this access error when use Google appengine. I am afraid the appengine did further check. I wonder how to disable this check.

      And it looks Hibernate community need note the problem and modify their code and make sure Hibernate can adapt to appengine environment.

      Comment

      Working...
      X