Results 1 to 4 of 4

Thread: org.springframework.beans.FatalBeanException: Could not instantiate class

  1. #1
    Join Date
    Jul 2010
    Posts
    6

    Unhappy org.springframework.beans.FatalBeanException: Could not instantiate class

    I am experiencing a strange error with Spring as following:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'securityServiceTarget' defined in class path resource [serviceContext.xml]: Can't resolve reference to bean 'userAccessServiceTarget' while setting property 'userAccessService'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'serviceBeforeAdvisorGos' defined in class path resource [serviceContext.xml]: Can't resolve reference to bean 'serviceMethodBeforeAdviceGos' while setting property 'advice'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'serviceMethodBeforeAdviceGos' defined in class path resource [serviceContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [com.xx.xxx.service.ServiceMethodBeforeAdviceGos]; constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/xx/xxx/service/security/EditRightsValidatorFactory

    It's very strange because EditRightsValidatorFactory.java does exist in the package of com.xx.xxx.service.security, and is a Singleton class.

    I am new with Spring. Please help. Thanks a lot in advance.

    Winifred

  2. #2
    Join Date
    May 2010
    Posts
    6

    Default

    Your setters are not available. Send context.xml and bean file.

  3. #3
    Join Date
    Jul 2010
    Posts
    6

    Default java.lang.ExceptionInInitializerError: null

    Thanks for reply. I have created a setter in the bean class, and that error is gone. Now I am experiencing another error, java.lang.ExceptionInInitializerError: null

    org.springframework.beans.FatalBeanException: Could not instantiate class [com.xx.yyy.service.zz.impl.ZzzzzzzTypeCurrDenLoade rImpl]; constructor threw exception; nested exception is java.lang.ExceptionInInitializerError: null
    java.lang.ExceptionInInitializerError

    How do I fix this error? Thanks a lot.

    Winifred

  4. #4
    Join Date
    Jul 2010
    Posts
    6

    Default

    This has been fixed as well. I have added setter in the bean, then the error is gone.

    Thanks again.

    Winifred

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •