Using Nexus Repository Manager 3.x Server for connecting Nexus 3. But the Test connection is failing with the below error.
Nexus Repository Manager 3.x connection failed
com.sonatype.nexus.api.repository.v3.impl.rest.NxrmResponseException: status code: 401, reason phrase: Unauthorized
at com.sonatype.nexus.api.repository.v3.impl.rest.NxrmResponseHandler.handleResponse(NxrmResponseHandler.java:51)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
at com.sonatype.nexus.api.repository.v3.impl.NexusRepositoryHttpClient.execute(NexusRepositoryHttpClient.java:83)
Caused: com.sonatype.nexus.api.exception.RepositoryManagerException: Get server version was unsuccessful (401 response from server)
at com.sonatype.nexus.api.repository.v3.impl.NexusRepositoryHttpClient.unsuccessfulEx(NexusRepositoryHttpClient.java:105)
at com.sonatype.nexus.api.repository.v3.impl.NexusRepositoryHttpClient.execute(NexusRepositoryHttpClient.java:86)
at com.sonatype.nexus.api.repository.v3.impl.DefaultNexusRepositoryV3Client.getVersion(DefaultNexusRepositoryV3Client.java:122)
at com.sonatype.nexus.api.repository.v3.RepositoryManagerV3Client$getVersion$0.call(Unknown Source)
at org.sonatype.nexus.ci.config.Nxrm3Configuration$DescriptorImpl.doVerifyCredentials(Nxrm3Configuration.groovy:92)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:536)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:694)
at org.kohsuke.stapler.Stapler.service(Stapler.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1633)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:92)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:51)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:561)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.lang.Thread.run(Thread.java:748)
The error indicates it's a Authentication failure. Can you check the credentials you are using to initiate the connection?
401, reason phrase: Unauthorized
Related
I'm attempting to create a build that monitors the latest docker images. However, I'm facing some issues in setting up the part where I tell the job to monitor for latest images on my DockerHub repo. Would be happy if anyone can help me here.
I've attached the settings in the url.
these are the settings
Here are the logs:
net.sf.json.JSONException: JSONObject["org-jenkinsci-plugins-registry-notification-opt-impl-TriggerForAllUsedInJob"] is not a JSONObject.
at net.sf.json.JSONObject.getJSONObject(JSONObject.java:2006)
at org.jenkinsci.plugins.registry.notification.DockerHubTrigger$DescriptorImpl.newInstance(DockerHubTrigger.java:146)
at org.jenkinsci.plugins.registry.notification.DockerHubTrigger$DescriptorImpl.newInstance(DockerHubTrigger.java:126)
at hudson.model.AbstractProject.buildDescribable(AbstractProject.java:1815)
at hudson.model.AbstractProject.submit(AbstractProject.java:1793)
at hudson.model.Project.submit(Project.java:225)
at hudson.model.Job.doConfigSubmit(Job.java:1335)
at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:768)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:36)
at org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48)
at org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:536)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:694)
at org.kohsuke.stapler.Stapler.service(Stapler.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:92)
at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:92)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:218)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:62)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:109)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:168)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:51)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.lang.Thread.run(Thread.java:748) ```
Running on Jenkins 2.275, CloudBees Docker Hub/Registry Notification 2.5
Would like to seek help in solving this issue
I am trying to implement XEP-0055 which is supported by ejabbed as shown here in supported xeps
This is my request:
XMPPIQ *iq = [[XMPPIQ alloc] init];
[iq addAttributeWithName:#"type" stringValue:#"get"];
[iq addAttributeWithName:#"from" stringValue:#"testuser1#company.com"];
[iq addAttributeWithName:#"to" stringValue:#"company.com"];
[iq addAttributeWithName:#"id" stringValue:#"search1"];
XMPPElement *query = [XMPPElement elementWithName:#"query"];
[query setXmlns:#"jabber:iq:search"];
[iq addChild:query];
[self.xmppStream sendElement:iq];
I am getting this response:
<iq xmlns="jabber:client" from="company.com" to="testuser1#company.com/2834146151141475281662718" type="error" id="search1">
<query xmlns="jabber:iq:search"/>
<error code="501" type="cancel">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
Why am I receiving feature-not-implemented? Link to official XEP description.
In ejabberd, the search functionality is delegated to a subdomain, by default using the vjud prefix. Try sending the search request to vjud.company.com instead.
i set up the project using android annotation, then check in to the svn after the checkout from the SVN ,the problem started ,please do something if anybody experienced in this
08-14 13:02:31.097: W/dalvikvm(16362): threadid=1: thread exiting with uncaught exception (group=0x41948ba8)
08-14 13:02:31.097: W/System.err(16362): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{}: java.lang.ClassNotFoundException: Didn't find class "com.MainActivity" on path: DexPathList[[zip file "/data/app/"],nativeLibraryDirectories=[/data/app-lib/com-2, /vendor/lib, /system/lib]]
08-14 13:02:31.097: W/System.err(16362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
08-14 13:02:31.097: W/System.err(16362): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
08-14 13:02:31.097: W/System.err(16362): at android.app.ActivityThread.access$800(ActivityThread.java:135)
08-14 13:02:31.097: W/System.err(16362): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
08-14 13:02:31.097: W/System.err(16362): at android.os.Handler.dispatchMessage(Handler.java:102)
08-14 13:02:31.097: W/System.err(16362): at android.os.Looper.loop(Looper.java:136)
08-14 13:02:31.097: W/System.err(16362): at android.app.ActivityThread.main(ActivityThread.java:5001)
08-14 13:02:31.097: W/System.err(16362): at java.lang.reflect.Method.invokeNative(Native Method)
08-14 13:02:31.097: W/System.err(16362): at java.lang.reflect.Method.invoke(Method.java:515)
08-14 13:02:31.097: W/System.err(16362): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
08-14 13:02:31.097: W/System.err(16362): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
08-14 13:02:31.097: W/System.err(16362): at dalvik.system.NativeStart.main(Native Method)
08-14 13:02:31.107: W/System.err(16362): Caused by: java.lang.ClassNotFoundException: Didn't find class ".MainActivity_" on path: DexPathList[[zip file "/data/app/com.-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.-2, /vendor/lib, /system/lib]]
08-14 13:02:31.107: W/System.err(16362): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-14 13:02:31.107: W/System.err(16362): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
08-14 13:02:31.107: W/System.err(16362): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
08-14 13:02:31.107: W/System.err(16362): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
08-14 13:02:31.107: W/System.err(16362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
08-14 13:02:31.107: W/System.err(16362): ... 11 more
latter i found this answer
->Right click the project
->select Property
->select Java Compiler
->select Annotation processing
->Select Factory Path
there remove the jar file and re add the jar file, the do Apply, then give OK
i have a lot of search regarding file transfer in IOS. I am using XEP-0065 and XEP-0096 for FileTransfer . Code which i am using :
- (void)sendToOtherDevice:(NSData *)fileData receiverJid:(NSString *)receiverJid
{
NSString *s = [NSString stringWithFormat:#"%#/Smack",receiverJid];
XMPPJID *jid = [XMPPJID jidWithString:s];
// XMPPSIFileTransfer * sifiletransfer = [[XMPPSIFileTransfer alloc] initiateFileTransferTo:jid withData:fileData];
XMPPSIFileTransfer *sifiletransfer = [[XMPPSIFileTransfer alloc] init];
[sifiletransfer initiateFileTransferTo:jid withData:fileData];
//XMPPJID *jid = [XMPPJID jidWithString:receiverJid];
NSString *jabbarID = [[[[self appDelegate] xmppStream] myJID] bare];
XMPPJID *senderjid = [XMPPJID jidWithString:jabbarID];
//[TURNSocket setProxyCandidates:[NSArray arrayWithObjects:s, nil]];
// [TURNSocket setProxyCandidates:[NSArray arrayWithObjects:s,jabbarID, nil]];
[TURNSocket setProxyCandidates:[NSArray arrayWithObjects:jid.domain,senderjid.domain, nil]];
// [TURNSocket setProxyCandidates:[NSArray arrayWithObjects:jid.domain, nil]];
//[TURNSocket setProxyCandidates:[NSArray arrayWithObjects:#"111.11.111.111", nil]];
TURNSocket *socket1 = [[TURNSocket alloc] initWithStream:[self xmppStream] toJID:jid];
// [turnSockets addObject:turnSocket];
[socket1 startWithDelegate:self delegateQueue:dispatch_get_main_queue()];
}
-(void)turnSocket:(TURNSocket *)sender didSucceed:(GCDAsyncSocket *)socket
{
[socket writeData:photoData withTimeout:60.0f tag:0];
[socket disconnectAfterWriting];
}
- (void)turnSocketDidFail:(TURNSocket *)sender
{
NSLog(#"Couldn't set up bytestream for file transfer!");
}
and i found following XML stanzas :
2013-11-22 14:23:08:990 iPhoneXMPP[1434:6417] SEND: <iq type="get" to="lava1" id="A5D91010-C182-4BCB-A989-5DFF2C0B6AE8"><query xmlns="http://jabber.org/protocol/disco#items"/></iq>
2013-11-22 14:23:09:290 iPhoneXMPP[1434:6a07] RECV: <iq xmlns="jabber:client" type="error" id="A5D91010-C182-4BCB-A989-5DFF2C0B6AE8" to="lava#example.com/368c5070" from="lava1"><query xmlns="http://jabber.org/protocol/disco#items"/><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
2013-11-22 14:23:09:291 iPhoneXMPP[1434:60b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-11-22 14:23:09:294 iPhoneXMPP[1434:6417] SEND: <iq type="get" to="example.com" id="7EB43464-63BC-4ADF-8B98-A1A15AB51DB3"><query xmlns="http://jabber.org/protocol/disco#items"/></iq>
2013-11-22 14:23:09:493 iPhoneXMPP[1434:400b] RECV: <iq xmlns="jabber:client" type="result" id="7EB43464-63BC-4ADF-8B98-A1A15AB51DB3" from="example.com" to="lava#example.com/368c5070"><query xmlns="http://jabber.org/protocol/disco#items"><item jid="search.example.com" name="User Search"/><item jid="conference.example.com" name="Public Chatrooms"/><item jid="proxy.example.com" name="Socks 5 Bytestreams Proxy"/><item jid="pubsub.example.com" name="Publish-Subscribe service"/></query></iq>
2013-11-22 14:23:09:494 iPhoneXMPP[1434:60b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-11-22 14:23:09:504 iPhoneXMPP[1434:6417] SEND: <iq type="get" to="proxy.example.com" id="0DFDF89F-29DE-4477-AF5E-B67387DD973C"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
2013-11-22 14:23:09:698 iPhoneXMPP[1434:400b] RECV: <iq xmlns="jabber:client" type="result" id="0DFDF89F-29DE-4477-AF5E-B67387DD973C" from="proxy.example.com" to="lava#example.com/368c5070"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="proxy" name="SOCKS5 Bytestreams Service" type="bytestreams"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/disco#info"/></query></iq>
2013-11-22 14:23:09:699 iPhoneXMPP[1434:60b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-11-22 14:23:09:701 iPhoneXMPP[1434:6a07] SEND: <iq type="get" to="proxy.example.com" id="63C74776-93A4-4C97-8CFC-63C57494E4F6"><query xmlns="http://jabber.org/protocol/bytestreams"/></iq>
2013-11-22 14:23:09:903 iPhoneXMPP[1434:6417] RECV: <iq xmlns="jabber:client" type="result" id="63C74776-93A4-4C97-8CFC-63C57494E4F6" from="proxy.example.com" to="lava#example.com/368c5070"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost jid="proxy.example.com" host="10.128.63.123" port="7777"/></query></iq>
2013-11-22 14:23:09:904 iPhoneXMPP[1434:60b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-11-22 14:23:09:906 iPhoneXMPP[1434:6417] SEND: <iq type="set" to="lava1/Smack" id="BB87F255-51AF-49F1-B700-D009BFF8A057"><query xmlns="http://jabber.org/protocol/bytestreams" sid="BB87F255-51AF-49F1-B700-D009BFF8A057" mode="tcp"><streamhost xmlns="http://jabber.org/protocol/bytestreams" jid="proxy.example.com" host="10.128.63.123" port="7777"/></query></iq>
2013-11-22 14:23:10:210 iPhoneXMPP[1434:6a07] RECV: <iq xmlns="jabber:client" type="error" id="BB87F255-51AF-49F1-B700-D009BFF8A057" to="lava#example.com/368c5070" from="lava1/Smack"><query xmlns="http://jabber.org/protocol/bytestreams" sid="BB87F255-51AF-49F1-B700-D009BFF8A057" mode="tcp"><streamhost jid="proxy.example.com" host="10.128.63.123" port="7777"/></query><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
2013-11-22 14:23:10:212 iPhoneXMPP[1434:60b] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
2013-11-22 14:23:10.213 iPhoneXMPP[1434:60b] Couldn't set up bytestream for file transfer!
Please Let me know what i am doing wrong. How Can i use XEP-0096 for FileTransfer.
I am developing an application in that I want to update my avatar image. I am following XEP-0153 guidelines to update my avatar image and I constructed an NSXMLElement correspond to the following code in XEP-0153 and sent that element through XMPPStream.
<iq from='juliet#capulet.com'
type='set'
id='vc1'>
<vCard xmlns='vcard-temp'>
<PHOTO>
<TYPE>image/jpeg</TYPE>
<BINVAL>
Base64-encoded-avatar-file-here!
</BINVAL>
</PHOTO>
</vCard>
</iq>
The server responses the following error:
<iq xmlns="jabber:client" type="error" id="vc1" to="vvreddy50#gmail.com/83557F96">
<vCard xmlns="vcard-temp">
<photo>
<type>image/jpeg</type>
<binval>Base64-encoded-avatar-file-here</binval>
</photo>
</vCard>
<error code="500" type="wait">
<internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
</internal-server-error>
</error>
</iq>
Instead of <iq to='juliet#capulet.com' type='result' id='vc1'/>
Please can anyone post the code or the link related to update avatar image? Thanks in advance.
- (void)updateAvatar:(UIImage *)avatar
{
NSData *imageData = UIImagePNGRepresentation(avatar);
dispatch_queue_t queue = dispatch_queue_create("queue", DISPATCH_QUEUE_PRIORITY_DEFAULT);
dispatch_async(queue, ^{
XMPPvCardTempModule *vCardTempModule = [[XMPPHandler sharedInstance] xmppvCardTempModule];
XMPPvCardTemp *myVcardTemp = [vCardTempModule myvCardTemp];
[myVcardTemp setName:[NSString stringWithFormat:#"%#",name.text]];
[myVcardTemp setPhoto:imageData];
[vCardTempModule updateMyvCardTemp:myVcardTemp];
});
}
#import "XMPPvCardTemp.h"
- (void)updateAvatar:(UIImage *)avatar{
NSData *imageData1 = UIImageJPEGRepresentation(avatar,0.5);
NSXMLElement *vCardXML = [NSXMLElement elementWithName:#"vCard" xmlns:#"vcard-temp"];
NSXMLElement *photoXML = [NSXMLElement elementWithName:#"PHOTO"];
NSXMLElement *typeXML = [NSXMLElement elementWithName:#"TYPE"stringValue:#"image/jpeg"];
NSXMLElement *binvalXML = [NSXMLElement elementWithName:#"BINVAL" stringValue:[imageData1 base64Encoding]];
[photoXML addChild:typeXML];
[photoXML addChild:binvalXML];
[vCardXML addChild:photoXML];
XMPPvCardTemp *myvCardTemp = [[[self appDelegate] xmppvCardTempModule]myvCardTemp];
if (myvCardTemp) {
[myvCardTemp setPhoto:imageData1];
[[[self appDelegate] xmppvCardTempModule] updateMyvCardTemp
:myvCardTemp];
}
else{
XMPPvCardTemp *newvCardTemp = [XMPPvCardTemp vCardTempFromElement:vCardXML];
[[[self appDelegate] xmppvCardTempModule] updateMyvCardTemp:newvCardTemp];
}
}
From the XMPP Core RFC, <error type='wait'> means:
retry after waiting (the error is temporary)
so your code should wait a while and re-send the request.
(This is assuming that you are actually sending a base64-encoded JPEG image as the BINVAL of your vCard. The reply from the server doesn't correspond to the request you say you sent, so I'm assuming you've edited both. It would be better to include the exact request and reply in your question, but truncate the base64-encoded image to a few characters for concision.)