jpa报错 Unable to acquire a connection from driver [null], user [null] and URL [null]
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]的更多相关文章
- centos6.5环境wget报错Unable to establish SSL connection
centos6.5环境wget报错Unable to establish SSL connection [root@centossz008 src]# wget --no-check-certific ...
- JPA报错问题修改小结
项目中在使用线程跑定时任务时,遇到报错,"Could not open JPA EntityManager for transaction Caused by: org.hibernate. ...
- delphi调试需要管理员权限程序报错“Unable to create process:请求的操作需要提升”
delphi调试启动需要UAC权限的程序的时候会报错“Unable to create process:请求的操作需要提升”.这是因为delphi没有以管理员身份启动,这样delphi createp ...
- nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】
转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...
- AS添加依赖报错Unable to merge dex
AS添加依赖报错Unable to merge dex 最近在给项目添加依赖的时候,要给项目导入Bmob的SDK,参照Bmob的官方文档,可以直接在app的build.gradle文件中添加 //Bm ...
- linux 下通过xhost进入图形界面,经常会出现报错“unable to open display”
linux 下通过xhost进入图形界面,经常会出现报错“unable to open display” linux下的操作步骤如下: [root@localhost ~]# vncserver N ...
- 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 ...
- 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 ...
- C# 解决SharpSvn启动窗口报错 Unable to connect to a repository at URL 'svn://....'
在远程机打开sharpsvn客户端测试,结果报错 Svn启动窗口报错 Unable to connect to a repository at URL 'svn://...' 咋整,我在win10我的 ...
随机推荐
- java中如何补齐汉字字符
一个汉字相当于两个字符,所以需要输入法的时候切换到[中文全角],中文全角占用2个字符(一个空格),半角占用1个字符
- pyTerra
https://pypi.org/project/pyTerra/ pyTerra is a Python module that allows you to make requests to Mic ...
- fileReader对象读取txt文件乱码问题 以及如何获取文件的url路径(绝对路径)
<input type="file" @change="aaa($event)"> <div id="hi">< ...
- 用bootstrap写一个登陆页
<div class="container"> <p class="text-center marginTop35">后台管理系统< ...
- [ML] Gradient Boost
参考链接: 1. https://medium.com/@cwchang/gradient-boosting-%E7%B0%A1%E4%BB%8B-f3a578ae7205 2. https://zh ...
- 震惊!文科生如何三个月转行成为Java工程师?
点击上方“程序员江湖”,选择“置顶或者星标” 你关注的就是我关心的! 作者:以大橘为重链接:https://www.nowcoder.com/discuss/156087 楼主是19届应届生,去年在牛 ...
- 用grep来查询日志
转自:http://www.itokit.com/2013/0308/74883.html linux系统中,利用grep打印匹配的上下几行 如果在只是想匹配模式的上下几行,grep可以实现. ...
- JVM----Java内存模型与线程
我们知道,计算机CPU和内存的交互是最频繁的,内存是我们的高速缓存区,用户磁盘和CPU的交互,而CPU运转速度越来越快,磁盘远远跟不上CPU的读写速度,才设计了内存,用户缓冲用户IO等待导致CPU的等 ...
- LeetCode 216. 组合总和 III(Combination Sum III)
题目描述 找出所有相加之和为 n 的 k 个数的组合.组合中只允许含有 1 - 9 的正整数,并且每种组合中不存在重复的数字. 说明: 所有数字都是正整数. 解集不能包含重复的组合. 示例 1: 输入 ...
- leetcode-hard-array- 227. Basic Calculator II
mycode 29.58% class Solution(object): def calculate(self, s): """ :type s: str :rtyp ...