Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigatorApplication.getTopicMapRepository() returns different repository object then TopicMaps.getTopicMapRepository() for the same sources file #392

Closed
GoogleCodeExporter opened this issue Mar 16, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

To reproduce the problem:

Have a navigator web application setup to use a sources file:

web.xml fragment:
<context-param>
    <param-name>source_config</param-name>
    <param-value>/path/to/sources.xml</param-value>
</context-param>

Then create a jsp file with:
<%@page import="net.ontopia.topicmaps.entry.TopicMaps"%>
<%@page import="net.ontopia.topicmaps.entry.TopicMapRepositoryIF"%>
<%@page import="net.ontopia.topicmaps.nav2.utils.NavigatorUtils"%>
<%
    TopicMapRepositoryIF navrepo = NavigatorUtils.getNavigatorApplication(pageContext).getTopicMapRepository();
    TopicMapRepositoryIF tmrepo = TopicMaps.getRepository("file:///apps/conf/sources/bedrijfsvoering/bedrijfsvoering-sources.xml");
%>
Navigator provided repository: #<%= navrepo.hashCode() %> = <%= 
navrepo.toString() %><br/>
TopicMaps provided repository: #<%= tmrepo.hashCode() %> = <%= 
tmrepo.toString() %><br/>

Output:
Navigator provided repository: #359728309 = 
net.ontopia.topicmaps.entry.TopicMapSourceManager@157104b5
TopicMaps provided repository: #974993029 = 
net.ontopia.topicmaps.entry.TopicMapSourceManager@3a1d3685

This is caused by the NavigatorApplication because it does not use the 
TopicMaps class's repository map.

Original issue reported on code.google.com by qsieb...@gmail.com on 11 May 2011 at 10:45

@GoogleCodeExporter
Copy link
Author

The source location in the JSP should ofcourse be the same as specified in the 
web.xml (/path/to/sources.xml)

Original comment by qsieb...@gmail.com on 11 May 2011 at 10:46

@GoogleCodeExporter
Copy link
Author

Fixed by r2391

Original comment by qsieb...@gmail.com on 21 Jun 2013 at 2:22

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by p.kruijsen on 21 Jun 2013 at 2:32

  • Added labels: Release5.2.3

@GoogleCodeExporter
Copy link
Author

Original comment by qsieb...@gmail.com on 1 Aug 2013 at 12:04

  • Added labels: Release5.3.0
  • Removed labels: Release5.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant