Hi Dimuthu,

Thank you.
I have an assumption that it is due to SSL keys. As I'm calling to an https
website from App Factory deployment.
Shall I install JIRA locally and try it and schedule a call?

Will a time around 9-10 a.m. be convenient for u?

Thanks.
Regards,
Dilhasha


*M.N.F. Dilhasha*
Software Engineering Intern | *WSO2 Inc.*

email   :
*[email protected] <[email protected]>*mobile : +94 77 8449321

On Sat, Apr 11, 2015 at 7:33 AM, Dimuthu Leelarathne <[email protected]>
wrote:

> Hi Fathima,
>
> If you want schedule a call at convienient time and send me SMS.
>
> I will join and help you debug the code.
>
> thanks,
> dimuthu
>
>
> On Sat, Apr 11, 2015 at 7:26 AM, Dimuthu Leelarathne <[email protected]>
> wrote:
>
>> Hi Fathima,
>>
>> There seems to be an issue with the keys. How did you set the keys to the
>> OAuth library? If you set them explicitly? Can you give the code sample?
>>
>> thanks,
>> diuthu
>>
>>
>> On Fri, Apr 10, 2015 at 2:20 PM, Fathima Dilhasha <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> I'm trying to retrieve issue Summaries from a Jira Instance via an OAuth
>>> client. I am using the Atlassian OAuth Client which uses net.oauth library.
>>> I have a client written in Java which does the task.
>>>
>>> I get the following error when I try to do the same steps within a
>>> carbon component in App Factory.
>>> Following is the error I get.
>>>
>>> *TID: [0] [AF] [2015-04-10 08:33:56,184] ERROR
>>> {module/issuetracker/getIssueSummaries.jag} -
>>>  org.mozilla.javascript.WrappedException: Wrapped
>>> java.lang.RuntimeException: Failed to obtain request token
>>> (/appmgt/modules/issuetracker/get/getIssueSummaries.jag#54)*
>>> * at
>>> org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)*
>>> * at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)*
>>> * at
>>> org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)*
>>> * at
>>> org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.get.c1._c_anonymous_1(/appmgt/modules/issuetracker/get/getIssueSummaries.jag:54)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.get.c1.call(/appmgt/modules/issuetracker/get/getIssueSummaries.jag)*
>>> * at
>>> org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)*
>>> * at
>>> org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)*
>>> * at
>>> org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)*
>>> * at
>>> org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.c0._c_anonymous_4(/appmgt/modules/issuetracker/module.jag:32)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.c0.call(/appmgt/modules/issuetracker/module.jag)*
>>> * at
>>> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1._c_anonymous_1(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag:15)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.call(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>> * at
>>> org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1._c_script_0(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag:9)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.call(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>> * at
>>> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)*
>>> * at
>>> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.call(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>> * at
>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.exec(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>> * at
>>> org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)*
>>> * at
>>> org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)*
>>> * at
>>> org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:541)*
>>> * at
>>> org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)*
>>> * at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)*
>>> * at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)*
>>> * at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)*
>>> * at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)*
>>> * at
>>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)*
>>> * at
>>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)*
>>> * at
>>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)*
>>> * at
>>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)*
>>> * at
>>> org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)*
>>> * at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)*
>>> * at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)*
>>> * at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)*
>>> * at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)*
>>> * at
>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)*
>>> * at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)*
>>> * at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)*
>>> * at
>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)*
>>> * at
>>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)*
>>> * at
>>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)*
>>> * at
>>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)*
>>> * at
>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)*
>>> * at
>>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)*
>>> * at
>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)*
>>> * at
>>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)*
>>> * at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)*
>>> * at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)*
>>> * at
>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)*
>>> * at
>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)*
>>> * at
>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)*
>>> * at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)*
>>> * at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)*
>>> * at java.lang.Thread.run(Thread.java:744)*
>>> *Caused by: java.lang.RuntimeException: Failed to obtain request token*
>>> * at
>>> org.wso2.carbon.appfactory.issuetracking.AtlassianOAuthClient.getRequestToken(AtlassianOAuthClient.java:71)*
>>> * at
>>> org.wso2.carbon.appfactory.issuetracking.service.IssueTrackerService.getOAuthAuthorizationUrl(IssueTrackerService.java:63)*
>>> * at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
>>> * at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)*
>>> * at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
>>> * at java.lang.reflect.Method.invoke(Method.java:606)*
>>> * at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)*
>>> * ... 56 more*
>>> *Caused by: net.oauth.OAuthException:
>>> java.security.spec.InvalidKeySpecException:
>>> java.security.InvalidKeyException: IOException: DerInputStream.getLength():
>>> lengthTag=42, too big.*
>>> * at net.oauth.signature.RSA_SHA1.initialize(RSA_SHA1.java:118)*
>>> * at
>>> net.oauth.signature.OAuthSignatureMethod.newMethod(OAuthSignatureMethod.java:218)*
>>> * at
>>> net.oauth.signature.OAuthSignatureMethod.newSigner(OAuthSignatureMethod.java:204)*
>>> * at net.oauth.OAuthMessage.sign(OAuthMessage.java:297)*
>>> * at net.oauth.OAuthMessage.addRequiredParameters(OAuthMessage.java:287)*
>>> * at net.oauth.OAuthAccessor.newRequestMessage(OAuthAccessor.java:91)*
>>> * at net.oauth.OAuthAccessor.newRequestMessage(OAuthAccessor.java:97)*
>>> * at net.oauth.client.OAuthClient.invoke(OAuthClient.java:252)*
>>> * at
>>> net.oauth.client.OAuthClient.getRequestTokenResponse(OAuthClient.java:190)*
>>> * at
>>> org.wso2.carbon.appfactory.issuetracking.AtlassianOAuthClient.getRequestToken(AtlassianOAuthClient.java:62)*
>>> * ... 62 more*
>>> *Caused by: java.security.spec.InvalidKeySpecException:
>>> java.security.InvalidKeyException: IOException: DerInputStream.getLength():
>>> lengthTag=42, too big.*
>>> * at
>>> sun.security.rsa.RSAKeyFactory.engineGeneratePublic(RSAKeyFactory.java:205)*
>>> * at java.security.KeyFactory.generatePublic(KeyFactory.java:334)*
>>> * at net.oauth.signature.RSA_SHA1.getPublicKeyFromDer(RSA_SHA1.java:136)*
>>> * at net.oauth.signature.RSA_SHA1.loadPublicKey(RSA_SHA1.java:315)*
>>> * at net.oauth.signature.RSA_SHA1.initialize(RSA_SHA1.java:110)*
>>> * ... 71 more*
>>> *Caused by: java.security.InvalidKeyException: IOException:
>>> DerInputStream.getLength(): lengthTag=42, too big.*
>>> * at sun.security.x509.X509Key.decode(X509Key.java:397)*
>>> * at sun.security.x509.X509Key.decode(X509Key.java:403)*
>>> * at sun.security.rsa.RSAPublicKeyImpl.<init>(RSAPublicKeyImpl.java:83)*
>>> * at
>>> sun.security.rsa.RSAKeyFactory.generatePublic(RSAKeyFactory.java:298)*
>>> * at
>>> sun.security.rsa.RSAKeyFactory.engineGeneratePublic(RSAKeyFactory.java:201)*
>>> * ... 75 more*
>>>
>>>
>>> To figure out the problem,
>>> I changed the java version in my machine to tally with the jdk version
>>> used in App Factory. Still my Java client works fine. (Not a problem due to
>>> jdk version)
>>>
>>> It would be really helpful if someone can point what's the reason for
>>> this error.
>>>
>>> Thanks.
>>>
>>> Regards,
>>> Dilhasha
>>>
>>>
>>> *M.N.F. Dilhasha*
>>> Software Engineering Intern | *WSO2 Inc.*
>>>
>>> email   :
>>> *[email protected] <[email protected]>*mobile : +94 77 8449321
>>>
>>
>>
>>
>> --
>> Dimuthu Leelarathne
>> Architect & Product Lead of App Factory
>>
>> WSO2, Inc. (http://wso2.com)
>> email: [email protected]
>> Mobile : 0773661935
>>
>> Lean . Enterprise . Middleware
>>
>
>
>
> --
> Dimuthu Leelarathne
> Architect & Product Lead of App Factory
>
> WSO2, Inc. (http://wso2.com)
> email: [email protected]
> Mobile : 0773661935
>
> Lean . Enterprise . Middleware
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to