You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you change the commented part of app/build.gradle.kts to M8, the exception will no longer occur.
// download glassfish-embedded-all// val url = "https://repo1.maven.org/maven2/org/glassfish/main/extras/glassfish-embedded-all/8.0.0-M8/glassfish-embedded-all-8.0.0-M8.jar"// val dest = layout.projectDirectory.file("glassfish-embedded-all-8.0.0-M8.jar")val url ="https://repo1.maven.org/maven2/org/glassfish/main/extras/glassfish-embedded-all/8.0.0-M9/glassfish-embedded-all-8.0.0-M9.jar"val dest = layout.projectDirectory.file("glassfish-embedded-all-8.0.0-M9.jar")
The stack traces are as follows.
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
java.lang.RuntimeException: Invalid resource: org.glassfish.resourcebase.resources.api.ResourceInfo@a358dd17[jndiName=java:app/App/MainDs__pm, applicationName=app, moduleName=null]
at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:565)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:503)
at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:48)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:56)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:81)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:161)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:126)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:325)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:546)
at org.glassfish.persistence.jpa.JPADeployer.createEntityManagerFactories(JPADeployer.java:331)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:984)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:467)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:257)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:474)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:574)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:570)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/javax.security.auth.Subject.doAs(Subject.java:453)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:569)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:600)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:592)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/javax.security.auth.Subject.doAs(Subject.java:453)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:591)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1484)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1862)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1738)
at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:147)
at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:73)
at org.glassfish.runnablejar.UberMain.executeCommandFromString(UberMain.java:192)
at org.glassfish.runnablejar.UberMain.run(UberMain.java:113)
at org.glassfish.runnablejar.UberMain.main(UberMain.java:92)
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource: org.glassfish.resourcebase.resources.api.ResourceInfo@a358dd17[jndiName=java:app/App/MainDs__pm, applicationName=app, moduleName=null]
at org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:62)
at org.glassfish.jdbcruntime.service.JdbcDataSource.<init>(JdbcDataSource.java:44)
at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:119)
at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:56)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:561)
... 32 more
Steps to reproduce
git clone https://github.com/naotsugu/playground-glassfish.git
cd playground-glassfish
git fetch origin gf-issue-JPADeployer
git checkout gf-issue-JPADeployer
./gradlew run
Impact of Issue
Data source cannot be defined.
The text was updated successfully, but these errors were encountered:
Environment Details
GlassFish Version (and build number): 8.0.0-M9
JDK version: 21
OS: any
Problem Description
The data source defined in
@DataSourceDefinition
cannot be referenced frompersistence.xml
.Works for
8.0.0-M8
, but exception for8.0.0-M9
.Probably affected by the #25198 modifications.
The following simple definitions are exceptions(See https://github.com/naotsugu/playground-glassfish/tree/gf-issue-JPADeployer).
If you change the commented part of
app/build.gradle.kts
toM8
, the exception will no longer occur.The stack traces are as follows.
Steps to reproduce
git clone https://github.com/naotsugu/playground-glassfish.git cd playground-glassfish git fetch origin gf-issue-JPADeployer git checkout gf-issue-JPADeployer ./gradlew run
Impact of Issue
Data source cannot be defined.
The text was updated successfully, but these errors were encountered: