jpa报错 Unable to acquire a connection from driver [null], user [null] and URL [null]

为啥报错

因为你在persistence.xml中没配置你数据库的相应信息

咋解决

persistence.xml在哪里?

咋编辑这东西?

咋配置

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="Project1_Group5_ClientTierApp"
transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <class>org.client.jpa.User</class> <properties> <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/webdevelopmentpracticuum_database?characterEncoding=UTF-8" />
<property name="javax.persistence.jdbc.user" value="你账号一般是root看你改没改过" />
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="javax.persistence.jdbc.password" value="你密码,我不能告诉你我自己的 />
<property name="eclipelink.ddl-generation" value="create-tables" />
<property name="eclipelink.jdbc.connections.min" value="1" />
<property name="eclipelink.jdbc.connections.max" value="2" />
<property name="eclipelink.logging.level" value="FINEST" /> </properties>
</persistence-unit> </persistence>

jpa报错 Unable to acquire a connection from driver [null], user [null] and URL [null]的更多相关文章

  1. centos6.5环境wget报错Unable to establish SSL connection

    centos6.5环境wget报错Unable to establish SSL connection [root@centossz008 src]# wget --no-check-certific ...

  2. JPA报错问题修改小结

    项目中在使用线程跑定时任务时,遇到报错,"Could not open JPA EntityManager for transaction Caused by: org.hibernate. ...

  3. delphi调试需要管理员权限程序报错“Unable to create process:请求的操作需要提升”

    delphi调试启动需要UAC权限的程序的时候会报错“Unable to create process:请求的操作需要提升”.这是因为delphi没有以管理员身份启动,这样delphi createp ...

  4. nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】

    转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...

  5. AS添加依赖报错Unable to merge dex

    AS添加依赖报错Unable to merge dex 最近在给项目添加依赖的时候,要给项目导入Bmob的SDK,参照Bmob的官方文档,可以直接在app的build.gradle文件中添加 //Bm ...

  6. linux 下通过xhost进入图形界面,经常会出现报错“unable to open display”

    linux 下通过xhost进入图形界面,经常会出现报错“unable to  open display” linux下的操作步骤如下: [root@localhost ~]# vncserver N ...

  7. git clone 报错Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

    在执行git clone命令报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange metho ...

  8. Git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc

    git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx. port 12345: no matching cipher found. Their o ...

  9. C# 解决SharpSvn启动窗口报错 Unable to connect to a repository at URL 'svn://....'

    在远程机打开sharpsvn客户端测试,结果报错 Svn启动窗口报错 Unable to connect to a repository at URL 'svn://...' 咋整,我在win10我的 ...

随机推荐

  1. codevs3269 混合背包 x

    3269 混合背包  时间限制: 1 s  空间限制: 256000 KB  题目等级 : 钻石 Diamond   题目描述 Description 背包体积为V ,给出N个物品,每个物品占用体积为 ...

  2. 一、基本的bash shell命令(基于Ubuntu实现)

    一.基本的bash shell命令(基于Ubuntu实现) /etc/passwd文件包含了所有系统用户账户列表以及每个用户的基本配置信息. man命令 在想要查找的工具的名称前输入man命令,就可以 ...

  3. Python基础之算术运算符

    如下图所示, 假设变量a = 10, b = 20:

  4. SWPUCTF2019 | 神奇的二维码

    拖到binwalk里面发现4个压缩包: 查找一下RAR的文件头,然后把它们提取出来: 第一个base64一下得到第二个压缩包的密码: 第二个压缩包可以,emmm,保存一下扩充一下自己的表情包库: 第三 ...

  5. python-matplotlib-2

    figure的使用 x = np.linspace(-1, 1, 50) y1 = 2 * x + 1 #figure 1 plt.figure() plt.plot(x, y1) # figure ...

  6. python中的fstring的 !r,!a,!s

    首先是fstring的结构 f ' <text> { <expression> <optional !s, !r, or !a> <optional : fo ...

  7. [学习笔记] L1-PCA

    L1-PCA Intro PCA的本质就是从高维空间向低维空间投影,投影的本质又是左乘(或右乘)一个向量(表征原来特征空间到投影后特征空间的权重),经过线性加权,转换到低维空间表征,如果将向量换成矩阵 ...

  8. 如何在GitHub上下载一部分文件(单个文件夹)

    Preface Github下的项目可能很大,里面有很多的子文件夹,我们可能只需要使用某个子目录下的资源,可以不用下载完整的repo就能使用. 例如,我想下载这个repo中的mnist_gan文件:h ...

  9. Mysql密码忘记,修改密码方法

    1.set password for ‘root’@’localhost’ = password(‘czllss’); -- czllss为新密码

  10. 接入上一篇SSM框架整合示例

    需要创建相应的包与文件夹 Book数据表作为本示例数据 搭建项目开始 首先有bean后 private int id; private String name; private int cnt; 第一 ...