Note : After adding the package to import-package as in the earlier mail, I
get the following output. :

osgi> p javax.xml.stream
javax.xml.stream; version="1.0.1"<org.eclipse.osgi_3.9.1.v20130814-1242 [0]>
  abdera_1.0.0.wso2v3 [4] imports
  andes_3.0.0.SNAPSHOT [6] imports
  annogen_0.1.0.wso2v1 [7] imports
  axiom_1.2.11.wso2v6 [12] imports
  axis2_1.6.1.wso2v14 [13] imports
  axis2-json_1.6.1.wso2v14 [14] imports
  compass_2.0.1.wso2v2 [38] imports
  hector-core_1.1.4.wso2v1 [44] imports
  jaxb_2.2.5.wso2v1 [52] imports
  neethi_2.0.4.wso2v4 [61] imports
  org.eclipse.core.expressions_3.4.500.v20130515-1343 [70] imports
  org.eclipse.core.runtime_3.9.0.v20130326-1255 [72] imports
  org.hectorclient.hector_2.0.0.0 [118] imports
  org.wso2.carbon.andes.core_3.0.0.SNAPSHOT [130] imports
  org.wso2.carbon.andes.mgt.stub_3.0.0.SNAPSHOT [131] imports
  org.wso2.carbon.andes.stub_3.0.0.SNAPSHOT [132] imports
  org.wso2.carbon.andes.ui_3.0.0.SNAPSHOT [133] imports
  org.wso2.carbon.application.deployer_4.4.1 [134] imports
  org.wso2.carbon.authenticator.stub_4.4.1 [137] imports
  org.wso2.carbon.base_4.4.1 [138] imports
  org.wso2.carbon.core_4.4.1 [142] imports
  org.wso2.carbon.core.commons.stub_4.4.1 [145] imports
  org.wso2.carbon.event.client_4.5.0.SNAPSHOT [151] imports
  org.wso2.carbon.event.client.stub_4.5.0.SNAPSHOT [152] imports
  org.wso2.carbon.event.core_4.5.0.SNAPSHOT [154] imports
  org.wso2.carbon.event.stub_4.5.0.SNAPSHOT [155] imports
*  org.wso2.carbon.event.ui_4.5.0.SNAPSHOT [156] imports*
  org.wso2.carbon.feature.mgt.stub_4.4.1 [160] imports
  org.wso2.carbon.identity.authenticator.saml2.sso_4.4.0 [163] imports
  org.wso2.carbon.identity.authenticator.saml2.sso.common_4.4.0 [164]
imports
  org.wso2.carbon.identity.authenticator.saml2.sso.stub_4.4.0 [165] imports
  org.wso2.carbon.identity.sso.saml.stub_4.4.0 [167] imports
  org.wso2.carbon.identity.sts.store_4.4.0 [168] imports
  org.wso2.carbon.identity.user.store.configuration.deployer_4.5.0.SNAPSHOT
[170] imports
  org.wso2.carbon.identity.user.store.configuration.stub_4.5.0.SNAPSHOT
[171] imports
  org.wso2.carbon.java2wsdl.ui_4.5.0.SNAPSHOT [174] imports
  org.wso2.carbon.logging.admin.stub_4.5.0.SNAPSHOT [176] imports
  org.wso2.carbon.logging.service_4.5.0.SNAPSHOT [179] imports
  org.wso2.carbon.logging.view.stub_4.5.0.SNAPSHOT [180] imports
  org.wso2.carbon.messageflows.stub_4.5.0.SNAPSHOT [183] imports
  org.wso2.carbon.metrics.data.service.stub_1.1.0.SNAPSHOT [189] imports
  org.wso2.carbon.p2.touchpoint_4.4.1 [198] imports
  org.wso2.carbon.qpid.stub_4.5.0.SNAPSHOT [199] imports
  org.wso2.carbon.registry.common_4.4.1 [203] imports
  org.wso2.carbon.registry.common.ui_4.4.1 [204] imports
  org.wso2.carbon.registry.core_4.4.1 [205] imports
  org.wso2.carbon.registry.properties.stub_4.4.1 [207] imports
  org.wso2.carbon.registry.resource.stub_4.4.1 [210] imports
  org.wso2.carbon.registry.search.stub_4.4.1 [213] imports
  org.wso2.carbon.security.mgt_4.4.0 [221] imports
  org.wso2.carbon.server.admin_4.4.1 [224] imports
  org.wso2.carbon.server.admin.stub_4.4.1 [226] imports
  org.wso2.carbon.statistics.stub_4.5.0.SNAPSHOT [229] imports
  org.wso2.carbon.tenant.common_4.4.0 [231] imports
  org.wso2.carbon.tenant.common.stub_4.4.0 [232] imports
  org.wso2.carbon.tenant.mgt.stub_4.4.0 [238] imports
  org.wso2.carbon.tenant.redirector.servlet.stub_4.4.0 [241] imports
  org.wso2.carbon.tenant.throttling.agent_4.4.0 [245] imports
  org.wso2.carbon.tenant.usage.agent_4.4.0 [246] imports
  org.wso2.carbon.throttling.agent.stub_4.4.0 [247] imports
  org.wso2.carbon.tracer.stub_4.5.0.SNAPSHOT [253] imports
  org.wso2.carbon.tryit_4.5.0.SNAPSHOT [255] imports
  org.wso2.carbon.ui_4.4.1 [257] imports
  org.wso2.carbon.user.core_4.4.1 [264] imports
  org.wso2.carbon.user.mgt.stub_4.5.0.SNAPSHOT [267] imports
  org.wso2.carbon.utils_4.4.1 [269] imports
  org.wso2.carbon.wsdl2code.stub_4.5.0.SNAPSHOT [271] imports
  org.wso2.carbon.wsdl2code.ui_4.5.0.SNAPSHOT [272] imports
  rampart-core_1.6.1.wso2v14 [281] imports
  rampart-policy_1.6.1.wso2v14 [282] imports
  rampart-trust_1.6.1.wso2v14 [283] imports
  spring.framework_3.2.9.wso2v1 [289] imports
  tomcat_7.0.59.wso2v3 [291] imports
  xmlbeans_2.3.0.wso2v1 [300] imports

Still I am getting the error.

Regards,
Hemika

Hemika Kodikara
Software Engineer
WSO2 Inc.
lean . enterprise . middleware
http://wso2.com

Mobile : +94777688882

On Tue, Aug 25, 2015 at 1:43 PM, Hemika Kodikara <hem...@wso2.com> wrote:

> Hi All,
>
> I am facing the following error when trying to publish a message to a
> topic in MB using the UI[1]. The topic implementation is taken from "event"
> component in carbon-commons.
>
> Following is the error that is coming :
>
> SEVERE: Servlet.service() for servlet [bridgeservlet] in context with path
> [/] threw exception [Unable to compile class for JSP:
>
> An error occurred at line: 18 in the jsp file:
> /topics/try_it_out_invoke_ajaxprocessor.jsp
> The type javax.xml.stream.XMLStreamException cannot be resolved. It is
> indirectly referenced from required .class files
> 15:     String messageToBePrinted = null;
> 16:     StAXOMBuilder builder = null;
> 17:     try {
> 18:         builder = new StAXOMBuilder(new
> ByteArrayInputStream(textMsg.getBytes()));
> 19:         message = builder.getDocumentElement();
> 20:         if (message != null) {
> 21:             brokerClient.publish(topic, message);
>
> According to the code, "new StAXOMBuilder(....)" will throw and
> javax.xml.stream.XMLStreamException.
>
> I ran "p javax.xml.stream" on the osgi console and noticed that the
> relevant UI module[2] did not contain the "javax.xml.stream" package.
> Therefore I imported the package to the pom as below :
>
> <instructions>
>     <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
>     <Bundle-Name>${project.artifactId}</Bundle-Name>
>     <Carbon-Component>UIBundle</Carbon-Component>
>    <Import-Package>
>
> org.wso2.carbon.event.stub.*;version="${carbon.commons.imp.package.version}",
> org.wso2.carbon.event.api.*,
> org.wso2.carbon.event.client.*,
>         org.wso2.carbon.utils,
>        * javax.xml.stream,*
>         org.apache.axis2.*; version="${axis2.osgi.version.range}",
>         org.apache.axiom.*; version="${axiom.osgi.version.range}",
>         *;resolution:=optional
>     </Import-Package>
>     <Export-Package>
>         org.wso2.carbon.event.ui.*
>     </Export-Package>
>   <DynamicImport-Package>*</DynamicImport-Package>
> </instructions>
>
> But still getting the same error. Is there anything else missing ?
>
> [1] -
> https://github.com/wso2/carbon-commons/blob/master/components/event/org.wso2.carbon.event.ui/src/main/resources/web/topics/try_it_out_invoke_ajaxprocessor.jsp
> [2] -
> https://github.com/wso2/carbon-commons/blob/master/components/event/org.wso2.carbon.event.ui/pom.xml
>
> Regards,
> Hemika
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +94777688882
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to