aspose file tools*
The moose likes BEA/Weblogic and the fly likes xml parer error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "xml parer error" Watch "xml parer error" New topic
Author

xml parer error

vidyaraj sarma
Greenhorn

Joined: Aug 23, 2006
Posts: 4
Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
.........................................
vidya raj: [Fatal Error] :1:27: The markup in the document preceding the root element must be well-formed.
[Fatal Error] :1:23: The markup in the document preceding the root element must be well-formed.
[Fatal Error] :1:32: XML document structures must start and end within the same entity.
[Fatal Error] :1:72: XML document structures must start and end within the same entity.



In the weblogic managed server error , we are facing this error after restarting the server. I am not able to identify which xml is giving this problem. There are 1000s of xml , is there any way to trouble shoot which xml is giving ths problem.

Thanks

vidyaraj
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
How about writing a simple DOM reader to scan all the files. It can be located very quickly

Lin
vidyaraj sarma
Greenhorn

Joined: Aug 23, 2006
Posts: 4
if you have any code to read the folder, please send the same.
thanks
vidyaraj
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
I think you can follow any xml parser samples to do it.

Lin
vidyaraj sarma
Greenhorn

Joined: Aug 23, 2006
Posts: 4
I am new to xml that why i am seeking your kind help.
if you have just paste the same.
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
using jdk 1.4 above

import javax.xml.parsers ;
import java.io.*;
public class XmlValidator
{
public static void main (String args[])
{
// suppose the argument passing the file name

try
{
DocumentBuilderFactory factory ;
DocumentBuilder builder;
factory = DocumentBuilderFactory.newInstance();
builder = factory.newDocumentBuilder();
builder.parse(new File(args[0]);
}
catch(Exception ex)
{
System.out.println("Something wrong");
ex.printStackTrace();
}
}


}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xml parer error