It is using a form of dependency injection. The OTInterfaceManager has a constructor that takes a UserMessageHandler. The OTrunk framework sees this and looks for a UserMessageHandler implementation in its lists of services. If it finds one it then it passes it to the OTInterfaceManger. That is what this message means:
No service could be found to handle the requirement of: class org.concord.sensor.state.OTInterfaceManager for: interface org.concord.framework.text.UserMessageHandler So when you initialize OTrunk you need to provide a UserMessageHandler implementation. If you are calling: OTViewerHelper.loadOTrunk or OTViewerHelper.loadOTrunkNoViewSystem Then this should be handled for automatically. How does the converter initialize OTrunk? Scott Geoffrey Kwan wrote: > I am trying to copy a service from this otml model file but receive an > error > http://rails.dev.concord.org/otrunk-wise-step/otml/model/187 > > here is the services section > <services> > <OTViewService showLeftPanel="false"> > <viewEntries> > ... > </viewEntries> > </OTViewService> > * <OTInterfaceManager> > <deviceConfigs> > <OTDeviceConfig configString="none" deviceId="10"/> > </deviceConfigs> > </OTInterfaceManager>* > </services> > > > When I try to copy the OTInterfaceManager service using the otrunk > copyObject() I receive this error below. > > No service could be found to handle the > requirement of: class org.concord.sensor.state.OTInterfaceManager > for: interface org.concord.framework.text.UserMessageHandler > java.lang.NullPointerException > at > org.concord.otrunk.OTObjectServiceImpl.loadOTObject(OTObjectServiceImpl.java:201) > at > org.concord.otrunk.OTObjectServiceImpl.getOTObject(OTObjectServiceImpl.java:163) > at > org.concord.otrunk.OTObjectServiceImpl.copyObject(OTObjectServiceImpl.java:370) > at > org.concord.otrunk.OTObjectServiceImpl.copyObject(OTObjectServiceImpl.java:347) > at > wise2.converter.converters.JaxbOTrunkConverter.copyObject(JaxbOTrunkConverter.java:438) > > > I tried adding Sensor and Framework to my project's classpath as well > as in the launcher but I still receive the error. I also tried > updating my code as well. > > What do I need to do to resolve this error? > > Thanks, > Geoff > > On Mon, Jun 23, 2008 at 7:48 PM, Scott Cytacki <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Geoffrey Kwan wrote: > > I was able to successfully convert some of the Pedagogica Steps, I > > haven't tried them all yet though, and I was wondering how to deal > > with the jar files. It seems as if there are two ways to handle > them. > > One would be to always keep the jar files with the otml files so the > > otml file could access the jars locally. Another would be to put the > > jar files on a web server so that the otml could access it remotely. > > How are you guys handling this? > To clarify for people not familiar with Pedagogic Steps: the > pedagogica > scripts are stored in a jar file. It is this jar file that Geoff is > referring to above. > > This is one example of resources needed by an otml file. Images are > another example. Currently, we put those resources on a > webserver. If > you are using Roolo to store the content then you'll want to store > those > resources in the repository. How those resources are accessed at > runtime is not clear. That is what we were were talking about at a > previous sail meeting. I think the best way to start is to > provide web > access to the resources in the repository, and then put these urls in > the otml file. > > OTrunk currently supports a few options for accessing binary > resources: > - store the resources on a webserver and use absolute urls to them. > - store the resources on the same webserver as the otml file, and use > urls relative to the otml file. (the context url or codebase of the > otml file can also be overridden using a property in the otml file). > - store the resources directly in the otml file as > gzipped-base64ed strings. > - put the otml file and the resources in a jar file, use relative urls > in the otml file, and put the jar file on the classpath. > > It would be easy to add another option where OTrunk could be passed a > url to a zip file that contained the otml file and its resources. > This > is slightly different than the last option above which requires > the jar > file to be on the classpath. > > > > > > > I can't run the JNLP at the url http://itsidiy.concord.org/models/2. > > It gives me this "Unable to launch the application" error, the stack > > trace is below. Do I need to install something? > This looks like the very annoying bug we found in java 6. The only > solution we've found to this problem is to clear the cache. > > The problem started after we moved jnlp.concord.org > <http://jnlp.concord.org> to a new server with > a different IP address. So we believe this problem is because > webstart > is storing the server's IP address in its cache. > > > > > > java.lang.NullPointerException > > at > > > com.sun.deploy.net.DownloadEngine.applyPatch(DownloadEngine.java:607) > > at > > > com.sun.deploy.cache.CacheEntry.processTempDataFile(CacheEntry.java:645) > > at > com.sun.deploy.cache.Cache.downloadResourceToCache(Cache.java:500) > > at > > > com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:947) > > at > > > com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1059) > > at > > > > com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1134) > > at > > > > com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1068) > > at > > > com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:142) > > at > > > com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:826) > > at > > > com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:742) > > at com.sun.javaws.Launcher.downloadResources(Launcher.java:1165) > > at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:540) > > at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:157) > > at com.sun.javaws.Launcher.launch(Launcher.java:95) > > at com.sun.javaws.Main.launchApp(Main.java:302) > > at com.sun.javaws.Main.continueInSecureThread(Main.java:212) > > at com.sun.javaws.Main$1.run(Main.java:107) > > at java.lang.Thread.run(Thread.java:613) > > > > > > Thanks, > > Geoff > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SAIL-Dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/SAIL-Dev?hl=en -~----------~----~----~----~------~----~------~--~---
