Ed,

I have excludes in the 'configurations' stanza, rather than 'war'.

configurations {
all {
resolutionStrategy {
....

}
....

// slf4j causes grief for unit tests
exclude group:"org.apache.logging.log4j", module: "log4j-slf4j2-impl"
....
}
}


Ray

On Mon, 2024-03-11 at 15:48 -0700, Ed O. wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

Hi Ray,
   JBOSS runs a Jandex indexer to index all class files found in the WAR file. 
There is something incorrectly formatted in the latest oracle driver included 
in CAS 7, ojdbc11-23.3.0.23.09.jar, which causes the indexer to throw errors 
and server to fail to start (reference 
https://github.com/keycloak/keycloak/issues/24983). As you mentioned, since I 
have a JNDI datasource configured within my app server, I don't need that Jar 
included in the final generated CAS.war, but because it is a transitive 
dependency of JDBC support, it is included in the WAR file.
Unfortunately I have not yet found a way to exclude it via the Overlay 
build.gradle script.  I've tried to add an exclude statement to the war 
definition, but it is still including it.

war{
entryCompression = ZipEntryCompression.STORED
enabled =false
exclude("ojdbc11-23.3.0.23.09.jar") <=====
}

I've also tried using ;

rootSpec.exclude("ojdbc11-23.3.0.23.09.jar")

instead of the exclude statement but nothing so far has worked.
Any suggestions for what to include in my build.gradle config to exclude the 
ojdbc war from the final war file WEB-INF/lib directory?

Any suggestions are appreciated.
Thanks,
 Ed O.


On Tuesday, February 27, 2024 at 10:57:39 AM UTC-8 Ray Bon wrote:
Ed,

Are you including the oracle jdbc jar in JBOSS?
My understanding is that the application server creates a jndi object 
independent of the application being deployed (i.e. it does not look to the 
application for drivers).

Ray

On Mon, 2024-02-26 at 15:22 -0800, Ed O. wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

I'm new to CAS and I'm trying to use jdbc query authentication running on JBOSS 
8.0.

In gradle.properties I have set the appServer entry to blank since I'll be 
using an external servlet container.
appServer=

and in the build.gradle I specify I need jdbc support.
implementation"org.apereo.cas:cas-server-support-jdbc"

In my cas.properties, I have specified the driver class and the datasource name 
to be used from the standalone.xml datasource details in JBOSS. I've also 
specified the cas.authn.jdbc.query[0].sql and fields.

cas.authn.jdbc.query[0].driver-class=oracle.jdbc.driver.OracleDriver

cas.authn.jdbc.query[0].data-source-name=jdbc/ivrsadminDS

The problem is that the CAS war is built with an oracle JDBC driver, which is 
not needed....but more importantly the JBOSS server cannot index this 
driver..and fails to deploy the war.

So my two part question is, ...when configuring for an external server when a 
server datasource is specified , should a db driver be bundled in the WAR, and 
if it is by default, is there a way to exclude the oracle jdbc driver from the 
war file when specifying jdbc support?

Thanks!







--

Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831 | CLE 019 | r...@uvic.ca<mailto:r...@uvic.ca>

I acknowledge and respect the lək̓ʷəŋən peoples on whose traditional territory 
the university stands, and the Songhees, Esquimalt and WSÁNEĆ peoples whose 
historical relationships with the land continue to this day.

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/3b52979861fe305546132fde4a8c59e2290a0f2e.camel%40uvic.ca.

Reply via email to