PermissionsEx

PermissionsEx

14M Downloads

PostgreSQL Unable to connect to SQL database

car1ot opened this issue ยท 2 comments

commented
========== UNABLE TO LOAD PERMISSIONS BACKEND =========
Your configuration must be fixed before PEX will enable
Details: Unable to connect to SQL database
=======================================================
ru.tehkode.permissions.exceptions.PermissionBackendException: Unable to connect to SQL database
        at ru.tehkode.permissions.backends.sql.SQLBackend.<init>(SQLBackend.java:118) ~[PermissionsEx-1.23.4.jar:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_211]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_211]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_211]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_211]
        at ru.tehkode.permissions.backends.PermissionBackend.getBackend(PermissionBackend.java:392) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.backends.PermissionBackend.getBackend(PermissionBackend.java:367) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.createBackend(PermissionManager.java:624) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.setBackend(PermissionManager.java:606) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.initBackend(PermissionManager.java:693) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.<init>(PermissionManager.java:67) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.bukkit.PermissionsEx.onEnable(PermissionsEx.java:175) [PermissionsEx-1.23.4.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:462) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:376) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:456) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:266) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:783) [core.jar:git-Spigot-2ee05fe-d31f05f]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]
Caused by: java.lang.ClassNotFoundException: org.postgresql.Driver
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_211]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211]
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[?:?]
        at ru.tehkode.permissions.backends.sql.SQLBackend.getSQL(SQLBackend.java:245) ~[?:?]
        at ru.tehkode.permissions.backends.sql.SQLBackend.<init>(SQLBackend.java:112) ~[?:?]
        ... 20 more
multiserver:
  use-netevents: true
permissions:
  debug: false
  allowOps: false
  user-add-groups-last: false
  log-players: false
  createUserRecords: false
  backend: sql
  informplayers:
    changes: false
  basedir: plugins/PermissionsEx
  backends:
    file:
      type: file
      file: permissions.yml
    sql:
      type: sql
      uri: postgresql://localhost/postgresql?user=postgres&password=*************
      file: permissions.yml
updater: true
alwaysUpdate: false

I'm using postgres database. I have tried 127.0.0.1, 0.0.0.0 instead localhost, use username, password fields, but it still dont work.

commented

PEX 1.x isn't supported here.

Your server environment doesn't include the PostgreSQL JDBC driver, so you can't connect to your database without that present.

I'm not sure if PEX 2.0 supports PostgreSQL yet - it seems like currently only MariaDB/MySQL and H2 are supported SQL databases.

commented

as md said :) also please don't spam everywhere when you don't get answered in 30 seconds.