• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Struts config works on windows, not on Unix

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On my windows machines things run fine.

Recently out of the blue, when I move the .war to my unix environment and expand it the following happens.

After the InitServlet completes successfully I get these errors:
SEVERE: Parse Fatal Error at line -1 column -1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file

AND

SEVERE: Error deploying configuration descriptor eoms.xml
org.xml.sax.SAXParseException: Premature end of file


Any ideas?


Thanks
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is undoubtedly due to the difference in newLine characters between Windows and UNIX. Here is a link that explains it. The best solution is to find a windows text editor that will save a file for UNIX use. There are several free ones. Then Save your struts-config.xml file for UNIX before including it in your war file.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting...my project develops in Windows but it deployed on Solaris. I just checked our struts-config.xml file and it is "DOS" formatted (with cr+lf). That version seems to work just fine on Solaris (Oracle Application Server).

- Brent
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know, Brent, it's an odd problem. The Application Server I use (WebSphere) tolerates the different linefeed characters just fine on either Windows or UNIX, but not all Application Servers do. It's usually a pretty good bet, though, that if an XML file parses fine on windows and doesn't parse on UNIX, the Linefeed character is to blame.
 
M Conlin
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I finally found the issue:

while testing build/install scripts the tomcat server had been started under root.

When I logged in as my tomcat user and attempted to restart the server it could not properly shutdown/restart. The error messages did NOT indicate that a resource was in use by someone else, it simply acted like it could not read xml and deploy the project correctly.

su over to root and shutdown the server fixed the issue.
 
reply
    Bookmark Topic Watch Topic
  • New Topic