且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQLException:没有为jdbc:postgresql找到合适的驱动程序

更新时间:2022-12-01 13:02:32

正如Nicolas所说,将JDBC驱动程序安装为核心模块

As Nicolas says install the JDBC driver as a core module

接下来你需要让你的应用程序依赖于这个模块有两种方法:
MANIEST.MF
jboss-dependency.xml

Next you need to make you application depend on this module there are two ways: MANIEST.MF jboss-dependency.xml

我推荐第一种方式,因为它更符合规范。基本上,您需要在EAR或WAR的META-INF目录中创建MANIFEST.MF文件(无论正在部署什么)。您在文件中创建的行将类似于:

I recommend the first way as it is more spec compliant. Essentially you need to create a MANIFEST.MF file in the META-INF directory of your EAR or WAR (whatever is being deployed). The line you create in the file will be something like:

Dependencies: org.postgresql

有关详细信息,请参阅 JBoss EAP文档 JBoss wiki 。我希望这有帮助!

For further info see the JBoss EAP documentation or the JBoss wiki. I hope this helps!