jBoss deployment

Do you guys have any idea how to deploy a war file to jBoss? Vaadin 23 - Java 11 - jBoss 7. I badly need it.

What is your issue with it?

@quintessential-ibex im currently receiving this kind of error and am not seeing any solutions online.

Error creating bean with name ‘vaadinApplicationContextInitializer’

JBoss 7.1 is not supported if you take a look at the release notes of V23.

Oh. I forgot to include. jBoss 7.4. Sorry. @quirky-zebra

I’m not an expert with JBoss, but from the name you have posted, I would guess you are using Vaadin Spring and not a plain CDI based project. So make sure you are preparing spring to be a deployable war / ear archive and remove tomcat and such

@quirky-zebra i am using the codes made from start.vaadin.com. I changed the pom file to war and created a war file after building. However, I am facing this vaadinApplicationContextListener error when I tried to deployed it to jBoss.

That’s definitely not enough. First make sure that you are also using an embedded wildfly instead of tomcat in your local dev environment with spring boot, once that works correctly, make sure to properly follow guides provided by spring how to move from an embedded to an external container.

Did you follow the instructions how to deploy spring boot app as war file? It is not just changing the packaging! Spring Boot Reference Documentation

If you will be running on jBoss and don’t need anything specific from Spring, I’d also suggest to go with a CDI based approach and use all the good that jBoss brings in by default (Jakarta EE features).

Hi. I’m migrating from another front-end framework, and I’m using Vaadin 14, Java 1.8 and JBoss 7.1 because of runtime environment constraints. I’m having similar issues deploying a war to JBoss as Arky seems to be having. If I switch to using Vaadin CDI, will a CDI app be able to access Hibernate and Shiro once deployed? Can you point me to a simple example for an understanding of how to implement it?

If I switch to using Vaadin CDI, will a CDI app be able to access Hibernate and Shiro once deployed?
Yes.
Can you point me to a simple example for an understanding of how to implement it?
If you want a nice comprehensive example, ask @quintessential-ibex if it is possible to open source the good old Vaadin 8 Bakery example for Java EE. It uses Shiro, DeltaSpike Data and all other goodies in a really nice way. Java EE is less well supported in Vaadin 23/24, but you can write the necessary glue yourself using the Vaadin 8 code as a blueprint and all the pieces generally fit together.
Here’s how the Java EE Vaadin 8 Bakery architecture looks:

Do you need to support clustering with “distributable”?

@mrts Thanks for your responses to my side question. Since this is a departure from the original question, I’m going to post a seperate question about the issues I’m having with Vaadin CDI. Since I’m a bit of a newbie with all this Vaadin stuff, I’m not sure what “clustering with ‘distributable’” even means. The application I create will be replacing one which is already in production if that helps.

On the original question, here’s a link to my Spring Boot/Vaadin 14 Greeter application, which I attempted to deploy to JBoss 7.1 under Java 8. This repo branch includes 2 stack traces: one using our vanilla JBoss instance, and the other using a JBoss instance modified as advised in similar Q&A for this issue. https://github.com/NCIDevRonR/vaadin-issues/tree/deploy-to-jboss-71-fails

Hi! Quickly looking at your code (or technically just pom.xml), it is exacly as I guessed. You are deploying a Spring Boot application with “war packaging” without properly following the Spring documentation.

Hi @quintessential-ibex, and thank you for your response. I’m attempting to migrate from PrimeFaces to Spring Boot/Vaadin, so I’ll concede to not being well read in the ins and outs of Spring or Spring Boot. Can you point me to something specific in the pom.xml which I should be coding differently, or at least, to someplace specific in the Spring documentation which will walk me through how to deploy successfully?

Then link above points out to the exact part in spring boot docs. The single page doc is huge so getting to the right part with the anchor may be tricky.

This maybe works better: “How-to” Guides