Win a copy of Head First Android this week in the Android forum!

Jack Maloney

Greenhorn
+ Follow
since Nov 23, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jack Maloney

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,

Hi,

I wonder if anyone can help me. Im brand new to HQL and am struggling a little. Basically I need to write a simple query that selects all values based on a foreign key(pattern_group_id) and store these in a list.

This is what I have so far:

List<String> patternByGroupList = sessionFactory.getCurrentSession()
.createQuery("SELECT * FROM PATTERN p WHERE pattern_group_id = :id")
.setParameter("id", groupName)
.setCacheable(true)
.list();

which is wrong. I need to write it so that it does a sub query within to select the pattern_group_id based on whatever the groupname (which is a String parameter) is. Can anyone point me in the right direction?

Thanks,