java.lang.IllegalStateException: CodeVersion not yet ready.

Google Groups | Kostas Kougios | 4 years ago
  1. 0

    Re: SBT dependency error

    Google Groups | 4 years ago | Kostas Kougios
    java.lang.IllegalStateException: CodeVersion not yet ready.
  2. 0

    Exception while connecting to mongodb in spark

    Stack Overflow | 2 years ago | dima_mak
    java.lang.IllegalStateException: not ready
  3. 0

    Illegal State exception mongo-hadoop and spark

    Stack Overflow | 2 years ago | HDJ
    java.lang.IllegalStateException: not ready
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    AWS Flow Jar creation with Maven + Java 1.8

    Stack Overflow | 5 days ago | user1737986
    java.lang.IllegalStateException: not ready
  6. 0

    When a @Bean method returns an instance of a FactoryBean, Spring proxies the factory bean, redirecting calls to getObject() to applicationContext.getBean(). The relevant code reads: {code} /** * Create a subclass proxy that intercepts calls to getObject(), delegating to the current BeanFactory * instead of creating a new instance. These proxies are created only when calling a FactoryBean from * within a Bean method, allowing for proper scoping semantics even when working against the FactoryBean * instance directly. If a FactoryBean instance is fetched through the container via &-dereferencing, * it will not be proxied. This too is aligned with the way XML configuration works. */ private Object enhanceFactoryBean(Class<?> fbClass, final ConfigurableBeanFactory beanFactory, final String beanName) throws InstantiationException, IllegalAccessException { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(fbClass); enhancer.setUseFactory(false); enhancer.setNamingPolicy(SpringNamingPolicy.INSTANCE); enhancer.setCallback(new MethodInterceptor() { @Override public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable { if (method.getName().equals("getObject") && args.length == 0) { return beanFactory.getBean(beanName); } return proxy.invokeSuper(obj, args); // bug here? } }); return enhancer.create(); } {code} In the marked line, obj refers to the proxy object. Therefore, calls to methods other than getObject() are forwarded to the super implementation *on the proxy object*, which has a different state than the FactoryBean it proxies. This breaks the following usecase: {code} @Bean protected DBTool dbTool() { return new DBTool(hibernateSessionFactory()); } @Bean protected AnnotationSessionFactoryBean hibernateSessionFactory() { // hibernate setup goes here } {code} where DBTool has a method: {code} public void createSchema() { annotationSessionFactory.createDatabaseSchema(); } {code} which now throws {code} java.lang.IllegalStateException: SessionFactory not initialized yet at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.getSessionFactory( at org.springframework.orm.hibernate3.LocalSessionFactoryBean.createDatabaseSchema( at org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean$$EnhancerBySpringCGLIB$$2fba14bc.CGLIB$createDatabaseSchema$12(<generated>) at org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean$$EnhancerBySpringCGLIB$$2fba14bc$$FastClassBySpringCGLIB$$52787a0.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper( at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor$1.intercept( at org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean$$EnhancerBySpringCGLIB$$2fba14bc.createDatabaseSchema(<generated>) at {code} because the proxy object is a factory that has not been configured.

    Spring JIRA | 2 years ago | Adrian Moos
    java.lang.IllegalStateException: SessionFactory not initialized yet

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      CodeVersion not yet ready.

      at com.googlecode.scalascriptengine.ScalaScriptEngine$$anon$4.get()
    2. com.googlecode.scalascriptengine
      1. com.googlecode.scalascriptengine.ScalaScriptEngine$$anon$4.get(ScalaScriptEngine.scala:54)
      2. com.googlecode.scalascriptengine.ScalaScriptEngine.get(ScalaScriptEngine.scala:136)
      3. com.googlecode.scalascriptengine.ScalaScriptEngine$$anon$$googlecode$scalascriptengine$OnChangeRefresh$$super$get(ScalaScriptEngine.scala:323)
      4. com.googlecode.scalascriptengine.OnChangeRefresh$class.get(RefreshPolicies.scala:66)
      5. com.googlecode.scalascriptengine.ScalaScriptEngine$$anon$1.get(ScalaScriptEngine.scala:323)
      6. com.googlecode.scalascriptengine.ScalaScriptEngine.newInstance(ScalaScriptEngine.scala:154)
      6 frames
    3. org.footle.sirce
      1. org.footle.sirce.Main$.main(Sirce.scala:19)
      1 frame