Java Spring Boot API: how view Maven console when doing exercises?


I am doing the Boot Boutique exercise at

and when I change “spring.datasource.initialization-mode=never” to =true, the project breaks. It seems mvn cannot compile my project, localhost:4001 is blank and curl cannot connect (connection refused). I have tried finding errors in my code, and have fixed some, but now I am out of clues. And since there is no console I cannot find the error. Setting initialization back to “never” doesn’t fix it either, project is broken until I reset the whole project.

There is no “View Solution” to this project, which is fine, but it would be very helpful indeed to have the console handy so I could see where the compiling errors.

I have, of course, tried resetting the project many times, and I regain connection. I have then step-by-step added back my code, but cannot figure out why it breaks when enabling the database (datasource initialization).

My question: is there a hidden window or way that I can bring back the console into view in projects such as this? This is not the first time I have this problem, there was another exercise a while back when I was forced to view the walkthrough in lack of a console window.

It seems this project is broken; saving the project several times without making any changes to reset, fresh code, will also break curl connection. Is this a known browser issue? I am using Safari.

I am having the same issue, curl returns cannot connect. However, in the instructions they say:
change spring.datasource.initialization-mode=never to `spring.datasource.initialization-mode=always
you seem to have changed it to true instead
I hope this works for you

Thanks for the reply. That was a typo on my part when writing this post, I used =always.

Chrome didnt work either and after writing this post I lost connection with localhost even when resetting the project. Seems its something on codecademy side.

My questions remain though: is it possible to view maven output / console in these projects?

The project is broken. Has been for about 4 months now. I reported it in October, but they still haven’t got around to fixing it yet. I think it is low on their priority list, so feel free to make some noise about it. f they know that enough people are disgruntled, they may prioritize it more. Use the report bug feature in the Get Unstuck tab at the top right.

You can check the maven output if you want to tho. mvn spring-boot:run should do it

Thanks, the command worked and I was able to clear the last code I did wrong.

After a while the project broke again. And the answer is in the mvn output:
Spring kills the project early in the booting process (“Killed”). No reason stated, but from what I read online it could be that Codecademy keeps all iterations of the Boot boutique you create when pressing save or using spring-boot:run, and that it runs out of memory after a couple of runs. Therefore killing all new iterations.

After a while I was able to get it running again. Most of the time only the command (mvn spring-boot:run) resulted in an output on the page to the right; it was otherwise white blank.

Now for the broken part. The BootType type is not working properly, all boots are defined as UNDEFINED. I have used

private BootType type;

and have

import javax.persistence.EnumType;

(among others).
Still no go apparently. Also, the icons for deleting or incrementing/decrementing shoes and quantities are broken; only unformatted text appears, but they are clickable:

Boots Inventory

1 undefined leather 10.5 6 ❌ ⬆️ ⬇️
2 undefined rubber 6.5 6 ❌ ⬆️ ⬇️
3 undefined rubber 7.5 16 ❌ ⬆️ ⬇️
4 undefined leather 8 8 ❌ ⬆️ ⬇️
5 undefined canvas 7 3 ❌ ⬆️ ⬇️

this could be due to a missing resource, as mvn states:

[INFO] skip non existing resourceDirectory /home/ccuser/workspace/spring-data-jpa-boots-bootique-project/src/test/resources

during boot up. But could naturally be something else entirely.

Apart from that I got the project going and working until the last tasks that involves Searching, which I don’t think will work since the BootType type is not working properly. By the way I got an error when using the @GeneratedValue strategy parameter on the id. Using only @GeneratedValue worked.

I’ll skip ahead to the Golden Medals project now.

Use mvn spring-boot:run command to properly start project and also to view your errors
Use it as few times as possible, otherwise it seems you’ll run into a wall and all new tries gets killed
Icons and BootType type is not working.

I just wrote a long text explaining what is wrong with this project and then it went away after posting. Won’t do it again. Here is TLDR:

Use mvn spring-boot:run to get it properly running, you might get a blank page otherwise.
Don’t use it more than 8-ish times or the process will get Killed early. Could be a memory issue on Codecademys part.
Icons on frontend and BootType type is broken, but unformatted text is clickable to Delete/Increment/Decrement. Shoes are defined as UNDEFINED, even when using

private BootType type;

Searching tasks are therefore broken, since there are no shoe types defined. Otherwise working. Use @GeneratedValue without strategy parameters on id.