Questions tagged [toplink]

TopLink is one of the leading Java persistence products and JPA implementations. TopLink is produced by Oracle and part of Oracle's OracleAS, WebLogic, and OC4J servers.

TopLink is one of the leading Java persistence products and JPA implementations. TopLink is produced by Oracle and part of Oracle's OracleAS, WebLogic, and OC4J servers.

As of TopLink 11g, TopLink bundles the open source project EclipseLink for most of its functionality.

The TopLink 11g release supports the JPA 1.0 specification. TopLink 10.1.3 also supports EJB CMP and is the persistence provider for OracleAS OC4J 10.1.3 for both JPA and EJB CMP. TopLink provides advanced object-relational mapping functionality beyond the JPA specification, as well as providing persistence for object-relational data-types, and Enterprise Information Systems (EIS/mainframes). TopLink includes sophisticated object caching and performance features. TopLink provides a Grid extension that integrate with Oracle Coherence. TopLink provides object-XML mapping support and provides a JAXB implementation and web service integration. TopLink provides a Service Data Object (SDO) implementation.

219 questions
170
votes
33 answers

No Persistence provider for EntityManager named

I have my persistence.xml with the same name using TopLink under the META-INF directory. Then, I have my code calling it with: EntityManagerFactory emfdb = Persistence.createEntityManagerFactory("agisdb"); Yet, I got the following error…
Robert A Henru
  • 2,222
  • 4
  • 21
  • 25
78
votes
4 answers

Do I have to close() every EntityManager?

I have just started migrating my homegrown persistence framework to JPA. Given that the persistence frameworks hide a lot of the plumbing, I'm interested in knowing if NOT closing EntityManagers will create a resource leak, or if the frameworks will…
stevemac
  • 2,534
  • 5
  • 27
  • 36
37
votes
12 answers

How to use enums with JPA

I have an existing database of a film rental system. Each film has a has a rating attribute. In SQL they used a constraint to limit the allowed values of this attribute. CONSTRAINT film_rating_check CHECK ((((((((rating)::text = ''::text) OR …
Timo
  • 597
  • 1
  • 6
  • 11
34
votes
3 answers

JPA Implementations - Which one is the best to use?

I have made use of the following JPA implementations: Hibernate, Toplink, OpenJPA Each of them has their own strengths and weaknesses. I found Hibernate the most advanced of the three except that it mixed some of its own enhancements with JPA…
mxc
  • 983
  • 3
  • 10
  • 17
18
votes
11 answers

JPA exception: Object: ... is not a known entity type

I'm new to JPA and I'm having problems with the autogeneration of primary key values. I have the following entity: package jpatest.entities; import java.io.Serializable; import javax.persistence.Entity; import…
mmutilva
  • 18,688
  • 22
  • 59
  • 82
12
votes
5 answers

Is there are way to scroll results with JPA/hibernate?

I found some hint in Toplink Query query = em.createQuery("SELECT e FROM Employee e ORDER BY e.lastName ASC, e.firstName ASC"); query.setHint("eclipselink.cursor.scrollable", true); ScrollableCursor scrollableCursor =…
yura
  • 14,489
  • 21
  • 77
  • 126
11
votes
3 answers

COALESCE in JPA namedQuery

I have the following namedQuery select new test.entity.Emp(COALESCE(k.projectId,'N') as projectId, k.projectName) from Emp o inner join o.projects k However I am getting error expecting RIGHT_ROUND_BRACKET, found '(' How to handle COALESCE in…
Jacob
  • 14,463
  • 65
  • 207
  • 320
10
votes
7 answers

GWT with JPA

I'm trying to build database application using GWT 1.5.3. I use JPA annotations with my objects. It seems in hosted mode GWT's RPC works fine. But when I try to compile my app using GWT-compiler I get errors like: "The import javax.persistence…
synergetic
  • 7,756
  • 8
  • 65
  • 106
9
votes
3 answers

Unknown entity class error message even though the entity is marked with @Entity annotation

I am building REST web app using Netbean6.9.1 and JPA EclipseLink. The issue I'm facing is even though my entity class MasatoTable is marked with Entity annotation, I get error: (java.lang.IllegalArgumentException: Unknown entity bean class: …
Meow
  • 18,371
  • 52
  • 136
  • 180
9
votes
7 answers

JPA with TopLink: No META-INF/persistence.xml was found in classpath

public class LoginTest { public static void main(String[] args) { EntityManagerFactory emf = Persistence.createEntityManagerFactory("IRCBotPU"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); Login lg =…
Switch
  • 14,783
  • 21
  • 69
  • 110
8
votes
1 answer

TopLink 11g versus EclipseLink

We're considering migrating to TopLink 11g JPA from Oracle Kodo JDO. But I see that EclipseLink exists and appears to be, perhaps, better thank Toplink. The wiki article on it currently states EclipseLink is based on the TopLink product, which…
BestPractices
  • 12,738
  • 29
  • 96
  • 140
7
votes
6 answers

When to use Hibernate/JPA/Toplink?

Right now I'm making an extremely simple website- about 5 pages. Question is if it's overkill and worth the time to integrate some sort of database mapping solution or if it would be better to just use plain old JNDI. I'll have maybe a dozen things…
GBa
  • 17,509
  • 15
  • 49
  • 67
7
votes
4 answers

Unable to have correct value with SELECT query using MAX() in JPA

I am new in JPA and I have a problem when I try to query to the database using MAX() function. Code of my function is following. Can anyone help me? Thank you. public int getMaxId(){ entityManager =…
Spacemonkey
  • 1,725
  • 3
  • 20
  • 44
7
votes
1 answer

Unknown abstract schema type

Based on the answer from axtavt, this is almost certainly a naming problem between Notebean and NoteBean. Is there a particular convention to follow here, just normal CamelCase? I believe that I've updated the @NamedQuery annotation in the entity…
Thufir
  • 8,216
  • 28
  • 125
  • 273
6
votes
3 answers

JPA inserts slow with an object graph

I'm trying to do a cascading save on a large object graph using JPA. For example (my object graph is a little bigger but close enough): @Entity @Table(name="a") public class A { private long id; @OneToMany(cascade = CascadeType.ALL, mappedBy =…
user364939
  • 233
  • 1
  • 10
1
2 3
14 15