Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Duplicate
-
None
-
None
-
None
-
Debian Wheezy with PC1 repo
ii puppetserver 2.1.1-1puppetlabs1 all Puppet Labs puppetserver
puppetserver gem list
-
-
- LOCAL GEMS ***
-
dbd-jdbc (0.1.6 java)
dbi (0.4.5)
deprecated (2.0.1)
hiera-eyaml (2.0.8)
highline (1.6.21)
jar-dependencies (0.1.13)
jdbc-mysql (5.1.36)
jruby-openssl (0.9.7 java)
json (1.8.0 java)
rake (10.1.0)
rdoc (4.1.2)
trollop (2.1.2)Debian Wheezy with PC1 repo ii puppetserver 2.1.1-1puppetlabs1 all Puppet Labs puppetserver puppetserver gem list LOCAL GEMS *** dbd-jdbc (0.1.6 java) dbi (0.4.5) deprecated (2.0.1) hiera-eyaml (2.0.8) highline (1.6.21) jar-dependencies (0.1.13) jdbc-mysql (5.1.36) jruby-openssl (0.9.7 java) json (1.8.0 java) rake (10.1.0) rdoc (4.1.2) trollop (2.1.2) -
Description
Hello,
In a erb file, we were using the Mysql DBI driver. It works great within a puppetmaster environment. But I can't get this erb file working inside puppetserver.
After reading link native-c-extension, I've switched to jdbc/mysql. But I can't get it working.
Here a simple code that didn't run inside a puppserver
require 'dbi'
require 'dbd/Jdbc'
require 'jdbc/mysql'
Jdbc::MySQL.load_driver
DBI.connect('dbi:jdbc:mysql://localhost/test', 'username', 'password', 'driver' => 'com.mysql.jdbc.Driver') do |dbh|
puts "Connected"
end
It gives:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Failed to parse template test.erb:
Filepath: /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/dbd-jdbc-0.1.6-java/lib/dbd/jdbc/driver.rb
Line: 66
Detail: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/test
at /etc/puppetlabs/code/environments/ohanesse/modules/test/manifests/ohanesse.pp:7:16 on node test-*
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
I've tried to add the 'mysql-connector-java-5.1.36-bin" jar file to the classpath (using -cp in the command line), same error.
Any ideas ?
Attachments
Issue Links
- relates to
-
SERVER-249 Add ability to add java/jars to puppet server
-
- Closed
-