Note that there are some explanatory texts on larger screens.

plurals
  1. POapplicationcontext.xml spring servrices from another jar
    primarykey
    data
    text
    <p>Quick question. Can you reference Spring classes in the applicationContext.xml, when they are in another jar which you webApp uses?</p> <p>The JAR (a common jar that contains all my servries and daos etc) is in the WAR file, but when I try to reference a service through the applicationContext.xml, I get the following error:-</p> <pre><code>Error creating bean with name 'com.myproject.common.test.impl.TestServiceImpl' defined in ServletContext resource [/WEB-INF/context/spring-context.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition </code></pre> <p>(Note spring-context.xml is imported into the applicationContext.xml without error.)</p> <p>My context XML:</p> <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt; &lt;bean id="com.myproject.common.test.impl.TestServiceImpl"&gt; &lt;property name="genericDao" ref="genericDao" /&gt; &lt;/bean&gt; &lt;/beans&gt; </code></pre> <p>My App packages are all under com.myproject.web My common JARS all under com.myproect.common</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload