onebusaway-application-modules icon indicating copy to clipboard operation
onebusaway-application-modules copied to clipboard

Unable to find type 'org.onebusaway.webapp.actions.bundles.ArrivalAndDepartureMessages'

Open mani-rai opened this issue 6 years ago • 11 comments

Hello guys,

I am trying to compile MobileApplication module and getting "Unable to find type 'org.onebusaway.webapp.actions.bundles.ArrivalAndDepartureMessages'" error message. It seems to be raising from ArrivalsAndDeparturesPresentaion class WhereLibrary module. The error does makes sense since ArrivalAndDepartureMessages interface is not in sub-packages of the module. However I couldn't understand how OneBusAwayStandardApplication module that inherits WhereLibrary module is getting compiled. Please let me know if there's any method I couldn't understand.

Thanks

mani-rai avatar Aug 24 '17 06:08 mani-rai

Can you link to which repository you are building? You reference the mobile application but the issue is filed in application-modules.

sheldonabrown avatar Aug 24 '17 12:08 sheldonabrown

Sorry for inaccuracies... I am referring to gwt mobile application module. Following links are location of source codes of this module.

https://github.com/OneBusAway/onebusaway-application-modules/tree/master/onebusaway-webapp/src/main/java/org/onebusaway/webapp/gwt/mobile_application https://github.com/OneBusAway/onebusaway-application-modules/tree/master/onebusaway-webapp/src/main/resources/org/onebusaway/webapp/actions

Thanks

mani-rai avatar Aug 24 '17 12:08 mani-rai

The build is still passing:

http://ci.camsys.com/job/onebusaway-application-modules/

Can you give some details as to java and maven versions?

sheldonabrown avatar Aug 24 '17 13:08 sheldonabrown

Hello,

I am building the application with java 1.7.0_79 and maven 3.1.0. And also by default, gwt mobile application is not included in build since it was experimental according to oba webapp configuration guide doc. Also if we look into build log of oba webapp http://ci.camsys.com/job/onebusaway-application-modules/1097/org.onebusaway$onebusaway-webapp/console we cannot find gwt mobile application build log. In my case, I locally included this module in build configuration to check this mobile application module.

Thanks

mani-rai avatar Aug 24 '17 13:08 mani-rai

@mani-rai Are you looking to build this mobile-friendly site?

http://tampa.onebusaway.org/where/iphone/

Or this one?

http://tampa.onebusaway.org/where/text/

If so, these are both included in the onebusaway-webapp module. See these instructions for building it, including the GWT components: https://github.com/OneBusAway/onebusaway-application-modules/wiki/Developer-Guide#configuring-onebusaway-webapp

barbeau avatar Aug 24 '17 14:08 barbeau

Thanks @barbeau... I am aware of those sites and wanted to check out gwt mobile application too...

mani-rai avatar Aug 24 '17 15:08 mani-rai

@mani-rai Unless there is some other component I don't know about, those are the "GWT mobile applications" (i.e., mobile friendly websites). GWT is just a tool to take Java code and compile to HTML and Javascript.

barbeau avatar Aug 24 '17 15:08 barbeau

Thanks @barbeau... But still I am in confusion that OneBusAwayStandardApplication module compiles without a problem though it inherits WhereLibrary module which creates ArrivalAndDepartureMessages via deferred bindings. Though ArrivalAndDepartureMessages is not located in WhereLibrary module's sub packages, OneBusAwayStandardApplication module compiles successfully. Whereas mobile application raises an error regarding its location. I am trying to find out if there's something I am missing regarding modules build.

mani-rai avatar Aug 24 '17 15:08 mani-rai

@mani-rai what are the exact steps you're using to compile the application? Are you using an ID like Eclipse? Can you provide screenshots or stack traces of the exact error you're seeing?

Running mvn package at the root of the project should build all the modules.

barbeau avatar Aug 24 '17 16:08 barbeau

@barbeau Here are the steps I took.

  1. Added MobileApplication module in onebusaway-webapp's pom file gwt-maven-plugin configuration. <module>org.onebusaway.webapp.gwt.MobileApplication</module>
  2. Added web resources configuration in maven-war-plugin configuration. <resource> <directory>target/gwt/org.onebusaway.webapp.gwt.MobileApplication</directory> <targetPath>where/mobile</targetPath> </resource>
  3. Packaged onebusaway-webapp from onebusaway-application-modules directory as mentioned by developers guide. mvn -am -pl onebusaway-webapp package

RESULT

[INFO] Compiling module org.onebusaway.webapp.gwt.MobileApplication [INFO] Validating newly compiled units [INFO] Ignored 3 units with compilation errors in first pass. [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. [INFO] Scanning for additional dependencies: file:{project-directory-path}/onebusaway-application-modules/onebusaway-webapp/src/main/java/org/onebusaway/webapp/gwt/where_library/view/ArrivalsAndDeparturesPresentaion.java [INFO] Computing all possible rebind results for 'org.onebusaway.webapp.actions.bundles.ArrivalAndDepartureMessages' [INFO] Rebinding org.onebusaway.webapp.actions.bundles.ArrivalAndDepartureMessages [INFO] Checking rule [INFO] [ERROR] Unable to find type 'org.onebusaway.webapp.actions.bundles.ArrivalAndDepartureMessages' [INFO] [ERROR] Hint: Previous compiler errors may have made this type unavailable [INFO] [ERROR] Hint: Your source appears not to live underneath a subpackage called 'client'; no problem, but you'll need to use the directive in your module to make it accessible [INFO] [ERROR] Errors in 'file:{project-directory-path}/onebusaway-application-modules/onebusaway-webapp/src/main/java/org/onebusaway/webapp/gwt/where_library/view/ArrivalsAndDeparturesPresentaion.java' [INFO] [ERROR] Line 43: Failed to resolve 'org.onebusaway.webapp.actions.bundles.ArrivalAndDepartureMessages' via deferred binding [INFO] [ERROR] Cannot proceed due to previous errors

mani-rai avatar Aug 24 '17 19:08 mani-rai

@mani-rai You shouldn't need to do steps 1 and 2 - this should already build as part of the normal onebusaway-webapp build process.

org.onebusaway.webapp.gwt.MobileApplication is referenced in https://github.com/OneBusAway/onebusaway-application-modules/blob/master/onebusaway-webapp/src/main/webapp/where/mobile/index.html, so I'm 99.9% sure the MobileApplication you're referencing is just the mobile-friendly websites that I linked to above.

barbeau avatar Aug 24 '17 20:08 barbeau