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

New install: TNAtoolAPI-Webapp has broken links to some scripts. #33

Closed
ed-g opened this issue Aug 31, 2017 · 16 comments
Closed

New install: TNAtoolAPI-Webapp has broken links to some scripts. #33

ed-g opened this issue Aug 31, 2017 · 16 comments

Comments

@ed-g
Copy link
Collaborator

ed-g commented Aug 31, 2017

These urls are not loading on my install of TNAST:

The following may be because I installed my WAR file directly after compiling "mvn package" so that it has the name TNAtoolAPI-Webapp-0.0.1-SNAPSHOT.war and my url with tomcat is http://127.0.0.1:8080/TNAtoolAPI-Webapp-0.0.1-SNAPSHOT

http://127.0.0.1:8080/TNAtoolAPI-Webapp/queries/transit/menu?day=null&dbindex=-1&username=admin
http://127.0.0.1:8080/TNAtoolAPI-Webapp/FileUpload?getSessionUser=gsu
http://127.0.0.1:8080/TNAtoolAPI-Webapp/queries/transit/DBList
http://127.0.0.1:8080/TNAtoolAPI-Webapp/modifiers/dbupdate/getVersion
http://127.0.0.1:8080/TNAtoolAPI-Webapp/modifiers/dbupdate/getDefaultDbIndex
In other words either:

  • the install intructions need to include how to build proper names with Tomcat,
  • or the URLs should be changed not to require a specific installation path.

These following urls appear to be simply broken regardless of the install path. I think there is an extra '../' in the URL.

http://127.0.0.1:8080/resources/images/287.GIF
http://127.0.0.1:8080/resources/data/navigation-tree.js?_=1504207027398
http://127.0.0.1:8080/resources/images/287.GIF

Based on a quick inspection of the source:

$ ag 287.GIF 
src/main/webapp/TNAtoolAPI-Webapp/Emp.html
130:		<div id="dialogPreLoader"><img src="../resources/images/287.GIF" alt="Page Loading" style="width:90px; height:90px; position: absolute; margin: auto; top: 0; left: 0; right: 0; bottom: 0;" >

src/main/webapp/TNAtoolAPI-Webapp/ShapeFileExport.html
83:    		bottom:0;" alt="Loading..." src="../resources/images/287.GIF"><br>

src/main/webapp/TNAtoolAPI-Webapp/HeatMap.html
397:				id="dialogPreLoader" src="../resources/images/287.GIF"

src/main/webapp/TNAtoolAPI-Webapp/T6.html
281:		<img id="dialogPreLoader" src="../resources/images/287.GIF" alt="Page Loading" style="width:100px; height:100px; position: absolute; margin: auto; top: 0; left: 0; right: 0; bottom: 0;" >

src/main/webapp/TNAtoolAPI-Webapp/index.jsp
79:		<img id="dialogPreLoader2" src="../resources/images/287.GIF" alt="Page Loading" width="85" height="85" style="margin:100px" >
339:      <img id="dialogPreLoader" src="../resources/images/287.GIF" alt="Page Loading" style="margin:9em;margin-top:22em" >     

src/main/webapp/resources/js/ConnectivityGraph0.js
22:	var loaderHtml = '<img id="conGraphPreLoader" src="../resources/images/287.GIF" alt="Page Loading" style="height:80; width:80; margin:120px" >';

@ed-g
Copy link
Collaborator Author

ed-g commented Aug 31, 2017

Upshot is the menu bar keeps "loading" indefinitely.

transit network analysis tool

@ed-g ed-g changed the title New install: not finding some scripts. New install: TNAtoolAPI-Webapp has broken links to some scripts. Aug 31, 2017
@ed-g ed-g added this to the TNA Trillium handover milestone Aug 31, 2017
@ed-g
Copy link
Collaborator Author

ed-g commented Aug 31, 2017

There is a file which should be installed to:

./src/main/resources/com/model/database/connections/transit/mapping/GtfsMapping.hibernate.xml

@ed-g
Copy link
Collaborator Author

ed-g commented Aug 31, 2017

@BenFields724 the GtfsMapping.hibernate.xml file which you emailed me looks to be the same as the file currently in the source code.

https://github.com/pouyalireza/TNAST_MAVEN/blob/master/TNAtoolAPI-Webapp/src/main/resources/com/model/database/connections/transit/mapping/GtfsMapping.hibernate.xml

Should this file require some edits?

@BenFields22
Copy link
Collaborator

NewInstanceFiles.zip

@BenFields22
Copy link
Collaborator

It was provided by Pouya when I was setting up my instance so it may have been a redundant replacement. Not sure if there was anything actually changed for that file. My familiarity with hibernate mapping is minimal so I can't really speak to that at the moment.

@BenFields22
Copy link
Collaborator

@ed-g @ODOT-RPTD-mb @pouyalireza I have attached a word file that covers the steps to resolve problems with a new instance.
installDocument.docx

@ed-g
Copy link
Collaborator Author

ed-g commented Sep 7, 2017

Text from word file.

Note: When building in the eclipse environment we are using run-as maven build with a goal of ‘tomcat7:run’

After initial Git clone into eclipse there is one build path error encountered:
Project 'TNAtoolAPI-Webapp' is missing required source folder: 'src/test/resources

To resolve, configure build path and remove the missing sources 'src/test/resources’ and 'src/test/java’

The application will load but the menu bar never finishes loading from what appears to be a hibernate mapping problem according to the eclipse console. Not positive what the cause is, but I believe it is a mapping problem between the database info files and the organization of the databases within the project.

To resolve, remove all databases located in ‘src/main/resources/com/model/database/connections/spatial’
‘src/main/resources/com/model/database/connections/transit’

Then place the provided database for march-2017 into the same locations.

Open dbinfo.cvs located in ‘src/main/resources/admin’ and remove all mappings except for the mar-17 database and change index to 0.

The application should load correctly after this.

Add additional databases in a similar fashion making sure the mappings are correct.

@ed-g
Copy link
Collaborator Author

ed-g commented Sep 7, 2017

Contents from NewInstanceFiles.zip, renamed to .txt to meet with github's file name restrictions:

march17.cfg.xml.txt
mapping.hbm.xml.txt
GtfsMapping.hibernate.xml.txt
dbInfo.csv.txt

@ed-g
Copy link
Collaborator Author

ed-g commented Sep 7, 2017

I edited the various database configurations to refer to my local database server. And changed database user to tnast (regular user) instead of postgres (superuser).

@ed-g
Copy link
Collaborator Author

ed-g commented Sep 7, 2017

DBlist is returning 404. How can we get a log file for this?

http://127.0.0.1:8080/TNAtoolAPI-Webapp/queries/transit/DBList

HTTP Status 404 - /TNAtoolAPI-Webapp/queries/transit/DBList

type Status report

message /TNAtoolAPI-Webapp/queries/transit/DBList

description The requested resource is not available.
Apache Tomcat/8.0.32 (Ubuntu)

@ed-g
Copy link
Collaborator Author

ed-g commented Sep 8, 2017

Hi did you folks get my message earlier? I need a current copy of the postgresql dump files. Ones in google docs are all more than a year old.

#6 (comment)

@srinivas13794
Copy link
Collaborator

srinivas13794 commented Sep 8, 2017 via email

@srinivas13794
Copy link
Collaborator

@ed-g an invite for a box folder containing all the backups for all databases has been sent to you.Please let me know if you did received it.

@ed-g
Copy link
Collaborator Author

ed-g commented Sep 12, 2017

@srinivas13794 thank you! I have received the files.

@ed-g
Copy link
Collaborator Author

ed-g commented Sep 12, 2017

Closing, all but one of these links are working now.

http://127.0.0.1:8080/TNAtoolAPI-Webapp/queries/transit/menu?day=null&dbindex=-1&username=admin

And we have a separate ticket #54 open for that one.

@ed-g ed-g closed this as completed Sep 12, 2017
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

4 participants