Hi Hantsy
Thanks for raising this!
The error you mention doesn't seem to be related to Codehaus Cargo, but rather to a missing dependency for the org.glassfish.main.distributions:glassfish artifact.
Could you perhaps try with a ZipUrlInstaller and point it to https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.0-M4/glassfish-7.0.0-M4.zip?
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/93df5e69-8898-469e-a961-102547c10033n%40googlegroups.com.
Hi Hantsy
Thanks for this - I believe a dedicated GlassFish 7.x container
is becoming a necessity, so I created
https://codehaus-cargo.atlassian.net/browse/CARGO-1589 and pushed
a first commit, which our continous Integration seems to be
(mostly) happy with.
Would you mind following the instructions on https://codehaus-cargo.github.io/cargo/Maven+3+Plugin+Installation.html#Maven3PluginInstallation-snapshots (or building Codehaus Cargo 1.9.14-SNAPSHOT yourself) and trying out the new glassfish7x container?
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/1ae636a9-8d7f-420a-a376-1243a709ca15n%40googlegroups.com.
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsyYou received this message because you are subscribed to a topic in the Google Groups "Codehaus Cargo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-cargo/43arWo7NyzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/6d39ff75-5ffe-a5c8-83f6-2c1187d79356%40alishomepage.com.
Hi Hantsy
Indeed, as explained on https://codehaus-cargo.github.io/cargo/Maven+3+Plugin+Installation.html#Maven3PluginInstallation-snapshots you should also execute:
mvn dependency:get -Dartifact=org.codehaus.cargo:cargo-core-container-glassfish:1.9.14-SNAPSHOT -DremoteRepositories=https://oss.sonatype.org/content/repositories/snapshots/
That'll ensure the GlassFish container's SNAPSHOT artifact is in your local repository.
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk2WdAmuMgvhvgAL-54ZeCMkpGGBaLpq7n2jsZk4xuz1HA%40mail.gmail.com.
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsyTo view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/4c8657b6-a6ec-9b52-6554-3788f4902f70%40alishomepage.com.
Hi Hantsy
Looking at the error message, Exception while preparing the app : Invalid resource : java:comp/DefaultDataSource__pm, there is perhaps an issue when Codehaus Cargo removes the default datasource. Could you try setting cargo.glassfish.removeDefaultDatasource to false to check?
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk1xsuAidurZrs8u%3DyqfBkUpbc5-%2B0H9Kc_N2vGGgTmSGw%40mail.gmail.com.
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsyTo view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/38d49e70-01de-b5b1-ed8f-b49eb782a1f5%40alishomepage.com.
Hi Hantsy
It of course should work with the default settings - We have a very special situation here that the Codehaus Cargo GlassFish 7.x container doesn't exist yet, and hence would have the opportunity to create it in a way that it will work with the default settings 😁
May I know, where did you see the JDNI name java:comp/DefaultDataSource referenced? In previous versions, I thought the name was jdbc/__default, and perhaps to make it work with a different name you simply would need to add the configuration for creating a datasource (you can also check our DataSource Definition Archetype as an example for Maven 3).
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk2fn%3DEgGAX5x4pFKSqVqjcs1_erD5Rjkyxan-CsUKU_DA%40mail.gmail.com.
Hi Hantsy
It of course should work with the default settings - We have a very special situation here that the Codehaus Cargo GlassFish 7.x container doesn't exist yet, and hence would have the opportunity to create it in a way that it will work with the default settings 😁
May I know, where did you see the JDNI name java:comp/DefaultDataSource referenced? In previous versions, I thought the name was jdbc/__default, and perhaps to make it work with a different name you simply would need to add the configuration for creating a datasource (you can also check our DataSource Definition Archetype as an example for Maven 3).
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsy--
You received this message because you are subscribed to a topic in the Google Groups "Codehaus Cargo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-cargo/43arWo7NyzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/ca9200a7-cdf2-0914-2c29-3ffbb21abd81%40alishomepage.com.
Hi Hantsy
Thanks for the hint - This explains quite some things!
The "problem" with the database GlassFish tries to have by default is that it wants to listen remotely, and hence a port number would be required, and must be made available. It would be very complex to guarantee that in a "generic" environment.
May I suggest, that you add a default embedded datasource instead? Here's what we have in our archetype:
<datasources>
<datasource>
<driverClass>org.apache.derby.jdbc.EmbeddedDriver</driverClass>
<url>jdbc:derby:derbyDB;create=true</url>
<jndiName>jdbc/CargoDS</jndiName>
<username>APP</username>
<password>nonemptypassword</password>
</datasource>
</datasources>
Once you add such a datasource, as per GlassFish5xInstalledLocalContainer.java#L74
onwards, it will be marked as default. The embedded Derby driver
has the advantage that it won't have any port number requirements,
as it is purely local.
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk1TQ0A8AQp2bztQj8FZdryfWiGQYdwVp-ZoV8wJZ%3DmPwg%40mail.gmail.com.
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsyTo view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/25dfe8ce-a2cf-b927-4406-f30ebe05fdcf%40alishomepage.com.
Hi Hantsy
You indeed simply need to:
You can try different jndiName to
make it work.
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk2q0u_vF0jx7MR2waOgVmkr_-uo8sjA3RLNc8NjKJf5CA%40mail.gmail.com.
<datasources>
<datasource>
<driverClass>org.apache.derby.jdbc.EmbeddedDriver</driverClass>
<url>jdbc:derby:derbyDB;create=true</url>
<jndiName>java:comp/DefaultDataSource</jndiName>
<username>APP</username>
<password>nonemptypassword</password>
</datasource>
</datasources>
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsyTo view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/6e517778-741f-cc8a-77ed-449a29d24898%40alishomepage.com.
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsyHi Hantsy
As per https://github.com/eclipse-ee4j/glassfish/issues/19187, I believe jndiname should be jdbc/__default, could you try that please?
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk1A4bNHfe2fG1jafecpD%2BLszWMWvJQKLrSM-RvG%3DiYAhg%40mail.gmail.com.
Hi Hantsy
Long time indeed! Thanks for checking in.
Indeed, it looks like we do enforce the first datasource to always get deployed as a "new default", hence the error below.
With the current version, the only workaorund would be to change the JNDI name. The Codehaus Cargo Glassfish container will then deploy it twice, once as default and another time with the second name.
I also checked in https://github.com/codehaus-cargo/cargo/commit/df815626549d92b7533e6beedd41008e11a89788 to fix this, once https://semaphoreci.com/codehaus-cargo/cargo/branches/master/builds/1399 completes you can use the latest SNAPSHOT. To do so:
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/013db535-009b-4dce-a30f-b9596a1a8839n%40googlegroups.com.
Regards,
Hantsy Bai
Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker
GitHub: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsyTo view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/ae61aaeb-fdd6-6995-8aeb-22c8844673e4%40alishomepage.com.