George Pincharoen

Ranch Hand
+ Follow
since Jul 03, 2001
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by George Pincharoen


I am calling a .NET web service from an axis client running on tomcat 5.0.
I got [ns1:VerifyEmailResult: null] as a result while I got the perfect xml response when I run this program as standalone.

Here's what I printed on the screen

Result: [ns1:VerifyEmailResult: null]
[Fatal Error] :1:1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

Notice that I also got an error 'Content is not allowed in prolog'. Is it because the program trying to parse illegal xml string?

One more thing, In standalone app, I use crimson as a parser, but tomcat uses xerces. I tested more by adding xerces lib to my standalone app and I got the same error as I got from tomcat.
It seems like xerces is the real problem. How do I solve this problem?
I'm not sure that I can remove xerces lib from my web app.

P.S. I've tried using crimson instead of xerces by setting these system properties

<system-property javax.xml.parsers.DocumentBuilderFactory=
<system-property javax.xml.parsers.SAXParserFactory=

but it led me to another error

java.lang.IllegalStateException: can't declare any more prefixes in this context
at org.apache.crimson.parser.Parser2.parseInternal(
at org.apache.crimson.parser.Parser2.parse(
at org.apache.crimson.parser.XMLReaderImpl.parse(
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(
at org.apache.axis.utils.XMLUtils.newDocument(
at org.apache.axis.utils.XMLUtils.newDocument(
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(
at org.apache.axis.wsdl.gen.Parser$
18 years ago
Yes, you can use it. But I would say that it's a bit too complicated.
- Error is not an exception.
- The rule that overridden method can't throw Exception that never throw apply only checked exception,so InnerB can throw RuntimeException without problems.
Thank you for reply
Now I got the solution.
The solution is update Log4J to lastest version.
22 years ago
Now I testing validator framework which come with Struts 1.1
First,I don't have any problem every seem work fine,but after I included Log4J in environment of server(Weblogic)
I got LogConfigurationException thrown from common-logging when I tried to deploy the same web applicatin that used to work.
I think the problems may come from Log4J,
but I don't know how to solve it.
Any advice?
Thank in advance
22 years ago
The Matrix !!!
I like it
22 years ago
I think this is a simple question for many of you
but I have problem to get Home object from JNDI lookup
it have error ClassCastException (in method narrow of PortableRemoteObject)
I try many way to solve this problem (I think I'm missed some environment setting)
If anyone have solution please help me
or give me a simple example and tell me how to set environment to run
Thanks in advance,
Thank you for your reply
and I have a new problem
I want to save dom object to xml source file by Tranformer.transform(. .)
First it seem ok,but the line that define DTD in my xml file has disappeared.
How can I solve this problem
I have problem about JAXP
If I have xml file and i parse it to Document,and then import node to my Document.
Problem is I want to create attribute for that node such as id="4" how can I do this
Thanks in advance
The HashMap roughly equivalent to HashTable, except
that it is unsynchronized and permits nulls
Congratulations Naresh
22 years ago
Congratulations Axel
22 years ago
Congratulations Mo
22 years ago