Whenever I try to set a list as a parameter for use in an IN expression I get an Illegal argument exception. Various posts on the internet seem to indicate that this is possible, but it's certainly not working for me. I'm using Glassfish V2.1 with Toplink.
Has anyone else been able to get this to work, if so how?
here's some example ...
I have a query:
select p from Product p
Which gives me the results I expect, but one of the columns (let's call it massiveDescription) is big, and since I'm querying the full list of products I want to exclude it.
I added @Basic(fetch=FetchType.LAZY) to getMassiveDescription() but this made no difference (the generated sql still incl...
Hello all,
I have a situation where I have a tree of Entities, and a Session Bean. The Session Bean simply persists or merges the entities, and the method in question is marked as @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW).
Now in the case that a child entity fails to be persisted/merged due to (for example) a foreig...
I have a struts 2 application and a toplink persistence provider running on tomcat 6.0.20 and a MySql 5.1.38 server on a GNU/Linux machine. After committing the data the when i go to retrieve it the data it has disappeared from the database.
I do a em.commit() and em.flush() after my queries have executed. How do they disappear? I am u...
I have an object "Instance" with another object "Course" inside. When trying to persist a new Instance object, I get the following error if Course is null:
java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: null
Here is my annotation for course:
...
I have project use EJB 3.0 and implement Toplink framework for model layer.
When using EJBQL to process data, I see it seems have some limitation:
It cannot process datatime such as find a part of date such as day, month or year
It cannot find datetime among from...to
It cannot comparison datetime field
It cannot map a class not entit...
Hi,
we are using Toplink implementation of JPA + Spring + EJB. In one of our EJBs we have something like this:
public void updateUser(long userId, String newName){
User u = em.get(User.class, userId);
u.setName(newName);
// no persist is invoked here
}
So, basically this updateUser method is supposed to update the name of...
I have application written in Java that is using EJB3 + Toplink. I'm using Glassfish as my app. server.
Sometimes the data that has been cached is old and I need to clear my cache manually. I know that we can set time to clear it, but I would like to make a button that will manually clear it for me. Is is possible to do?
...
Hi All,
I'm building a J2SE application with EJB3 and an Oracle Express Edition DB.
My problem is like that - I set an EntityBean in my project which matches a table in the DB. The table contains a column which is not nullable and has a default value. All I want is that when persisting a new data to this table using the EJB, the column...
Hey,
I've got an excpetion when I generate this EJB SQL Statement.
Exception Description: Syntax error parsing the query [SELECT h FROM Busmodul h WHERE LOWER(h.modulNummer) LIKE :modulnummer AND h.einbauort.id = :einbauort_fk AND h.plattform.id = :plattform_fk ORDER BY TRIM(TRAILING '-' FROM CONCAT('0', h.modulNummer))], line 1, c...
Hi,
For glassfish v2, I have searched through the web and I cannot find anyway to specify query timeout when using TopLink essential query hint. We have another option to migrate to EclipseLink but that is not feasible.
have tried the solution in
http://forums.oracle.com/forums/thread.jspa?threadID=974732&tstart=-1
but it seems the ...
Hello colleagues!
It is continues of question ( http://stackoverflow.com/questions/2570976/struts-2-bean-is-not-created )
I'm using struts2 + toplink in my very simple web application under Tomcat.
On the page I would like use iteration tag. That is why I've declared some factory (SomeFactory) that resolves collection of entities (Enti...
Hello,
I have a JPA project which used to work. This month, I have added some data in my database. When I run the usual job (I used to run on preceeding months), I get this error:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal E...
Hello,
Could you please explain to me how to add a standalone c3pO or DBCP connection pool to my toplink-based JPA project?
I have a persistence.xml file, and everytime I want to query the database, I'm doing this:
EntityManagerFactory emf = this.getEntityManagerFactory();
// Surely using persistence.xml to set up the factory
Enti...
Hi,
I'm working for a Swing Project and the technologies used are netbeans with Toplink essentials, mysql.
The Problem I'm facing is the entity object dosn't get updated after insertions take place while calling a getter collection of the foreign key property.
Ex: I have 2 tables Table1,Table2. I have sno column, id column as a prim...
Hello,
I add entity to my database and it works fine. But when i retrieve the List, i get the old entity, the new entities i add are not shown until i undeploy the application and redeploy it again. This means are my entities cached by default? But, I haven't made any settings for caching entities in my persistence.xml or any such file.
...
EDIT: Solved, but I don't know what was different now. If anyone can explain what happened differently, I'd appreciate it.
The way it's working now is by merging only the Parent, not the Child at all, like so:
Parent parent = child.getParent();
parent.getChildren().add(child);
getJpaTemplate().merge(parent);
Now, it seems to be worki...
This may be related to my question from a few days ago, but I'm not even sure how to explain this part. (It's an entirely different parent-child relationship.)
In my interface, I have a set of attributes (Attribute) and valid values (ValidValue) for each one in a one-to-many relationship. In the Spring MVC frontend, I have a page for an...
I have just started studying Spring framework. My current goal is to access database from my bean through JPA (TopLink** provider) on Geronimo server. But I can't overcome the problem of getting entityManagerFactory.
The exception I get:
java.lang.IllegalStateException:
ClassLoader
[org.apache.geronimo.kernel.config.MultiParent...
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 = "a")
private Collection<B> bs;
}
@Entity
@Table(name="b")
public class B {
private lo...