RemoteSecurityMaster creation gives me error


#1

Code run

new RemoteSecurityMaster(new URI(“http://localhost:8080/jax/components/SecurityMaster/central”));

version OG-Platform 1.2.x dev branch, 1.2.2 maven build.
and run using Eclipse SDK, Version: 4.2.2,

gets the error

Exception in thread “main” java.lang.ExceptionInInitializerError
at com.opengamma.util.fudgemsg.OpenGammaFudgeContext.getInstance(OpenGammaFudgeContext.java:30)
at com.opengamma.transport.jaxrs.FudgeBase.(FudgeBase.java:31)
at com.opengamma.transport.jaxrs.FudgeObjectBinaryConsumer.(FudgeObjectBinaryConsumer.java:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:374)
at java.lang.Class.newInstance(Class.java:327)
at com.sun.jersey.core.spi.component.ComponentConstructor._getInstance(ComponentConstructor.java:192)
at com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:179)
at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:166)
at com.sun.jersey.core.spi.component.ProviderFactory._getComponentProvider(ProviderFactory.java:159)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:153)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:251)
at com.sun.jersey.core.spi.component.ProviderServices.getProviders(ProviderServices.java:148)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:175)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:342)
at com.sun.jersey.api.client.Client.access$000(Client.java:118)
at com.sun.jersey.api.client.Client$1.f(Client.java:191)
at com.sun.jersey.api.client.Client$1.f(Client.java:187)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.(Client.java:187)
at com.sun.jersey.api.client.Client.(Client.java:170)
at com.sun.jersey.api.client.Client.create(Client.java:679)
at com.opengamma.util.rest.FudgeRestClient.create(FudgeRestClient.java:48)
at com.opengamma.util.rest.AbstractRemoteClient.(AbstractRemoteClient.java:38)
at com.opengamma.master.impl.AbstractRemoteMaster.(AbstractRemoteMaster.java:43)
at com.opengamma.master.impl.AbstractRemoteDocumentMaster.(AbstractRemoteDocumentMaster.java:40)
at com.opengamma.master.security.impl.RemoteSecurityMaster.(RemoteSecurityMaster.java:40)
at com.algotree.ogloader.util.misc.ConfigSource.main(ConfigSource.java:1040)
Caused by: org.fudgemsg.FudgeRuntimeException: Unable to scan classpath elements for @FudgeBuilderFor annotations
at org.fudgemsg.types.ClasspathUtilities.getAnnotationDB(ClasspathUtilities.java:74)
at org.fudgemsg.types.ClasspathUtilities.getClassNamesWithAnnotation(ClasspathUtilities.java:155)
at org.fudgemsg.mapping.FudgeObjectDictionary.addAllAnnotatedBuilders(FudgeObjectDictionary.java:307)
at com.opengamma.util.fudgemsg.OpenGammaFudgeContext$ContextHolder.constructContext(OpenGammaFudgeContext.java:42)
at com.opengamma.util.fudgemsg.OpenGammaFudgeContext$ContextHolder.(OpenGammaFudgeContext.java:37)
… 32 more
Caused by: java.util.zip.ZipException: invalid distance too far back
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:193)
at java.util.jar.JarInputStream.read(JarInputStream.java:207)
at org.scannotation.archiveiterator.InputStreamWrapper.read(InputStreamWrapper.java:36)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readUTF(DataInputStream.java:609)
at java.io.DataInputStream.readUTF(DataInputStream.java:564)
at javassist.bytecode.Utf8Info.(ConstPool.java:1483)
at javassist.bytecode.ConstPool.readOne(ConstPool.java:992)
at javassist.bytecode.ConstPool.read(ConstPool.java:970)
at javassist.bytecode.ConstPool.(ConstPool.java:127)
at javassist.bytecode.ClassFile.read(ClassFile.java:693)
at javassist.bytecode.ClassFile.(ClassFile.java:85)
at org.scannotation.AnnotationDB.scanClass(AnnotationDB.java:311)
at org.scannotation.AnnotationDB.scanArchives(AnnotationDB.java:294)
at org.fudgemsg.types.ClasspathUtilities.getAnnotationDB(ClasspathUtilities.java:72)
… 36 more


#2

Later I found that it is a matter of Eclipse permissions problem…

starting eclipse as sudo solved issue. Sorry for convenience made.


#3

Ok, no problem, glad you got it sorted.