Avatar of mvkraju
mvkraju asked on

javax.xml.namespace.NamespaceContext and javax.xml.XMLConstants not found when compiling JAXB generated classes

Hi,

 I am trying to run JAXB application
When i am trying to compile, after i generate Java classes using JAXB

the compiler could not found the following classes
javax.xml.XMLConstants
javax.xml.namespace.NamespaceContext

What jar file i suppose to put in my classpath?

Thanks
Java

Avatar of undefined
Last Comment
CEHJ

8/22/2022 - Mon
CEHJ

That comes with the web services development pack. Where are your jars for that - put them into your classpath
ASKER
mvkraju

yes i put them in the classpath.
I put the following jars in the class path tose are related to JAXB
jaxb-api.jar
jaxb-impl.jar
jaxb-libs.jar
jaxb-xjc.jar

am i missing anything else?
CEHJ

>>am i missing anything else?

Well i don't know if you're missing anything, but since it's part of the wsdp, i would download that and make sure you've got all jars
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
mvkraju

Ofcourse as CEHJ said i also put
jax-1_1-fr-qname-class.jar and relaxngDatatype.jar in my classpath
ASKER
mvkraju

i could see only those 4 jars under
jwsdp-1.3\jaxb\lib
CEHJ

I gave you a command to search jars before. Try it out on XMLConstants
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
mvkraju

I tried last time also, i did not get any result
may be i might be doing dome thing wrong in executing the command
could you guide me step by step.
ASKER
mvkraju

o.k. i could run the command againest XMLConstants
like >>jar -tvf *.jar | find "XMLConstants"
there is no result
ASKER
mvkraju

i checked XMLConstants against all the individual jar which i have, but there is no result
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER
mvkraju

I am increasing points guys. I need urgent help
CEHJ

>>

o.k. i could run the command againest XMLConstants
like >>jar -tvf *.jar | find "XMLConstants"
there is no result

>>

I don't know where you're quoting that command from - it's not from me, and won't work ;-) The one i gave you will
CEHJ

This is slightly better than the one i gave you though:


for %a in (*.jar) do @echo Looking in %a ... & @jar -tvf "%a" | @find /I "XMLConstants"
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
mvkraju

I used ur command, XMLConstants is not there :(
CEHJ

So did you download the wsdp?
CEHJ

Look at the title bar of the browser when you open this page:

http://java.sun.com/webservices/docs/1.3/api/javax/xml/XMLConstants.html
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER
mvkraju

CEHJ

  You know what?
under jwsdp-1.3\jwsdp-shared\lib there are bunch of jar files

we have to put them in the classpath, then we will not get any error.
Thanks for ur support.
ASKER CERTIFIED SOLUTION
CEHJ

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
mvkraju

CEHJ i am awarding these points to you.
Eventhough i did not get satisfied answer from you.

Your comment did not say that i suppose to put all the libraries those are under jwsdp-shared directory.
CEHJ

>>Your comment did not say that i suppose to put all the libraries those are under jwsdp-shared directory.

Obviously, all classes, and by extension all jars, that your application needs must be in the classpath. I'm not aware of where they are on your file system originally but the general point holds
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.