Rundeck - How to use a different JDBC driver - RHEL RPM install - rundeck

The RedHat RPM install of Rundeck runs it as an executable WAR file. The JDBC driver for SQL server is inside the WAR and is quite old.
How to we use a newer/different SQL Server JDBC driver than what is in the WAR?
Version 3 of Rundeck "expanded" to the filesystem (didn't run from a WAR) and we were able to put the drivers in Rundeck's "lib" folder, but in this case we don't feel like adding it to the WAR and then modifying the MANIFEST.MF inside the WAR to add it to the classpath is the right solution.
Thanks.

Officially you can create a var/lib/rundeck/lib directory and put the latest driver there, take a look.
Alternatively, you can clone the repo, update the package, and build your "own" WAR. That WAR file can be saved on the /var/lib/rundeck/bootstrap path (RPM/DEB installations).
The source code references this package (pretty old, from 2018). You can update to the latest version and test, of course, this process is at your own risk.
Finally, you can suggest the driver update here.

Related

How can I create an Upstart Zip package using sbt-native-packager?

I am unable to generate an upstart zip package.
I have added the following to my sbt project
...
enablePlugins(UpstartPlugin).
enablePlugins(JavaServerAppPackaging)
and then run
sbt clean universal:packageBin
And a Zip file is produced but it contains the shell script in ./bin and the jars in ./lib that look like what is produced when I use JavaAppPackaging!
Where are the conf files etc needed for upstart?
Am I missing the secret sauce or using the wrong incantation?
Reading all the docs at this page I am under the impression that the archetype plugins determine what goes into my package while the format plugins determine what form the package takes.
So for example I could have a Java Server project that is designed to launch running as a daemon user using the JavaServerAppPackaging (archetype) and adding the daemonUser setting, but then have this bundled up as a Zip or Tar.gz using the Universal (format) plugin or a .deb file using the Debian (format) plugin.
Well I want a Java Service with all the files necessary to be started with the upstart System Loader but packaged as a Zip file. So I assume I need the upstart (archetype system loader) plugin with the universal (format) plugin.
There is even a tip on the system loader docs for the upstart plugin saying
You can use systemloaders with the Java Application Archetype or the Java Server Application Archetype!
Well that exactly what I want however it doesn't state how to do it!
Please can someone tell me how to get a zip bundle with an upstart layout that starts a Java Server application? And if you can point out the documentation I have clearly missed than that would help my understanding too :-)
Cheers
Karl
Thanks for ready the docs so carefully and sorry that the docs are lacking an explanation what package types support system loaders.
The short answer is: only rpm and debian packages support system loaders ( systemd, systemV and upstart ).
Why is that so? A system loader is tight to the target operation system. It's nothing universal, which is the reason it's not in there. The configuration files and or scripts and platform dependent and this is not part of your regular application directory.
Cheers,
Muki

JBoss Client directory

I recently started learning more about JBoss Application sever. After installation I was looking inside all directories created by JBoss installation. (I'm using JBoss AS version - jboss-5.0.1.GA)
I referred documentation available at this link
It says 'client' directory contains Jar files needed by remote clients.
client: The JARs that are required for clients that run outside of JBoss are located in the client directory.
When I looked inside 'client' directory after installation, it contains 90 jar files overall. Does that mean If I create a remote ejb client I would need to include all the 90 jars in my remote application classpath?
With JBoss AS 5.x things got complicated.
Placing all of the client jar files on classpath will certainly work.
In JBoss 4.x there was an option to use jbossall-client.jar which integrated other numerous client libs into single file. If you'll look into same named jar in JBoss 5.x you'll find out that it's reduced to manifest referencing other jars. Placing this single jar in your classpath will work as long as all of the jars referenced by manifest are present in the same directory.
If accessing remote EJB is all you need then only a subset of jars is required, unfortunatelly it's hard to tell which ones is it.
Following this coderanch link (I've found it here on SO) you'll find such subset prepared for JBoss 5.1.0.GA.
Be warned though, list of jars published on coderanch has abbreviated names, some misquotations and at least two jars are not present in server version 5.0.1. If reducing number of dependencies is your priority, use this list wisely and enhance/extend it by trials and errors.

Deploying a new version of WAR onto tomcat on eclipse

So I'm having this issue with eclipse and tomcat 6.
I am able to upload the first version of my war on eclipse using server(tomcat 6)->add resource, add all.
But then I tried editing some lines, and then run as maven clean->run as maven install, then clean, clean tomcat work directory, and restart the server, and it would not show me the reflected changes.
Any suggestions?
You clean your application, and executing an install, but seems you're not executing the build correctly. Ensure you're generating a new war file (take a look at the date of when it is generated to make sure you're deploying the last version). If your project has many modules, e.g: war and jars. Make sure you build the jars as well, and the jars are being replaced in the tomcat/libs folder or in your WEB-INF/libs, check the date of when are the depending jars generated too, then you can see the differences.
Best regards.

java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool

I am tring to configure a dynamic web project using eclipse helos. I use tomcat 6. When I add the libraries to the WebContent/lib it works fine. But I want to a folder called lib in the project's root level(root/lib). When I put my library files to that folder it builds fine. Run fine to the login page. When I try to log in it gives
"java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool"
Please help me with this.
You're creating a web app and deploying it as a WAR file in a Java EE container. That means that your deployment must follow the WAR standards. Put your JARs in WEB-INF/lib. The container will find them there.
Tomcat 6 and 7 have changed things up so JDBC driver JARs need to go in the server /lib directory. The app server expects to find them with its class loader. Try putting the MySQL JDBC connector JAR in /lib and see if that helps.

Including the MySql's connector/j as part of an EAR file: Glassfish

We want to simplify the deployment process of an app by including the MySql connector/j jar as part of the EAR. (so we won't need to manually copy it in the /lib folder of our Glassfish servers)
Is it possible?
UPDATE: We have read this is possible using the SAR files in JBoss, but we don't think it's available in Glassfish.
Because of the classloader hierarchy in Glassfish I don't think this is possible. The mysql driver jar needs to be available outside of your application's classloader because the connection pool is globally available.
http://download.oracle.com/docs/cd/E19226-01/820-7695/6niugesfp/index.html#indexterm-28
From what I can find, Glassfish doesn't support anything like .sar files:
http://old.nabble.com/Migrating-From-jboss-4.2.1-to-GlassFish-td18629992.html
Maybe vote for this issue, or create your own for a .sar-like deployment option:
http://java.net/jira/browse/GLASSFISH-16915