Community
Participate
Working Groups
Using a vanilla COSMOS driver (COSMOS-1.0.0-200801161716), I'm having problems running the example MDR. Here are my exact steps: 1) Download Eclipse 3.3.1.1 (http://download.eclipse.org/eclipse/downloads/drops/R-3.3.1.1-200710231652/index.php) 2) Download COSMOS SDK 3) Add the following org.apache and muse plug-ins to the driver's plug-in directory: javax.mail.api_1.4.0 javax.saaj.api_1.3.0 org.apache.commons.httpclient_3.0.1 org.apache.commons.logging_1.1.0 org.apache.ws.commons.schema_1.2.0 org.apache.wsdl4j_1.6.1 org.apache.xalan_2.7.0 wstx-asl_3.0.1 muse-complete-2.2.0.jar muse-osgi-soa-mini-2.2.0.jar org.apache.xerces_2.8.0.v200705301630.jar org.apache.xml.resolver_1.1.0.v200705310020.jar org.eclipse.equinox.ds_1.0.0.v20070226.jar org.eclipse.equinox.log_1.0.1.R32x_v20060717.jar 4) Start the eclipse workbench 5) Check-out the following projects from COSMOS CVS: org.eclipse.cosmos.dc.dataManager.client org.eclipse.cosmos.dc.mdr.client org.eclipse.cosmos.example.mdr org.eclipse.cosmos.samples.cmdbf.services 6) Open the run launch configuration dialog and create a new OSGi Framework profile: - Select everything in workspace - Select everything in target except for org.eclipse.cosmos.dc.dataManager.client org.eclipse.cosmos.dc.mdr.client 7) Run the profile. Here's the output I get: osgi> 17-Jan-2008 2:44:46 PM org.mortbay.http.HttpServer doStart INFO: Version Jetty/5.1.x 17-Jan-2008 2:44:46 PM org.mortbay.util.Container start INFO: Started org.mortbay.jetty.servlet.ServletHandler@14501450 17-Jan-2008 2:44:46 PM org.mortbay.util.Container start INFO: Started HttpContext[/,/] 17-Jan-2008 2:44:46 PM org.mortbay.http.SocketListener start INFO: Started SocketListener on 0.0.0.0:80 17-Jan-2008 2:44:46 PM org.mortbay.util.Container start INFO: Started org.mortbay.http.HttpServer@359a359a Pinging Muse to initialize the endpoint... made it! java.io.FileNotFoundException: D:\COSMOS\COSMOS-1.0.0-200801161716\eclipse\file:D:\COSMOS\COSMOS-1.0.0-200801161716\eclipse\plugins\org.eclipse.cosmos.dc.mgmt.wsdm_1.0.0.v200801161716.jar!\log\muse.log (The filename, directory name, or volume label syntax is incorrect.) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:205) at java.io.FileOutputStream.<init>(FileOutputStream.java:96) at java.io.FileWriter.<init>(FileWriter.java:69) at org.apache.muse.core.platform.osgi.OSGiLogListener.<init>(OSGiLogListener.java:43) at org.apache.muse.core.platform.osgi.OSGiLogHandler.<init>(OSGiLogHandler.java:45) at org.apache.muse.core.platform.osgi.descriptor.OSGiLoggingConfig.createLogHandler(OSGiLoggingConfig.java:47) at org.apache.muse.core.descriptor.LoggingConfig.newInstance(LoggingConfig.java:89) at org.apache.muse.core.descriptor.RouterDefinition.newInstance(RouterDefinition.java:84) at org.apache.muse.core.platform.osgi.routing.OSGiResourceRouter.addResourceDefinitions(OSGiResourceRouter.java:359) at org.apache.muse.core.platform.osgi.routing.OSGiResourceRouter.setEnvironment(OSGiResourceRouter.java:140) at org.apache.muse.core.descriptor.RouterDefinition.newInstance(RouterDefinition.java:81) at org.apache.muse.core.platform.AbstractIsolationLayer.initialize(AbstractIsolationLayer.java:178) at org.apache.muse.core.platform.osgi.mini.internal.OSGiMiniIsolationLayer.initialize(OSGiMiniIsolationLayer.java:65) at org.apache.muse.core.platform.osgi.mini.internal.OSGiMinServlet.createIsolationLayer(OSGiMinServlet.java:37) at org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:69) at org.apache.muse.core.platform.osgi.mini.internal.OSGiMinServlet.doPost(OSGiMinServlet.java:52) at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) 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:689) at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:288) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) 17-Jan-2008 2:44:48 PM org.apache.muse.core.routing.SimpleResourceRouter initialize INFO: [ID = 'RouterIsInitialized'] The resource router has been initialized. 17-Jan-2008 2:44:48 PM org.apache.muse.core.routing.SimpleResourceRouter initialize INFO: [ID = 'RouterIsInitialized'] The resource router has been initialized. Entry bundleentry://59/OSGI-INF/Advertisement/Dispatch-Consumer.xml Ref is <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address>http://127.0.0.1:1080/wsn-consumer/services/consumer</wsa:Address> <wsa:ReferenceParameters> <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">MuseResource-1</muse-wsa:ResourceId> </wsa:ReferenceParameters> </wsa:EndpointReference> Entry bundleentry://59/OSGI-INF/Advertisement/advertisement-consumer.xml Ref is <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address>http://localhost:1080/wsn-consumer/services/consumer</wsa:Address> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"> <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">RuntimeIdentifierValue</muse-wsa:ResourceId> </wsa:ReferenceParameters> </wsa:EndpointReference> 17-Jan-2008 2:44:48 PM org.apache.muse.core.routing.SimpleResourceRouter initialize INFO: [ID = 'RouterIsInitialized'] The resource router has been initialized. 17-Jan-2008 2:44:48 PM org.apache.muse.core.routing.SimpleResourceRouter initialize INFO: [ID = 'RouterIsInitialized'] The resource router has been initialized. Register MDR with COSMOS broker... Tried to register data manager with broker at startup, but registration failed. 17-Jan-2008 2:44:49 PM org.apache.muse.core.SimpleResource initialize INFO: [ID = 'ResourceInitialized'] The resource at '/org.eclipse.cosmos.example.mdr.ExampleMdr' has been initialized. 17-Jan-2008 2:44:49 PM org.apache.muse.core.SimpleResource initialize INFO: [ID = 'ResourceInitialized'] The resource at '/org.eclipse.cosmos.example.mdr.ExampleMdr' has been initialized. Bound<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address>http://9.26.144.198:80/cosmos/services/org.eclipse.cosmos.example.mdr.ExampleMdr</wsa:Address> <wsa:ReferenceParameters> <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">Example</muse-wsa:ResourceId> </wsa:ReferenceParameters> </wsa:EndpointReference> Register MDR with COSMOS broker... Tried to register data manager with broker at startup, but registration failed.
Doing some debugging revealed that the problem is being caused by an NPE exception in org.eclipse.cosmos.dc.dataManager.impl.initialize(): Object resourceObject = wsdmBinding.getBindingForObject(this); wsdmBinding is null. The setter method for the field is not invoked by anyone. Here's the stack trace: LoggingDataManager(AbstractDataManager).initialize() line: 153 LoggingDataManager(AbstractDataManager).register() line: 185 Activator(AbstractDataManagerActivator).serviceChanged(ServiceEvent) line: 96 FilteredServiceListener.serviceChanged(ServiceEvent) line: 94 BundleContextImpl.dispatchEvent(Object, Object, int, Object) line: 1224 EventManager.dispatchEvent(EventListeners$ListElement[], EventDispatcher, int, Object) line: 195 ListenerQueue.dispatchEventSynchronous(int, Object) line: 141 Framework.publishServiceEventPrivileged(ServiceEvent) line: 1603 Framework.publishServiceEvent(int, ServiceReference) line: 1578 ServiceRegistrationImpl.<init>(BundleContextImpl, String[], Object, Dictionary) line: 103 BundleContextImpl.createServiceRegistration(String[], Object, Dictionary) line: 657 BundleContextImpl.registerService(String[], Object, Dictionary) line: 609 RegisterComponentService.registerService(InstanceProcess, ComponentConfiguration) line: 102 InstanceProcess.registerComponentConfigurations(List) line: 153 Resolver.dispatchWork(int, Object) line: 701 WorkQueue$Queued.dispatch() line: 57 WorkQueue.run() line: 108
Created attachment 87203 [details] replacement muse.xml for wsdm bundle
Joel, I'm not sure what the purpose of the attachment is. If it resolves the problem, please describe what I'm suppose to do with it. Thanks
I suppose it is for replacign the muse.xml in the mgmt.wsdm bundle. If the bundle is packaged as a jar file, the log file can't be written inside the jar. So Joel's change is to specify the log directory to be under the parent directory. I also see Joel commented out the file persistence block. I will update the muse.xml and give it a try.
The inability to run the example MDR was a configuration issue on my end. I have since fixed the problem and I'm able to submit queries. The exception below is however thrown whenever the OSGi profile is launched in Eclipse. I'll keep this defect open to handle the exception. I've lowered the severity and changed the summary. Thanks.
Joel, I'm still seeing an exception about muse log file with the new muse.xml. Is the a better way to specify the log file path? Or should we package the bundle as a directory? java.io.FileNotFoundException: D:\cosmos2\i8\build4\cosmos-demo\DataManagers\fil e:D:\cosmos2\i8\build4\cosmos-demo\DataManagers\plugins\org.eclipse.cosmos.dc.mg mt.wsdm_1.0.0.v200801181306.jar!\..\log\muse.log (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:70) at java.io.FileWriter.<init>(FileWriter.java:46) at org.apache.muse.core.platform.osgi.OSGiLogListener.<init>(OSGiLogList ener.java:43) at org.apache.muse.core.platform.osgi.OSGiLogHandler.<init>(OSGiLogHandl er.java:45) at org.apache.muse.core.platform.osgi.descriptor.OSGiLoggingConfig.creat eLogHandler(OSGiLoggingConfig.java:47) at org.apache.muse.core.descriptor.LoggingConfig.newInstance(LoggingConf ig.java:89)
Joel, please see if it's something you want to fix in i8. Thanks.
Moving all open bugzillas that are targeted to iterations in the past to the next iteration (i13).
since OSGi is not currently supported, marking as wontfix. can reopen later if necessary.