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