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

Could not load PropertiesLauncher #16

Open
eshenayo opened this issue Oct 27, 2023 · 6 comments
Open

Could not load PropertiesLauncher #16

eshenayo opened this issue Oct 27, 2023 · 6 comments

Comments

@eshenayo
Copy link

When running sudo ./devicestarter.sh I get the error:

Error: Could not find or load main class org.springframework.boot.loader.PropertiesLauncher

Which is from this line:

java -cp $CP -Djava.library.path=$LIB_PATH -XX:ErrorFile=$POSSUM_LOG_PATH/CrashLog/hs_err_pid%p.log -XX:ReplayDataFile=$POSSUM_LOG_PATH/CrashLog/replay_pid%p.log -Dlog4j2.formatMsgNoLookups=true -Dloader.main=com.target.devicemanager.DeviceMain org.springframework.boot.loader.PropertiesLauncher

This may be user error.

@bmcecilia3
Copy link
Collaborator

What were you trying to do when running the devicestarter.sh? Were you trying to run Possum locally? If so, there are steps detailed in the ReadMe to assist with this process here. We are trying to make our ReadMe more detailed, so if these steps are unclear, please reach out and we will try to update them accordingly.

Usually when running locally, we don't run the devicestarter.sh because it is meant to be used on a physical register with devices attached. As detailed in our Sequence Overview Diagram the devicestarter.sh defines classpaths and libraries and then starts Possum. When running locally, we bypass this setup step by starting Possum with gradle instead of the script. Hope this helps!

@eshenayo
Copy link
Author

eshenayo commented Nov 2, 2023

Thanks for the reply! Yes, I was trying to run the script locally, but it is being run on a physical register with the devices attached.

@bmcecilia3
Copy link
Collaborator

Do you have a register that you are running devicestarter.sh on that is not working? Were you able to get Possum up and running on your local machine?

@eshenayo
Copy link
Author

eshenayo commented Nov 7, 2023

I have possum running, but it isn't picking up any of the attached devices:

023-11-07T09:50:57.269-07:00  INFO 151066 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2023-11-07T09:50:57.551-07:00  INFO 151066 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2152 ms
2023-11-07T09:50:57.792-07:00 DEBUG 151066 --- [           main] c.t.d.configuration.ApplicationConfig    : Application Version - PACKAGE_VERSION
2023-11-07T09:50:57.793-07:00 DEBUG 151066 --- [           main] c.t.d.configuration.ApplicationConfig    : Is Simulation Mode - false
jpos/res/jpos.properties file not found
jpos/res/jpos.properties file not found
jpos/res/jpos.properties file not found
2023-11-07T09:50:58.657-07:00  INFO 151066 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 3 endpoint(s) beneath base path ''
2023-11-07T09:50:58.773-07:00  INFO 151066 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2023-11-07T09:50:58.800-07:00  INFO 151066 --- [           main] com.target.devicemanager.DeviceMain      : Started DeviceMain in 4.108 seconds (process running for 4.489)
2023-11-07T09:50:58.865-07:00 DEBUG 151066 --- [           main] com.target.devicemanager.DeviceMain      : Setting default log path for POSSUM.
2023-11-07T09:51:04.880-07:00  INFO 151066 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-11-07T09:51:04.883-07:00  INFO 151066 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 3 ms
2023-11-07T09:51:04.939-07:00 ERROR 151066 --- [nio-8080-exec-1] c.t.d.common.DeviceAvailabilityService   : JSON is in wrong format
2023-11-07T09:51:07.291-07:00 ERROR 151066 --- [nio-8080-exec-2] c.t.d.common.DeviceAvailabilityService   : JSON is in wrong format

And when hitting the peripherals endpoint, there is an error in the output of the possum run that the format is incorrect

image

@bmcecilia3
Copy link
Collaborator

When you run the simulator, are you using the command ./gradlew run -DuseSimulators=true?

@eshenayo
Copy link
Author

eshenayo commented Nov 7, 2023

I'm not running the simulator, I have peripherals that I want to verify control of. I have the env variable set to local for SPRING_PROFILES_ACTIVE

I am running the command as:

cd $POSSUM_DIR
sudo -E ./gradlew run

Where POSSUM_DIR is set to the cloned repository base. I already ran sudo -E ./gradlew build and I have the drivers for my peripherals installed (NCR, HP and Zebra)

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

2 participants