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

OBA Install From Source - Hessian #200

Closed
jaullo opened this issue Apr 28, 2017 · 7 comments
Closed

OBA Install From Source - Hessian #200

jaullo opened this issue Apr 28, 2017 · 7 comments

Comments

@jaullo
Copy link

jaullo commented Apr 28, 2017

Hello,

I'm working in a social project for my country and the main idea is try to implement OBA. So i tried to install OBA (latest version) from code in eclipse. All the code is imported without issues, howhever, i didn´t find an step by step guide to make it work, specially for database configuration. We readed the developer guide and all kind of information that we found but no luck.

So, i wish to to ask you for help about the modules that requires database configuration and how to configure them. Also, how to use and configure the onebusaway-transit-data-federation-webapp

For onebusaway-transit-data-federation-webapp we made this

<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://127.0.0.1/org_onebusaway_agency_data?characterEncoding=UTF-8&amp;useSSL=false" /> <property name="username" value="xxxx" /> <property name="password" value="xxxx" /> </bean>

<bean class="org.onebusaway.container.spring.SystemPropertyOverrideConfigurer"> <property name="order" value="-2" /> <property name="properties"> <props> <prop key="bundlePath">C:\Users\jaullo.ICETEL\Desktop\MyBus\transit_build </prop> </props> </property> </bean>

C:\Users\jaullo.ICETEL\Desktop\MyBus\transit_build --> is the path whre my GTFS information is, but it appear not to work

Finally we have also this error
Exception in thread "Thread-5" org.springframework.remoting.RemoteConnectFailureException: Cannot connect to Hessian remote service at [http://localhost:8080/onebusaway-transit-data-federation-webapp/remoting/transit-data-service]; nested exception is com.caucho.hessian.client.HessianConnectionException: HessianProxy cannot connect to 'http://localhost:8080/onebusaway-transit-data-federation-webapp/remoting/transit-data-service at org.springframework.remoting.caucho.HessianClientInterceptor.convertHessianAccessException(HessianClientInterceptor.java:262) at org.springframework.remoting.caucho.HessianClientInterceptor.invoke(HessianClientInterceptor.java:231) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy56.getAgenciesWithCoverage(Unknown Source) at org.onebusaway.presentation.impl.ServiceAreaServiceImpl$BackgroundThread.run(ServiceAreaServiceImpl.java:130) at java.lang.Thread.run(Unknown Source)

Any help is appreciated

@themonki
Copy link

Hi @jaullo,

you was try first with quickstart?

First you need do this: Building a Transit Data Bundle, but here is better documentation: http://developer.onebusaway.org/modules/onebusaway-application-modules/current/guides/transit-data-bundle-guide.html. You need to download the onebusaway-transit-data-federation-builder.jar.

Example

java -jar onebusaway-transit-data-federation-builder.jar GTFS.zip transit_build

Later move transit_build to C:\Users\jaullo.ICETEL\Desktop\MyBus\

How you are try to deploy the onebusaway-transit-data-federation-webapp? over tomcat? over eclipse?

@jaullo
Copy link
Author

jaullo commented Apr 28, 2017

Hi @themonki
Thank you for your answer, it was very helpfull and points me in the right direction. I'm using eclipse with tomcat 7, so in run configurations i have a Java Application configured (OneBusAway_BunldeBuilder) with the project, main class and arguments set.
My arguments are:

C:\Users\jaullo.ICETEL\Desktop\MyBus\MBTA_GTFS.zip C:\Users\jaullo.ICETEL\Desktop\MyBus\transit_build
-P tripEntriesFactory.throwExceptionOnInvalidStopToShapeMappingException=false

Whe i run this configuration i get many new files in the transit folder.
Now i run my project and no error is showed and i can access http://localhost:8080/onebusaway-webapp/
But the Page is just a blank page.

Captura
I'm doing something wrong?

PD: In my org_onebusaway_agency_data database for the onebusaway-transit-data-federation-webapp no information is charged.
Also i compiled onebusaway_webapp with maven (mvn -am -pl onebusaway-webapp package) and i received Build Success, so i copied the gwt files to my app deployed directory

@themonki
Copy link

@jaullo, that is blank because you need XWiki Instalation. I don't know how to set up this, sorry.

The GTFS informations is loader on memory, on database is save another informations like api keys.

navigate to http://localhost:8080/onebusaway-webapp/where/standard/

Others URL

http://localhost:8080/onebusaway-webapp/where/iphone/
http://localhost:8080/onebusaway-webapp/where/text/
http://localhost:8080/onebusaway-webapp/user/index.action

On datasource on onebusaway-webapp you need to add the api key for to work with IOS and Android apps, if you want, explore this apps and find something like "custom api server" .

Add this:

<!-- Service that is used to verify API keys -->
<bean id="apiKeyValidationService" class="org.onebusaway.users.impl.validation.KeyValidationServiceImpl" />

<!-- Allows the TEST key for OBA API testing.  Should be removed in production -->
<bean class="org.onebusaway.users.impl.CreateApiKeyAction">
    <property name="key" value="TEST"/>
</bean>

<!-- iOS Client key -->
<bean class="org.onebusaway.users.impl.CreateApiKeyAction">
    <property name="key" value="org.onebusaway.iphone"/>
</bean>

<!-- Android Client key -->
<bean class="org.onebusaway.users.impl.CreateApiKeyAction">
    <property name="key" value="v1_BktoDJ2gJlu6nLM6LsT9H8IUbWc=cGF1bGN3YXR0c0BnbWFpbC5jb20="/>
</bean>

@themonki
Copy link

@jaullo and another thing, if you can not see the map or stops you need to add to datasource your Google Maps Api Key

!-- Tells ehCache to use a different name for the cache (to avoid conflicting with other onebusaway webapps)	-->
  <bean class="org.onebusaway.container.spring.PropertyOverrideConfigurer">
    <property name="properties">
      <props>
        <prop key="cacheManager.cacheManagerName">org.onebusaway.c_webapp.cacheManager</prop>
        <prop key="defaultWebappConfigurationSource.googleMapsApiKey">YOUR_API_KEY</prop>
      </props>
    </property>
  </bean>

@jaullo
Copy link
Author

jaullo commented Apr 28, 2017

@themonki Oohhh :)
I'm installing xwiki right now to make some tests.
Is the maps key added to onebusaway-webapp datsource too?

Thank you so much! You're a crack

@themonki
Copy link

themonki commented Apr 28, 2017 via email

@barbeau
Copy link
Member

barbeau commented Apr 29, 2017

@jaullo I hope all that info has helped (thanks @themonki!) We use these Github issues to track specific bugs, so I'm going to close this issue out. If you have more questions on setting up please post to the OneBusAway developers group - https://groups.google.com/forum/m/#!forum/onebusaway-developers.

@barbeau barbeau closed this as completed Apr 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants