datanucleus

No persistence providers available for “transactions-optional”

三世轮回 提交于 2019-12-11 18:42:35
问题 I'm having this error in my AppEngine project: javax.persistence.PersistenceException: No persistence providers available for "transactions-optional" after trying the following discovered implementations: org.datanucleus.api.jpa.PersistenceProviderImpl at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:180) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70) jdoconfig.xml <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" xmlns

StackOverFlowError while doing a One-To-One relationship in GAE Datastore using JPA 2.0

房东的猫 提交于 2019-12-11 18:14:21
问题 I have two tables Folder & VirtualSystemEntry I tried to follow this Dataneclous Turorial but it always results with StackOverFlowException here what I tried so far Folder.java @Entity public class Folder implements IsSerializable{ @Id @Column(name = "fvseID") @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true") private String fvseID; @OneToOne @JoinColumn(name="vseID") private VirtualSystemEntry vse=new

JPA and GWT failing

拟墨画扇 提交于 2019-12-11 17:44:11
问题 I'm trying to use JPA with GWT. My serviceImpl calls UserDAO.exists(user); When I run a test case, which calls the same method, with the same parameters, it runs ok. When I do the RPC call, if fails horribly (error at the end). When I rename persistence.xml to someothername.xml, I get the SAME error, so I'm inclined to think that GWT (in development mode BTW), is NOT reading my persistence.xml. The error: Starting Jetty on port 8888 [WARN] Exception while dispatching incoming RPC call com

datanucleus + jpa + oracle. Strange error with tables not existing

喜你入骨 提交于 2019-12-11 08:58:21
问题 I have a strange issue when I try to use Datanucleus to access an Oracle database. In short, what happens is this : I run my application; when datanucleus initializes, it complains that it cannot find the tables (although they are in there). I stop the application, I drop the tables, I add the datanucleus.autoCreateSchema = true ...property in persistence.xml, and everything works - tables are created and then the select works. I stop the application again, and then I try to start it with the

GAE/JPA/DataNucleus: Strange exception while trying to persist entity (IllegalArgumentException: out of field index :-1)

偶尔善良 提交于 2019-12-11 07:36:13
问题 I'm getting an exception after I added this embedded field in my entity: @Entity public class Team extends DataObject { @Embedded private TeamEvolution teamEvolution = new TeamEvolution(); // NEW FIELD: @Embedded // @AttributeOverrides({ @AttributeOverride(name = "buffer", column = @Column) }) // @Enumerated private ScoutBuffer scoutBuffer; ... This guy is very simple: @Embeddable public class ScoutBuffer { private static final int BUFFER_SIZE = 150; @Basic private List<String> buffer; ... //

Google App Engine - can't operate on multiple entity groups in a single transaction

a 夏天 提交于 2019-12-11 07:05:09
问题 Why am I receiving the exception below if the type of both entities is PersistentLogin? I thought that would mean they are in the same entity group, but I guess that is an incorrect assumption. Any ideas how to fix this? This is the code: // the class is marked with @Transactional @Override public final void removeUserTokens(final String username) { final Query query = entityManager.createQuery( "SELECT p FROM PersistentLogin p WHERE username = :username"); query.setParameter("username",

Can DataNucleus persist an abstract base class parameterized with Generics?

安稳与你 提交于 2019-12-11 06:52:42
问题 Using DataNucleus, I have been happy using an abstract base class to provide a 'long' ID to the sub-classes (please note the primitive type). When adapting an example from JPA I got the idea to parameterize the base class. The purpose was to support different ID types, such as String. @PersistenceCapable @Inheritance(strategy=InheritanceStrategy.SUBCLASS_TABLE) @Version(strategy=VersionStrategy.VERSION_NUMBER, column="jdo_version") public abstract class VersionedIdEntity<P> implements

Datanucleus: moving from @Transactional to non-transactional

落爺英雄遲暮 提交于 2019-12-11 04:07:13
问题 I am using Datanucleus, JDO and Spring's declarative @Transactional management woven with Aspect-J. But when a 'normal' method gets a persistent object from a @Transactional method, the object's state will become transient (the persistence manager seems to be removed) and the object is no longer persistent. Example: public class Example { public void test() throws Exception { Login l = getLogin(); JDOHelper.getObjectState(l); // transient instead of persistent l.getSomeOtherPersistentObj()

DataNucleus, Maven, schema-create fails

时光怂恿深爱的人放手 提交于 2019-12-11 03:07:31
问题 I am trying to create a maven project with DataNucleus and MySQL. However, when i try to build and mvn datanucleus:schema-create the project, I get a failure. I can't figure out why. Here is the persistence.xml class, and it is present in the classes/META-INF folder of the built project: <?xml version="1.0" encoding="UTF-8" ?> <persistence 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

'DataNucleus Enhancer' Error 206

喜欢而已 提交于 2019-12-10 18:13:12
问题 I have a problem. I always get an Error 206 from Java DataNucleus Enhancer, since 2 days ago... days before, it worked without errors. Cannot run program "D:\Program Files\Java\jre6\bin\javaw.exe" (in directory "C:\Users\schmisa2\workspace\AMS0"): CreateProcess error=206, The filename or extension is too long Cannot run program "D:\Program Files\Java\jre6\bin\javaw.exe" (in directory "C:\Users\schmisa2\workspace\AMS0"): CreateProcess error=206, The filename or extension is too long I searched