You haven't specified the version in the pom for the artifact. This could
be a reason for osgi cannot find the class.

  Exported packages
    com.wso2.orderproc.service; version="*0.0.0*"[exported]
    com.wso2.axis2.orderproc.exception.xsd; version="*0.0.0*"[exported]
    com.wso2.orderproc.stub; version="*0.0.0*"[exported]

Try adding *<version>4.2.0</version>* to the top level of the pom.



Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729


On Thu, Jul 17, 2014 at 10:34 AM, Darshana Akalanka Pagoda Arachchi <
[email protected]> wrote:

> Yes sure Gayashan. Here's the output from the commands.
>
>
> osgi> ss com.wso2.orderproc.stub
> "Framework is launched."
>
>
> id State       Bundle
> 16 ACTIVE      com.wso2.orderproc.stub_4.2.0
> osgi> b 16
> com.wso2.orderproc.stub_4.2.0 [16]
>   Id=16, Status=ACTIVE      Data
> Root=/home/akalanka/Programs/wso2carbon-4.2.0/repository/components/default/configuration/org.eclipse.osgi/bundles/16/data
>   "No registered services."
>   No services in use.
>   Exported packages
>     com.wso2.orderproc.service; version="0.0.0"[exported]
>     com.wso2.axis2.orderproc.exception.xsd; version="0.0.0"[exported]
>     com.wso2.orderproc.stub; version="0.0.0"[exported]
>     *; version="0.0.0"<unwired><dynamic>
>   No fragment bundles
>   Named class space
>     com.wso2.orderproc.stub; bundle-version="4.2.0"[provided]
>   No required bundles
>
>
> osgi> diag 16
> reference:file:../dropins/com.wso2.orderproc.stub-4.2.0.jar [16]
>   No unresolved constraints.
> osgi>
>
>
>
> On Thu, Jul 17, 2014 at 12:35 AM, Gayashan Amarasinghe <[email protected]>
> wrote:
>
>> Hi Danushka,
>>
>> Can you also execute the following 2 commands in the osgi console and see
>> the results?
>>
>> b <your bundle artifact id>
>> diag <your bundle artifact id>
>>
>> Lets have a chat and figure this out tomorrow.
>>
>> /Gayashan
>>
>>
>> On Wed, Jul 16, 2014 at 10:38 PM, Darshana Akalanka Pagoda Arachchi <
>> [email protected]> wrote:
>>
>>> Hi Danushka,
>>>
>>> I checked the state as you mentioned and it gives me as it is active as
>>> well. Also I forgot to mention that the deployed components works fine
>>> unless I give it a wrong input to trigger the Custom Exception.
>>>
>>> osgi output
>>>
>>> osgi> ss com.wso2.orderproc.stub
>>> "Framework is launched."
>>>
>>>
>>> id State       Bundle
>>> 16 ACTIVE      com.wso2.orderproc.stub_4.2.0
>>>
>>>
>>>
>>> On Wed, Jul 16, 2014 at 8:28 PM, Danushka Fernando <[email protected]>
>>> wrote:
>>>
>>>> Hi
>>>> Seems bundle is not loaded to the OSGi. So start the server with the
>>>> option -DosgiConsole and when server is started in console press
>>>> enter/return then it will promt the OSGi console which looks like follows.
>>>>
>>>> osgi>
>>>>
>>>> Then enter the command
>>>>
>>>> ss <your bundle artifact id>
>>>>
>>>> This will show the status of the bundle in OSGi. Check [1] for the OSGi
>>>> life cycle states.
>>>>
>>>> If it shown in the list and not in ACTIVE state that means some thing
>>>> wrong with the bundle. You can figure it out using OSGi console.
>>>>
>>>> If it is not listed under as command that means you are doing something
>>>> wrong in installing it. So for time being you can try dropping the jar to
>>>> the repository/components/dropins folder.
>>>>
>>>> [1] http://en.m.wikipedia.org/wiki/OSGi#Life-cycle
>>>> On Jul 16, 2014 6:11 PM, "Darshana Akalanka Pagoda Arachchi" <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Gayashan,
>>>>>
>>>>> I've attached the pom file of the stub bundle. The required class is
>>>>> available in the jar file generated.
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Wed, Jul 16, 2014 at 6:00 PM, Gayashan Amarasinghe <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Darshana,
>>>>>>
>>>>>> Have you properly exported the relevant package and imported the
>>>>>> relevant packages within maven bundle plugin of each bundle? Seems like
>>>>>> this is occurring because the required class is not available for the
>>>>>> bundle's class path. If you can attach your pom files, would be easier to
>>>>>> find the issue.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> /Gayashan
>>>>>>
>>>>>>
>>>>>> On Wed, Jul 16, 2014 at 5:49 PM, Darshana Akalanka Pagoda Arachchi <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am developing a carbon components which throws a custom Exception
>>>>>>> when necessary. The stub packaging also contains these custom 
>>>>>>> Exceptions.
>>>>>>> However, on runtime, when thrown, carbon throws a ClassNotFound 
>>>>>>> Exception
>>>>>>> for the custom Exceptoin class.
>>>>>>>
>>>>>>> ERROR {org.apache.catalina.core.ApplicationDispatcher} -
>>>>>>>  Servlet.service() for servlet bridgeservlet threw exception
>>>>>>> {org.apache.catalina.core.ApplicationDispatcher}
>>>>>>> java.lang.ClassNotFoundException:
>>>>>>> com.wso2.axis2.orderproc.exception.xsd.OrderProcessorException$Factory
>>>>>>>  at
>>>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
>>>>>>> at
>>>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
>>>>>>>  at
>>>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
>>>>>>> at
>>>>>>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
>>>>>>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>>>>>>> at
>>>>>>> com.wso2.orderproc.service.OrderProcessorServiceOrderProcessorException$Factory.parse(OrderProcessorServiceOrderProcessorException.java:417)
>>>>>>>  at
>>>>>>> com.wso2.orderproc.stub.OrderProcessorServiceStub.fromOM(OrderProcessorServiceStub.java:2339)
>>>>>>> at
>>>>>>> com.wso2.orderproc.stub.OrderProcessorServiceStub.addItem(OrderProcessorServiceStub.java:289)
>>>>>>>  at
>>>>>>> com.wso2.orderproc.ui.OrderProcessorClient.insertItem(OrderProcessorClient.java:45)
>>>>>>> at
>>>>>>> org.apache.jsp.orderprocessor.addItem_jsp._jspService(org.apache.jsp.orderprocessor.addItem_jsp:81)
>>>>>>>  at
>>>>>>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>>  at
>>>>>>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
>>>>>>> at
>>>>>>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
>>>>>>>  at
>>>>>>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>>  at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
>>>>>>> at
>>>>>>> org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
>>>>>>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>>  at
>>>>>>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>>>>>>> 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.doInclude(ApplicationDispatcher.java:605)
>>>>>>> at
>>>>>>> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:37)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.include(ContextPathServletAdaptor.java:369)
>>>>>>>  at
>>>>>>> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1015)
>>>>>>> at
>>>>>>> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:700)
>>>>>>>  at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
>>>>>>> at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>>  at java.lang.reflect.Method.invoke(Method.java:601)
>>>>>>> at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:87)
>>>>>>>  at
>>>>>>> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:88)
>>>>>>> at
>>>>>>> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
>>>>>>>  at
>>>>>>> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:465)
>>>>>>> at
>>>>>>> org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:140)
>>>>>>>  at
>>>>>>> org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:117)
>>>>>>> at
>>>>>>> org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171)
>>>>>>>  at
>>>>>>> org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
>>>>>>> at
>>>>>>> org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
>>>>>>>  at
>>>>>>> org.apache.jsp.admin.layout.template_jsp._jspx_meth_tiles_insertAttribute_7(org.apache.jsp.admin.layout.template_jsp:603)
>>>>>>> at
>>>>>>> org.apache.jsp.admin.layout.template_jsp._jspService(org.apache.jsp.admin.layout.template_jsp:335)
>>>>>>>  at
>>>>>>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>>  at
>>>>>>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
>>>>>>> at
>>>>>>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
>>>>>>>  at
>>>>>>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>>  at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
>>>>>>> at
>>>>>>> org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
>>>>>>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>>  at
>>>>>>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>>>>>>> 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:412)
>>>>>>>  at
>>>>>>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.forward(RequestDispatcherAdaptor.java:30)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.forward(ContextPathServletAdaptor.java:362)
>>>>>>> at
>>>>>>> org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:198)
>>>>>>>  at
>>>>>>> org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
>>>>>>> at
>>>>>>> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:419)
>>>>>>>  at
>>>>>>> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:370)
>>>>>>> at
>>>>>>> org.wso2.carbon.ui.action.ActionHelper.render(ActionHelper.java:52)
>>>>>>>  at
>>>>>>> org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:101)
>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>>>>>>>  at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>>>>>>> at
>>>>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>>>>>>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>>>>>> at
>>>>>>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>>>>>>>  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: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.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
>>>>>>>  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:1110)
>>>>>>>  at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>>>>>> at java.lang.Thread.run(Thread.java:722)
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Darshana Akalanka Pagoda Arachchi,*
>>>>>>> *Software Engineer*
>>>>>>> *078-4721791*
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Dev mailing list
>>>>>>> [email protected]
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Gayashan Amarasinghe*
>>>>>> Software Engineer | Platform TG
>>>>>> WSO2, Inc. | http://wso2.com
>>>>>> lean. enterprise. middleware
>>>>>>
>>>>>> Mobile : +94718314517
>>>>>> Blog : gayashan-a.blogspot.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Darshana Akalanka Pagoda Arachchi,*
>>>>> *Software Engineer*
>>>>> *078-4721791*
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>
>>>
>>> --
>>> *Darshana Akalanka Pagoda Arachchi,*
>>> *Software Engineer*
>>> *078-4721791*
>>>
>>
>>
>>
>> --
>> *Gayashan Amarasinghe*
>> Software Engineer | Platform TG
>> WSO2, Inc. | http://wso2.com
>> lean. enterprise. middleware
>>
>> Mobile : +94718314517
>> Blog : gayashan-a.blogspot.com
>>
>
>
>
> --
> *Darshana Akalanka Pagoda Arachchi,*
> *Software Engineer*
> *078-4721791*
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to