datanucleus

JDOQL DATANUCLEUS filtering using String matches

感情迁移 提交于 2019-12-04 19:24:34
Using JDO with Datanucleus, I'm trying to filter some data from my database (using jdoql). I would like to use the regular expression for some sophisticated searchs, I found that JDO provide the String method "matches" that accepts a regular expression, and according to the DATANUCLEUS documentation, this method can receive any type of ExpReg: matches(String pattern) : Returns whether string matches the passed expression. The pattern argument follows the rules of java.lang.String.matches method. I was able to do filtering based on some regular expression (like " .* ", ".", ". * ") But not with

Defining database independent JPA object uid

ⅰ亾dé卋堺 提交于 2019-12-04 17:07:26
It turns out that the following example works when using mysql 5.x, however it doesn't when using an oracle 10g database. Is there a way to define a unique identifier field that is independent of the database technology? @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="id") private long id; I have tested this in hibernate and the following exception occurs only when using Oracle: org.hibernate.MappingException: Dialect does not support identity key generation Using a database table is a portable way to generate identifiers. The simplest way to use a table to generate

Unable to get ID of newly-created JDO persistent entity using GAE/J DataNucleus plug-in version 2.1.2

谁都会走 提交于 2019-12-04 10:30:01
My problem I am porting my application from version 1.x to 2.0 of the DataNucleus plug-in for GAE/J using the new 1.7.5 GAE/J SDK. This changes my JDO version from 2.3 to 3.0.1. My persistent entity class has a primary key of type encoded string, along with read-only access to the object’s numeric ID. Each instance is the sole member of its entity group (children and parent are linked by numeric ID only). Previously, I have been able to create and persist a new MyEntity instance and then immediately access its numeric ID to store in the parent MyEntity instance’s list of child IDs. Now I find

Connecting and Persisting to HBase

耗尽温柔 提交于 2019-12-04 08:38:46
I just tried to connect to hbase which is part of the cloudera-vm using a java client. (192.168.56.102 is the inet ip of the vm) I use virtual box with host only network setting. So I can access the webUI of the hbase master @ http://192.168.56.102:60010/master.jsp Also my java client (worked well on the vm itself) established connection to 192.168.56.102:2181 But when it calls getMaster I get connection refused see log: 11/09/14 11:19:30 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.56.102:2181 sessionTimeout=180000 watcher=hconnection 11/09/14 11:19:30 INFO

Inconsistent Fetch From Google App Engine Datastore

回眸只為那壹抹淺笑 提交于 2019-12-04 05:48:11
I have an application deployed in Google app engine. I am getting inconsistent data when i fetch an entity by id immediately after updating that entity. I'm using JDO 3.0 to access the app engine datastore. I have an entity Employee @PersistenceCapable(detachable = "true") public class Employee implements Serializable { /** * */ private static final long serialVersionUID = -8319851654750418424L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, defaultFetchGroup = "true") @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true") private String id;

NullPointerException running DataNucleus Enhancer 3.1.0-release

痞子三分冷 提交于 2019-12-02 01:26:15
问题 I am running DataNucleus enhancer from DOS as follows: java -cp C:\Users\Chania\workspace\myproject\war\WEB-INF\classes\;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-enhancer-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-core-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\deps\jdo-api-3.1-SNAPSHOT-20110926.jar;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-api-jdo-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\deps\log4j-1.2.14

NullPointerException running DataNucleus Enhancer 3.1.0-release

♀尐吖头ヾ 提交于 2019-12-01 21:23:18
I am running DataNucleus enhancer from DOS as follows: java -cp C:\Users\Chania\workspace\myproject\war\WEB-INF\classes\;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-enhancer-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-core-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\deps\jdo-api-3.1-SNAPSHOT-20110926.jar;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-api-jdo-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\deps\log4j-1.2.14.jar;C:\repo\datanucleus-full-3.1.0-release\deps\asm-4.0.jar -Dlog4j.configuration=file:C:\repo

Error HBASE-ZOOKEEPER : Too many connections

可紊 提交于 2019-12-01 18:03:58
问题 I am using Hbase-Hadoop combination for my application along with Data Nucleus as the ORM. When I am trying to access hbase via several threads at a single time. It throws exceptions as : Exception in thread "Thread-26" javax.jdo.JDODataStoreException org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to connect to ZooKeeper but the connection closes immediately. This could be a sign that the server has too many connections (30 is the default). Consider inspecting your ZK

Google App Engine - org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

ε祈祈猫儿з 提交于 2019-12-01 17:05:16
Why does the code below result in org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed? The exception appears to be thrown at query.getResultList(). public final void removeUserTokens(final String username) { final Query query = entityManager.createQuery( "SELECT p FROM PersistentLogin p WHERE username = :username"); query.setParameter("username", username); for (Object token : query.getResultList()) { entityManager.remove(token); } } Exception: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed at org.datanucleus.ObjectManagerImpl

Google App Engine - org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

心已入冬 提交于 2019-12-01 16:25:16
问题 Why does the code below result in org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed? The exception appears to be thrown at query.getResultList(). public final void removeUserTokens(final String username) { final Query query = entityManager.createQuery( "SELECT p FROM PersistentLogin p WHERE username = :username"); query.setParameter("username", username); for (Object token : query.getResultList()) { entityManager.remove(token); } } Exception: org.datanucleus