Search Results

Search found 65 results on 3 pages for 'datanucleus'.

Page 1/3 | 1 2 3  | Next Page >

  • Datanucleus 2.x AND Eclipse RCP 3.4

    - by marcolopes
    Hi, ANYONE using Datanucleus (http://www.datanucleus.org/) with ECLIPSE RCP? Eclipse DOES NOT recognize Datanucleus has a PLUGIN, with versions of DN newer than 1.1.0m3 :-( The JARS i currently use, and the LAST ONES being recognized has plugins by eclipse (copied directly to \eclipse\plugins folder) are from datanucleus-accessplatform-rdbms-1.1.0.m3 Specific bundles: datanucleus-rdbms-1.1.0.m3.jar datanucleus-connectionpool-1.0.0.jar datanucleus-core-1.1.0.m3.jar datanucleus-enhancer-1.1.0.m1.jar IS there ANYONE out there using DATANUCLEUS with ECLIPSE? Thanks a lot. marco

    Read the article

  • NullPointerException using datanucleus-json with S3

    - by Matt
    I'm using datanucleus 3.2.7 from Maven, trying to use the Amazon S3 JPA provider. I can successfully write data into S3, but querying either by using "SELECT u FROM User u" or "SELECT u FROM User u WHERE id = :id" causes a NullPointerException to be thrown. Using the RDBMS provider, everything works perfectly. Is there something I'm doing wrong? Main.java EntityManagerFactory factory = Persistence.createEntityManagerFactory("MyUnit"); EntityManager entityManager = factory.createEntityManager(); Query query = entityManager.createQuery("SELECT u FROM User u", User.class); List<User> users = query.getResultList(); // Null pointer exception here for(User u:users) System.out.println(u); User.java package test; import javax.persistence.*; @Entity @Table(name = "User") public class User { @Id public String id; public String name; public User(String id, String name) { this.id = id; this.name = name; } public String toString() { return id+" : "+name; } } persistence.xml <?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/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="MyUnit"> <class>test.User</class> <exclude-unlisted-classes /> <properties> <properties> <property name="datanucleus.ConnectionURL" value="amazons3:http://s3.amazonaws.com/" /> <property name="datanucleus.ConnectionUserName" value="xxxxx" /> <property name="datanucleus.ConnectionPassword" value="xxxxx" /> <property name="datanucleus.cloud.storage.bucket" value="my-bucket" /> </properties> <property name="datanucleus.autoCreateSchema" value="true" /> </properties> </persistence-unit> </persistence> Exception java.lang.NullPointerException at org.datanucleus.NucleusContext.isClassWithIdentityCacheable(NucleusContext.java:1840) at org.datanucleus.ExecutionContextImpl.getObjectFromLevel2Cache(ExecutionContextImpl.java:5287) at org.datanucleus.ExecutionContextImpl.getObjectFromCache(ExecutionContextImpl.java:5191) at org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3137) at org.datanucleus.store.json.CloudStoragePersistenceHandler.getObjectsOfCandidateType(CloudStoragePersistenceHandler.java:367) at org.datanucleus.store.json.query.JPQLQuery.performExecute(JPQLQuery.java:94) at org.datanucleus.store.query.Query.executeQuery(Query.java:1786) at org.datanucleus.store.query.Query.executeWithMap(Query.java:1690) at org.datanucleus.api.jpa.JPAQuery.getResultList(JPAQuery.java:194) at test.Main.main(Main.java:16)

    Read the article

  • Maven problems using GAE and DataNucleus

    - by Wraith
    I'm having trouble retrieving 2 artifacts in my Maven/Java/Google App Engine project: com.google.appengine.orm:datanucleus-appengine:jar:1.0.7.final com.google.appengine:appengine-api-1.0-sdk:jar:1.3.4 There's a similar question posted, but each answer brings me back to the same error message. More detail I don't know if it is relevant, but rather than a version number, my original dependency for DataNucleus contained a variable. I am using Eclipse. <groupId>org.datanucleus</groupId> <artifactId>datanucleus-core</artifactId> <version>${datanucleus.version}</version> <scope>runtime</scope> I did not include my stack trace in Maven for brevity's sake. Please let me know if it would help to post it. Thank you.

    Read the article

  • DataNucleus Enhancer flakey?

    - by KevMo
    I'm creating a GWT app in Google App Engine, and using Google data store. Does anybody else have the problem of the DataNucleus being flakey as all get out? I can save a class, and DataNucleus will do it's thing just fine. If I change ANYTHING in the class (even adding whitespace) and then save, I get the following error: DataNucleus Enhancer completed with success for 0 classes. Timings : input=37 ms, enhance=0 ms, total=37 ms. Consult the log for full details DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details Once I clean my project, DataNucleus is happy again. Is this common when using eclipse? Is there a workaround?

    Read the article

  • Datanucleus/JDO Level 2 Cache on Google App Engine

    - by Thilo
    Is it possible (and does it make sense) to use the JDO Level 2 Cache for the Google App Engine Datastore? First of all, why is there no documentation about this on Google's pages? Are there some problems with it? Do we need to set up limits to protect our memcache quota? According to DataNucleus on Stackoverflow, you can set the following persistence properties: datanucleus.cache.level2.type=javax.cache datanucleus.cache.level2.cacheName={cache name} Is that all? Can we choose any cache name? Other sources on the Internet report using different settings. Also, it seems we need to download the DataNucleus Cache support plugin. Which version would be appropriate? And do we just place it in WEB-INF/lib or does it need more setup to activate it?

    Read the article

  • @Unique doesn't have any effect in DataNucleus w/ NeoDatis

    - by David Parks
    Using JDO / DataNucleus / NeoDatis datastore I added @Unique to a field of a persistable object, however I am allowed to create multiple objects which violate the unique constraint. The docs for DataNucleus/NeoDatis suggest that Unique fields are supported. @PersistenceCapable public class User { @Persistent @Unique private String username; //... } If I add multiple objects to the DB with the same username there's no problem doing so. :(

    Read the article

  • Eager fetching of children with JDO (Datanucleus)

    - by Jan
    Hi, can JDO fetch all children of a database model at once? Like: class Parent { @Persistent(mappedBy="parent") private Set<Children> children; } class Children { @Persistent private Parent parent; @Persistent private String name; } In my case, I have a large number of Parents which I fetch at once. Accessing their children then takes a lot of time because they are fetched lazily. Does JDO (Datanucleus) support their fetching at once, togehter with the Parents? I also tried to fetch all Children independantly with another quey and put them into the Level2 cache afterwards, but still they are fetched (maybe jdo doesn't know about their relationship? Because the ForeignKey (parent-id) hasn't been fetched at first?) Any ideas how to read the data structure faster? Cheers, Jan

    Read the article

  • persistence.xml ignores Hibernate and chooses DataNucleus

    - by iNPUTmice
    Hi, I'm toying around with GWT (dunno if this matters) and Hibernate. I've created a a file persistence.xml in META-INF with (amoung) other configuration the line: org.hibernate.ejb.HibernatePersistence But when I startup the EntityManager it chooses DataNucleus instead of Hibernate (which later fails because it isnt installed (jar are not in the class path)) Java Code is: EntityManagerFactory factory = Persistence.createEntityManagerFactory("gwt"); EntityManager em =factory.createEntityManager(); EntityTransaction transacation = em.getTransaction(); transacation.begin(); Campaign campaign = new Campaign(); campaign.setName("Test"); em.persist(campaign); transacation.commit(); config file contains: <?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/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="gwt" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/DefaultDS</jta-data-source> <properties> ...

    Read the article

  • datanucleus enhancer & javaw: "the parameter is incorrect"

    - by Riley
    I'm on windows XP using eclipse and the datanucleus enhancer for a gwt + gae app. When I run the enhancer, I get an error: Error Thu Oct 21 16:33:57 CDT 2010 Cannot run program "C:\Program Files\Java\jdk1.6.0_18\bin\javaw.exe" (in directory "C:\ag\dev"): CreateProcess error=87, The parameter is incorrect java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_18\bin\javaw.exe" (in directory "C:\ag\dev"): CreateProcess error=87, The parameter is incorrect at java.lang.ProcessBuilder.start(Unknown Source) at com.google.gdt.eclipse.core.ProcessUtilities.launchProcessAndActivateOnError(ProcessUtilities.java:213) at com.google.appengine.eclipse.core.orm.enhancement.EnhancerJob.runInWorkspace(EnhancerJob.java:154) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 5 more I've had this problem before, and it was due to a long classpath. I just spent an hour and a half shortening my classpath by moving libraries around and even moving my eclipse install, but with no luck. Any ideas about where I should start to look for an answer? The error message doesn't include any information about what directory it's in or anything. It's kind of infuriating! Is it possible to make the output of javaw more verbose? Is it possible to get around this class-path size bug?

    Read the article

  • Publish failed using Ant publisher (Eclipse/datanucleus).

    - by aronp
    Dear All, I am being driven mad the following (apparently hard) error from eclipse. Publish failed using Ant publisher Resource is out of sync with the file system: '/MyServlet/build/classes/com/inver/hotzones/database/BaseNetworkData.class'. I have seen comments on similar errors where refreshing eclipses view of the project helps but it is not helping me. Have tried cleaning the project, removing it from the webserver, deleting war files but cant seem to clear it. I have reset my TMPDIR variable so that it uses a directory on the same filesystem as that appeared to be another possible cause. The error occurs on classes which have been enhanced by datanuculeus. I have auto-enhance on the project. The other references to this problem indicate that it is due to Eclipses view of the project being out of step with the filesystem, and I am guessing that this has something to do with thedata nucleus enhancement. Any ideas? Thanks. I am using Eclipse 3.5.2 with latest datanucleus pluggins. Stack trace org.eclipse.core.runtime.CoreException: Resource is out of sync with the file system: '/MyServlet/build/classes/com/inver/hotzones/database/BaseNetworkData.class'. at org.eclipse.jst.server.generic.core.internal.publishers.AbstractModuleAssembler.copyModule(AbstractModuleAssembler.java:172) at org.eclipse.jst.server.generic.core.internal.publishers.WarModuleAssembler.assemble(WarModuleAssembler.java:31) at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.assembleModule(AntPublisher.java:167) at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:128) at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:82) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:949) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1039) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:872) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    Read the article

  • Problems Mapping a List of Serializable Objets with JDO

    - by Sergio del Amo
    I have two classes Invoice and InvoiceItem. I would like Invoice to have a List of InvoiceItem Objets. I have red that the list must be of primitive or serializable objects. I have made InvoiceItem Serializable. Invoice.java looks like import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.jdo.annotations.Column; import javax.jdo.annotations.Embedded; import javax.jdo.annotations.EmbeddedOnly; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.Element; import javax.jdo.annotations.PrimaryKey; import com.google.appengine.api.datastore.Key; import com.softamo.pelicamo.shared.InvoiceCompanyDTO; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Invoice { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String number; @Persistent private Date date; @Persistent private List<InvoiceItem> items = new ArrayList<InvoiceItem>(); public Invoice() {} public Long getId() { return id; } public void setId(Long id) {this.id = id;} public String getNumber() { return number;} public void setNumber(String invoiceNumber) { this.number = invoiceNumber;} public Date getDate() { return date;} public void setDate(Date invoiceDate) { this.date = invoiceDate;} public List<InvoiceItem> getItems() { return items;} public void setItems(List<InvoiceItem> items) { this.items = items;} } and InvoiceItem.java looks like import java.io.Serializable; import java.math.BigDecimal; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; @PersistenceCapable public class InvoiceItem implements Serializable { @Persistent private BigDecimal amount; @Persistent private float quantity; public InvoiceItem() {} public BigDecimal getAmount() { return amount;} public void setAmount(BigDecimal amount) { this.amount = amount;} public float getQuantity() { return quantity;} public void setQuantity(float quantity) { this.quantity = quantity;} } I get the next error while running a JUnit test. javax.jdo.JDOUserException: Attempt to handle persistence for object using datastore-identity yet StoreManager for this datastore doesn't support that identity type at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:674) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) at com.softamo.pelicamo.server.InvoiceStore.add(InvoiceStore.java:23) at com.softamo.pelicamo.server.PopulateStorage.storeInvoices(PopulateStorage.java:58) at com.softamo.pelicamo.server.PopulateStorage.run(PopulateStorage.java:46) at com.softamo.pelicamo.server.InvoiceStoreTest.setUp(InvoiceStoreTest.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) NestedThrowablesStackTrace: Attempt to handle persistence for object using datastore-identity yet StoreManager for this datastore doesn't support that identity type org.datanucleus.exceptions.NucleusUserException: Attempt to handle persistence for object using datastore-identity yet StoreManager for this datastore doesn't support that identity type at org.datanucleus.state.AbstractStateManager.<init>(AbstractStateManager.java:128) at org.datanucleus.state.JDOStateManagerImpl.<init>(JDOStateManagerImpl.java:215) at org.datanucleus.jdo.JDOAdapter.newStateManager(JDOAdapter.java:119) at org.datanucleus.state.StateManagerFactory.newStateManagerForPersistentNew(StateManagerFactory.java:150) at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1297) at org.datanucleus.sco.SCOUtils.validateObjectForWriting(SCOUtils.java:1476) at org.datanucleus.store.mapped.scostore.ElementContainerStore.validateElementForWriting(ElementContainerStore.java:380) at org.datanucleus.store.mapped.scostore.FKListStore.validateElementForWriting(FKListStore.java:609) at org.datanucleus.store.mapped.scostore.FKListStore.internalAdd(FKListStore.java:344) at org.datanucleus.store.appengine.DatastoreFKListStore.internalAdd(DatastoreFKListStore.java:146) at org.datanucleus.store.mapped.scostore.AbstractListStore.addAll(AbstractListStore.java:128) at org.datanucleus.store.mapped.mapping.CollectionMapping.postInsert(CollectionMapping.java:157) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.runPostInsertMappingCallbacks(DatastoreRelationFieldManager.java:216) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.access$200(DatastoreRelationFieldManager.java:47) at org.datanucleus.store.appengine.DatastoreRelationFieldManager$1.apply(DatastoreRelationFieldManager.java:115) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:80) at org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:955) at org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(DatastorePersistenceHandler.java:527) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProcess(DatastorePersistenceHandler.java:299) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:251) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:235) at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:3185) at org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java:3161) at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1298) at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) at com.softamo.pelicamo.server.InvoiceStore.add(InvoiceStore.java:23) at com.softamo.pelicamo.server.PopulateStorage.storeInvoices(PopulateStorage.java:58) at com.softamo.pelicamo.server.PopulateStorage.run(PopulateStorage.java:46) at com.softamo.pelicamo.server.InvoiceStoreTest.setUp(InvoiceStoreTest.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Moreover, when I try to store an invoice with a list of items through my app. In the development console I can see that items are not persisted to any field while the rest of the invoice class properties are stored properly. Does anyone know what I am doing wrong? Solution As pointed in the answers, the error says that the InvoiceItem class was missing a primaryKey. I tried with: @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; But I was getting javax.jdo.JDOFatalUserException: Error in meta-data for InvoiceItem.id: Cannot have a java.lang.Long primary key and be a child object (owning field is Invoice.items). In persist list of objets, @aldrin pointed that For child classes the primary key has to be a com.google.appengine.api.datastore.Key value (or encoded as a string) see So, I tried with Key. It worked. @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id;

    Read the article

  • Maven building for GoogleAppEngine, forced to include JDO libraries?

    - by James.Elsey
    Hi, I'm trying to build my application for GoogleAppEngine using maven. I've added the following to my pom which should "enhance" my classes after building, as suggested on the DataNucleus documentation <plugin> <groupId>org.datanucleus</groupId> <artifactId>maven-datanucleus-plugin</artifactId> <version>1.1.4</version> <configuration> <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration> <verbose>true</verbose> </configuration> <executions> <execution> <phase>process-classes</phase> <goals> <goal>enhance</goal> </goals> </execution> </executions> </plugin> According to the documentation on GoogleAppEngine, you have the choice to use JDO or JPA, I've chosen to use JPA since I have used it in the past. When I try to build my project (before I upload to GAE) using mvn clean package I get the following output [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) javax.jdo:jdo2-api:jar:2.3-ec Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=javax.jdo -DartifactId=jdo2-api -Dversion=2.3-ec -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=javax.jdo -DartifactId=jdo2-api -Dversion=2.3-ec -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4 2) javax.jdo:jdo2-api:jar:2.3-ec ---------- 1 required artifact is missing. for artifact: org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4 from the specified remote repositories: __jpp_repo__ (file:///usr/share/maven2/repository), DN_M2_Repo (http://www.datanucleus.org/downloads/maven2/), central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Sat Apr 03 16:02:39 BST 2010 [INFO] Final Memory: 31M/258M [INFO] ------------------------------------------------------------------------ Any ideas why I should get such an error? I've searched through my entire source code and I'm not referencing JDO anywhere, so unless the app engine libraries require it, I'm not sure why I get this message.

    Read the article

  • Making Spring Data JPA work with DataNucleus (GAE) (Spring Boot)

    - by xybrek
    There are several hints that Spring Data works with Google App Engine like: http://tommysiu.blogspot.com/2014/01/spring-data-on-gae-part-1.html http://blog.eisele.net/2009/07/spring-300m3-on-google-appengine-with.html Much of the examples are not "Spring Boot" so I've been trying to retrofit things with it. However, I've been stuck with this error for days and days: [INFO] Caused by: java.lang.NullPointerException [INFO] at org.datanucleus.api.jpa.metamodel.SingularAttributeImpl.isVersion(SingularAttributeImpl.java:79) [INFO] at org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.findVersionAttribute(JpaMetamodelEntityInformation.java:102) [INFO] at org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.<init>(JpaMetamodelEntityInformation.java:79) [INFO] at org.springframework.data.jpa.repository.support.JpaEntityInformationSupport.getMetadata(JpaEntityInformationSupport.java:65) [INFO] at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getEntityInformation(JpaRepositoryFactory.java:149) [INFO] at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:88) [INFO] at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:68) [INFO] at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:158) [INFO] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:224) [INFO] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:210) [INFO] at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:92) [INFO] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$6.run(AbstractAutowireCapableBeanFactory.java:1602) [INFO] at java.security.AccessController.doPrivileged(Native Method) [INFO] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1599) [INFO] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549) [INFO] ... 40 more Where, I'm trying to use Spring Data JPA with DataNucleus/AppEngine: @Configuration @ComponentScan @EnableJpaRepositories @EnableTransactionManagement class JpaApplicationConfig { private static final Logger logger = Logger .getLogger(JpaApplicationConfig.class.getName()); @Bean public EntityManagerFactory entityManagerFactory() { logger.info("Loading Entity Manager..."); return Persistence .createEntityManagerFactory("transactions-optional"); } @Bean public PlatformTransactionManager transactionManager() { logger.info("Loading Transaction Manager..."); final JpaTransactionManager txManager = new JpaTransactionManager(); txManager.setEntityManagerFactory(entityManagerFactory()); return txManager; } } I've tested Persistence.createEntityManagerFactory("transactions-optional"); to see if the app can persist using this EMF, well, it does, so I am sure that this EMF works fine. The problem is the "wiring" up with the Spring Data JPA, can anybody help?

    Read the article

  • ClassNotFoundException: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider

    - by Kiva
    I try to start an Google appengine application in my eclipse. I have the Google plugin and I set the sdk for my application. But, when I start this one, I get the following error: java.lang.ClassNotFoundException: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider However, this class is present in the sdk which is present in my classpath. Why Appengine doesn't find this class ? Thanks.

    Read the article

  • Appengine datastore phantom entity - inconsistent state?

    - by aloo
    Getting a weird error on java appengine code that used to work fine (nothing has changed but the data in the datastore). I'm trying to iterate over the results of a query and change a few properties of the entities. The query does return a set of results, however, when I try to access the first result in the list, it throws an exception when trying to access any of its properties (but its key). Here's the exception: org.datanucleus.state.JDOStateManagerImpl isLoaded: Exception thrown by StateManager.isLoaded Could not retrieve entity of kind OnTheCan with key OnTheCan(3204258) org.datanucleus.exceptions.NucleusObjectNotFoundException: Could not retrieve entity of kind OnTheCan with key OnTheCan(3204258) at org.datanucleus.store.appengine.DatastoreExceptionTranslator.wrapEntityNotFoundException(DatastoreExceptionTranslator.java:60) And here is my code: PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = null; List<OnTheCan> cans; query = pm.newQuery("SELECT this FROM " + OnTheCan.class.getName() + " WHERE open == true ORDER BY onTheCanId ASC"); query.setRange(0, num); cans = (List<OnTheCan>) query.execute(); for (OnTheCan c : cans) { System.err.println(c.getOnTheCanId()); // this works fine! getting the key works c.setOpen(false); // failure here with the above exception c.setAutoClosed(true); c.setEndTime(new Date(c.getStartTime().getTime() + 600000/*10*60*1000*/)); } pm.close(); The code throws the exception when trying to execute c.setOpen(false) - thats the first time I'm accessing or setting a property that isnt the key. So it seems there is a phantom entity in my datastore with key 3204258. THis entity doesn't really exist (queried the datastore from admin console) but for some reason its being returned by the query. Could my data store be in an inconsistent state? I've managed the following workaround by placing it as the first line in my for loop. Clearly an ugly hack: if (c.getOnTheCanId() == 3204258) { continue; } Any ideas?

    Read the article

  • How to iterate JPA collections in Google App engine

    - by palto
    Hi I use Google App Engine with datanucleus and JPA. I'm having a real hard time grasping how I'm supposed to read stuff from data store and pass it to JSP. If I load a list of POJOs with entitymanager and pass it to JSP, it crashes to org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed. I understand why this is happening. Obviously because I fetch the list, close the entity manager and pass it to JSP, at which point it will fail because the list is lazy. How do I make the list NOT lazy without resorting to hacks like calling size() or something like that? Here is what I'm trying to do: @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setAttribute("parties", getParties()); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/WEB-INF/parties.jsp"); dispatcher.forward(req, resp); } private List<Party> getParties(){ EntityManager em = entityManagerProvider.get(); try{ Query query = em.createQuery("SELECT p FROM Party p"); return query.getResultList(); }finally{ em.close(); } }

    Read the article

  • Store java.util.Calendar field into one column

    - by Rasika
    How to store java.util.Calendar field into one column with Datanucleus JDO. By default it is stored into two columns (millisecs, Timezone) with following JDO metadata. field name="startDate" serialized="true" embedded="true" persistence-modifier="persistent" What need to be changed in metadata to store it into single column (Timestamp)? Is it posible query (JDOQL) on calendar field when it is in two clumn?

    Read the article

  • JPA/JDO entity to XML XSD generator.

    - by h2g2java
    I am using JDO or JPA on GAE plugin in Eclipse. I am using smartgwt datasource, accepting an xsd. I would like to be educated how to generate an XSD from my jdo/jpa entity, vice versa. Is there a tool to do it? While datanucleas does all its magic enhancing in the Eclipse background, would I be able to somehow operate in a mode that would generate XSDs for me? Can Hibernate operate in an offline mode, to solely help me generate XSDs which I could use in GWT without deploying hibernate with my web-app? Can Hibernate even be capable of generating XSDs from entities, vice versa? Currently, I am about to write a utility to generate an xsd, given an entity class - but I am hoping I don't have to reinvent the wheel if it already exists. I am hoping people here could educate me on any available tools to ease my XSD generation. But btw, I am very wary of anything that uses Maven, because most people (like Spring) who write the Maven scripts and pom don't have the expertise to write it in a way that would spew out messages and verbosity appropriately to make it easy for me to locate model errors.

    Read the article

  • Empty list in appengine datastore: java vs python

    - by lOranger
    I have the following java model class in AppEngine: public class Xyz ... { @Persistent private Set<Long> uvw; } When saving an object Xyz with an empty set uvw in Java, I get a "null" field (as listed in the appengine datastore viewer). When I try to load the same object in python (through remote_api), as defined by the following python model class: class Xys(db.Model): uvw = db.ListProperty(int) I get a "BadValueError: Property uvw is required". When saving another object of the same class in python with an empty uvw list, the datastore viewer print a "missing" field. Apparently empty lists storage handling differs between Java and python and lead to "incompatible" objects. Thus my question: Is there a way to, either: force Java to store an empty list as a "missing" field, force Python to gracefully accept a "null" list as an empty list when loading the object? Or any other suggestion on how to handle empty list field in both languages. Thanks for your answers!

    Read the article

  • Declarative JDOQL vs Single-String JDOQL : performance

    - by DrDro
    When querying with JDOQL is there a performance difference between using the declarative version and the Single-String version: Example from the JDOQL doc: //Declarative JDOQL : Query q = pm.newQuery(org.jpox.Person.class, "lastName == \"Jones\" && age < age_limit"); q.declareParameters("double age_limit"); List results = (List)q.execute(20.0); //Single-String JDOQL : Query q = pm.newQuery("SELECT FROM org.jpox.Person WHERE lastName == \"Jones\"" + " && age < :age_limit PARAMETERS double age_limit"); List results = (List)q.execute(20.0); Other then performance, are there any reasons for which one is better to use then the other or is it just about the one with which we feel more comfortable.

    Read the article

  • Delete an entity by key without fetching it first in app engine (using JDO)

    - by Peter Recore
    Is there a way to delete an entity without having to fetch it from the datastore first? I am assuming I already have the key or id for the entity. I'm thinking of something like deleteObjectById that would be an analogue to getObjectById on PersistenceManager. The closest I can think of is using Query.deletePersistentAll() (as seen here) and specifying a query that only relies on the key, but I can't tell if that is going to fetch the entity before deleting it. thanks EDIT: I know how to do this using the low level API, as well as in the python API. I was wondering if there was a way to do it within the JDO layer.

    Read the article

  • What is "read operations inside transactions can't allow failover" ?

    - by Kenyth
    From time to time I got the following exception message on GAE for my GAE/J app. I searched with Google, no relevant results were found. Does anyone know about this? Thanks in advance for any response! The exception message is as below: Nested in org.springframework.orm.jpa.JpaSystemException: Illegal argument; nested exception is javax.persistence.PersistenceException: Illegal argument: java.lang.IllegalArgumentException: read operations inside transactions can't allow failover at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java: 34) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java: 67) at com.google.appengine.api.datastore.DatastoreServiceImpl $1.run(DatastoreServiceImpl.java:128) at com.google.appengine.api.datastore.TransactionRunner.runInTransaction(TransactionRunner.java: 30) at com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java: 111) at com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java: 84) at com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java: 77) at org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.get(RuntimeExceptionWrappingDatastoreService.java: 53) at org.datanucleus.store.appengine.DatastorePersistenceHandler.get(DatastorePersistenceHandler.java: 94) at org.datanucleus.store.appengine.DatastorePersistenceHandler.get(DatastorePersistenceHandler.java: 106) at org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject(DatastorePersistenceHandler.java: 464) at org.datanucleus.state.JDOStateManagerImpl.loadUnloadedFieldsInFetchPlan(JDOStateManagerImpl.java: 1627) at org.datanucleus.state.JDOStateManagerImpl.loadFieldsInFetchPlan(JDOStateManagerImpl.java: 1603) at org.datanucleus.ObjectManagerImpl.performDetachAllOnCommitPreparation(ObjectManagerImpl.java: 3192) at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java: 2931) at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java: 369) at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:256) at org.datanucleus.jpa.EntityTransactionImpl.commit(EntityTransactionImpl.java: 104) at org.datanucleus.store.appengine.jpa.DatastoreEntityTransactionImpl.commit(DatastoreEntityTransactionImpl.java: 55) at name.kenyth.playtweets.service.Tx.run(Tx.java:39) at name.kenyth.playtweets.web.controller.TwitterApiController.persistStatus(TwitterApiController.java: 309) at name.kenyth.playtweets.web.controller.TwitterApiController.processStatusesForWebCall(TwitterApiController.java: 271) at name.kenyth.playtweets.web.controller.TwitterApiController.getHomeTimelineUpdates_aroundBody0(TwitterApiController.java: 247) at name.kenyth.playtweets.web.controller.TwitterApiController $AjcClosure1.run(TwitterApiController.java:1) at name.kenyth.playtweets.web.refine.AuthenticationEnforcement.ajc $around$name_kenyth_playtweets_web_refine_AuthenticationEnforcement $2$439820b7proceed(AuthenticationEnforcement.aj:1) at name.kenyth.playtweets.web.refine.AuthenticationEnforcement.ajc $around$name_kenyth_playtweets_web_refine_AuthenticationEnforcement $2$439820b7(AuthenticationEnforcement.aj:168) at name.kenyth.playtweets.web.controller.TwitterApiController.getHomeTimelineUpdates(TwitterApiController.java: 129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:43) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java: 710) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java: 167) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java: 414) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java: 402) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java: 771) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java: 716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java: 647) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java: 552) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 390) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126) at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java: 195) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java: 159) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java: 141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java: 90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java: 417) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java: 71) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java: 76) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java: 88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java: 76) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 250) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5838) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5836) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication

    Read the article

1 2 3  | Next Page >