472,811 Members | 1,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

Java Persistence in a Desktop Application

myusernotyours
188 100+
Hi all,

Am trying to create a Java Desktop App that uses Java Persistence in Netbeans.
The database is MS Access but I tried with Mysql and got the same error.
When I run the app( Create the entity manager), I keep getting the following...

Expand|Select|Wrap|Line Numbers
  1. Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: No Persistence provider for EntityManager named ReceiptingPU:  The following providers:
  2. oracle.toplink.essentials.PersistenceProvider
  3. oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
  4. Returned null to createEntityManagerFactory.
  5.  
  6.         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
  7.         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
  8.  
Here is the persistence.xml

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  3.   <persistence-unit name="ReceiptingPU" transaction-type="RESOURCE_LOCAL">
  4.     <provider>oracle.toplink.essentials.PersistenceProvider</provider>
  5.     <class>receipting.entities.Receipt</class>
  6.     <class>receipting.entities.Consumer</class>
  7.     <class>receipting.entities.Receipttransaction</class>
  8.     <class>receipting.entities.Users</class>
  9.     <properties>
  10.       <property name="toplink.jdbc.user" value="user"/>
  11.       <property name="toplink.jdbc.password" value="user"/>
  12.       <property name="toplink.jdbc.url" value="jdbc:mysql://localhost/watering"/>
  13.       <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
  14.     </properties>
  15.   </persistence-unit>
  16. </persistence>
I have the toplink library correctly in the class path. Any one with some light please?


Alex
Feb 24 '09 #1
0 2318

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Frank Grimm | last post by:
Hi group, i'm looking for a Java persistence framework that is able to cope with changes of the class source, i.e. new/changed attributes and/or methods. Say you have an exported (persistent)...
10
by: mail2deepa | last post by:
Hello, I want to know the difference between desktop application and intranet application. when to do desktop application and when intranet application. deepa
8
by: Uttam | last post by:
Hello, I am currently in the process of developing an application in a pure desktop world using Access 2000. I am intending to convert this pure desktop application into a Client Server...
4
by: Elhanan | last post by:
hi.. all a client of ours is considering to move from a dos application to windows desktop application. the application is for traveling agency, the database is rather large. their current...
3
by: ebbflow | last post by:
I've seen explainations on how to impersonate a non aspnet user when a web page is called within an web application, but I have a different impersonation issue. I have a windows desktop...
1
by: Bartholomew Simpson | last post by:
I wrote a desktop application in C++ a little while ago, and I will like to port it to a web application. Here are the details: 1). ALL business logic is held in ANSI C++ libraries (e.g. I...
2
by: sezanawa | last post by:
Hi Guys, I am new to java deployment things. Specially for desktop applications. I used to work with J2EE and i did deployment only for web projects. Now i have developed a small desktop...
1
by: wenger | last post by:
java have the java persistence API for object-relational mapping between the java application and relational database, then why we still need the hibernate tools such as vp-uml and middlegen ??
2
by: sukeshchand | last post by:
I have a java script function. i want to use the function in my vb.net desktop application. how ????
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.