R
Railway

✋|help

Deployment issues in Spring Boot project

Ddx_manh9/1/2023
Hello, I am a newcomer using the Hobby Plan. My project is built on the Spring Boot platform and runs fine on my local machine, but when I deploy it, I encounter an error related to ThymeLeaf. Here is the error log:
2023-09-01T15:34:44.565Z ERROR 1 --- [nio-6498-exec-5] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-6498-exec-5] Exception processing template "/client/index": Error resolving template [/client/index], template might not exist or might not be accessible by any of the configured Template Resolvers
@project: 85eadb05-1f13-4118-bdf2-067247f8ec87
@environment: c1a03bd1-e816-4b7c-8fa8-b762c8ff2c0f
@service: d89d3294-6dea-48e3-8f36-5059abdd7229
@deployment: 13118411-5b51-4992-bc7a-d6cab21e47ff
@replica: 9714fd21-a33b-45f7-bb7d-875a768537e7
Bbrody1929/1/2023
@interstellartaco hello friendly neighbourhood Java dev
Ddx_manh9/1/2023
I really need help. I hope everyone can assist me.
Bbrody1929/1/2023
don't know if aleks is available right now, he'll come around when he has the time
Ddx_manh9/1/2023
Thank you. But can he trace and identify the issue from that log? I'm concerned that since the error description is limited, it might be challenging for him to trace
Bbrody1929/1/2023
this is true, please provide the full deployment log in a txt file
Ddx_manh9/1/2023
This is my log. I really hope to receive assistance
Bbrody1929/1/2023
are you using a relative path to that template file
Ddx_manh9/1/2023
I have declared the Thymeleaf path to the templates directory in the application.yaml file:
spring:
thymeleaf:
prefix: classpath:/templates/
suffix: .html
I have also declared a route so that when accessing the corresponding URL, it will go to the file: client/index.html:
@GetMapping(value = {"/", "/home", "/trang-chu"})
public ModelAndView index() {
ModelAndView view = new ModelAndView("/client/index");
return view;
}
And here is the file path of that file in the project:
src/main/resources/templates/client/index.html
I have also declared the dependent libraries in the pom.xml file:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity6</artifactId>
</dependency>
Bbrody1929/1/2023
these look like absolute paths, try using relative paths
Ddx_manh9/1/2023
"No, it is a relative path
Bbrody1929/1/2023
alright
Ddx_manh9/1/2023
:microservices:
The deadline is pressing on me. I need urgent assistance :(((((((
Bbrody1929/1/2023
this is comunity help, if no one here knows java and how to solve your problem you may not get an answer unfortunatly
Ddx_manh9/1/2023
Thank you. Is there any way to receive support from the Railway technical team? I believe this error is internal to their system
Bbrody1929/1/2023
I assure you it's not a platform issue, something with your code. but to receive support from the team you'd need to be on the pro plan or there would need to be something wrong with the platform, this is just a code issue
Ddx_manh9/1/2023
I have cloned this project to another machine, and it runs fine on that machine. I'm quite stuck on this issue :((
Bbrody1929/1/2023
unfortunatly, it runs on my machine does not rule out a code issue
Ddx_manh9/1/2023
I have redeployed on Railway several times, but the error still occurs. However, on my local machines where I deploy this project, the error doesn't occur. It's really difficult to troubleshoot
Bbrody1929/1/2023
sorry but the "it runs on my machine" does not rule out a code issue
Ddx_manh9/1/2023
Yes, I understand. What I mean is that since I cannot reproduce the error, resolving it has become a deadlock
Bbrody1929/1/2023
you can always log stuff and try different path styles, etc. it would not be wise to wait for someone to come with an answer without trying to work through this problem yourself too
Ddx_manh9/1/2023
Thank you. During the past few hours, alongside troubleshooting the issue, I also posted the question on the community. And I'm still actively seeking ways to resolve the problem.
Iinterstellartaco9/1/2023
Try removing the leading / from the view path.

Looking for more? Join the community!

Recommended Posts
Backup DatabaseHi, is it possible to perform or schedule database backups on railway? If so, could you explain howIssuing TLS certificate ongoing for 4 days nowHey folks, I've added a CNAME dns on my domain on Monday, and then it changed the status on the railfrontend web app making requests to wrong endpointOn my frontend web app I have a env variable configured to be the endpoint of my application but wheI have run graphql api for railway, I want to know how I can add custom domain by using this api.from the graph ql api, I can query project info and add plugins to project. But I do not know how toIs there an easy way to pause a project?Hello, we have a secondary development environment that we need for testing every once in a while. Ideployed flowise bot, no url generatedI have deployed a flowise bot and I have a hobby tier on railway. The issue is that after the deployDoes anyone know how to enable mongoDB drivers in a php/laravel project?Y tried to added with this command in the env tab NIXPACKS_PKGS=php81Extensions.mongodb But it stillInstalling php-gd extensionIs there a way for me to use Nixpacks to install php-gd in the setup stage of the build process. Or bind [::1]:5433: Cannot assign requested addressI'm trying to use an SSH tunnel and need to bind to my local port 5433 but keep getting this error. charged for hobby plan ?I have been charged 5 dollars for the hobby plan whilst my usage was below it and every month i had Custom Domain - Waiting for DNS updateI have deployed an app on Railway and set up a custom domain. I've tried to get the custom domain tDeployment has crashed with FileNotFoundError: [Errno 2]Hi. I am have problem with my JSON file. I try to deploy my flask chatbot project the have function nocodb - update failedHi I am testing the railway nocodb hosting, I was informed by the nocodb that there is an update thaDoes waived hobby plan fee expire?I am on hobby plan (previously developer) and I have the hobby plan waived. I would like to confirm Deployment issues in Golang projectProject id : 4e543459-a744-4198-970b-be420281426a I am trying to deploy a go lang application, it's Using a custom domain with cloudflarehi! I'm ready to deploy my project to my domain, and now railway has detected my cname record, but icron job timezoneGreetings! I want to host a script which runs at a certain time relative to my time zone (GMT+3). Whtsc: Permission deniedI just subscribed to the Hobby Plan and am trying to deploy my first backend. It was working fine iPostgres MemoryIt is possible run commands like 'top' or 'pg_top'? I need check memory usage for my Postgres instanUpgrade to pro, how to "redeploy" postgres / redis to take advantage of the PRO infrastructure?I understand how to re-deploy my app to take advantage of the PRO infrastructure (after dragging it