KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to inject a JAXBContext into spring application context, by: <bean id="jaxbContext" class="javax.xml.bind.JAXBContext" factory-method="newInstance"> <constructor-arg type="java.lang.Class" value="com.package.MyClassName"/> </bean> It throws an exception: No matching factory method found: factory method 'newInstance' And I also try : <bean id="jaxbContext" class="javax.xml.bind.JAXBContext" factory-method="newInstance"> <constructor-arg type="java.lang.String" value="com.package"/> </bean> And It throws an an exception: javax.xml.bind.JAXBException: "com.package" doesnt contain ObjectFactory.class or jaxb.index I did put a jaxb.index file inside the package "com.package" and has a single line "MyClassName" in the file.
Tags (comma-separated)
Save Edits
Cancel