JAXP 1.4 in JDK 1.5? javax.xml.stream.FactoryFinder$ConfigurationError

hello,
i'm forced to develop in jdk 1.5 and need to use package javax.xml.stream (StAX), which is not included in jaxp1.3 (in jdk 5), so there is a need to somehow integrate jaxp 1.4 to jdk5.
first thing i've tried was getting jaxp 1.4 src and include a buildpath to my project to it. problem is, that javax.xml.stream.XMLOutputFactory.newInstance() throws exception javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.sun.xml.internal.stream.XMLOutputFactoryImpl not found
thanks in advance

problem solved

Similar Messages

  • Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream

    I am trying to develop a web service client for amazon webservice.but i am getting this error while running the app. Can anyone please help me. I have installed the JWSDP and but could not understand why i have to locate all the jar files in the classpath?Please help.
    ===== error=========================================
    C:\abr\classes>java -classpath c:\abr\test.jar;C:\abr\jaxrpc-api.jar;C:\abr\jaxrpc-impl.jar;C:\abr\jaxrpc-spi.jar;c:\abr\classes\amazon.jar;C:\abr\mail.jar;C:\a
    br\saaj-api.jar;C:\abr\activation.jar;c:\abr\FastInfoset.jar;%classpath% Client
    [b]Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream/XMLS
    treamWriter
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.
    java:672)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:87)
    at amazon.AmazonSearchPort_Stub.authorSearchRequest(AmazonSearchPort_Stu
    b.java:988)
    at Client.main(Client.java:21)

    I'm assuming you're using JWSDP 1.6 as I see Fastinfoset.jar in your list. You are missing some jar files in your classpath there. The best way to know what you need is to look at the release notes for JWSDP 1.6. Since you're building a web serivce start with the table in there and lookup JAX-RPC. It'll show you what jar files are needed and what other libraries are needed. Now depending on what you're doing you don't really need all those.
    For sure you're missing jsr173_api.jar which is where I believe that class you need is located. This is in the JWSDP_1_6\sjsxp\lib directory. You will probably need the other jar thats in there too. Best bet is to follow the dependancy chart in the release notes.
    This should get you going.
    Ryan

  • Problem in javax.xml.stream package

    i am getting some trouble while using the import statement for following package:-
    import javax.xml.stream.*;
    I have j2sdk1.4.2 installed in my system. I am using NetBeans 3.6 IDE.
    Should i copy some jars in order to resolve this issue. You can send me the steps at:- [email protected]
    Please help me.
    Regards
    Sks

    Have not been able to find anything in the bug database.
    I am alittle worried that the StAX - 1.0.1 (http://stax.codehaus.org) has a method with the same signature that does something very different.

  • Javax.xml.stream.XMLInputFactory problems with &

    Hi all
    I am using javax.xml.stream.XMLInputFactory to create an XMLStreamReader, which reads XML in from a database.
    The problem is that when it encounters & entities, it is replacing them simply with &. When I then go to transform the XML with an XSL stylesheet, it fails with a parser error due to the presence of unescaped & characters.
    Looking at the API documentation, I thought that setting the property javax.xml.stream.isReplacingEntityReferences to false would solve the problem, but it isn't. The line of code I am using is as follows: -
    inputFactory.setProperty("javax.xml.stream.isReplacingEntityReferences", new Boolean(false));
    Any further ideas as to what I am doing wrong or what else I should be doing?
    Many thanks for reading and considering my post.
    Kind Regards
    Jon

    Thanks for your continued posts guys...
    Quote from DrClap: "So if you consider this to be a problem, you are most likely misunderstanding. Or is there a reason why you feel you have to know how the text was represented in the document it came from?"
    Right, just to clarify, this is what I'm trying to do...
    1. XML, complete with properly escaped characters (&, etc) is sitting in the database.
    2. Next, I am attempting to read the XML into memory character for character via an XMLInputStream and so I still want &, etc, not just &.
    3. Finally, I apply stylesheet to XML Now I do want the parser to decode the & into &. The problem is that it has already been done in 2 (above) so the parser in 3 falls over.
    Thanks for pointing out that javax.xml.stream.XMLInputFactory is not a standard class DrClap - looks like it's back to the drawing board for me!!
    Thanks
    Jon

  • Javax.xml.stream.XMLStreamException throws when present '&' character

    Hi
    I am writing a code using stax parser. But recently I got an error when "&" or "&" present in the xml document.
    This is the error I am getting
    javax.xml.stream.XMLStreamException: ParseError at [row,col]:[30,30]
    Message: The reference to entity "name" must end with the ';' delimiter.This is my xml
    <url>  http://url?id=1&name=aaa  </url>  This is my code
    XMLInputFactory xmlInputFactory =  XMLInputFactory.newInstance();
                xmlInputFactory.setProperty(
                        XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES,
                        Boolean.TRUE);
                xmlInputFactory.setProperty(
                        XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES,
                        Boolean.FALSE);
                xmlInputFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);
    String xmlSource;
    XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new ByteArrayInputStream(xmlSource.getBytes("UTF-8")));
    while (reader.hasNext())
      reader.next(); // error throws in this line
    }Can someone please help me.

    Sorry for the late reply. I was waited with the intention because this was my fault.
    Yes I am using & amp;
    But the problem return persist.
    Now I have identified the problem.
    The problem was I am using same xml for process multiple time.
    First time it does not fail.
    But the second time I am assigning the processed xml to a string and use this string as a input to the second xml processing.
    This time it automatically replace all & amp; with & .
    Now it fails.
    To eliminate this What I have done is when reading text and attribute values I am do a simple string replacing process.
    protected String encode2XML(String source)
            String src = source;
            if (src != null)
                src = src.replace("&", "&");
                src = src.replace("<", "<");
                src = src.replace(">", ">");
                src = src.replace("\"", """);
                src = src.replace("\'", "&#039;");
                return src;
            else
                return "";
        }

  • Javax.xml.stream import problem???? plz help

    hi, i am looking into using stax to write to xml, however i believe i need some classes contained within javax.xml.stream.*; and this is not contained within j2se docs i know, i think it comes with the web services.
    what i wanted to know is as i am using netbeans what is the best way for me to use these packages as i still need the current ones contained within j2se for the rest of my app
    thanks
    Danny =)

    do i have to download another jre or can it be done using the one i currently have, j2se 1.9

  • Javax.xml.stream is not found

    I'm running eclipse on a mac using java 6.
    And for some reason eclipse cant find javax.xml.stream
    does anyone know where i can download this file?
    and or how I can tell eclipse where to find it?
    Thanks!

    alan_mehio wrote:
    Hi,
    You definitely will get more help if you post your question with eclipse related forumUnless someone points out that javax.xml.stream simply isn't part of J2SE. You can download it here

  • Java.lang.NullPointerException javax.xml.parsers.DocumentBuilder.parse

    Hi all,
    i have a problem by solving an error in my code. The Code is mainly from Ian Darwin.
    The code i am running works with j2sdk1.4.2_04. But now i have to bring it to work with jdk1.6.0_13.
    The code parses xml documents. With small xml documents the code works. With large xml documents i get the following error while running the produced class file.
    Exception in thread "main" java.lang.NullPointerException
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.setChunkIndex(DeferredDocumentImpl.java:1944)
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.appendChild(DeferredDocumentImpl.java:644)
    at com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.characters(AbstractDOMParser.java:1191)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.characters(XMLDTDValidator.java:862)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:463)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:208)
    at XParse.parse(XParse.java:38)
    at XParse$JFileChooserrv.<init>(XParse.java:119)
    at XParse.main(XParse.java:213)
    I know what a java.lang.NullPointerException mens. But i don't know where i have to look for. Specially i don't know what or where "com.sun.org.apache...." is.
    Is there a package that a have to add to the environment? Can some one tell my where i can find this package?
    I wrote the code for some years ago, 2006 or so. With the knew jdk1.6.0_13 some thinks chance in the environment. Couldn't find what exactly.
    The code has only 215 lines, but some how i can't add it to this Message, because Maximum allowed is only 7500.
    Is there an other Forum, which may is better for my question?

    Here is the code:
    import java.io.*;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.Container;
    import javax.swing.JTextArea;
    * This code is mainly from @author Ian Darwin, [email protected]
    public class XParse {
         /** Convert the file */
         public static void parse(File file, boolean validate) {
              try {
                   System.err.println("");
                   String fileName = file.getAbsolutePath();
                   System.err.println("Parsing " + fileName + "...");
                   // Make the document a URL so relative DTD works.
                   //String uri = new File(fileName).getAbsolutePath();
                   //System.err.println(uri);
                   DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
                   if (validate)
                   f.setValidating(true);
                   DocumentBuilder p = f.newDocumentBuilder();
                   p.setErrorHandler(new MyErrorHandler(System.err));
                   //XmlDocument doc = XmlDocument.createXMLDocument(file);
                   boolean vaild =  p.isValidating();
                   if (vaild) {
                        System.out.println("yes parsing");
                        Document doc = p.parse(file); // <<<< ERROR
                   System.out.println("Parsed OK");
              } catch (SAXParseException ex) {
                   System.err.println("+================================+");
                   System.err.println("|       *SAX Parse Error*        |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   System.err.println("At line " + ex.getLineNumber());
                   System.err.println("+================================+");
              } /**catch (RuntimeException ex) {
                   System.err.println("+================================+");
                   System.err.println("|       *SAX Parse Error*        |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   //System.err.println("At line " + ex.getLineNumber());
                   //System.err.println("At line " + ex.getMessage());
                   System.err.println("+================================+");
              }**/ catch (SAXException ex) {
                   System.err.println("+================================+");
                   System.err.println("|          *SAX Error*           |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
                   System.err.println("+================================+");
              /*}} catch (SAXNotRecognizedException  ex) {
                   System.err.println(" no SAX");*/
              } catch (ParserConfigurationException ex) {
                   System.err.println(" ???");
               } catch (IOException ex) {
                   System.err.println("+================================+");
                   System.err.println("|           *XML Error*          |");
                   System.err.println("+================================+");
                   System.err.println(ex.toString());
    private static class JFileChooserrv {
         JFileChooserrv(JFrame f, boolean vverabreiten) {
              String openfile;
              String verror;
              boolean validate = true;
              final JFrame frame = f;
              String vFilename = "Z:\\Boorberg\\parsen_vista\\daten";
              //String vFilename = "C:\\";
              File vFile = new File(vFilename);
              final JFileChooser chooser = new JFileChooser(vFile);
              JFileFilter filter = new JFileFilter();
              filter.addType("xml");
              filter.addType("sgml");
              filter.addType("html");
              filter.addType("java");
              filter.setDescription("strukturfiles");
              chooser.addChoosableFileFilter(filter);
              boolean vjeas = true;
              chooser.setMultiSelectionEnabled(vjeas);
              int returnVal = chooser.showOpenDialog(frame);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   //Array  filearry[] = chooser.getSelectedFiles();
                   //if (vFile = chooser.getSelectedFiles()) {
                   //File  file[] = chooser.getSelectedFiles();
                   File  vfile[] = chooser.getSelectedFiles();
                   //String openfile = new String();
                   int vlenght = vfile.length;
                   if (vlenght>1) {
                        int x=0;
                        while (x< vlenght) {
                                  parse(vfile[x], validate);
                                  x = x +1;
                   if (vlenght<=1) {
                        File v2file = chooser.getSelectedFile();
                             parse(v2file, validate);
              } else {
                   System.out.println("You did not choose a filesystem           object.");
         System.exit(0);
    private static class JFileFilter extends javax.swing.filechooser.FileFilter {
         protected String description, vnew;
         protected ArrayList<String> exts = new ArrayList<String>();
         protected boolean vtrue;
         public void addType(String s) {
              exts.add(s);
         /** Return true if the given file is accepted by this filter. */
         public boolean accept(File f) {
              // Little trick: if you don't do this, only directory names
              // ending in one of the extentions appear in the window.
              if (f.isDirectory()) {
                   return true;
              } else if (f.isFile()) {
                   Iterator it = exts.iterator();
                   while (it.hasNext()) {
                        if (f.getName().endsWith((String)it.next()))
                             return true;
              // A file that didn't match, or a weirdo (e.g. UNIX device file?).
              return false;
         /** Set the printable description of this filter. */
         public void setDescription(String s) {
              description = s;
         /** Return the printable description of this filter. */
         public String getDescription() {
              return description;
    private static class MyErrorHandler implements ErrorHandler {
            // Error handler output goes here
            private PrintStream out;
            MyErrorHandler(PrintStream out) {
                this.out = out;
             * Returns a string describing parse exception details
            private String getParseExceptionInfo(SAXParseException spe) {
                String systemId = spe.getSystemId();
                if (systemId == null) {
                    systemId = "null";
                String info = "URI=" + systemId +
                    " Line=" + spe.getLineNumber() +
                    ": " + spe.getMessage();
                return info;
            // The following methods are standard SAX ErrorHandler methods.
            // See SAX documentation for more info.
            public void warning(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                //out.println("Warning: " + getParseExceptionInfo(spe));
            public void error(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                String message = "Error: " + getParseExceptionInfo(spe);
                throw new SAXException(message);
            public void fatalError(SAXParseException spe) throws SAXException {
                   //System.exit(0);
                String message = "Fatal Error: " + getParseExceptionInfo(spe);
                throw new SAXException(message);
         public static void main(String[] av) {
              JFrame vframe = new JFrame("chose files to pars");
              boolean vverabreiten = true;
              boolean validate = true;
              JFileChooserrv vdateienwaehlen = new JFileChooserrv(vframe, vverabreiten);
    }The Stack Trace i posted in the last Message. But i couldn't read it, i am not a programmer.

  • Guide Lines to Use SAX,DOM using javax.xml. * files only, I

    Hi Respected Recievers,
    My Name is Surya, i am working as a Java
    Programmer.
    I need JAR files to run SAX and DOM properly.
    I don't want to Use xerces.jar or jaxp.jar files, i will use only javax.xml.* files only.
    Could provide some examples on those topics like reading,modifying,the files using SAX and DOM.
    Thanks&Regards
    Surya

    Add rt.jar to Classpath.
    DOM Tutorial
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPDOM3.html
    SAX tutorial
    http://java.sun.com/j2ee/1.4/docs/tutorial-update2/doc/JAXPSAX.html

  • Problems instantiating javax.xml.ws.Service object

    i'm at a total loss here: on my development machine everything works fine. when i switch to our test production server, it blows up.
    My dev machine is OS X 10.5 and test production machine is OS X 10.6. Both are using Java 1.5 and Tomcat 6.0.x...
    The web services I'm calling all reside on other machines on our rack and I'm using internal IP addresses to call them.
    My Service class is below. The blow-up occurs in the constructor right before the info log. The exception message follows the class. help!
    @WebServiceClient(name = "gnwSoap", targetNamespace = "gnwSoapNamespace", wsdlLocation = "http://192.168.1.12/4DWSDL/DOC")
    public class GnwSoap extends Service {
         private static final Log log = LogFactory.getLog(GnwSoap.class);
         public GnwSoap(URL wsdlLocation, QName serviceName) {
              super(wsdlLocation, serviceName);
              log.info("Endpoint sucessfully created: " + wsdlLocation.getHost());
          * @return returns GnwSoapDocument
         @WebEndpoint(name = "gnwSoapPort")
         public GnwSoapDocument getGnwSoapPort() {
              return super.getPort(new QName("gnwSoapNamespace", "gnwSoapPort"),
                        GnwSoapDocument.class);
    }The Exception:
    javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,12]
    Message: Scanner State 24 not Recognized
    com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:179)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
    org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:109)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp(ConcurrentSessionFilter.java:99)
    org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    ...

    I have Oracle JDeveloper Studio Edition Version 10.1.3.2.0.4066.
    Please note I have already added following libaries, jars to Tool->Project Properties->Libraries in JDeveloper.
    EJB3.0, TopLink Essentials JPA, J2EE, Jws-api.jar, Ejb30.jar, JSP Runtime, JAX-RPC Client, TopLink, JDeveloper Runtime, Embedded OC4J client, Jaxrpc-api.jar, Wsserver.jar
    Thank you.

  • NoClassDefFoundError: javax/xml/rpc/Stub

    Hi,
    I have a problem running the example Hello JAX-RPC application that comes with the JWSDP-1.1. I can run the application ok using ant, but if I try to run the program from the command line without using ant, I get NoClassDefFoundError: javax/xml/rpc/Stub
    The command I'm using is
    java hello.HelloClient
    I have updated my CLASSPATH to include all the jar's that are used in the build.xml file. My CLASSPATH should be complete as I used the output from ant show-props to get it.
    Thanks.

    I checked the jaxrpc-api.jar file using
    jar -tf jaxrpc-api.jar
    The contents (lsited below) does not contain javax/xml/rpc/Stub
    Thanks again
    META-INF/
    META-INF/MANIFEST.MF
    javax/
    javax/xml/
    javax/xml/rpc/
    javax/xml/rpc/encoding/
    javax/xml/rpc/handler/
    javax/xml/rpc/handler/soap/
    javax/xml/rpc/holders/
    javax/xml/rpc/server/
    javax/xml/rpc/soap/
    javax/xml/rpc/Service.class
    javax/xml/rpc/ServiceException.class
    javax/xml/rpc/Call.class
    javax/xml/rpc/encoding/TypeMappingRegistry.class
    javax/xml/rpc/encoding/TypeMapping.class
    javax/xml/rpc/encoding/SerializerFactory.class
    javax/xml/rpc/encoding/DeserializerFactory.class
    javax/xml/rpc/encoding/Serializer.class
    javax/xml/rpc/encoding/Deserializer.class
    javax/xml/rpc/encoding/DeserializationContext.class
    javax/xml/rpc/encoding/SerializationContext.class
    javax/xml/rpc/encoding/XMLType.class
    javax/xml/rpc/handler/HandlerRegistry.class
    javax/xml/rpc/handler/soap/SOAPMessageContext.class
    javax/xml/rpc/handler/MessageContext.class
    javax/xml/rpc/handler/GenericHandler.class
    javax/xml/rpc/handler/Handler.class
    javax/xml/rpc/handler/HandlerInfo.class
    javax/xml/rpc/handler/HandlerChain.class
    javax/xml/rpc/ParameterMode.class
    javax/xml/rpc/JAXRPCException.class
    javax/xml/rpc/FactoryFinder.class
    javax/xml/rpc/NamespaceConstants.class
    javax/xml/rpc/ServiceFactory.class
    javax/xml/rpc/Stub.class
    javax/xml/rpc/holders/BooleanWrapperHolder.class
    javax/xml/rpc/holders/Holder.class
    javax/xml/rpc/holders/BigDecimalHolder.class
    javax/xml/rpc/holders/BigIntegerHolder.class
    javax/xml/rpc/holders/BooleanHolder.class
    javax/xml/rpc/holders/DoubleWrapperHolder.class
    javax/xml/rpc/holders/ByteArrayHolder.class
    javax/xml/rpc/holders/ByteHolder.class
    javax/xml/rpc/holders/ByteWrapperHolder.class
    javax/xml/rpc/holders/CalendarHolder.class
    javax/xml/rpc/holders/DoubleHolder.class
    javax/xml/rpc/holders/FloatWrapperHolder.class
    javax/xml/rpc/holders/FloatHolder.class
    javax/xml/rpc/holders/IntHolder.class
    javax/xml/rpc/holders/LongWrapperHolder.class
    javax/xml/rpc/holders/LongHolder.class
    javax/xml/rpc/holders/IntegerWrapperHolder.class
    javax/xml/rpc/holders/ShortWrapperHolder.class
    javax/xml/rpc/holders/ObjectHolder.class
    javax/xml/rpc/holders/QNameHolder.class
    javax/xml/rpc/holders/ShortHolder.class
    javax/xml/rpc/holders/StringHolder.class
    javax/xml/rpc/server/ServletEndpointContext.class
    javax/xml/rpc/server/ServiceLifecycle.class
    javax/xml/rpc/soap/SOAPFaultException.class

  • Javax.xml.soap.SOAPException: Unable to create message factory for SOAP

    I installde jwsdp1.5 and tomcat50-jwsdp, want to use the local registry server in jwsdp1.5 to publish and query services. the code can run successfully on other PC, but I can not run it successfully.
    when I run the JSP+Servlet to publish a service, the information is:
    javax.xml.registry.JAXRException: javax.xml.bind.JAXBException
    - with linked exception:
    [javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider com.sun.xml.messaging.saaj.soap.MessageImpl could not be instantiated: java.lang.IllegalAccessException: Class javax.xml.soap.FactoryFinder can not access a member of class com.sun.xml.messaging.saaj.soap.MessageImpl with modifiers "protected"]
         at com.sun.xml.registry.uddi.Processor.processRequestJAXB(Unknown Source)
         at com.sun.xml.registry.uddi.UDDIMapper.getAuthorizationToken(Unknown Source)
         at com.sun.xml.registry.uddi.ConnectionImpl.setCredentials(Unknown Source)
         at Publish.doPost(Publish.java:66)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:790)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:709)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:572)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.xml.bind.JAXBException
    - with linked exception:
    [javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider com.sun.xml.messaging.saaj.soap.MessageImpl could not be instantiated: java.lang.IllegalAccessException: Class javax.xml.soap.FactoryFinder can not access a member of class com.sun.xml.messaging.saaj.soap.MessageImpl with modifiers "protected"]
         at com.sun.xml.registry.common.util.MarshallerUtil.jaxbMarshalObject(Unknown Source)
         ... 32 more
    what can I do?? Help me please!!Thanks very very very much!

    It seems saaj-impl.jar (in case of Sun One Server) or the jar which contains implementationof SAAJ API is not in the classpath.

  • Javax.xml.parsers not found in import

    I have downloaded JAXP from java.sun.com. I put the jar files in ../jdk/jre/lib/ext/.
    Im getting "javax.xml.parsers not found in import" when I try to compile a program with an import statement like this:
    import javax.xml.parsers.*;
    What am i missing? My classpath has ../jdk/jre/lib/ext/ in it..

    I have downloaded JAXP from java.sun.com. I put the
    jar files in ../jdk/jre/lib/ext/.
    Im getting "javax.xml.parsers not found in import"
    when I try to compile a program with an import
    statement like this:
    import javax.xml.parsers.*;
    What am i missing? My classpath has
    ../jdk/jre/lib/ext/ in it..Hi,
    This seems to be a classpath problem. You can also use JDK1.4.1
    which has crimson bundled with it. So you do not need to do any explicit settings for classpath.
    Pls let me know if you still have problems
    Thanks,
    Bhakti

  • NoSuchMethod: javax.xml.parsers.SAXParserFactory.getSchema()

    Hi All,
    In a servlet I have created a SOAPMessage object based on the request received, and when I execute
    message.getSOAPBody I get the message:
    java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()
    I am running tomcat with jdk 1.5 and I am using saaj-api.jar, saaj_imp.jar and Fastinfoset.jar from jwsdp 1.6
    Anyone got any ideas what to do ?
    Kind regards,
    Marco Laponder

    Along with jdk1.4.2, Sun has bundled a currently ancient version of JAXP.
    So, get a recent version of a JAXP implementation (e.g. with JWSDP1.6), probably contained in jar-files called jaxp-api.jar, dom.jar, sax.jar, xalan.jar and xercesImpl.jar, and add these to your classpath when you're compiling/running.
    You're not done yet! Because the old jaxp libraries are bundled with your JVM, the classloader will find them through your bootclasspath, and they will be prefered above the new implementation you just added to the classpath. To resolve this, the JVM creators came up with the endorsed mechanism. This allows you to provide new classes for a list of predefined packages. These classes are already included in the jvm distribution, but are foreseen to be updated. See for more information about the endorsed mechanism: http://java.sun.com/j2se/1.4.2/docs/guide/standards/ .
    So to be short, you also have to make the jvm recognise them as endorsed libraries. E.g. by adding them to the <java-home>/lib/endorsed directory or by setting the java.endorsed.dirs property to the directories which include the new jar files.
    Your commandline to run app.class would become: java -Djava.endorsed.dirs=/home/endorsedDir;/anotherDir app

  • Javax.xml.parsers.SAXParser parser() error

    Hi,
    I've got some code that works fine in the Forte for Java IDE but just will not work when running as a stand-alone Windows application. I think it's to do with the filename having spaces in the pathname?
    Any help would be great!
    Regards.
    Gary Revell
    [email protected]
    [email protected]
    I've attached the code and the error(s) I get
    ------------------CODE FRAGMENT------------------
    // loadCE.java
    // Created on 25 April 2001, 15:43
    // @author RevellG
    // @version V1.0
    // This class is used to load the Standard Call Reporting XML document
    // and to allow the easy interrogation of the contents. The data can
    // then be used to populate fields in the Call Reporting GUI.
    import java.util.Vector;
    import java.io.*;
    import java.util.*;
    import java.util.Collections;
    import org.xml.sax.*;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class loadCallElement extends Object
    private static loadCall loadCall = null;
    private static boolean DEBUG = false;
    // Creates new loadCE
    public loadCallElement(boolean debugFlag )
    this.DEBUG = debugFlag;
    public void parseDoc( String docName ) throws Throwable
    // Use the default (non-validating) parser
    SAXParserFactory factory = null;
    try
    // Parse the input
    factory = SAXParserFactory.newInstance();
    SAXParser saxParser = factory.newSAXParser();
    loadCall = new loadCall(DEBUG);
    saxParser.parse( new File( docName ), loadCall );
    catch (Throwable t)
    // catch ( Exception t )
    System.err.println( t.getMessage() +" - <"+docName+">");
    t.printStackTrace ();
    loadCall.ceTree.clear();
    throw t;
    ------------------Error and Stack Trace---------------
    E:\Support\Call Logs\bin>java -classpath .\SCM_GUI.jar;%CLASSPATH%;%XML_HOME%\jaxp.jar;%XML_HOME%\parser.jar M
    anagerInterface > g.g
    CWD /Telecom/Support/Call Logs/Logs/Open/BBC PICS/001$revellg$qwerty.xml: 550 /Telecom/Support/Call Logs/Logs/
    Open/BBC PICS/001$revellg$qwerty.xml: The system cannot find the path specified.
    - <\\Reoclu1\Telecom\Support\Call Logs\Logs\Open\BBC PICS\001$revellg$qwerty.xml>
    java.io.FileNotFoundException: CWD /Telecom/Support/Call Logs/Logs/Open/BBC PICS/001$revellg$qwerty.xml: 550 /
    Telecom/Support/Call Logs/Logs/Open/BBC PICS/001$revellg$qwerty.xml: The system cannot find the path specified
    at sun.net.ftp.FtpClient.readReply(Unknown Source)
    at sun.net.ftp.FtpClient.issueCommand(Unknown Source)
    at sun.net.ftp.FtpClient.issueCommandCheck(Unknown Source)
    at sun.net.ftp.FtpClient.cd(Unknown Source)
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at com.sun.xml.parser.InputEntity.init(InputEntity.java:141)
    at com.sun.xml.parser.Parser.parseInternal(Parser.java:463)
    at com.sun.xml.parser.Parser.parse(Parser.java:284)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
    at loadCallElement.parseDoc(loadCallElement.java:52)
    at SCMView.create(SCMView.java, Compiled Code)
    at EventController$5.actionPerformed(EventController.java:116)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    Thanks Jim,
    I've installed JDK V1.3.1 and the problem HAS gone away..... However now JDK V1.3.1 won't install on other Win 2K machines.....
    Gary.

Maybe you are looking for