• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Problem while connecting to UDDI registry

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying to connect to UDDI registry with the following code
--------
try{
//create a connection factory
ConnectionFactory factory=ConnectionFactory.newInstance();

//configuring the connection factory
Properties prop=new Properties();
prop.setProperty("javax.xml.registry.lifeCycleManagerURL","https://uddi.ibm.com/testregistry/publishapi");
prop.setProperty("javax.xml.registry.queryManagerURL","http://uddi.ibm.com/testregistry/inquiryapi");
prop.setProperty("javax.xml.registry.factoryClass","com.sun.xml.registry.uddi.ConnectionFactoryImpl");
prop.setProperty("javax.xml.registry.security.authenticationMethod","UDDI_GET_AUTHTOKEN");
factory.setProperties(prop);

// now create the connection
Connection connection=factory.createConnection();
.......


-----------------
and I got the following exception
---
Failure to initialize mapper
Sep 1, 2005 3:04:35 PM com.sun.xml.registry.uddi.UDDIMapper initJAXBObjectFactory
SEVERE: Exiting unable to initial JAXB context
java.lang.NoClassDefFoundError: org/relaxng/datatype/ValidationContext
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.sun.xml.registry.uddi.bindings_v2.impl.runtime.GrammarInfoFacade.class$(Unknown Source)
at com.sun.xml.registry.uddi.bindings_v2.impl.runtime.GrammarInfoFacade.createGrammarInfoFacade(Unknown Source)
at com.sun.xml.registry.uddi.bindings_v2.impl.runtime.DefaultJAXBContextImpl.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:96)
at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:229)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:149)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:238)
at com.sun.xml.registry.uddi.UDDIMapper.initJAXBObjectFactory(Unknown Source)
at com.sun.xml.registry.uddi.UDDIMapper.<init>(Unknown Source)
at com.sun.xml.registry.uddi.RegistryServiceImpl.<init>(Unknown Source)
at com.sun.xml.registry.uddi.ConnectionImpl.<init>(Unknown Source)
at com.sun.xml.registry.uddi.ConnectionFactoryImpl.createConnection(Unknown Source)
at com.sun.xml.registry.common.ConnectionFactoryImpl.createConnection(Unknown Source)
at com.JAXRConnection.main(JAXRConnection.java:57)
--------------- linked to ------------------
javax.xml.bind.JAXBException
- with linked exception:
[java.lang.NoClassDefFoundError: org/relaxng/datatype/ValidationContext]
at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:96)
at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:229)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:149)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:238)
at com.sun.xml.registry.uddi.UDDIMapper.initJAXBObjectFactory(Unknown Source)
at com.sun.xml.registry.uddi.UDDIMapper.<init>(Unknown Source)
at com.sun.xml.registry.uddi.RegistryServiceImpl.<init>(Unknown Source)
at com.sun.xml.registry.uddi.ConnectionImpl.<init>(Unknown Source)
at com.sun.xml.registry.uddi.ConnectionFactoryImpl.createConnection(Unknown Source)
at com.sun.xml.registry.common.ConnectionFactoryImpl.createConnection(Unknown Source)
----
for line

"Connection connection=factory.createConnection();"

Can any one tell me how to handle this exception? Do I need to set some more properties while creating the connection?

Thanks in advance
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic