graph reload without restart

111 views
Skip to first unread message

Nawaz Khursid

unread,
Aug 2, 2012, 1:22:55 PM8/2/12
to opentripp...@googlegroups.com
Hi,
I have a running instance of otp in singleton context. I have generated a new graph.obj file with some changes in gtfs feed.
I would like to test the multi-graph feature with a single router context to use the dynamic reload feature.

In order to do so I followed the tutorial [1]. I modified the data-source.xml and application-context.xml accordingly and
my directory structure contain the correct place holder for Graph.obj file.

I am facing an issue on startup of otp[2] about JsonCallBackFilter bean initialization.

Kindly please let me know what is missing. I am update to master branch.

regards


Attached herewith are the configuration/context files.


[1]https://github.com/openplans/OpenTripPlanner/wiki/MultipleGraphs

[2]
LF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
012-08-02 19:12:30,644 INFO  [AbstractSecurityInterceptor.java:156] : Validated configuration attributes
012-08-02 19:12:30,734 INFO  [AbstractSecurityInterceptor.java:156] : Validated configuration attributes
012-08-02 19:12:30,815 INFO  [ContextLoader.java:214] : Root WebApplicationContext: initialization completed in 1121 ms
Winstone 2012/08/02 19:12:30] - Error initializing web application: prefix [/opentripplanner-api-webapp]
rg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'jsonpCallbackFilter' is defined
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
       at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
       at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:217)
       at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:145)
       at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:179)
       at winstone.FilterConfiguration.getFilter(FilterConfiguration.java:133)
       at winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:907)
       at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131)
       at winstone.HostConfiguration.initMultiWebappDir(HostConfiguration.java:317)
       at winstone.HostConfiguration.<init>(HostConfiguration.java:80)
       at winstone.HostGroup.initHost(HostGroup.java:85)
       at winstone.HostGroup.<init>(HostGroup.java:45)
       at winstone.Launcher.<init>(Launcher.java:196)
       at winstone.Launcher.main(Launcher.java:391)


data-sources.xml
application-context.xml

Andrew Byrd

unread,
Aug 3, 2012, 3:07:49 PM8/3/12
to opentripp...@googlegroups.com
Hello Nawaz,

Unfortunately that documentation on multi-graph feature is out of date,
and things work very differently now. I will update the wiki.
You don't need any special Spring configuration now, you can just
configure the graphService in data-souces as follows:

<bean id="graphService"
class="org.opentripplanner.routing.impl.GraphServiceImpl">
<property name="path" value="/var/otp/graphs/{}/" />
<property name="defaultRouterId" value="arbor" />
</bean>

the {} placeholder will be replaced with the routerId from the query
string, or the specified defaultRouterId if there isn't one provided in
the query string.

Dynamic reloading of graphs is not currently implemented, though there
are some provisions for it.

-Andrew
Reply all
Reply to author
Forward
0 new messages