Issues when JClouds binaries are packed as an AAR service

24 views
Skip to first unread message

Nirmal Fernando

unread,
Jul 16, 2012, 11:39:46 PM7/16/12
to jcl...@googlegroups.com
Hi All,

We packed our autoscaler service and JClouds libraries (beta-4) as an AAR file, and deployed it in a WSO2 Carbon server (OSGi based).

When we invoke our service and try to spawn a new instance, we are getting following error [1].

It is my understanding that JClouds work in non-OSGi way too. What could be the reason for jclouds-core jar not picking up aws-ec2-1.5.0-beta.4 jar?

[1]

[2012-07-15 21:51:25,601] ERROR {org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver} -  key [aws-ec2] not in the list of providers or apis: {}
org.apache.axis2.AxisFault: key [aws-ec2] not in the list of providers or apis: {}
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at org.wso2.carbon.load.balance.autoscaler.service.stub.AutoscalerServiceStub.initAutoscaler(AutoscalerServiceStub.java:296)
    at AutoscaleServiceClient.init(AutoscaleServiceClient.java:54)
    at D.main(D.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
    at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
    at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:205)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.eclipse.equinox.http.helper.FilterServletAdaptor$FilterChainImpl.doFilter(FilterServletAdaptor.java:56)
    at org.wso2.carbon.mashup.jsservices.custom.ui.CustomUIServletFilter.doFilter(CustomUIServletFilter.java:233)
    at org.eclipse.equinox.http.helper.FilterServletAdaptor.service(FilterServletAdaptor.java:37)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:45)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
    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:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:143)
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:48)
    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:999)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1620)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)


--

Thanks & regards,
Nirmal

Software Engineer- Platform Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/

Alex Heneveld

unread,
Jul 16, 2012, 11:45:59 PM7/16/12
to jcl...@googlegroups.com, Nirmal Fernando

Hi Nirmal,

You may know this but jclouds uses ServiceLoader to find providers and
API's, looking at this file:

META-INF/services/org.jclouds.providers.ProviderMetadata

in the various JARs. Issue could be in how your server is loading these
files?

In answer to your question jclouds does not require OSGi.

--A
> --
> You received this message because you are subscribed to the Google
> Groups "jclouds" group.
> To post to this group, send email to jcl...@googlegroups.com.
> To unsubscribe from this group, send email to
> jclouds+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jclouds?hl=en.


Nirmal Fernando

unread,
Jul 17, 2012, 12:07:12 AM7/17/12
to Alex Heneveld, jcl...@googlegroups.com
Hi Alex,

On Tue, Jul 17, 2012 at 9:15 AM, Alex Heneveld <alex.h...@cloudsoftcorp.com> wrote:

Hi Nirmal,

You may know this but jclouds uses ServiceLoader to find providers and API's, looking at this file:

    META-INF/services/org.jclouds.providers.ProviderMetadata

in the various JARs.  Issue could be in how your server is loading these files?

hm... yes, that might be the reason. In the AAR file all dependecy jars inside lib folder and in the outer most layer there's an META-INF dir too.

I might want to dig deep and see.
 
To unsubscribe from this group, send email to jclouds+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.

Andrew Phillips

unread,
Jul 17, 2012, 2:10:42 AM7/17/12
to jcl...@googlegroups.com
Hi Nirmal

If what Alex suggests is indeed the issue (service definition files
are not found or are not being correctly merged) you may want to look at

https://groups.google.com/forum/?fromgroups#!topic/jclouds-dev/5mVxkpTn5PE
https://github.com/jclouds/jclouds-examples/blob/master/compute-basics/src/main/assembly/jar-with-dependencies.xml

ap
Reply all
Reply to author
Forward
0 new messages