-
Notifications
You must be signed in to change notification settings - Fork 306
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
JMS resources from glassfish-resources.xml not usable - JNDI lookup fails #3449
Comments
try setting the system property -Ddeployment.resource.validation=false |
@smillidge that was the issue! Thank you very much, it would have taken me ages to find this. Would you like me to add some text about this to the docs? Happy to create a PR. |
Adding a special JVM option "-Ddeployment.resource.validation=false" at container build time, so the resources may be created in application scope. This needs to be present BEFORE the app server starts, it cannot be added during startup via prebootcmd. See also: * payara/Payara#3449 * https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480 TODO: this needs to be documented and added to classic installer, too!
Adding a special JVM option "-Ddeployment.resource.validation=false" so the resources may be created in application scope. See also: * payara/Payara#3449 * https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480 TODO: this needs to be documented and added to classic installer, too!
Adding a special JVM option "-Ddeployment.resource.validation=false" so the resources may be created in application scope. See also: * payara/Payara#3449 * https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480 TODO: this needs to be documented and added to classic installer, too!
Adding a special JVM option "-Ddeployment.resource.validation=false" so the resources may be created in application scope. See also: * payara/Payara#3449 * https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480 TODO: this needs to be documented and added to classic installer, too!
Adding a special JVM option "-Ddeployment.resource.validation=false" so the resources may be created in application scope. See also: * payara/Payara#3449 * https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480 TODO: this needs to be documented and added to classic installer, too!
Adding a special JVM option "-Ddeployment.resource.validation=false" so the resources may be created in application scope. See also: * payara/Payara#3449 * https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480 TODO: this needs to be documented and added to classic installer, too!
Adding a special JVM option "-Ddeployment.resource.validation=false" so the resources may be created in application scope. See also: * payara/Payara#3449 * https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf#G3.1590480 TODO: this needs to be documented and added to classic installer, too!
Sorry missed your update yes please make a PR we will merge it. |
Can you add some clarification as to why this is needed? What does setting this flag to I'm just trying to better understand what's happening here. Thanks. |
It stops the check during deployment that all resources referenced by the deployment are available. The implementation is currently simplistic in that it tries to look up the referenced resource in the JNDI tree and if not present fails deployment. In the case of application scoped resources then this check can be too aggressive as the resource has not been fully deployed yet.. |
Documentation PR made. https://github.com/payara/Payara-Server-Documentation/pull/686 |
Description
While trying to build a docker image for IQSS/dataverse, I experienced difficulties to deploy application scoped JMS resources. JNDI lookup fails, see logs below.
This seems to be a bug, as I am pretty sure I created a configuration inline with the Glassfish docs. Couldn't find specific docs for Payara, only some issues, that didn't seem related.
Expected Outcome
The application should deploy (maybe fail at later stages when creating the db tables - this is a WIP).
Current Outcome
Deployment fails with the following error:
Steps to reproduce (Only for bug reports)
You can simply run
mvn -Pcontainer -DskipTests clean package docker:build docker:run
to reproduce:git clone https://github.com/poikilotherm/dataverse.git -b 5292-small-container dataverse cd dataverse mvn -Pcontainer -DskipTests clean package docker:build docker:run
(You obviously need to be on Mac/Linux and have Git, Maven plus Docker readily available.)
Context (Optional)
This is an effort to create a ready-to-use Docker image of Dataverse, see IQSS/dataverse#5292. I try to make the current installer obsolete and it seemed a good idea to put the JMS config within the application code.
Some links to relevant parts:
IngestServiceBean.java
where the resource is looked up to be injectedglassfish-setup.sh
glassfish-resources.xml
Please be aware that this Docker image already integrates payara/docker-payaraserver-full#61.
Environment
The text was updated successfully, but these errors were encountered: