cancel
Showing results for 
Search instead for 
Did you mean: 

Web app works fine on local engine. Won't run when deployed to server

Former Member
0 Kudos

Hello,

I have a web app using servlets and JSPs running fine locally.

I change my NDS preference to point to the server J2EE engine and deploy to the server. The deploy finishes with no problems.

When I try to run the application on the server I get the following error:

Servlet is permanently unavailable!

Details: javax.servlet.UnavailableException: External entity not found: "http://java.sun.com/dtd/web-app_2_3.dtd". The ID of this error is

Exception id: [00306E4B2EE8005700000657000063B7000404712CB07B5A].

What would cause it to act this way?

Thanks in advance for any help.

David.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

The whole problem was that the Sun site was down. The web.xml file tries to resolve a uri reference to a dtd file on sun's server.

Well we obviously don't want our site availability to rely on Sun so we decided to make a copy of the DTD file and place it on one of our own servers.

In order to make it work seamlessly we had to create a "dtd" folder on our web server. We placed the DTD file there.

Then we also placed the DTD file in the following directory on our workstations:

C:\Program Files\SAP\JDT\eclipse\plugins\com.tssap.j2ee.ui\definitions\dtd

Then we changed the web.xml file to point to the dtd file on our server.

Works fine now.

The problem was that

Former Member
0 Kudos

Hi David,

I'm really guessing here but is it because your server J2EE does not have internet access and hence can't access the DTD file at the java.sun.... address you mention? I know I have problems sometimes in NDS when editing XML files where NDS locks up for a few seconds if it can't get at a remote DTD file. This is usually because of my company's internal network/firewall setup - working in NDS on my home computer I don't suffer the same issues.

That error message you mention looks like it is looking for the file on java.sun and this is then causing an UnavailableException - I may be misinterpreting it but I don't think it is saying your servlet is unavailable.

I'm probably wrong

Gareth.

aka. wizbongre.

Former Member
0 Kudos

Gareth,

I know exactly what you mean about the DTD files. I've experienced that also.

I am looking into that possibility on the server. However, the message is VERY confusing. It mentions a servlet but the DTD has nothing to do with a servlet. Also WHICH servlet. It's very frustrating that it doesn't give me more information so I can at least look at the "offending servlet"

I'll keep posting updates to this and hopefully a solution soon.

Thanks!

Former Member
0 Kudos

Hello,

Has anyone else ran into this problem?

David.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Looks like it is looking for some object that exists on your local machine, but does not exists on the server. Do you have those specific objects includeded in your project?

Regards,

RIch Heilman

Former Member
0 Kudos

Rich,

Well, the web.xml only has references to servlets and jsps that are part of my web module.

There are some 3rd party jars that have been included in the Java Build Path of the project but when I check the generated WAR file all those are there. Since the WAR file is deployed as part of the ear I am assuming that all the resources are deployed too.

What's weird is that the message refers to a servlet (telling me WHICH servlet would be very helpful) but then it lists the reference to the DTD file. Not sure what that is about.

David.

Former Member
0 Kudos

There is only one class referenced in the web.xml that is not part of my code. It is the Struts ActionServlet class.

Just checked the WAR file on the server and it has that class (and all the other Struts) classes in it.

So now I'm really baffled. What the heck is it referring to?

Is there a way to get more detailed information from WAS. I mean, just telling me that a servlet is unavailable without telling me WHAT servlet is pretty useless.

The only thing that IS specifically mentioned is the dtd but that's something that is put into the web.xml file automatically by NDS when you create a web module.

David.