chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srinivas Nv Gannavarapu" <srinivas.gannavar...@in.ibm.com>
Subject Need help in establishing the session with opencmis 0.13.0 (tip build) client connnect to server
Date Wed, 09 Dec 2015 11:56:44 GMT


We are trying to write a client code (ECMTest1.java) leveraging Apache
OpenCMIS 0.13.0 (latest tip build) to retrieve repository info and it fails
with the following exception. The server is also implemented with OpenCMIS
0.13.0 (latest tip build).

Are we missing something? Can anyone please help? ( also have the code
snippet and JAR's included below)

Exception in thread "main" java.lang.NoSuchFieldError:
com/sun/xml/bind/v2/model/nav/Navigator.REFLECTION
	at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.<init>
(RuntimeModelBuilder.java:87)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet
(JAXBContextImpl.java:422)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>
(JAXBContextImpl.java:286)
	at com.sun.xml.bind.v2.ContextFactory.createContext
(ContextFactory.java:139)
	at com.sun.xml.bind.v2.ContextFactory.createContext
(ContextFactory.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:95)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:56)
	at java.lang.reflect.Method.invoke(Method.java:620)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:260)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:247)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:444)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:649)
	at org.apache.cxf.common.jaxb.JAXBContextCache$2.run
(JAXBContextCache.java:347)
	at org.apache.cxf.common.jaxb.JAXBContextCache$2.run
(JAXBContextCache.java:345)
	at java.security.AccessController.doPrivileged
(AccessController.java:420)
	at org.apache.cxf.common.jaxb.JAXBContextCache.createContext
(JAXBContextCache.java:345)
	at
org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas
(JAXBContextCache.java:246)
	at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas
(JAXBDataBinding.java:472)
	at org.apache.cxf.jaxb.JAXBDataBinding.initialize
(JAXBDataBinding.java:327)
	at
org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings
(AbstractServiceFactoryBean.java:86)
	at
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL
(ReflectionServiceFactoryBean.java:423)
	at
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel
(ReflectionServiceFactoryBean.java:525)
	at
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create
(ReflectionServiceFactoryBean.java:261)
	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create
(JaxWsServiceFactoryBean.java:215)
	at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:467)
	at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:343)
	at javax.xml.ws.Service.getPort(Service.java:238)
	at
org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.createPortObjectFromServiceHolder
(AbstractPortProvider.java:717)
	at
org.apache.chemistry.opencmis.client.bindings.spi.webservices.CXFPortProvider.createPortObject
(CXFPortProvider.java:63)
	at
org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getPortObject
(AbstractPortProvider.java:459)
	at
org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getRepositoryServicePort
(AbstractPortProvider.java:281)
	at
org.apache.chemistry.opencmis.client.bindings.spi.webservices.RepositoryServiceImpl.getRepositoryInfo
(RepositoryServiceImpl.java:126)
	at
org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfo
(RepositoryServiceImpl.java:75)
	at org.apache.chemistry.opencmis.client.runtime.SessionImpl.connect
(SessionImpl.java:1125)
	at
org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.createSession
(SessionFactoryImpl.java:107)
	at
org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.createSession
(SessionFactoryImpl.java:69)
	at ECMTest1.connect(ECMTest1.java:204)
	at ECMTest1.main(ECMTest1.java:49)



Code snippet

	private static Session getSession() {

		SessionFactory factory = SessionFactoryImpl.newInstance();
		Map<String, String> parameter = new HashMap<String, String>();

		parameter.put(SessionParameter.USER, "xxx");
		parameter.put(SessionParameter.PASSWORD, "xxx");

		parameter.put(SessionParameter.BINDING_TYPE,
BindingType.WEBSERVICES.value());

		parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE,
"http://localhost:9080/openfncmis/services/ACLService?wsdl" (http://localhost:9080/openfncmis/services/ACLService?wsdl%27)
);
		parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE,
"http://localhost:9080/openfncmis//servicesObjectService?wsdl" (http://localhost:9080/openfncmis//servicesObjectService?wsdl%27)
);
		parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE,
"http://localhost:9080/openfncmis/services/MultiFilingService?wsdl" (http://localhost:9080/openfncmis/services/MultiFilingService?wsdl%27)
);
		parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE,
"http://localhost:9080/openfncmis/services/NavigationService?wsdl" (http://localhost:9080/openfncmis/services/NavigationService?wsdl%27)
);
		parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE,
"http://localhost:9080/openfncmis/services/DiscoveryService?wsdl" (http://localhost:9080/openfncmis/services/DiscoveryService?wsdl%27)
);
		parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE,
"http://localhost:9080/openfncmis/services/PolicyService?wsdl" (http://localhost:9080/openfncmis/services/PolicyService?wsdl%27)
);
		parameter.put
(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE,
"http://localhost:9080/openfncmis/services/RelationshipService?wsdl" (http://localhost:9080/openfncmis/services/RelationshipService?wsdl%27)
);
		parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE,
"http://localhost:9080/openfncmis/services/RepositoryService?wsdl" (http://localhost:9080/openfncmis/services/RepositoryService?wsdl%27)
);
		parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE,
"http://localhost:9080/openfncmis/services/VersioningService?wsdl" (http://localhost:9080/openfncmis/services/VersioningService?wsdl%27)
);

		parameter.put(SessionParameter.REPOSITORY_ID, "ECM");
		parameter.put(SessionParameter.AUTH_SOAP_USERNAMETOKEN,
"true");

		Session session = factory.createSession(parameter);

		return session;
	}



JARs used

asm-3.3.1.jar
chemistry-opencmis-client-api-1.0.0-SNAPSHOT.jar
chemistry-opencmis-client-bindings-1.0.0-SNAPSHOT.jar
chemistry-opencmis-client-impl-1.0.0-SNAPSHOT.jar
chemistry-opencmis-commons-api-1.0.0-SNAPSHOT.jar
chemistry-opencmis-commons-impl-1.0.0-SNAPSHOT.jar
chemistry-opencmis-test-tck-1.0.0-SNAPSHOT.jar
chemistry-opencmis-workbench-1.0.0-SNAPSHOT.jar
core-3.2.0.jar
cxf-core-3.0.7.jar
cxf-rt-bindings-soap-3.0.7.jar
cxf-rt-bindings-xml-3.0.7.jar
cxf-rt-databinding-jaxb-3.0.7.jar
cxf-rt-frontend-jaxws-3.0.7.jar
cxf-rt-frontend-simple-3.0.7.jar
cxf-rt-transports-http-3.0.7.jar
cxf-rt-ws-addr-3.0.7.jar
cxf-rt-wsdl-3.0.7.jar
cxf-rt-ws-policy-3.0.7.jar
groovy-all-2.4.5.jar
javase-3.2.0.jar
jaxb-core-2.2.11.jar
jaxb-impl-2.1.7.jar
log4j-1.2.17.jar
neethi-3.0.3.jar
slf4j-api-1.7.5.jar
slf4j-log4j12-1.7.5.jar
stax2-api-3.1.4.jar
woodstox-core-asl-4.4.1.jar
wsdl4j-1.6.3.jar
xml-resolver-1.2.jar
xmlschema-core-2.2.1.jar

                                                                                        
                                                                                        
                                                                                        
 Srinivas Gannavarapu (Srini G)                                                         
 Senior Software Engineer                                                               
 IBM Analytics                                                                          
                                                                                        
 Phone: +91 40 669 57058                                                                
 E-mail:                                                                                
 srinivas.gannavarapu@in.ibm.com                                                        
                                                                                        
                                                                                        
                                                                                        









Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message