• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

org.xml.sax.SAXException: Invalid element in

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Using Axis1.4

I have 2 webservices already in my tomcat server. Both are working fine. When i deploy 3rd service then i am facing the below error. But if i place this 3 rd service Only then its working fine. Please can any one guide me what the problem is and where?

Error: org.xml.sax.SAXException: Invalid element in BeanService.OutletStatus - allItemsAvailable


Thanks in Advance.
Shajid
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Any one can help on this please....
If you need any more information, please let us know.

Thanks,
Shajid Basha
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. SAXEception MUST be coming from an XML parsing step
2. You need to identify which part of the program is doing the parsing - it could be on the client side or the server side, surely telling us where the error appears is essential.
3. IF on the client side you should use SoapUI or TCPMON to capture the exact text of the service response.
With that text to look at you may find the solution is obvious.

Bill
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

I have used SoapUI only. But, i dint find any error from that tool. Only empty body tags i am getting. I am able to see this "org.xml.sax.SAXException: Invalid element" in tomcat.

Can you guide me please.

Thanks,
Shajid Basha
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

I want to add one more point. If i deploy only this(current service which i am talking about) service then i wont get any problem. When i deploy with the service which are already present then i am getting this error.

Thanks,
Shajid Basha
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you get an error message on the Tomcat side - stating that in your first post would have saved time.

Is that on starting Tomcat, on every SOAP request, or on just the first SOAP request, or what?

Surely there is a stack trace you can use to determine which process in Tomcat is throwing the exception.

Are the other webservices part of the same web application? Do they share files? Share a database?

Bill
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

Thanks for your reply. I am getting that error at the time of submitting the request, not at the time of Tomcat start.

In my tomcat first 2 webservices are working fine (if i dont place the 3rd one). But When i place the third one then the 2nd service is getting that error. But the 1st and 3rd is working fine.

Thanks,
Shajid Basha.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kindly re-read my last post.

What about the stack trace?

What resources are these apps sharing?

When Tomcat throws that exception, what do you see on the client side?

Do all subsequent requests throw the same exception?

Bill
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

Q) What about the stack trace?

org.xml.sax.SAXException: Invalid element in BeanService.OutletStatus - allItemsAvailable
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at _20._2._1._10.axis.services.ProductLocator.ProductLocatorSoapBindingStub.filteredDivisionFind(ProductLocatorSoapBindingStub.java:308)
at com.ebiz.es.ProductLocatorProcessor.COS_543_ProductLocatorProcessorSOAP_V10Impl.COS_543_performProductLocatorProcessorServices_V10(COS_543_ProductLocatorProcessorSOAP_V10Impl.java:64)
at com.ebiz.es.ProductLocatorProcessor.COS_543_ProductLocatorProcessorSOAP_V10Skeleton.COS_543_performProductLocatorProcessorServices_V10(COS_543_ProductLocatorProcessorSOAP_V10Skeleton.java:56)

Q) What resources are these apps sharing?

This services invokes one more service and get the response. Thats it. It wont include any other resources.

Q) When Tomcat throws that exception, what do you see on the client side?

It throws the same exception what is in Q 1. and at client side i can see only empty body tags in SoapUI.

Q) Do all subsequent requests throw the same exception?

Yes, all the subsequent requests from this service throws same exception.



Please let me know if any of my answers are not understand for you.


Thanks,
Shajid Basha

 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

org.xml.sax.SAXException: Invalid element in BeanService.OutletStatus - allItemsAvailable
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)



Here is the method signature:


So the BeanDeserializer does not like the "allItemsAvailable" element in some XML stream it is trying to deserialize. You need to find out where that XML is coming from. Seems likel it is the service being called.

This services invokes one more service and get the response. Thats it. It wont include any other resources.



Is this same service being calle by all 3 of your applications?

Bill
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

No all 3 are different services....

Shajid
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bill,

But, they all are have similar packages...
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If this was my problem I would concentrate on the mystery of where BeanDeserializer is getting this "allItemsAvailable" element that it cant handle. I would use a file content search tool for that term in all files associated with the project.

Bill
 
shajid basha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

But if i deploy only this webservice then its working fine. When i deploy with the second service, then only i am getting this problem...

Is their any problem with the namespaces....

I am very thankful to you for your precious time.

Thanks,
Shajid
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But if i deploy only this webservice then its working fine. When i deploy with the second service, then only i am getting this problem...

Is their any problem with the namespaces....



Alas my crystal ball is in the shop for the 10,000 vision checkup so I can't see into your system. It is time for you to dig in and do some detective work on your own.

Bill
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys!
I need to exclude the "new fields" (like lax XML processing) of xsd that not exist in the stubs. If the xsd file changes (add new field) I want to exclude it. Do you know if axis support this mode.
 
I knew I would regret that burrito. But this tiny ad has never caused regrets:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic