- This topic has 3 replies, 2 voices, and was last updated 14 years, 10 months ago by support-shalini.
-
AuthorPosts
-
amir55Participanthi dear all
1 – //used to be ok in previous versions to version 8
ApplicationContext applicationContext = new FileSystemXmlApplicationContext(new String (“src/applicationContext.xml”));error
javax.servlet.ServletException: javax.faces.FacesException: Cant instantiate class: component1.ItemHandler.. IOException parsing XML document from file [D:\JBoss_GR\jboss-4.2.2.GA\bin\src\applicationContext.xml]; nested exception is java.io.FileNotFoundException: src\applicationContext.xml (The system cannot find the path specified)2 – how to access in jave code the springDAOManager in next applicationContext.xml
<beans>
<bean id=”husbandDAOService” class=”org.springframework.transaction.interceptor.TransactionProxyFactoryBean”>
<property name=”transactionManager”><ref bean=”transactionManager”/></property>
<property name=”proxyTargetClass”><value>true</value></property><property name=”transactionAttributes”></property>
<property name=”target”><ref local=”springDAOManager”/></property></bean></beans>
I tried next but not working for mismatch
SpringDAOManager springDAOManager = (SpringDAOManager)applicationContext.getBean(“husbandDAOService”); // not ok
Amir
support-shaliniMemberAmir,
Can explain in detail what exactly you are trying to do?used to be ok in previous versions to version 8
Are you working on a project that is imported from an earlier version of MyEclipse?
Also, can you list out the steps to replicate the above issue?
amir55Participanthi dear
1 – yes I use the projects from earlier versions
2 – I just try to re run those projects on version 8.
3 – I started with the jsf spring hibernte. I used to get the applicationContext.xml successfuly but now error thrown
ApplicationContext applicationContext = new FileSystemXmlApplicationContext(new String (“src/applicationContext.xml”));
error
error
javax.servlet.ServletException: javax.faces.FacesException: Cant instantiate class: component1.ItemHandler.. IOException parsing XML document from file [D:\JBoss_GR\jboss-4.2.2.GA\bin\src\applicationContext.xml]; nested exception is java.io.FileNotFoundException: src\applicationContext.xml (The system cannot find the path specified)4 – more important spring question is
Hhow to access in jave code the springDAOManager in next applicationContext.xml
<beans>
<bean id=”husbandDAOService” class=”org.springframework.transaction.interceptor.TransactionProxyFactoryBean”>
<property name=”transactionManager”><ref bean=”transactionManager”/></property>
<property name=”proxyTargetClass”><value>true</value></property><property name=”transactionAttributes”></property>
<property name=”target”><ref local=”springDAOManager”/></property></bean></beans>
I tried next but not working for mismatch. srurely it is as
a – SpringDAOManager is not husbandDAOService
b – husbandDAOService has no corrispondent bean. so how to do that thankfullySpringDAOManager springDAOManager = (SpringDAOManager)applicationContext.getBean(“husbandDAOService”); // not ok
Amir
support-shaliniMemberAmir,
Can you try using absolute path for FileSystemXmlApplicationContext?
Please refer to the following link –
http://www.coderanch.com/forums/posts/watch/0/476364 -
AuthorPosts