cancel
Showing results for 
Search instead for 
Did you mean: 

Error in migrating a Spring/Struts-App from Tomcat to WebAS

Former Member
0 Kudos

I tried migrating a Struts/Spring-App (war) which is running smoothly in Tomcat to WebAS.

Deploying is no problem and the plain JSPs work fine. But the 'real' app is not running and throws the following error at startup:

24 Mai 2006 09:07:13,593 - ActionServlet.initServlet(1149) | The /WEB-INF/web.xml was not found.

org.xml.sax.SAXParseException: Dokumentwurzelelement fehlt

at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3376)

at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3364)

at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:668)

at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)

at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)

at org.apache.commons.digester.Digester.parse(Digester.java:1567)

at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1142)

at org.apache.struts.action.ActionServlet.init(ActionServlet.java:328)

at javax.servlet.GenericServlet.init(GenericServlet.java:258)

at com.sap.engine.services.servlets_jsp.server.runtime.context.WebComponents.addServlet(WebComponents.java:134)

at com.sap.engine.services.servlets_jsp.server.container.ApplicationThreadInitializer.loadServlets(ApplicationThreadInitializer.java:376)

at com.sap.engine.services.servlets_jsp.server.container.ApplicationThreadInitializer.run(ApplicationThreadInitializer.java:110)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

Any help much appreciated!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Found already the solution although it is not a nice one:

Do not edit the source code of the web.xml directly!!!!

Never!

Inserting a context param via the graphical tool in SAP NetWeaver Developer Studio worked fine. Inserting the plain text (maybe differently formatted, ok, but that's it) and WebAS spit the above mentioned error-message out.

Strange enough, that the graphical tool picked the manual inserted code up and I could change it, but still the error occurred. The only solution was to delete it and then add it through the GUI.

Now the next Problem comes with Sitemesh (http://opensymphony.com/sitemesh/).

I know that according to their website (http://opensymphony.com/sitemesh/requirements.html) this very nice lib is not tested with SAP WebAS. So I wonder if anyone has already any experience with it?

I just get some strange response from WebAS after calling the application showing strange values in Firefox and throwing an error in IE because of bad response.

Next issue (after Sitemesh) in Migrating will be our JAAS-Login-Module.

Former Member
0 Kudos

hi istvan,

we are also migrating from websphere to netweaver.

But in spring framework we r facing problems.

We hav spring-beans.jar file in lib dir of Web Application. But When we are creating BeanFactory from xml as,

BeanFactory beanFactory = new ClassPathXmlApplicationContext ("client-config.xml");

clent-config.xml file contains :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
	<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
		<property name="location">
			<value>conf/service-client/client.properties</value>
		</property>
	</bean></beans>

But code is giving exception: ClassNotFoundException -org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.

Wat is the problem ?

Kindly help.

We are also using JAAS for authentication.We are refering above code from our LoginModules login() method.

Regards,

sagar.