• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

War not deploying to JBoss 6 in Eclipse

 
Jack Maloney
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've inherited a project and im trying to get it working in JBoss in Eclipse. It works fine when deploying outside of Eclipse but its abit of a pain to keep doing a maven build, moving the WAR files to the relevent JBoss directory and then doing a redeploy every time I change anything. So im trying to set it up in Eclipse. I downloaded a helloworld app which works. As soon as I try with my app I get this error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blockedFoldersHibernateDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.redbeemedia.nips.dao.hibernate.GenericDaoHibernateImpl.setSessionFactory(org.hibernate.SessionFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring/persistence-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: jdbc not bound
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: jdbc not bound
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)

Does anyone know what this means and how to resolve? Why does it only happen inside of Eclipse and not when I deploy it outside?

Thanks,

 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post your code. Did you google for your exception, may be check if this helps.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect that the datasource hasn't been configured in the JBoss AS being run by Eclipse. You might have to deploy the *-ds.xml file for your datasource manually.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic