Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!

Bruno Melloni

Greenhorn
+ Follow
since Oct 25, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bruno Melloni

At our organization we have many internal Spring MVC applications running on Tomcat on a Windows server.  The problem is that the number of applications make Tomcat take 10 minutes to start, so even a simple server bounce during the day is a problem.  We also have no Tomcat sysadmins or deploy admins, so the job falls on developers, and we have no expertise on how to optimize servers... the best we have been able to do is to keep the servers stable.

We are looking at Spring Boot with embedded Tomcat as a way to allow us to bounce applications independently instead of an overall Tomcat container.  We have a couple concerns and I am hoping someone can point me in the right direction:

- Since all of the embedded Tomcat instances will use the same version, is it possible for them to share the Tomcat code even as they have independent memory spaces for the apps?  It seems wasteful to load so many copies of the same read-only thing.  Same thing for Java itself, it would be even crazier to have to include a separate copy of Java for each webapp.

- What is the best way to deploy?  Googling seems to point to using a container, and more specifically to deploy the embedded Tomcat Spring Boot apps on Docker.

- Is Docker included in the Windows Server license?  Googling seems to hint so... but it is not clear.


I apologize if these are truly noob questions but google did not help, if anything it added to the confusion as every tutorial seems to be lobbying to sell you a tool instead of helping you choose the best fit.

Also, if going the Spring Boot way is overkill... please say so.  Simpler is always better, if there is such a way.
1 week ago
PROBLEM SOLVED - IGNORE. Turned out to be that someone had changed the pgm_id value.

---

I have the following SQL: "INSERT INTO pgm_cat (pgm_id, category_id) OUTPUT Inserted.pgm_cat_id AS pgm_cat_id VALUES(3,3) "

In Spring JDBC using getJdbcTemplate().queryForLong(sql) it throws the exception:

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "PROGRAM_PGM_CAT_fk". The conflict occurred in database "IDP", table "dbo.PROGRAM", column 'PGM_ID'.

The strange thing is that the Foreign Key has been there all the time, this kind of functionality works with JPA/Hibernate, and the exact query listed works perfectly in MSSMA (no FK error).

​Can someone explain why and how to fix it or work around it?
6 years ago
The problem only seems to happens when using the old style <%@ ... %>. If you switch to the new strict XML style <jsp:... /> the problem goes away.

Perhaps one of the Ganymede developers felt that we should all switch to writing JSPs using XML syntax. Annoying.

I have not found a way to eliminate the warnings. If somebody finds it, please post.
I have a WAR and an EAR project. My library jars (i.e. Struts, log4j, etc) are in the EAR. I entered a classpath entry in the WAR's META-INF/MANIFEST.MF to point to the EAR's jar files, and therefore the application compiles correctly.

But when I try to run it, it fails to load the classes from the EAR's jars.

I test-exported the EAR, and I discovered that both manifest.mf for the EAR and WAR get overwritten with empty manifests. I suspect this is what happens when I try to just run it.

This is obviously a bug, can anyone suggest a cure?
(I hope it is not a flu shot, since those are scarce this year
15 years ago