cancel
Showing results for 
Search instead for 
Did you mean: 

EAR referencing a library DC containing Spring jars

MartinHastik
Active Participant
0 Kudos

Hi,

i try to create a spring app in SAP WAS 7.0. Therefor i created a j2ee library DC in the NWDI containing the spring jars.

It is deployed to the applicatin server and i can see it in visual admin. Now i created a WAR and EAR DC referencing these external Library DC to access the spring jars(containing e.g Dispather Servlet...). In the WAR DC i created a servlet, which should make use of the Spring Dispatcher Servlet. Here i get a ServletNotFound Exeption.

When referencing other classes e.g org.springframework.util.StringUtils there is no problem. Only when accessing a servlet i get the ServletNotFound Exeption exeption.

Here is my application-j2ee-engine.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">

<application-j2ee-engine>

<reference

reference-type="hard">

<reference-target

provider-name="nwdi"

target-type="library"><b>appl/comp/j2eelib/test</b></reference-target>

</reference>

<provider-name>nwdi</provider-name>

<fail-over-enable

mode="disable"/>

</application-j2ee-engine>

Here is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>

<servlet-name>springapp</servlet-name>

<servlet-class>

<b>org.springframework.web.servlet.DispatcherServlet</b> </servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet>

<servlet-name>DispatcherServlet</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>springapp</servlet-name>

<url-pattern>*.htm</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>DispatcherServlet</servlet-name>

<url-pattern><b>ds.test</b></url-pattern>

</servlet-mapping>

<welcome-file-list>

<welcome-file>index.jsp</welcome-file>

</welcome-file-list>

<taglib>

<taglib-uri>/spring</taglib-uri>

<taglib-location>/WEB-INF/spring.tld</taglib-location>

</taglib>

</web-app>

thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Martin,

Did you ever solve this issue? We are getting the same exception. Would really appreciate your help.

Thanks and Regards,

Shibendra

Vlado
Advisor
Advisor
0 Kudos

Hi Martin,

If you've not solved this yet (unlikely but since the thread is not closed), change the reference-target name to <b>applcompj2eelib~test</b>.

Hope it helps anyway!

\-- Vladimir