Closed rakeshrangappa closed 8 years ago
Hi @rakesh30892,
what version of the connector are you using?
hi, I am using connector4java 1.8
Also, I am referring to the code provided here .
https://github.com/osiam/connector4java/blob/master/docs/vertx-example.md.
I am unable to resolve the following line of code
URI uri = oConnector.getRedirectLoginUri();
Do you use Maven or Gradle, or did you just put the connector's .jar
file in you classpath?
I just put the connector's .jar file in the classpath.
Alright, It's highly preferable that you use some build tool like Maven or Gradle that does dependency management for you. The connector is always available on the Maven Central, but it has some dependencies on external libs, namely:
You have to put all of these on the classpath.
I added all the above mentioned .jar's to my classpath. But let me try it using a build tool and update you.
Thanks
Alright. If it works and this issue is fully solved, please close it. Thank you for choosing OSIAM and have fun with it :)
Hey @rakesh30892. did @tkrille 's explanations help? If so, please close this issue.
Hi, Can you guide me with the following error.
Exception in thread "main" org.osiam.client.exception.ConnectionInitializationException: Cannot connect to OSIAM at org.osiam.client.AbstractOsiamService.createResource(AbstractOsiamService.java:193) at org.osiam.client.OsiamUserService.createUser(OsiamUserService.java:127) at org.osiam.client.OsiamConnector.createUser(OsiamConnector.java:445) at osiam.CreateUser.main(CreateUser.java:124) Caused by: com.fasterxml.jackson.databind.JsonMappingException: Failed to instantiate class org.osiam.resources.helper.JsonDateSerializer, problem: null at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:916) at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:470) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.resolve(BeanSerializerBase.java:300) at com.fasterxml.jackson.databind.ser.SerializerCache.addAndResolveNonTypedSerializer(SerializerCache.java:146) at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:901) at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:429) at com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:520) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:99) at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2626) at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2118) at org.osiam.client.AbstractOsiamService.mapToString(AbstractOsiamService.java:280) at org.osiam.client.AbstractOsiamService.createResource(AbstractOsiamService.java:191) ... 3 more Caused by: java.lang.IllegalArgumentException: Failed to instantiate class org.osiam.resources.helper.JsonDateSerializer, problem: null at com.fasterxml.jackson.databind.util.ClassUtil.throwAsIAE(ClassUtil.java:328) at com.fasterxml.jackson.databind.util.ClassUtil.unwrapAndThrowAsIAE(ClassUtil.java:348) at com.fasterxml.jackson.databind.util.ClassUtil.createInstance(ClassUtil.java:380) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializerInstance(DefaultSerializerProvider.java:426) at com.fasterxml.jackson.databind.ser.BasicSerializerFactory.findSerializerFromAnnotation(BasicSerializerFactory.java:447) at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._constructWriter(BeanSerializerFactory.java:729) at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:579) at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.constructBeanSerializer(BeanSerializerFactory.java:360) at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanSerializer(BeanSerializerFactory.java:247) at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:198) at com.fasterxml.jackson.databind.ser.SerializerFactory.createSerializer(SerializerFactory.java:53) at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:935) at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:911) ... 14 more Caused by: java.lang.ClassNotFoundException: org.joda.time.format.ISODateTimeFormat 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 org.osiam.resources.helper.JsonDateSerializer.(JsonDateSerializer.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.fasterxml.jackson.databind.util.ClassUtil.createInstance(ClassUtil.java:378)
... 24 more