How to specify Space URL for servlet?

I have a data grid called "myDataGrid". For command-line Java program, I use "jini:////myDataGrid?groups=gigaspaces-6.6.0-XAP-m1" and it is working fine. For servlet, if I use the same Space URL, I got lookup error

javax.servlet.ServletException: javax.servlet.ServletException: com.j_spaces.cor e.client.FinderException: LookupFinder failed to find service using the followin g service attributes:

     Service attributes: [com.j_spaces.lookup.entry.State(state=started,elec

table=null,replicable=null)] Service attributes: [net.jini.lookup.entry.Name(name=myDataGrid)] Lookup timeout: [5000] Classes: [interface com.j_spaces.core.service.Service] Jini Lookup Groups: [gigaspaces-6.6.0-XAP-m1] Number of Lookup Services: 0

    at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.jav

a:437) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:25 6) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 39) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.ja va:616) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav a:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448 ) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 39) at org.openspaces.pu.container.jee.jetty.JettyJeeProcessingUnitContainer Provider.createContainer(JettyJeeProcessingUnitContainerProvider.java:422) at org.openspaces.pu.container.servicegrid.PUServiceBeanImpl.startPU(PUS erviceBeanImpl.java:290) at org.openspaces.pu.container.servicegrid.PUServiceBeanImpl.advertise(P UServiceBeanImpl.java:149) at org.jini.rio.resources.servicecore.ServiceAdminImpl.advertise(Service AdminImpl.java:214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.gigaspaces.lrmi.DynamicSmartStub._invoke(DynamicSmartStub.java:20 8) at com.gigaspaces.lrmi.DynamicSmartStub.invokeDirect(DynamicSmartStub.ja va:290) at com.gigaspaces.lrmi.DynamicSmartStub.invoke(DynamicSmartStub.java:348 ) at $Proxy14.advertise(Unknown Source) at org.jini.rio.resources.servicecore.ServiceAdminProxy.advertise(Servic eAdminProxy.java:114) at org.jini.rio.cybernode.ServiceBeanLoader.advertise(ServiceBeanLoader. java:452) at org.jini.rio.cybernode.ServiceBeanLoader.advertise(ServiceBeanLoader. java:413) at org.jini.rio.cybernode.JSBDelegate.advertise(JSBDelegate.java:339) at org.jini.rio.cybernode.JSBContainer.activate(JSBContainer.java:194) at org.jini.rio.cybernode.CybernodeImpl.instantiate(CybernodeImpl.java:1 005) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.gigaspaces.lrmi.LRMIRuntime.invoked(LRMIRuntime.java:339) at com.gigaspaces.lrmi.nio.Pivot.consumeAndHandleRequest(Pivot.java:399)

    at com.gigaspaces.lrmi.nio.Pivot.handleRequest(Pivot.java:487)
    at com.gigaspaces.lrmi.nio.Pivot$ChannelEntryTask.work(Pivot.java:153)
    at com.gigaspaces.lrmi.nio.Pivot$Worker.dispatch(Pivot.java:199)
    at com.gigaspaces.lrmi.nio.Pivot$Worker.dispatch(Pivot.java:189)
    at com.j_spaces.kernel.WorkingGroup$TaskWrapper.run(WorkingGroup.java:71

) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec utor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:907) at java.lang.Thread.run(Thread.java:619) Caused by: javax.servlet.ServletException: com.j_spaces.core.client.FinderExcept ion: LookupFinder failed to find service using the following service attributes:

     Service attributes: [com.j_spaces.lookup.entry.State(state=started,elec

table=null,replicable=null)] Service attributes: [net.jini.lookup.entry.Name(name=myDataGrid)] Lookup timeout: [5000] Classes: [interface com.j_spaces.core.service.Service] Jini Lookup Groups: [gigaspaces-6.6.0-XAP-m1] Number of Lookup Services: 0

    at com.gigaspaces.wan.phonebook.web.PhoneBookLoaderServlet.init(PhoneBoo

kLoaderServlet.java:30) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.jav a:433) ... 40 more Caused by: com.j_spaces.core.client.FinderException: LookupFinder failed to find service using the following service attributes:

     Service attributes: [com.j_spaces.lookup.entry.State(state=started,elec

table=null,replicable=null)] Service attributes: [net.jini.lookup.entry.Name(name=myDataGrid)] Lookup timeout: [5000] Classes: [interface com.j_spaces.core.service.Service] Jini Lookup Groups: [gigaspaces-6.6.0-XAP-m1] Number of Lookup Services: 0

    at com.j_spaces.core.client.LookupFinder.find(LookupFinder.java:355)
    at com.j_spaces.core.client.SpaceFinder.findRegularSpace(SpaceFinder.jav

a:1033) at com.j_spaces.core.client.SpaceFinder._find(SpaceFinder.java:615) at com.j_spaces.core.client.SpaceFinder.internalFind(SpaceFinder.java:40 8) at com.j_spaces.core.client.SpaceFinder.internalFind(SpaceFinder.java:39 2) at com.j_spaces.core.client.SpaceFinder.find(SpaceFinder.java:479) at com.gigaspaces.wan.phonebook.web.PhoneBookLoader.loadDummyValues(Phon eBookLoader.java:41) at com.gigaspaces.wan.phonebook.web.PhoneBookLoader.load(PhoneBookLoader .java:37) at com.gigaspaces.wan.phonebook.web.PhoneBookLoaderServlet.load(PhoneBoo kLoaderServlet.java:66) at com.gigaspaces.wan.phonebook.web.PhoneBookLoaderServlet.init(PhoneBoo kLoaderServlet.java:28) ... 41 more h4. Attachments

[setenv.bat|/upfiles/1375971711608256.txt]

[gigaspaces_gsc_0_0.log|/upfiles/1375971711677976.txt]

[gigaspaces_gsc_0_1.log|/upfiles/1375971711146416.txt]

[gigaspaces_lh_gsm_0_0.log|/upfiles/1375971711820566.txt]

[phonebook.zip|/upfiles/137597171126096.html]

[gigaspaces_gsc_0_0.log|/upfiles/1375971711427976.txt]

[gigaspaces_gsc_0_1.log|/upfiles/1375971711531461.txt]

[gigaspaces_lh_gsm_0_0.log|/upfiles/1375971711744761.txt]

[gigaspaces_0_0.log|/upfiles/13759717115806661.txt]

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2493]{quote}

asked 2008-07-29 06:00:48 -0600

oumind gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete