I am getting this error when I am running my eclipselink project.
[EL Warning]: 2008.12.05 11:47:08.056--java.lang.NoClassDefFoundError: org/jboss/resource/adapter/jdbc/ValidConnectionChecker was thrown on attempt of PersistenceLoadProcessor to load class com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker. The class is ignore...
Is there a viable alternative to Hibernate? Preferably something that doesn't base itself on JPA.
Our problem is that we are building a complex (as in, many objects refer to each other) stateful RIA system. It seems as Hibernate is designed to be used mainly on one-off applications - JSF and the like.
The problem is mainly that of lazy...
One thing I like about EclipseLink has this great thing called the batch query hint, which I'm yet to find a Hibernate equivalent of.
Basically doing a whole bunch of joins gets messy real quick and you end up querying way more data than you necessarily want (remember that if you join person to 6 addresses the person information is retu...
What is the difference between TopLink Essentials & EclipseLink, both originates from Oracle ?
...
I have a collection of states, that I want to cache for the life of the application, preferably after it is called for the first time. I'm using EclipseLink as my persistence provider. In my EJB3 entity I have the following code:
@Cache
@NamedQueries({
@NamedQuery(
name = "State.findAll",
query = "SELECT s FROM State...
I'm having real difficulty getting the eclipselink.join-fetch hint to work in glassfish.
I have a Client object that contains a collection of Task objects and the Task object has a collection of WorkPeriod objects.
My code looks like this:
Query query = entityManager.createQuery("select client from Client client left join fetch client...
Is it possible to have an entity class which inherits from another (abstract) entity class from another ejb module?
EclipseLink for example doesn't create the depending columns in database table of the subclass. It simply ignores the (abstract) superclass entity.
...
My entity has a named query which looks like this:
@NamedQuery(name = "Person.find", query = "select p from Organization p where p.name=:NAME")
In my code I want to set the query cache hint:
query.setHint("eclipselink.cache-usage", "CheckCacheThenDatabase");
If I try to get whole result list:
List<Person> result = query.getResultL...
I worked a lot with Hibernate as my JPA implementation. In most cases it works fine! But I have also seen a lot of pitfalls:
Remoting with persisted Objects is difficult, because Hibernate replaces the Java collections with its own collection implementation. So the every client must have the Hibernate .jar libraries. You have to take c...
How should I use EclipseLink's @BasicMap annotation for a map whose key value is an entity and the value is an Integer?
@Entity
class A {
// This doesn't work, as the key is an entity
@BasicMap
private Map<B, Integer> myMap = new HashMap<B, Integer>();
}
@Entity
class B {
...
}
...
I have a list of objects and each and every object in the list have a position which may not change unless explicitly changed, in other words, the objects are in a queue. What collection should I use in my entity class to store these objects and how should that collection be annotated?
I currently have this
@Entity
class Foo {
...
...
I'm using EclipseLink with the "eclipselink.ddl-generation" property set to "create-tables". The order of the columns in the created tables seems random. I want the columns in a particular order - the order in which the fields appear in the Entity class definition.
Is there a way to tell EclipseLink to create the columns in the order ...
I have 2 tables:
Movies:
movieID
Users:
userID
These tables have a many to many relationship through the Queue table, with
an additional attribute, listOrder:
Queue:
movieID,
userID,
listOrder
I'm attempting to model this using EclipseLink, but am getting an
"incompattible mapping" error. Here is a sampling of my code:
@...
I have the following many-to-many mapping:
public class Student implements
{
@Id
@GeneratedValue
private Integer xID;
@ManyToMany
@JoinTable(name = "x_y",
joinColumns = { @JoinColumn(name = "xID")},
inverseJoinColumns={@JoinColumn(name="yID")})
private Set<Cat> cats;
}
public class Cat implements
{
@Id
...
I'm working on a web project using EJB 3.0, and whenever EclipseLink tries to interact with the database, it says that the schema I'm using doesn't exist (which it does).
I get a massive, unhelpful stack trace from GlassFish 2.1, which begins with:
EclipseLink, version: Eclipse Persistence Services - 1.1.0.r3639-SNAPSHOT
file:/C:/Docu...
My database has two entities; Company and Person. A Company can have many People, but a Person must have only one Company. The table structure looks as follows.
COMPANY
----------
owner PK
comp_id PK
c_name
PERSON
----------------
owner PK, FK1
personid PK
comp_id FK1
p_fname
p_sname
It has occurred to me that I could remove PER...
I use JPA persistence for my data models with Eclipselink as the persistence provider. I have a modular (OSGi) application and one of the modules contains the standard data model and a persistence unit that automatically includes all the entities from the package. The persistence provider is in another module, which works well.
Now I wa...
I have one Servlet that does insertion into my database. This is working fine. A second Servlet displays what the first one has inserted, however whenever I run the displaying Servlet, all records in all my tables are being deleted! My JPA implementation is EclipseLink and the db is MySQL.
Is it possible that the way I retrieve a Entity...
I'm confused about class visibility in OSGi. I'm running Apache Felix and loading the following bundles:
the antlr, asm, jpa and core bundles from eclipselink
an OSGi-fied jar for javax.persistence 1.99
an OSGi-fied jar with the com.mysql.jdbc driver
a bundle of my own that contains annotated entity classes and a persistence.xml
anothe...
I have a JPA entity class with a composite primary key (uid,lid) that in the database should look like this;
UID | LID | ...
---------------
1 | 1 | ...
1 | 2 | ...
1 | 3 | ...
2 | 1 | ...
2 | 2 | ...
2 | 3 | ...
How can I make EclipseLink/JPA generate sequence numbers on the fly, or how can I find out the high...