• 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
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

javax.servlet.ServletException: org.springframework.beans.factory.BeanCreationException: Error creat

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys , i am having this error displayed when i run a struts/spring/hibernate app on Jboss 4.2.2 GA.


the action-servlet.xml is





The app was running fine about two days ago , there haven't been any changes to the code. I dont know if it has anything to do with a new jvm i installed the day before the app failed. The jvm is jrockit 4.0.1. Please help !!!

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But the error is occurring in a different context file, no?
 
Marcel Jacome
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David for your reply, the xml i posted is indeed from the correct file , the correct name is iess-action-servlet.xml not action-servlet.xml.
Additionally, i deployed the file in a different computer but get the same error. My IDE is Eclipse Ganymede , i even tried Galileo.
I installed jdk 1.6 last friday. Upon starting Jboss on Monday , there was this error condition about port 1099 already being used ,after solving that (by shutting down Jboss and restarting the system), this BeanCreationException took over. This really baffles me.

Thanks for your help.
 
Marcel Jacome
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I switched back to jdk 1.5 , but nothing has changed. it keeps giving me this error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/seg' defined in ServletContext resource [/WEB-INF/iess-action-servlet.xml]: Can't resolve reference to bean 'servicioFondoReserva' while setting property 'servicioFondoReserva'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servicioFondoReserva' defined in ServletContext resource [/WEB-INF/iess-application-context.xml]: Can't resolve reference to bean 'servicioFondoReservaTarget' while setting property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servicioFondoReservaTarget' defined in ServletContext resource [/WEB-INF/iess-application-context.xml]: Can't resolve reference to bean 'gestorFondosReserva' while setting property 'gestorFondosReserva'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gestorFondosReserva' defined in ServletContext resource [/WEB-INF/iess-application-context.xml]: Can't resolve reference to bean 'gestorSolicitud' while setting property 'gestorSolicitud'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gestorSolicitud' defined in ServletContext resource [/WEB-INF/iess-application-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [ec.gov.iess.gestor.fondoreserva.impl.GestorSolicitudImpl]; constructor threw exception; nested exception is java.lang.ClassCastException: $Proxy236


Has anyone had this problem before?? . It is the first time it's happened to me. I have searched all over the internet but found no solution.
Is there something i should check??
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The root of the problem would seem to be in the constructor for the GestorSolicitudImpl class. What's going on there?
 
Marcel Jacome
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark for your reply , the constructor looks like this




Thanks again.

 
Mark Secrist
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a hunch this may be where your problem is

I assume parameter passed to the getServiceBean method is a JNDI reference and you are implementing the ServiceLocator pattern to retrieve a registered service interface. It's possible that the object returned doesn't implement the 'RegistroCivilServicio' interface. Does your service locator cast the instance to that type? If so, maybe you can do an instanceof test and produce a better exception message.

I've generally found that there is a lot of 'noise' in the exception stack around the lifecycle of the bean creation that sometimes makes it difficult to locate the exact problem.
 
Marcel Jacome
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Mark , removing an attribute (duplicate="preserve") from build.xml and rebuilding solved the problem , which is weird.
 
Marcel Jacome
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem came back again , but Mark gave me a clue as to the serviceLocator pattern in the problem class. And he hit it right in the nail !!!

What i did was comment the protected variable and move the declaration inside the methods that needed it and voila.

Thank you very much Mark.


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic