java - Access denied exception when trying to create PubSub instance -
i trying publish data on pubsub. so, need run below code
pubsub pubsub = pubsuboptions.defaultinstance().service(); string topicname = "mytopic"; topic topic = pubsub.create(topicinfo.of(topicname));
this exception getting
nested in java.lang.exceptionininitializererror: java.security.accesscontrolexception: access denied ("java.lang.runtimepermission" "modifythreadgroup") @ java.security.accesscontrolcontext.checkpermission(accesscontrolcontext.java:484) @ java.security.accesscontroller.checkpermission(accesscontroller.java:698) @ java.lang.securitymanager.checkpermission(securitymanager.java:549) @ java.lang.threadgroup.checkaccess(threadgroup.java:315) @ java.lang.thread.init(thread.java:391) @ java.lang.thread.init(thread.java:349) @ java.lang.thread.<init>(thread.java:508) @ io.netty.util.internal.threadlocalrandom$1.<init>(threadlocalrandom.java:79) @ io.netty.util.internal.threadlocalrandom.<clinit>(threadlocalrandom.java:79) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:163) @ io.netty.util.internal.logging.internalloggerfactory.<clinit>(internalloggerfactory.java:44) @ io.netty.channel.multithreadeventloopgroup.<clinit>(multithreadeventloopgroup.java:33) @ io.grpc.netty.utils$defaulteventloopgroupresource.create(utils.java:210) @ io.grpc.netty.utils$defaulteventloopgroupresource.create(utils.java:193) @ io.grpc.internal.sharedresourceholder.getinternal(sharedresourceholder.java:124) @ io.grpc.internal.sharedresourceholder.get(sharedresourceholder.java:94) @ io.grpc.netty.nettychannelbuilder$nettytransportfactory.<init>(nettychannelbuilder.java:306) @ io.grpc.netty.nettychannelbuilder$nettytransportfactory.<init>(nettychannelbuilder.java:275) @ io.grpc.netty.nettychannelbuilder.buildtransportfactory(nettychannelbuilder.java:225) @ io.grpc.internal.abstractmanagedchannelimplbuilder.build(abstractmanagedchannelimplbuilder.java:191) @ com.google.api.gax.grpc.serviceapisettings$builder$3.getorbuildchannel(serviceapisettings.java:349) @ com.google.cloud.pubsub.spi.v1.publisherapi.<init>(publisherapi.java:197) @ com.google.cloud.pubsub.spi.v1.publisherapi.create(publisherapi.java:186) @ com.google.cloud.pubsub.spi.defaultpubsubrpc.<init>(defaultpubsubrpc.java:160) @ com.google.cloud.pubsub.pubsuboptions$defaultpubsubrpcfactory.create(pubsuboptions.java:60) @ com.google.cloud.pubsub.pubsuboptions$defaultpubsubrpcfactory.create(pubsuboptions.java:54) @ com.google.cloud.serviceoptions.rpc(serviceoptions.java:399) @ com.google.cloud.pubsub.pubsubimpl.<init>(pubsubimpl.java:115) @ com.google.cloud.pubsub.pubsuboptions$defaultpubsubfactory.create(pubsuboptions.java:43) @ com.google.cloud.pubsub.pubsuboptions$defaultpubsubfactory.create(pubsuboptions.java:38) @ com.google.cloud.serviceoptions.service(serviceoptions.java:391) @ com.beonic.api.apicallservlet.processrequest(apicallservlet.java:78)
i have created billable project id , permissions given project. please advise what's missing. help.
Comments
Post a Comment