「NetBeans」カテゴリーアーカイブ
【NetBeans】解決「 Unable to retrieve EntityManagerFactory for unitName null」
persistence.xmlはありますか??
もしも表題のような「Unable to retrieve EntityManagerFactory for unitName null」がStacktrace上にあったら下記を確認してください。
そのデータベースへの持続性ユニット。
プロジェクトを右クリック。
持続性ユニット
![【NetBeans】解決「 Unable to retrieve EntityManagerFactory for unitName null」](https://kenjimorita.jp/wp-content/uploads/2017/01/b295e2b8e8b27529750bcb34cda99a82-1024x572.png)
すでにデータベースが作成されているなら、
それを選択
![【NetBeans】解決「 Unable to retrieve EntityManagerFactory for unitName null」](https://kenjimorita.jp/wp-content/uploads/2017/01/bd0db39193ea399abe24d5ee40250d80-1024x604.png)
構成ファイルの下にpersistance.xmlが作られたはずです。
試しにこれで再度描画して見てください。