<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-16308</id>
	<title>Nabble - OpenJPA</title>
	<updated>2008-07-08T15:30:41Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/OpenJPA-ft16308.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/OpenJPA-f16308.html" />
	<subtitle type="html">&lt;a href=&quot;http://incubator.apache.org/openjpa/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;OpenJPA&lt;/a&gt;&amp;nbsp;Project is an open source implementation of the Java Persistence API.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-18350546</id>
	<title>Query problem with open jpa 1.0.2</title>
	<published>2008-07-08T15:30:41Z</published>
	<updated>2008-07-08T15:30:41Z</updated>
	<author>
		<name>tao_dong_cn</name>
	</author>
	<content type="html">&lt;br&gt;Hi, I'm working on a project using openjpa 1.0.2. I got
&lt;br&gt;org.apache.openjpa.persistence.ArgumentException while executing a simple
&lt;br&gt;query today, wish someone can help me on this issue. Thanks
&lt;br&gt;&lt;br&gt;The query I'm trying to execute is:
&lt;br&gt;&amp;quot;select job from job j&amp;quot;
&lt;br&gt;Moreover there is no problem for me to create a new job record.
&lt;br&gt;&lt;br&gt;Three related persistence classes are defined as the following:
&lt;br&gt;&lt;br&gt;@Table(name = &amp;quot;job&amp;quot;)
&lt;br&gt;@Entity(name = &amp;quot;job&amp;quot;)
&lt;br&gt;public class Job implements Serializable{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Id
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;job_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @GeneratedValue(strategy = GenerationType.IDENTITY)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private long jobId;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;job_name&amp;quot;, length = 255, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String jobName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String status;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne (optional = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;create_by&amp;quot;, referencedColumnName = &amp;quot;user_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private User createUser;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;create_time&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Date createTime;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne (optional = true)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;update_by&amp;quot;, referencedColumnName = &amp;quot;user_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private User updateUser;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;update_time&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Date updateTime;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne (optional = false, fetch = FetchType.EAGER)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;proj_lead_id&amp;quot;, referencedColumnName = &amp;quot;user_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private User projectLead;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne (optional = false, fetch = FetchType.EAGER)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;designer_id&amp;quot;, referencedColumnName = &amp;quot;user_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private User designer;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;approve_by&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String approveBy;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;concept_date&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Date conceptDate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;vendor_due_date&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Date vendorDueDate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;release_date&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Date releaseDate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;@Entity(name = &amp;quot;user&amp;quot;)
&lt;br&gt;@Table(name = &amp;quot;usr_user&amp;quot;)
&lt;br&gt;public class User implements Serializable {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static final long serialVersionUID = 3L;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Id
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;user_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @GeneratedValue(strategy = GenerationType.IDENTITY)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private long userId;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String password;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;user_name&amp;quot;, length = 20, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String userName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;first_name&amp;quot;, length = 32, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String firstName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;last_name&amp;quot;, length = 32, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String lastName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name = &amp;quot;mid_name&amp;quot;, length = 20, nullable = true)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String midName;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne (optional = false, fetch = FetchType.EAGER)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;role_id&amp;quot;, referencedColumnName = &amp;quot;role_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Role role;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;@Entity (name = &amp;quot;role&amp;quot;)
&lt;br&gt;@Table(name = &amp;quot;role&amp;quot;)
&lt;br&gt;public class Role {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Id
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name=&amp;quot;role_id&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @GeneratedValue(strategy = GenerationType.IDENTITY)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private long roleId;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Column (name=&amp;quot;role_name&amp;quot;, length = 20, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String roleName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;and the exception details I got are
&lt;br&gt;javax.faces.FacesException: Error calling action method of component with id
&lt;br&gt;job-search-form:search-button
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:69)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.faces.component.UICommand.broadcast(UICommand.java:121)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:292)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.faces.component.UIViewRoot.process(UIViewRoot.java:209)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:117)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.Thread.run(Thread.java:595)
&lt;br&gt;Caused by: javax.faces.el.EvaluationException: javax.el.ELException:
&lt;br&gt;/web/searchJob.xhtml @278,43 action=&amp;quot;#{jobBacking.search}&amp;quot;:
&lt;br&gt;org.springframework.dao.InvalidDataAccessApiUsageException: nested exception
&lt;br&gt;is &amp;lt;openjpa-1.0.2-r420667:627158 nonfatal user error&amp;gt;
&lt;br&gt;org.apache.openjpa.persistence.ArgumentException: null
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:79)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 23 more
&lt;br&gt;Caused by: javax.el.ELException: /web/searchJob.xhtml @278,43
&lt;br&gt;action=&amp;quot;#{jobBacking.search}&amp;quot;:
&lt;br&gt;org.springframework.dao.InvalidDataAccessApiUsageException: nested exception
&lt;br&gt;is &amp;lt;openjpa-1.0.2-r420667:627158 nonfatal user error&amp;gt;
&lt;br&gt;org.apache.openjpa.persistence.ArgumentException: null
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:74)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 24 more
&lt;br&gt;Caused by: org.springframework.dao.InvalidDataAccessApiUsageException:
&lt;br&gt;nested exception is &amp;lt;openjpa-1.0.2-r420667:627158 nonfatal user error&amp;gt;
&lt;br&gt;org.apache.openjpa.persistence.ArgumentException: null
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:269)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:212)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.orm.jpa.JpaAccessor.translateIfNecessary(JpaAccessor.java:152)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:190)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.orm.jpa.JpaTemplate.executeFind(JpaTemplate.java:152)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:299)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:295)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.xyz.dao.JobDAO.searchJob(JobDAO.java:209)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at $Proxy11.searchJob(Unknown Source)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.xyz.backing.JobBacking.search(JobBacking.java:157)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.el.parser.AstValue.invoke(AstValue.java:152)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 25 more
&lt;br&gt;Caused by: &amp;lt;openjpa-1.0.2-r420667:627158 nonfatal user error&amp;gt;
&lt;br&gt;org.apache.openjpa.persistence.ArgumentException: null
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:769)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:765)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:517)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:238)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:277)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.springframework.orm.jpa.JpaTemplate$9.doInJpa(JpaTemplate.java:307)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:185)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 44 more
&lt;br&gt;Caused by: java.lang.NullPointerException
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.jdbc.kernel.exps.PCPath.initialize(PCPath.java:445)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.initialize(SelectConstructor.java:197)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.newSelect(SelectConstructor.java:119)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:73)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:331)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:171)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:676)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:988)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:799)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 51 more 
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://n2.nabble.com/Query-problem-with-open-jpa-1.0.2-tp395802p395802.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/Query-problem-with-open-jpa-1.0.2-tp395802p395802.html&lt;/a&gt;&lt;br&gt;Sent from the OpenJPA Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Query-problem-with-open-jpa-1.0.2-tp18350546p18350546.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18347831</id>
	<title>Tomcat Injection</title>
	<published>2008-07-08T13:02:06Z</published>
	<updated>2008-07-08T13:02:06Z</updated>
	<author>
		<name>ericp56</name>
	</author>
	<content type="html">&lt;br&gt;Hello,
&lt;br&gt;&lt;br&gt;After reading some documentation, I though I had my injection code worked
&lt;br&gt;out, but apparently not.
&lt;br&gt;&lt;br&gt;I am using Tomcat with OpenJPA.
&lt;br&gt;&lt;br&gt;In my class, I have:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @PersistenceUnit(unitName = &amp;quot;CallScheduler&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private @Resource(name=&amp;quot;bean/OpenJPAEMF&amp;quot;)OpenJPAEntityManagerFactory emf;
&lt;br&gt;In my META-INF/context.xml, I have:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Resource name=&amp;quot;bean/OpenJPAEMF&amp;quot; auth=&amp;quot;Container&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; factory=&amp;quot;org.apache.openjpa.persistence.OpenJPAEntityManagerFactory&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=&amp;quot;org.apache.openjpa.persistence.OpenJPAEntityManagerFactory.class&amp;quot; /&amp;gt;
&lt;br&gt;&lt;br&gt;While executing a method in my class, &amp;nbsp;emf is still null.
&lt;br&gt;&lt;br&gt;How should I instantiate emf? &amp;nbsp;I am under the impression that
&lt;br&gt;OpenJPAPersistence.createEntityManagerFactory is for unmanaged code...
&lt;br&gt;&lt;br&gt;Eric
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://n2.nabble.com/Tomcat-Injection-tp395699p395699.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/Tomcat-Injection-tp395699p395699.html&lt;/a&gt;&lt;br&gt;Sent from the OpenJPA Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Tomcat-Injection-tp18347831p18347831.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18338440</id>
	<title>Error while merging object tree</title>
	<published>2008-07-08T05:47:30Z</published>
	<updated>2008-07-08T05:47:30Z</updated>
	<author>
		<name>Ekin Sökmen</name>
	</author>
	<content type="html">Hi,&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;br&gt;I get following error while merging a persisted entity A after adding new child entities to it.&amp;nbsp; The following relation exists between entities:&amp;nbsp; A -&amp;gt; (many to many) B -&amp;gt; (one to many) C. &lt;br&gt;
&lt;br&gt;The issue is I don&amp;#39;t get this error while using openjpa 1.0.0, but I get it using openjpa &lt;a href=&quot;http://1.1.0.&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;1.1.0.&lt;/a&gt; If I add &amp;quot;cascade= {CascadeType.MERGE, CascadeType.PERSIST}&amp;quot; to ChainEntityC.chainEntityB field It works with openjpa 1.1.0 but this time I have problems with openjpa &lt;a href=&quot;http://1.0.0.&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;1.0.0.&lt;/a&gt;  &lt;br&gt;

&lt;br&gt;I&amp;#39;m not sure if this is a bug or an older bug is fixed. Do we need to open a jira for this or not? My opinion is the cascade type on entity C should not be necessary because C is the last entity in the chain and should be cascaded from A to C. Cascade from C to B does not sound logical.&lt;br&gt;

&lt;br&gt;The test code is attached and works if you copy it to openjpa-persistence-jdbc test module. &lt;br&gt;&lt;br&gt;Thanks.&lt;br&gt;&lt;br&gt;Ekin Sokmen.&lt;br&gt;&lt;br&gt;Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.938 sec &amp;lt;&amp;lt;&amp;lt; FAILURE!&lt;br&gt;

testChainUpdate(org.apache.openjpa.persistence.relations.TestChainEntities)&amp;nbsp; Time elapsed: 2.85 sec&amp;nbsp; &amp;lt;&amp;lt;&amp;lt; ERROR!&lt;br&gt;&amp;lt;openjpa-1.1.0-r422266:659716 nonfatal user error&amp;gt; org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged object in persistent field &amp;quot;org.apache.openjpa.persistence.relations.ChainEntityC.chainEntityB&amp;quot; during flush.&amp;nbsp; However, this field does not allow cascade persist. Set the cascade attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or &amp;quot;persist&amp;quot; or &amp;quot;all&amp;quot; (JPA orm.xml), or enable cascade-persist globally, or manually persist the related field value prior to flushing. You cannot flush unmanaged objects or graphs that have persistent associations to unmanaged objects.&lt;br&gt;

FailedObject: org.apache.openjpa.persistence.relations.ChainEntityB@1702c48&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:753)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:594)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2819)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.PNewProvisionalState.nonprovisional(PNewProvisionalState.java:44)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.StateManagerImpl.nonprovisional(StateManagerImpl.java:1130)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:772)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(SingleFieldManager.java:735)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:637)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2819)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.PNewProvisionalState.nonprovisional(PNewProvisionalState.java:44)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.StateManagerImpl.nonprovisional(StateManagerImpl.java:1130)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:772)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(SingleFieldManager.java:735)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:637)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2819)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.PDirtyState.beforeFlush(PDirtyState.java:37)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:957)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1945)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1905)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1823)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1347)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:877)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:512)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.persistence.relations.TestChainEntities.testChainUpdate(TestChainEntities.java:46)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestCase.runTest(TestCase.java:154)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestCase.runBare(TestCase.java:127)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestResult$1.protect(TestResult.java:106)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestResult.runProtected(TestResult.java:124)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestResult.run(TestResult.java:109)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestCase.run(TestCase.java:118)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.openjpa.persistence.test.PersistenceTestCase.run(PersistenceTestCase.java:122)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestSuite.runTest(TestSuite.java:208)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at junit.framework.TestSuite.run(TestSuite.java:203)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.maven.surefire.Surefire.run(Surefire.java:177)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)&lt;br&gt;&lt;br&gt;
&lt;/div&gt;&lt;br&gt;
&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;test_case.zip&lt;/strong&gt; (3K) &lt;a href=&quot;http://www.nabble.com/attachment/18338440/0/test_case.zip&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Error-while-merging-object-tree-tp18338440p18338440.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18338311</id>
	<title>[jira] Created: (OPENJPA-654) Missing dictionary properties in OpenJPA docs</title>
	<published>2008-07-08T05:40:31Z</published>
	<updated>2008-07-08T05:40:31Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">Missing dictionary properties in OpenJPA docs
&lt;br&gt;---------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: OPENJPA-654
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/OPENJPA-654&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/OPENJPA-654&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: OpenJPA
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Bug
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: docs
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 1.1.0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: David Ezzio
&lt;br&gt;&lt;br&gt;&lt;br&gt;The following properties are found in DBDictionary.java, but are not (unlike most) documented in the User's Guide, section &amp;quot;4.4.1. DBDictionary Properties&amp;quot;:
&lt;br&gt;&lt;br&gt;allowsAliasInBulkClause
&lt;br&gt;batchLimit
&lt;br&gt;bitLengthFunction
&lt;br&gt;booleanTypeName
&lt;br&gt;castFunction
&lt;br&gt;closePoolSQL
&lt;br&gt;concatenateDelimiter
&lt;br&gt;concatenateFunction
&lt;br&gt;currentDateFunction
&lt;br&gt;currentTimeFunction
&lt;br&gt;currentTimestampFunction
&lt;br&gt;datePrecision
&lt;br&gt;dropTableSQL
&lt;br&gt;fixedSizeTypeNames
&lt;br&gt;getStringVal
&lt;br&gt;inClauseLimit
&lt;br&gt;maxEmbeddedBlobSize
&lt;br&gt;maxEmbeddedClobSize
&lt;br&gt;platform
&lt;br&gt;rangePosition
&lt;br&gt;requiresCastForComparisons
&lt;br&gt;requiresCastForMathFunctions
&lt;br&gt;requiresTargetForDelete
&lt;br&gt;searchStringEscape
&lt;br&gt;sequenceNameSQL
&lt;br&gt;sequenceSQL
&lt;br&gt;sequenceSchemaSQL
&lt;br&gt;supportsAutoAssign
&lt;br&gt;supportsCascadeUpdateAction
&lt;br&gt;supportsComments
&lt;br&gt;supportsCorrelatedSubselect
&lt;br&gt;supportsDefaultUpdateAction
&lt;br&gt;supportsModOperator
&lt;br&gt;supportsNullUpdateAction
&lt;br&gt;supportsRestrictUpdateAction
&lt;br&gt;supportsXMLColumn
&lt;br&gt;trimBothFunction
&lt;br&gt;trimLeadingFunction
&lt;br&gt;trimTrailingFunction
&lt;br&gt;xmlTypeName
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Developers-f16309.html&quot; embed=&quot;fixTarget[16309]&quot; target=&quot;_top&quot; &gt;OpenJPA Developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28OPENJPA-654%29-Missing-dictionary-properties-in-OpenJPA-docs-tp18338311p18338311.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18340923</id>
	<title>Error while merging object three</title>
	<published>2008-07-08T05:35:44Z</published>
	<updated>2008-07-08T05:35:44Z</updated>
	<author>
		<name>Ekin Sökmen</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I get following error while merging a persisted entity A after adding new
&lt;br&gt;child entities to it. &amp;nbsp;The following relation exists between entities: &amp;nbsp;A -&amp;gt;
&lt;br&gt;(many to many) B -&amp;gt; (one to many) C.
&lt;br&gt;&lt;br&gt;The issue is I don't get this error while using openjpa 1.0.0, but I get it
&lt;br&gt;using openjpa 1.1.0. If I add &amp;quot;cascade= {CascadeType.MERGE,
&lt;br&gt;CascadeType.PERSIST}&amp;quot; to ChainEntityC.chainEntityB field It works with
&lt;br&gt;openjpa 1.1.0 but this time I have problems with openjpa 1.0.0.
&lt;br&gt;&lt;br&gt;I'm not sure if this is a bug or an older bug is fixed. Do we need to open a
&lt;br&gt;jira for this or not? My opinion is the cascade type on entity C should not
&lt;br&gt;be necessary because C is the last entity in the chain and should be
&lt;br&gt;cascaded from A to C. Cascade from C to B does not sound logical.
&lt;br&gt;&lt;br&gt;The test code is attached and works if you copy it to
&lt;br&gt;openjpa-persistence-jdbc test module.
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;Ekin Sokmen.
&lt;br&gt;&lt;br&gt;Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.938 sec
&lt;br&gt;&amp;lt;&amp;lt;&amp;lt; FAILURE!
&lt;br&gt;testChainUpdate(org.apache.openjpa.persistence.relations.TestChainEntities)
&lt;br&gt;Time elapsed: 2.85 sec &amp;nbsp;&amp;lt;&amp;lt;&amp;lt; ERROR!
&lt;br&gt;&amp;lt;openjpa-1.1.0-r422266:659716 nonfatal user error&amp;gt;
&lt;br&gt;org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged
&lt;br&gt;object in persistent field
&lt;br&gt;&amp;quot;org.apache.openjpa.persistence.relations.ChainEntityC.chainEntityB&amp;quot; during
&lt;br&gt;flush. &amp;nbsp;However, this field does not allow cascade persist. Set the cascade
&lt;br&gt;attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA
&lt;br&gt;annotations) or &amp;quot;persist&amp;quot; or &amp;quot;all&amp;quot; (JPA orm.xml), or enable cascade-persist
&lt;br&gt;globally, or manually persist the related field value prior to flushing. You
&lt;br&gt;cannot flush unmanaged objects or graphs that have persistent associations
&lt;br&gt;to unmanaged objects.
&lt;br&gt;FailedObject: org.apache.openjpa.persistence.relations.ChainEntityB@1702c48
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:753)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:594)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2819)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.PNewProvisionalState.nonprovisional(PNewProvisionalState.java:44)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.nonprovisional(StateManagerImpl.java:1130)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:772)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(SingleFieldManager.java:735)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:637)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2819)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.PNewProvisionalState.nonprovisional(PNewProvisionalState.java:44)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.nonprovisional(StateManagerImpl.java:1130)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:772)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(SingleFieldManager.java:735)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:637)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:562)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:478)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2819)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.PDirtyState.beforeFlush(PDirtyState.java:37)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:957)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1945)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1905)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1823)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1347)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:877)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:512)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.persistence.relations.TestChainEntities.testChainUpdate(TestChainEntities.java:46)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestCase.runTest(TestCase.java:154)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestCase.runBare(TestCase.java:127)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestResult$1.protect(TestResult.java:106)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestResult.runProtected(TestResult.java:124)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestResult.run(TestResult.java:109)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestCase.run(TestCase.java:118)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.persistence.test.PersistenceTestCase.run(PersistenceTestCase.java:122)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestSuite.runTest(TestSuite.java:208)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at junit.framework.TestSuite.run(TestSuite.java:203)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:585)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Error-while-merging-object-three-tp18340923p18340923.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18337405</id>
	<title>EAGER vs. LAZY loading - weird behaviour in OpenJPA 1.0.1</title>
	<published>2008-07-08T04:56:36Z</published>
	<updated>2008-07-08T04:56:36Z</updated>
	<author>
		<name>Beniamin Mazan</name>
	</author>
	<content type="html">&lt;br&gt;Hi
&lt;br&gt;I refactored my source code quoted in
&lt;br&gt;&lt;a href=&quot;http://n2.nabble.com/Incredible-set-of-statements-td221053.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/Incredible-set-of-statements-td221053.html&lt;/a&gt;&lt;br&gt;Currently I use:
&lt;br&gt;&lt;br&gt;@Entity 
&lt;br&gt;public class Customer {
&lt;br&gt;...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy =
&lt;br&gt;&amp;quot;customer&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Set&amp;lt;Product&amp;gt; products = new HashSet&amp;lt;Product&amp;gt;();
&lt;br&gt;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;@Entity
&lt;br&gt;public class Product {
&lt;br&gt;...
&lt;br&gt;&amp;nbsp; &amp;nbsp; @ManyToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH }, fetch =
&lt;br&gt;FetchType.EAGER)
&lt;br&gt;&amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;billacc_id&amp;quot;, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; Customer customer;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy
&lt;br&gt;= &amp;quot;product&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; @OrderBy(value = &amp;quot;created DESC&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; private List&amp;lt;RequestLog&amp;gt; logs = new ArrayList&amp;lt;RequestLog&amp;gt;();
&lt;br&gt;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;@Entity
&lt;br&gt;public class RequestLog {
&lt;br&gt;...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH}, fetch =
&lt;br&gt;FetchType.LAZY)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;product_id&amp;quot;, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Product product;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy =
&lt;br&gt;&amp;quot;request&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @OrderBy(value = &amp;quot;created DESC&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;ResponseLog&amp;gt; children = new ArrayList&amp;lt;ResponseLog&amp;gt;();
&lt;br&gt;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;@Entity
&lt;br&gt;public class ResponseLog {
&lt;br&gt;...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH}, fetch =
&lt;br&gt;FetchType.LAZY)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;request_id&amp;quot;, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private RequestLog request;
&lt;br&gt;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;I've noticed 2 cases of outlandish manner.
&lt;br&gt;&lt;br&gt;1) When I use finder for Customer or Product (with RequestLog.product using
&lt;br&gt;fetchType == LAZY) I got initialized structure with all RequestLogs'
&lt;br&gt;references to Products set to null
&lt;br&gt;&lt;br&gt;2) When I use finder for Customer or Product (with RequestLog.product using
&lt;br&gt;getchType == EAGER) I see that OpenJPA generate queries to get Customer,
&lt;br&gt;Product, RequestLog from DB, but queries for RequestLogs are joins using all
&lt;br&gt;classes from bottom to up - (request_log, product and customer) despite the
&lt;br&gt;fact, that EM has gathered these data in previous queries and could use it
&lt;br&gt;instead of redundant selecting them from DB.
&lt;br&gt;&lt;br&gt;Is it usual OpenJPA behaviour?
&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;thanks, Beniamin 
&lt;br&gt;My homesite - &amp;nbsp;&lt;a href=&quot;http://www.mazan.pl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.mazan.pl&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://www.mazan.pl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.mazan.pl&lt;/a&gt;&amp;nbsp;
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://n2.nabble.com/EAGER-vs.-LAZY-loading---weird-behaviour-in-OpenJPA-1.0.1-tp364201p364201.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/EAGER-vs.-LAZY-loading---weird-behaviour-in-OpenJPA-1.0.1-tp364201p364201.html&lt;/a&gt;&lt;br&gt;Sent from the OpenJPA Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;thanks
&lt;br&gt;Beniamin&lt;/div&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/EAGER-vs.-LAZY-loading---weird-behaviour-in-OpenJPA-1.0.1-tp18337405p18337405.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18325006</id>
	<title>svn commit: r674609 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java</title>
	<published>2008-07-07T12:41:33Z</published>
	<updated>2008-07-07T12:41:33Z</updated>
	<author>
		<name>allee8285</name>
	</author>
	<content type="html">Author: allee8285
&lt;br&gt;Date: Mon Jul &amp;nbsp;7 12:41:32 2008
&lt;br&gt;New Revision: 674609
&lt;br&gt;&lt;br&gt;URL: &lt;a href=&quot;http://svn.apache.org/viewvc?rev=674609&amp;view=rev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/viewvc?rev=674609&amp;view=rev&lt;/a&gt;&lt;br&gt;Log:
&lt;br&gt;OPENJPA-653 - Commit for Jeremy Bauer
&lt;br&gt;&lt;br&gt;Modified:
&lt;br&gt;&amp;nbsp; &amp;nbsp; openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
&lt;br&gt;&lt;br&gt;Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
&lt;br&gt;URL: &lt;a href=&quot;http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=674609&amp;r1=674608&amp;r2=674609&amp;view=diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=674609&amp;r1=674608&amp;r2=674609&amp;view=diff&lt;/a&gt;&lt;br&gt;==============================================================================
&lt;br&gt;--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java (original)
&lt;br&gt;+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Mon Jul &amp;nbsp;7 12:41:32 2008
&lt;br&gt;@@ -569,7 +569,10 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// make sure we didn't abort
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (_maintainCache) {
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;QueryResult res = new QueryResult(_qk, _data.values());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;QueryResult res = null;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;synchronized (this) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;res = new QueryResult(_qk, _data.values());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_cache.put(_qk, res);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;abortCaching();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Commits-f23253.html&quot; embed=&quot;fixTarget[23253]&quot; target=&quot;_top&quot; &gt;OpenJPA Commits&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/svn-commit%3A-r674609----openjpa-trunk-openjpa-kernel-src-main-java-org-apache-openjpa-datacache-QueryCacheStoreQuery.java-tp18325006p18325006.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18320858</id>
	<title>HuyAnh Ngo is out of the office.</title>
	<published>2008-07-07T09:27:49Z</published>
	<updated>2008-07-07T09:27:49Z</updated>
	<author>
		<name>Ngo, Anh (ISS Southfield)-2</name>
	</author>
	<content type="html">&lt;br&gt;I will be out of the office starting &amp;nbsp;07/07/2008 and will not return until
&lt;br&gt;07/14/2008.
&lt;br&gt;&lt;br&gt;I will respond to your message when I return.&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Developers-f16309.html&quot; embed=&quot;fixTarget[16309]&quot; target=&quot;_top&quot; &gt;OpenJPA Developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/HuyAnh-Ngo-is-out-of-the-office.-tp18320858p18320858.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18317782</id>
	<title>[jira] Created: (OPENJPA-653) Concurrency issue with query cache enabled</title>
	<published>2008-07-07T07:15:31Z</published>
	<updated>2008-07-07T07:15:31Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">Concurrency issue with query cache enabled
&lt;br&gt;------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: OPENJPA-653
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/OPENJPA-653&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/OPENJPA-653&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: OpenJPA
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Bug
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: datacache
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 1.2.0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Jeremy Bauer
&lt;br&gt;&lt;br&gt;&lt;br&gt;A Java EE application with query result caching enabled and with many concurrent users is failing with a ConcurrentModificationException in org.apache.openjpa.datacache.QueryCacheStoreQuery. &amp;nbsp;Specifically, the failure is in the inner class.method CachingResultObjectProvider.checkFinished(Object, boolean) and occurs while iterating the _data TreeMap within the QueryResult constructor. &amp;nbsp;
&lt;br&gt;&lt;br&gt;Examination of this method showed that the tree map is synchronized in the beginning of the method and then later when the &amp;nbsp;map is cleared in abortCaching(). &amp;nbsp;It is not synchronized when a new QueryResult is constructed. &amp;nbsp;This allows a thread to iterate over the map (during the constructor) while another thread is modifying it. &amp;nbsp;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Developers-f16309.html&quot; embed=&quot;fixTarget[16309]&quot; target=&quot;_top&quot; &gt;OpenJPA Developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28OPENJPA-653%29-Concurrency-issue-with-query-cache-enabled-tp18317782p18317782.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18314927</id>
	<title>Mass insert; @SequenceGenerator allocationSize ignored?</title>
	<published>2008-07-07T04:46:45Z</published>
	<updated>2008-07-07T04:46:45Z</updated>
	<author>
		<name>graffer</name>
	</author>
	<content type="html">&lt;br&gt;Hi guys,
&lt;br&gt;&lt;br&gt;My environment: JBOSS 4.2.1, OpenJPA 1.1, Java 5, EJB 3 (+JPA), build time
&lt;br&gt;enhancement, many entities, Oracle 10g
&lt;br&gt;&lt;br&gt;We are currently inserting a lot of entities. Therefore we use a common
&lt;br&gt;sequence (inherited from a @MappedSuperClass):
&lt;br&gt;&lt;br&gt;@Id
&lt;br&gt;@SequenceGenerator(name = &amp;quot;SeqGen&amp;quot;, allocationSize = 100, sequenceName =
&lt;br&gt;&amp;quot;SEQ&amp;quot;)
&lt;br&gt;@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = &amp;quot;SeqGen&amp;quot;)
&lt;br&gt;public int getId()
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; return id;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;When creating 1000 entities and then call em.flush(), OpenJPA first performs
&lt;br&gt;1000 times 
&lt;br&gt;&lt;br&gt;SELECT SEQ.NEXTVAL from dual;
&lt;br&gt;&lt;br&gt;It then executes the 1000 insert statements (hopefully in batch). When
&lt;br&gt;looking at the allocationSize javadoc, I assumed, that it would create an
&lt;br&gt;ORACLE sequence with INCREMENT_BY 100 and then catch a new sequence value
&lt;br&gt;every 100 inserts?
&lt;br&gt;&lt;br&gt;Is my expectation for allocationSize wrong, or do I use it the wrong way?
&lt;br&gt;Is there a better / other way to configure the expected sequence behavior?
&lt;br&gt;The problem is that our application now has a huge overhead in performance
&lt;br&gt;only to calculate the ID of the new entity.
&lt;br&gt;&lt;br&gt;Thank you in advance for your help!
&lt;br&gt;&lt;br&gt;bye, Georg
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://n2.nabble.com/Mass-insert--%40SequenceGenerator-allocationSize-ignored--tp363057p363057.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/Mass-insert--%40SequenceGenerator-allocationSize-ignored--tp363057p363057.html&lt;/a&gt;&lt;br&gt;Sent from the OpenJPA Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Mass-insert--%40SequenceGenerator-allocationSize-ignored--tp18314927p18314927.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18310920</id>
	<title>Bug in mapping.</title>
	<published>2008-07-06T23:43:34Z</published>
	<updated>2008-07-06T23:43:34Z</updated>
	<author>
		<name>Hiran Chaudhuri</name>
	</author>
	<content type="html">Hi there.
&lt;br&gt;&lt;br&gt;With entities generated from the database I keep getting such exceptions:
&lt;br&gt;org.apache.openjpa.persistence.PersistenceException: Invalid value for
&lt;br&gt;getInt() - 'N'
&lt;br&gt;&lt;br&gt;When I workaround one such exception, I get the next one, and it seems that
&lt;br&gt;all of them occur on fields that are CHAR(1) not nullable in the database
&lt;br&gt;and were mapped to char. Char is not even shown in the example code, which
&lt;br&gt;means it might have skipped to be tested completely.
&lt;br&gt;&lt;br&gt;Seeing this as a global issue, I want to fix it globally. Can FieldStrategy
&lt;br&gt;be an overall solution? And if yes, how do I introduce my strategy to
&lt;br&gt;OpenJPA?
&lt;br&gt;&lt;br&gt;Hiran Chaudhuri
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Bug-in-mapping.-tp18310920p18310920.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18289593</id>
	<title>Able to remove relation with ManyToMany and no cascade.</title>
	<published>2008-07-05T00:02:09Z</published>
	<updated>2008-07-05T00:02:09Z</updated>
	<author>
		<name>Jitendra chintamadaka</name>
	</author>
	<content type="html">I stumbled accross a test scenario and did not think it was working right. Before posting a bug, I wanted to check if this scenario was already addressed (either in this forum or other forums).
&lt;br&gt;&lt;br&gt;I have three tables:
&lt;br&gt;&lt;br&gt;STUDENT (SID INT, SFSTNM VCHAR10, SLSTNM VCHAR10)
&lt;br&gt;TEAM (TID INT, NAME VCHAR10)
&lt;br&gt;COLLEGE( STUDID INT - REFERENCING SID STUDENT table, TEAMID INT - REFERENCING TID of TEAM table)
&lt;br&gt;&lt;br&gt;STUDENT entity defines a owning relation of ManyToMany with TEAM as follows:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @ManyToMany ()
&lt;br&gt;&amp;nbsp; &amp;nbsp; @JoinTable(name=&amp;quot;COLLEGE&amp;quot;, joinColumns=@JoinColumn(name=&amp;quot;STUDID&amp;quot;, referencedColumnName=&amp;quot;SID&amp;quot;), inverseJoinColumns=@JoinColumn(name=&amp;quot;TEAMID&amp;quot;, referencedColumnName=&amp;quot;TID&amp;quot;))
&lt;br&gt;&amp;nbsp; &amp;nbsp; public List&amp;lt;Team&amp;gt; getTeamCollection() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return teamCollection;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;TEAM entity defines the inverse relation as below:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @ManyToMany(mappedBy=&amp;quot;teamCollection&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; public List&amp;lt;Student&amp;gt; getStudentList() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return studentList;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;Data in the tables is as follows:
&lt;br&gt;Student
&lt;br&gt;SID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SFSTNM &amp;nbsp; &amp;nbsp; SLSTNM
&lt;br&gt;----------- ---------- ----------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 ONE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LAST
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 TWO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LAST
&lt;br&gt;&lt;br&gt;Team
&lt;br&gt;TID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TNAME
&lt;br&gt;----------- ----------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100 TEAM 100
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200 TEAM 200
&lt;br&gt;&lt;br&gt;College
&lt;br&gt;STUDID &amp;nbsp; &amp;nbsp; &amp;nbsp;TEAMID
&lt;br&gt;----------- -----------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200
&lt;br&gt;&lt;br&gt;Scenario 1:
&lt;br&gt;Using EntityManager, I find the Student entity with PK value &amp;quot;1&amp;quot;. Access the team list and remove the entry in the list with TID &amp;quot;100&amp;quot;. Now when I commit this transaction, the entry from intermediate table (COLLEGE) with STUDID &amp;quot;1&amp;quot; and TEAMID &amp;quot;100&amp;quot; is removed.
&lt;br&gt;&lt;br&gt;Scenario 2:
&lt;br&gt;Using EntityManager, I find the Team entity with PK value &amp;quot;200&amp;quot;. Access the student list and remove the entry in the list with SID &amp;quot;1&amp;quot;. On comitting the transaction, no changes are noticed in the COLLEGE table.
&lt;br&gt;&lt;br&gt;Conclusion:
&lt;br&gt;With this testing, I am able to conclude that, using owner side of ManyToMany relation, we can remove entries from JoinTable (with or without any cascade option - Yes, I tried with no cascade option, refresh cascade option), where as from the inverse side of ManyToMany, we are unable to remove.
&lt;br&gt;&lt;br&gt;I have looked up the JSR 220 and did not find any specific mention on this scenario. This seems like a bug in the implementation. Please let me know if this really is a bug, so I can submit a bug report.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Jitendra.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Able-to-remove-relation-with-ManyToMany-and-no-cascade.-tp18289593p18289593.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18283008</id>
	<title>OpenJPA-571</title>
	<published>2008-07-04T09:51:58Z</published>
	<updated>2008-07-04T09:51:58Z</updated>
	<author>
		<name>Tim Holloway</name>
	</author>
	<content type="html">Can someone look at issue OpenJPA-571? I noticed that apparently nobody
&lt;br&gt;has taken it on and I'm the third person to get nailed by it - in my
&lt;br&gt;case in a simple table-to-table copy operation. I got around it only by
&lt;br&gt;replacing the failing persist() call with a brute-force JDBC INSERT
&lt;br&gt;operation.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Thanks,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tim
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Developers-f16309.html&quot; embed=&quot;fixTarget[16309]&quot; target=&quot;_top&quot; &gt;OpenJPA Developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/OpenJPA-571-tp18283008p18283008.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18282443</id>
	<title>How to find cause for PersistenceException?</title>
	<published>2008-07-04T09:16:55Z</published>
	<updated>2008-07-04T09:16:55Z</updated>
	<author>
		<name>Hiran Chaudhuri</name>
	</author>
	<content type="html">Hi there.
&lt;br&gt;&lt;br&gt;On classes generated from a database with Netbeans 6.1 I get such an exception at runtime:
&lt;br&gt;&amp;lt;openjpa-1.1.0-r422266:657916 nonfatal general error&amp;gt; org.apache.openjpa.persistence.PersistenceException: Invalid value for getInt() - 'N'
&lt;br&gt;&lt;br&gt;Now I can imagine that int is a wrong mapping for the regarding table column and I know which table is accessed - but how do I find out which column this message relates to?
&lt;br&gt;&lt;br&gt;Hiran Chaudhuri
&lt;br&gt;_______________________________________________________________________
&lt;br&gt;Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
&lt;br&gt;kostenlos testen. &lt;a href=&quot;http://www.pc-sicherheit.web.de/startseite/?mc=022220&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.pc-sicherheit.web.de/startseite/?mc=022220&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-find-cause-for-PersistenceException--tp18282443p18282443.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18277379</id>
	<title>Incredible set of statements</title>
	<published>2008-07-04T04:03:26Z</published>
	<updated>2008-07-04T04:03:26Z</updated>
	<author>
		<name>Beniamin Mazan</name>
	</author>
	<content type="html">&lt;br&gt;I got Entity with relation to itself like :
&lt;br&gt;&lt;br&gt;public class ActionLog {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH}, fetch =
&lt;br&gt;FetchType.EAGER)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;product_id&amp;quot;, nullable = false)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Product product;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH}, fetch =
&lt;br&gt;FetchType.EAGER)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @JoinColumn(name = &amp;quot;parent_id&amp;quot;, nullable = true)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private ActionLog parent;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy =
&lt;br&gt;&amp;quot;parent&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @OrderBy(value = &amp;quot;created DESC&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;ActionLog&amp;gt; children = new ArrayList&amp;lt;ActionLog&amp;gt;();
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;When I execute named query to load Product with ActionLogs :
&lt;br&gt;SELECT p FROM Product p LEFT JOIN FETCH p.logs WHERE p.id = :id
&lt;br&gt;OpenJPA generates strange set of select.
&lt;br&gt;&lt;br&gt;At first is selects all ActionLogs for specified Product - it's OK. But next
&lt;br&gt;it build single statement to select children of each ActionLog has been
&lt;br&gt;found in the first step.
&lt;br&gt;&lt;br&gt;Couldn't it be made simplier?
&lt;br&gt;&lt;br&gt;Beniamin
&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;--
&lt;br&gt;thanks
&lt;br&gt;Beniamin
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://n2.nabble.com/Incredible-set-of-statements-tp221053p221053.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/Incredible-set-of-statements-tp221053p221053.html&lt;/a&gt;&lt;br&gt;Sent from the OpenJPA Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;thanks
&lt;br&gt;Beniamin&lt;/div&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Incredible-set-of-statements-tp18277379p18277379.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18274621</id>
	<title>1st level cache and query statistics?</title>
	<published>2008-07-04T00:49:35Z</published>
	<updated>2008-07-04T00:49:35Z</updated>
	<author>
		<name>graffer</name>
	</author>
	<content type="html">&lt;br&gt;Hello guys,
&lt;br&gt;&lt;br&gt;My environment: JBOSS 4.2.1, OpenJPA 1.1, Java 5, EJB 3 (+JPA), build time
&lt;br&gt;enhancement, many entities
&lt;br&gt;&lt;br&gt;I currently try to get some statistics of the entity manger usage. JPA
&lt;br&gt;provides no standardized way to find out how many entities are in the 1st
&lt;br&gt;level cache. I only know it from Hibernate, it has a Session.getStatistics()
&lt;br&gt;which returns basic information about the current session. More detailed
&lt;br&gt;information is available on the SessionFactoy.
&lt;br&gt;&lt;br&gt;So now my question: Is there a similar way in OpenJPA? I would need the
&lt;br&gt;following statistics:
&lt;br&gt;&lt;br&gt;1) EntityManager: how many entities (and collections) are in 1st level
&lt;br&gt;cache?
&lt;br&gt;2) EntityManagerFactory: how many select / insert / update statements were
&lt;br&gt;executed within that SessionFactory?
&lt;br&gt;&lt;br&gt;If those informations are not available via API, how can I access them? Is
&lt;br&gt;the 1st level cache in org.apache.openjpa.kernel.Broker?
&lt;br&gt;&lt;br&gt;Thank you for your help.
&lt;br&gt;&lt;br&gt;bye, Georg
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://n2.nabble.com/1st-level-cache-and-query-statistics--tp220964p220964.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/1st-level-cache-and-query-statistics--tp220964p220964.html&lt;/a&gt;&lt;br&gt;Sent from the OpenJPA Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/1st-level-cache-and-query-statistics--tp18274621p18274621.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18273754</id>
	<title>[jira] Commented: (OPENJPA-235) SQL reordering to avoid non-nullable foreign key constraint violations</title>
	<published>2008-07-03T23:39:31Z</published>
	<updated>2008-07-03T23:39:31Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/OPENJPA-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12610463#action_12610463&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/OPENJPA-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12610463#action_12610463&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Roger Keays commented on OPENJPA-235:
&lt;br&gt;-------------------------------------
&lt;br&gt;&lt;br&gt;Hi Fay, Your patch does actually work for me. I just needed to clean and rebuild. Thanks for that, I was tearing my hair out. Will we see the patch applied for 1.1.1?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; SQL reordering to avoid non-nullable foreign key constraint violations
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: OPENJPA-235
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/OPENJPA-235&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/OPENJPA-235&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: OpenJPA
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: kernel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Reece Garrett
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Patrick Linskey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.2.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: merge-detached.patch, merge-testcases.patch, openjpa-235-break-nullable-070716.patch, openjpa-235-break-nullable.patch, openjpa-235-delete-cascade.patch, openjpa-235-test.jar, openjpa-235-test1.jar, openjpa-235-test2.zip, openjpa.patch, openjpa.patch, sqlreorder.patch, sqlReorder2.patch, sqlReorderTests.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; OpenJPA does not do any SQL statement re-ordering in order to resolve foreign key constraints. Instead, objects are always inserted in the order in which the user persists the instances. &amp;nbsp;When you persist in an order that would violate foreign key constraints, OpenJPA attempts to insert null and then update the foreign key value in a separate statement. If you use non-nullable constraints, though, you must persist your objects in the correct order.
&lt;br&gt;&amp;gt; This improvement re-orders SQL statements as follows:
&lt;br&gt;&amp;gt; 1. First, all insert statements execute. Inserts which have foreign keys with non-nullable constraints execute AFTER the foreign keys which they depend on have been inserted since no deferred update is possible.
&lt;br&gt;&amp;gt; 2. Next, all update statements execute. No reordering is necessary.
&lt;br&gt;&amp;gt; 3. &amp;nbsp;Finally, all delete statements execute. Like inserts, deletes execute in an order which does not violate non-nullable foreign key constraints.
&lt;br&gt;&amp;gt; If a circular foreign key reference is found during the re-ordering process then re-ordering halts and the remaining unordered statements are left as is. There is nothing that can be done about the circular reference (other than fixing the schema) and the resulting SQL statements will not succeed.
&lt;br&gt;&amp;gt; The net effect is that users do not need to worry about the persistence order of their objects regardless of non-nullable foreign key constraints. The only class modified was org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager. I have included a patch which includes my modifications to OperationOrderUpdateManager and test cases. The test cases I have provided fail on the current trunk but pass with my modifications. I have also verified that I did not break anything by using maven to run all test cases with my modifications in place.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Developers-f16309.html&quot; embed=&quot;fixTarget[16309]&quot; target=&quot;_top&quot; &gt;OpenJPA Developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Commented%3A-%28OPENJPA-235%29-SQL-reordering-to-avoid-non-nullable-foreign-key-constraint-violations-tp18273754p18273754.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18269574</id>
	<title>svn commit: r673855 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test: PersistenceTestCase.java SingleEMFTestCase.java</title>
	<published>2008-07-03T15:41:07Z</published>
	<updated>2008-07-03T15:41:07Z</updated>
	<author>
		<name>Pinaki Poddar</name>
	</author>
	<content type="html">Author: ppoddar
&lt;br&gt;Date: Thu Jul &amp;nbsp;3 15:41:07 2008
&lt;br&gt;New Revision: 673855
&lt;br&gt;&lt;br&gt;URL: &lt;a href=&quot;http://svn.apache.org/viewvc?rev=673855&amp;view=rev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/viewvc?rev=673855&amp;view=rev&lt;/a&gt;&lt;br&gt;Log:
&lt;br&gt;OPENJPA-652: Formatting to be published base TestCases
&lt;br&gt;&lt;br&gt;Modified:
&lt;br&gt;&amp;nbsp; &amp;nbsp; openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
&lt;br&gt;&amp;nbsp; &amp;nbsp; openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
&lt;br&gt;&lt;br&gt;Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
&lt;br&gt;URL: &lt;a href=&quot;http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java?rev=673855&amp;r1=673854&amp;r2=673855&amp;view=diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java?rev=673855&amp;r1=673854&amp;r2=673855&amp;view=diff&lt;/a&gt;&lt;br&gt;==============================================================================
&lt;br&gt;--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java (original)
&lt;br&gt;+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java Thu Jul &amp;nbsp;3 15:41:07 2008
&lt;br&gt;@@ -43,10 +43,15 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;extends TestCase {
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;- &amp;nbsp; &amp;nbsp; * Marker object you an pass to {@link #setUp} to indicate that the
&lt;br&gt;- &amp;nbsp; &amp;nbsp; * database tables should be cleared.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; * Marker object you pass to {@link #setUp} to indicate that the
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; * database table rows should be cleared.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;protected static final Object CLEAR_TABLES = new Object();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; * Marker object you pass to {@link #setUp} to indicate that the
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; * database table should be dropped and then recreated.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;protected static final Object DROP_TABLES = new Object();
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;@@ -152,7 +157,8 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;- &amp;nbsp; &amp;nbsp; * Closes all open entity managers after first rolling back any open transactions
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; * Closes all open entity managers after first rolling back any open 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; * transactions.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;protected void closeAllOpenEMs(EntityManagerFactory emf) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (emf == null || !emf.isOpen())
&lt;br&gt;@@ -196,15 +202,17 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;protected void clear(EntityManagerFactory emf) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (emf == null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clear(emf, true, ((OpenJPAEntityManagerFactorySPI) emf).getConfiguration().
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getMetaDataRepositoryInstance().getMetaDatas());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clear(emf, true, ((OpenJPAEntityManagerFactorySPI) emf)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;		.getConfiguration()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;		.getMetaDataRepositoryInstance().getMetaDatas());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * Delete all instances of the given types using bulk delete queries.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * @param closeEMs TODO
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;- &amp;nbsp; &amp;nbsp;private void clear(EntityManagerFactory emf, boolean closeEMs, ClassMetaData... types) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;private void clear(EntityManagerFactory emf, boolean closeEMs, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;		ClassMetaData... types) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (emf == null || types.length == 0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&lt;br&gt;Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
&lt;br&gt;URL: &lt;a href=&quot;http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java?rev=673855&amp;r1=673854&amp;r2=673855&amp;view=diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java?rev=673855&amp;r1=673854&amp;r2=673855&amp;view=diff&lt;/a&gt;&lt;br&gt;==============================================================================
&lt;br&gt;--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java (original)
&lt;br&gt;+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java Thu Jul &amp;nbsp;3 15:41:07 2008
&lt;br&gt;@@ -21,6 +21,17 @@
&lt;br&gt;&amp;nbsp;import org.apache.openjpa.jdbc.meta.ClassMapping;
&lt;br&gt;&amp;nbsp;import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+/**
&lt;br&gt;+ * Base class for OpenJPA-specific Test Case.
&lt;br&gt;+ * Provides utilities for configuration setup and persistent entity 
&lt;br&gt;+ * registration during setUp() method.
&lt;br&gt;+ * Derived classes can access protected EntityManagerFactory to create 
&lt;br&gt;+ * EntityManager. The protected EntityManagerFactory is declared to be
&lt;br&gt;+ * OpenJPA-extended SPI interface &amp;lt;code&amp;gt;OpenJPAEntityManagerFactorySPI&amp;lt;/code&amp;gt;
&lt;br&gt;+ * so that derived classes can access internal mapping/metadata/configuration
&lt;br&gt;+ * and other structures. &amp;nbsp;
&lt;br&gt;+ * &amp;nbsp; 
&lt;br&gt;+ */
&lt;br&gt;&amp;nbsp;public abstract class SingleEMFTestCase
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;extends PersistenceTestCase {
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -71,8 +82,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * Get the class mapping for a given entity
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; * @param name
&lt;br&gt;- &amp;nbsp; &amp;nbsp; * &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The Entity's name.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; * @param name The Entity's name.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * @return If the entity is a known type the ClassMapping for the Entity
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; will be returned. Otherwise null
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Commits-f23253.html&quot; embed=&quot;fixTarget[23253]&quot; target=&quot;_top&quot; &gt;OpenJPA Commits&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/svn-commit%3A-r673855---in--openjpa-trunk-openjpa-persistence-jdbc-src-test-java-org-apache-openjpa-persistence-test%3A-PersistenceTestCase.java-SingleEMFTestCase.java-tp18269574p18269574.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18269272</id>
	<title>[CONF] OpenJPA: HowToWriteTestCaseForOpenJPA (page edited)</title>
	<published>2008-07-03T15:16:01Z</published>
	<updated>2008-07-03T15:16:01Z</updated>
	<author>
		<name>confluence-2</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
    &lt;base href=&quot;http://cwiki.apache.org/confluence&quot; /&gt;
    
&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;PageContent&quot;&gt;
&lt;table class=&quot;pagecontent&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tr&gt;
&lt;td valign=&quot;top&quot; class=&quot;pagebody&quot;&gt;

    &lt;div class=&quot;pageheader&quot;&gt;
        &lt;span class=&quot;pagetitle&quot;&gt;
            Page Edited :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;openjpa&lt;/a&gt; :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/HowToWriteTestCaseForOpenJPA&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;HowToWriteTestCaseForOpenJPA&lt;/a&gt;
        &lt;/span&gt;
    &lt;/div&gt;

     &lt;p&gt;
        &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/HowToWriteTestCaseForOpenJPA&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;HowToWriteTestCaseForOpenJPA&lt;/a&gt;
        has been edited by             &lt;a href=&quot;http://cwiki.apache.org/confluence/display/~ppoddar@apache.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pinaki Poddar&lt;/a&gt;
            &lt;span class=&quot;smallfont&quot;&gt;(Jul 03, 2008)&lt;/span&gt;.
     &lt;/p&gt;
    
     &lt;p&gt;
                 &lt;a href=&quot;http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=89791&amp;originalVersion=1&amp;revisedVersion=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;(View changes)&lt;/a&gt;
     &lt;/p&gt;

    &lt;span class=&quot;label&quot;&gt;Content:&lt;/span&gt;&lt;br /&gt;
    &lt;div class=&quot;greybox wiki-content&quot;&gt;&lt;h1&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-HowtowriteTestCaseforOpenJPA%3F&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;How to write TestCase for OpenJPA?&lt;/h1&gt;

&lt;p&gt;OpenJPA Unit Tests are JUnit Tests. Base JUnit TestCase (org.junit.TestCase) has been extended to facilitate common initialization steps or configuration settings required for unit testing OpenJPA. As a test developer, you should inherit your test class from one of the extended TestCases. This also helps the test you write to be integrated with OpenJPA test corpus of approximately 2000 test cases in 400 classes.&lt;br /&gt;
The inheritance hierarchy is:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;junit.framework.TestCase
    org.apache.openjpa.persistence.test.PersistenceTestCase
        org.apache.openjpa.persistence.test.SingleEMFTestCase
            org.apache.openjpa.persistence.test.SQLListenerTestCase&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;SingleEMFTestCase is a good candidate for inheritance unless your test needs to analyze or count number of SQL statements in which case SQLListenerTestCase should be your choice.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-Settingupthetest&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Setting up the test&lt;/h2&gt;

&lt;p&gt; JUnit tests are setup in their setUp method. OpenJPA TestCases augment the setUp() method to accept a list of arguments. In this list, you should specify&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the domain classes used by your test&lt;/li&gt;
	&lt;li&gt;the configuration properties that are critical to your test&lt;/li&gt;
	&lt;li&gt;CLEAR_TABLES or DROP_TABLES : these are constants declared in the superclass which clears the rows or drops the tables altogether.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt; The following example shows how to declare setUp() method in your test class&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; void setUp() &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; Exception {
    setUp(CLEAR_TABLES,                      &lt;span class=&quot;code-comment&quot;&gt;// clears rows from PERSON and ADDRESS table
&lt;/span&gt;          Person.class, Address.class,       &lt;span class=&quot;code-comment&quot;&gt;// registers Person and Address as persistence-capable entity
&lt;/span&gt;          &lt;span class=&quot;code-quote&quot;&gt;&quot;openjpa.Multithreaded&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;);  &lt;span class=&quot;code-comment&quot;&gt;// sets configuration property as name-value pair
&lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-ConfigurationofPersistenceUnit&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Configuration of Persistence Unit&lt;/h3&gt;

&lt;p&gt; Notice that some configuration parameters can be set in the setUp() method of test program itself. This is recommended for properties that are important for your test. The non-critical parameters such as database connection properties (unless your test is about some specific aspect of a particular database) are better be specified in META-INF/persistence.xml.&lt;/p&gt;

&lt;p&gt; The name of the persistence unit is, by default, &quot;test&quot;. But your test should overwrite the name with a more specific unit name. For example,&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; getPersistenceUnitName() {
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;test-eager-fetch&quot;&lt;/span&gt;;
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-CleaningUp&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Cleaning Up&lt;/h3&gt;

&lt;p&gt;Specifying CLEAR_TABLES or DROP_TABLES in the list of setUp() parameters helps to minimize impact of one test on another. Remember that the test you are writing will run with 2000 other tests in a batch.&lt;/p&gt;

&lt;p&gt;JUnit TestCases invoke tearDown() method on termination. SingleEMFTestCase ensures that tearDown() method deletes all rows for the classes involved in your test. While clear-your-own-mess helps in most situations, you may want the database records to remain for analysis especially when tests are failing. In that case you may consider suppressing the superclass behavior of tearDown() by simply nullifying the method as&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; void tearDown() &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; Exception {
     &lt;span class=&quot;code-comment&quot;&gt;// avoids &lt;span class=&quot;code-keyword&quot;&gt;super&lt;/span&gt; class to delete all records
&lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-NamingConvention&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Naming Convention&lt;/h2&gt;

&lt;p&gt; Name your test class and test methods with following guideline in mind&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Test case class names start with &quot;Test&quot; e.g. TestEagerFetch&lt;/li&gt;
	&lt;li&gt;Test method names start with &quot;test&quot; e.g. testUpdateHonoursForeignKeyConstraints()&lt;/li&gt;
	&lt;li&gt;Be generously descriptive with camel case e.g. TestEagerFetch or testFetchGroupLocking()&lt;/li&gt;
	&lt;li&gt;avoid the obvious e.g. TestSelect or testQuery()&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-Domainclasses&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Domain classes&lt;/h2&gt;

&lt;ul&gt;
	&lt;li&gt;Domain classes should avoid common names such as Person or Address.&lt;/li&gt;
	&lt;li&gt;Prefer annotation over XML Descriptors for O-R Mapping because that helps to colocate relevant information. Unless, of course, the test is specific about variations in behavior across annotation and XML Descriptors.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;


&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;
    &lt;tr&gt;
        &lt;td height=&quot;12&quot; background=&quot;http://cwiki.apache.org/confluence/images/border/border_bottom.gif&quot;&gt;&lt;img src=&quot;http://cwiki.apache.org/confluence/images/border/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;div class=&quot;smalltext&quot;&gt;
    Powered by
    &lt;a href=&quot;http://www.atlassian.com/software/confluence/default.jsp?clicked=footer&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Atlassian Confluence&lt;/a&gt;
    (Version: 2.2.9 Build:#527 Sep 07, 2006)
    -
    &lt;a href=&quot;http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Bug/feature request&lt;/a&gt;&lt;br /&gt;
    &lt;br&gt;
    &lt;a href=&quot;http://cwiki.apache.org/confluence/users/viewnotifications.action&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Unsubscribe or edit your notifications preferences&lt;/a&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Commits-f23253.html&quot; embed=&quot;fixTarget[23253]&quot; target=&quot;_top&quot; &gt;OpenJPA Commits&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-CONF--OpenJPA%3A-HowToWriteTestCaseForOpenJPA-%28page-edited%29-tp18269272p18269272.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18269196</id>
	<title>[CONF] OpenJPA: HowToWriteTestCaseForOpenJPA (page created)</title>
	<published>2008-07-03T15:10:02Z</published>
	<updated>2008-07-03T15:10:02Z</updated>
	<author>
		<name>confluence-2</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
    &lt;base href=&quot;http://cwiki.apache.org/confluence&quot; /&gt;
    
&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;PageContent&quot;&gt;
&lt;table class=&quot;pagecontent&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tr&gt;
&lt;td valign=&quot;top&quot; class=&quot;pagebody&quot;&gt;

    &lt;div class=&quot;pageheader&quot;&gt;
        &lt;span class=&quot;pagetitle&quot;&gt;
            Page Created :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;openjpa&lt;/a&gt; :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/HowToWriteTestCaseForOpenJPA&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;HowToWriteTestCaseForOpenJPA&lt;/a&gt;
        &lt;/span&gt;
    &lt;/div&gt;

     &lt;p&gt;
        &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/HowToWriteTestCaseForOpenJPA&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;HowToWriteTestCaseForOpenJPA&lt;/a&gt;
        has been created by             &lt;a href=&quot;http://cwiki.apache.org/confluence/display/~ppoddar@apache.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pinaki Poddar&lt;/a&gt;
            &lt;span class=&quot;smallfont&quot;&gt;(Jul 03, 2008)&lt;/span&gt;.
     &lt;/p&gt;

    &lt;span class=&quot;label&quot;&gt;Content:&lt;/span&gt;&lt;br /&gt;
    &lt;div class=&quot;greybox wiki-content&quot;&gt;&lt;h1&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-HowtowriteTestCaseforOpenJPA%3F&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;How to write TestCase for OpenJPA?&lt;/h1&gt;

&lt;p&gt;OpenJPA Unit Tests are JUnit Tests. Base JUnit TestCase (org.junit.TestCase) has been extended to faciliate common initialization steps or configuration settings required for unit testing OpenJPA. As a test develpoer, you should inherit your test class from one of the extended TestCases. This also helps the test you write to be integrated with OpenJPA test corpus of approximately 2000 test cases in 400 classes.&lt;br /&gt;
The inheritence hierarchy is:&lt;/p&gt;
&lt;div class=&quot;preformatted&quot;&gt;&lt;div class=&quot;preformattedContent&quot;&gt;
&lt;pre&gt;org.junit.TestCase
    org.apache.openjpa.persistence.test.PersistenceTestCase
        org.apache.openjpa.persistence.test.SingleEMFTestCase
            org.apache.openjpa.persistence.test.SQLListenerTestCase
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;SingleEMFTestCase is a good candidate for inheritance unless your test needs to analyze or count number of SQL statements in which case SQLListenerTestCase should be your choice.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-Settingupthetest&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Setting up the test&lt;/h2&gt;

&lt;p&gt; JUnit tests are setup in their setUp method. OpenJPA TestCases augment the setUp() method to accept a list of arguments. In this list, you should specify&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the domain classes used by your test&lt;/li&gt;
	&lt;li&gt;the configuration properties that are critical to your test&lt;/li&gt;
	&lt;li&gt;CLEAR_TABLES or DROP_TABLES : these are constants declared in the superclass which clears the rows or drops the tables altogether.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt; The following example shows how to declare setUp() method in your test class&lt;/p&gt;
&lt;div class=&quot;preformatted&quot;&gt;&lt;div class=&quot;preformattedContent&quot;&gt;
&lt;pre&gt;public void setUp() throws Exception {
    setUp(CLEAR_TABLES,                      // clears rows from PERSON and ADDRESS table
          Person.class, Address.class,       // registers Person and Address as persistence-capable entity
          &quot;openjpa.Multithreaded&quot;, &quot;true&quot;);  // sets configuration property as name-value pair
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-ConfigurationofPersistenceUnit&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Configuration of Persistence Unit&lt;/h3&gt;

&lt;p&gt; Notice that some configuration parameters can be set in the setUp() method of test program itself. This is recommended for properties that are important for your test. The non-critical parameters such as database connection properties (unless your test is about some specific aspect of a particular database) are better be specified in META-INF/persistence.xml.&lt;/p&gt;

&lt;p&gt; The name of the persistence unit is, by default, &quot;test&quot;. But your test should overwrite the name with a more specific unit name. For example,&lt;/p&gt;

&lt;div class=&quot;preformatted&quot;&gt;&lt;div class=&quot;preformattedContent&quot;&gt;
&lt;pre&gt;protected String getPersistenceUnitName() {
    return &quot;test-eager-fetch&quot;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-CleaningUp&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Cleaning Up&lt;/h3&gt;

&lt;p&gt;Specifying CLEAR_TABLES or DROP_TABLES in the list of setUp() parameters helps to minimize impact of one test on another. Remember that the test you are writing will run with 2000 other tests in a batch.&lt;/p&gt;

&lt;p&gt;JUnit TestCases invoke tearDown() method on termination. SingleEMFTestCase ensures that tearDown() method deletes all rows for the classes involved in your test. While clear-your-own-mess helps in most situations, you may want the database records to remain for analysis especially when tests are failing. In that case you may consider suppressing the superclass behavior of tearDown() by simply nullifying the method as&lt;/p&gt;
&lt;div class=&quot;preformatted&quot;&gt;&lt;div class=&quot;preformattedContent&quot;&gt;
&lt;pre&gt;public void tearDown() throws Exception {
     // avoids super class to delete all records
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-NamingConvention&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Naming Convention&lt;/h2&gt;

&lt;p&gt; Name your test class and test methods with following guideline in mind&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Test case class names start with &quot;Test&quot; e.g. TestEagerFetch&lt;/li&gt;
	&lt;li&gt;Test method names start with &quot;test&quot; e.g. testUpdateHonoursForeignKeyConstraints()&lt;/li&gt;
	&lt;li&gt;Be generously descriptive with camel case e.g. TestEagerFetch or testFetchGroupLocking()&lt;/li&gt;
	&lt;li&gt;avoid the obvious e.g. TestSelect or testQuery()&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;&lt;a name=&quot;HowToWriteTestCaseForOpenJPA-Domainclasses&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Domain classes&lt;/h2&gt;

&lt;ul&gt;
	&lt;li&gt;Domain classes should avoid common names such as Person or Address.&lt;/li&gt;
	&lt;li&gt;Prefer annotation over XML Descriptors for O-R Mapping because that helps to colocate relevant information. Unless, of course, the test is specifc about variations in behavior across annotation and XML Descriptors.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;


&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;
    &lt;tr&gt;
        &lt;td height=&quot;12&quot; background=&quot;http://cwiki.apache.org/confluence/images/border/border_bottom.gif&quot;&gt;&lt;img src=&quot;http://cwiki.apache.org/confluence/images/border/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;div class=&quot;smalltext&quot;&gt;
    Powered by
    &lt;a href=&quot;http://www.atlassian.com/software/confluence/default.jsp?clicked=footer&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Atlassian Confluence&lt;/a&gt;
    (Version: 2.2.9 Build:#527 Sep 07, 2006)
    -
    &lt;a href=&quot;http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Bug/feature request&lt;/a&gt;&lt;br /&gt;
    &lt;br&gt;
    &lt;a href=&quot;http://cwiki.apache.org/confluence/users/viewnotifications.action&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Unsubscribe or edit your notifications preferences&lt;/a&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Commits-f23253.html&quot; embed=&quot;fixTarget[23253]&quot; target=&quot;_top&quot; &gt;OpenJPA Commits&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-CONF--OpenJPA%3A-HowToWriteTestCaseForOpenJPA-%28page-created%29-tp18269196p18269196.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18264972</id>
	<title>[jira] Created: (OPENJPA-652) Collaborative Testing: provide resources/tools to facilitate user community to contribute unit tests for OpenJPA</title>
	<published>2008-07-03T10:51:45Z</published>
	<updated>2008-07-03T10:51:45Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">Collaborative Testing: provide resources/tools to facilitate user community to contribute unit tests for OpenJPA &amp;nbsp;
&lt;br&gt;------------------------------------------------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: OPENJPA-652
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/OPENJPA-652&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/OPENJPA-652&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: OpenJPA
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: New Feature
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: build / infrastructure
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Pinaki Poddar
&lt;br&gt;&lt;br&gt;&lt;br&gt;A growing body of developers are using OpenJPA and reporting their use case scenarios, error report via the Nabble posts. This process generates wealth of unstructured information.
&lt;br&gt;&lt;br&gt;&amp;nbsp; Here is a proposal to add some more structure to it:
&lt;br&gt;&lt;br&gt;1. We publish and distribute the common utilities of OpenJPA's JUnit based test harness.
&lt;br&gt;2. We request/mandate that submission of a JIRA report accompany a test case written in accordance to OpenJPA-JUnit based tests.
&lt;br&gt;&lt;br&gt;This way, we can build a diverse test corpus gradually.
&lt;br&gt;&lt;br&gt;To get this done, we need to
&lt;br&gt;1. Document our JUnit Test harness related classes (such as SingleEMFTestCase etc.). They already are well-documented -- perhaps a small write-up on 'How to write OpenJPA test' manual.
&lt;br&gt;2. Extend our build so that these tests classes are distributed with their source code in a separate bundle. &amp;nbsp;
&lt;br&gt;3. Promote the users' to contribute their test cases
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Developers-f16309.html&quot; embed=&quot;fixTarget[16309]&quot; target=&quot;_top&quot; &gt;OpenJPA Developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28OPENJPA-652%29-Collaborative-Testing%3A-provide-resources-tools-to-facilitate-user-community-to-contribute-unit-tests-for-OpenJPA-tp18264972p18264972.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18262595</id>
	<title>Callback to/from entity transactions</title>
	<published>2008-07-03T08:57:01Z</published>
	<updated>2008-07-03T08:57:01Z</updated>
	<author>
		<name>Dirk Brenckmann</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Q: Is there a way to access/get back exceptions thrown within the persistance/transaction layer?
&lt;br&gt;&lt;br&gt;Example:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Code (pseudo):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sateless session bean::SomeEntity someMethod( SomeEntity entity ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return this.getEntityManager().merge( entity );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Server:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Duplicate entry '0-shortname 1-0000-00-00 00:00:00' for key 2
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Client:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Will get SomeEntity with all fields set to null/default.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Well - I would have expected something like 'null' to be returned or an exception to be thrown, but I have to admit I did not yet fully read the specs... Nvm I can handle the returned value anyway.
&lt;br&gt;But:
&lt;br&gt;I'd like to give the user a feedback like &amp;quot;... already exists!&amp;quot; which I can do soley if I get access to the exception thrown on the transaction layer. Is there something like @TransactionCallback?
&lt;br&gt;Or maybe I went wrong somwhere else?
&lt;br&gt;&lt;br&gt;Thank you in advance.
&lt;br&gt;-- 
&lt;br&gt;Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
&lt;br&gt;Der Eine für Alle: &lt;a href=&quot;http://www.gmx.net/de/go/messenger03&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gmx.net/de/go/messenger03&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Callback-to-from-entity-transactions-tp18262595p18262595.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18262453</id>
	<title>Collaborative Testing</title>
	<published>2008-07-03T08:50:14Z</published>
	<updated>2008-07-03T08:50:14Z</updated>
	<author>
		<name>Pinaki Poddar</name>
	</author>
	<content type="html">&lt;br&gt;Hi, 
&lt;br&gt;&amp;nbsp; &amp;nbsp;A growing body of developers are using OpenJPA and reporting their use
&lt;br&gt;case scenarios, error report via the Nabble posts. This process generates
&lt;br&gt;wealth of unstructured information.
&lt;br&gt;&lt;br&gt;&amp;nbsp; Here is a proposal to add some structure to it: 
&lt;br&gt;&lt;br&gt;1. We publish and distribute the common utilities of OpenJPA's JUnit based
&lt;br&gt;test harness. 
&lt;br&gt;2. We request/mandate that submission of a JIRA report accompany a test case
&lt;br&gt;written in accordance to OpenJPA-JUnit based tests. 
&lt;br&gt;&lt;br&gt;This way, we can build a diverse test corpus gradually. 
&lt;br&gt;&lt;br&gt;To get this done, we need to 
&lt;br&gt;1. Document our JUnit Test harness related classes (such as
&lt;br&gt;SingleEMFTestCase etc.). They already are well-documented -- perhaps a small
&lt;br&gt;write-up on 'How to write OpenJPA test' manual. 
&lt;br&gt;2. Extend our build so that these tests classes are distributed with their
&lt;br&gt;source code in a separate bundle. &amp;nbsp; 
&lt;br&gt;3. Promote the users' to contribute their test cases 
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://n2.nabble.com/Collaborative-Testing-tp220418p220418.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://n2.nabble.com/Collaborative-Testing-tp220418p220418.html&lt;/a&gt;&lt;br&gt;Sent from the OpenJPA Developers mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Developers-f16309.html&quot; embed=&quot;fixTarget[16309]&quot; target=&quot;_top&quot; &gt;OpenJPA Developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Collaborative-Testing-tp18262453p18262453.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18262075</id>
	<title>Query to return shared data for performance reasons.</title>
	<published>2008-07-03T08:31:18Z</published>
	<updated>2008-07-03T08:31:18Z</updated>
	<author>
		<name>Gustav Trede-2</name>
	</author>
	<content type="html">hello,
&lt;br&gt;&lt;br&gt;Im interested in helping openjpa to implement that query can return 
&lt;br&gt;shared objects from the cache.
&lt;br&gt;&lt;br&gt;On many usage cases its only of interest to read data, no need to get a 
&lt;br&gt;clone/copy then.
&lt;br&gt;(and yes its up to the user to not actually edit the returned data.)
&lt;br&gt;&lt;br&gt;This exists in eclipselink and works good, QueryHints.READ_ONLY.
&lt;br&gt;&lt;br&gt;Could i please get some initial help, &amp;nbsp;where to do this in the code base 
&lt;br&gt;in a nice way ?.
&lt;br&gt;&lt;br&gt;regards
&lt;br&gt;gustav 
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Users-f23252.html&quot; embed=&quot;fixTarget[23252]&quot; target=&quot;_top&quot; &gt;OpenJPA Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Query-to-return-shared-data-for-performance-reasons.-tp18262075p18262075.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18260257</id>
	<title>[CONF] OpenJPA: FAQ (comment added)</title>
	<published>2008-07-03T07:07:00Z</published>
	<updated>2008-07-03T07:07:00Z</updated>
	<author>
		<name>confluence-2</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
    &lt;base href=&quot;http://cwiki.apache.org/confluence&quot; /&gt;
    
&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;PageContent&quot;&gt;
&lt;table class=&quot;pagecontent&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tr&gt;
&lt;td valign=&quot;top&quot; class=&quot;pagebody&quot;&gt;

&lt;div class=&quot;pageheader&quot;&gt;
    &lt;span class=&quot;pagetitle&quot;&gt;
        Comment Added :
        &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;openjpa&lt;/a&gt; :
        &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/FAQ?focusedCommentId=89761#comment-89761&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Re: FAQ&lt;/a&gt;
    &lt;/span&gt;
&lt;/div&gt;

&lt;p&gt;
    &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/FAQ?focusedCommentId=89761#comment-89761&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;FAQ&lt;/a&gt;
    commented on by             &lt;a href=&quot;http://cwiki.apache.org/confluence/display/~michael.d.dick@gmail.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Michael Dick&lt;/a&gt;
        &lt;span class=&quot;smallfont&quot;&gt;(Jul 03, 2008)&lt;/span&gt;.
&lt;/p&gt;

&lt;span class=&quot;label&quot;&gt;Comment:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;greybox wiki-content&quot;&gt;&lt;p&gt;Thanks for pointing these out Jonas. I've updated the page. &lt;/p&gt;&lt;/div&gt;


&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;
    &lt;tr&gt;
        &lt;td height=&quot;12&quot; background=&quot;http://cwiki.apache.org/confluence/images/border/border_bottom.gif&quot;&gt;&lt;img src=&quot;http://cwiki.apache.org/confluence/images/border/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;div class=&quot;smalltext&quot;&gt;
    Powered by
    &lt;a href=&quot;http://www.atlassian.com/software/confluence/default.jsp?clicked=footer&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Atlassian Confluence&lt;/a&gt;
    (Version: 2.2.9 Build:#527 Sep 07, 2006)
    -
    &lt;a href=&quot;http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Bug/feature request&lt;/a&gt;&lt;br /&gt;
    &lt;br&gt;
    &lt;a href=&quot;http://cwiki.apache.org/confluence/users/viewnotifications.action&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Unsubscribe or edit your notifications preferences&lt;/a&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/OpenJPA-Commits-f23253.html&quot; embed=&quot;fixTarget[23253]&quot; target=&quot;_top&quot; &gt;OpenJPA Commits&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-CONF--OpenJPA%3A-FAQ-%28comment-added%29-tp18260257p18260257.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18260238</id>
	<title>[CONF] OpenJPA: FAQ (page edited)</title>
	<published>2008-07-03T07:06:00Z</published>
	<updated>2008-07-03T07:06:00Z</updated>
	<author>
		<name>confluence-2</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
    &lt;base href=&quot;http://cwiki.apache.org/confluence&quot; /&gt;
    
&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;PageContent&quot;&gt;
&lt;table class=&quot;pagecontent&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tr&gt;
&lt;td valign=&quot;top&quot; class=&quot;pagebody&quot;&gt;

    &lt;div class=&quot;pageheader&quot;&gt;
        &lt;span class=&quot;pagetitle&quot;&gt;
            Page Edited :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;openjpa&lt;/a&gt; :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/FAQ&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;FAQ&lt;/a&gt;
        &lt;/span&gt;
    &lt;/div&gt;

     &lt;p&gt;
        &lt;a href=&quot;http://cwiki.apache.org/confluence/display/openjpa/FAQ&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;FAQ&lt;/a&gt;
        has been edited by             &lt;a href=&quot;http://cwiki.apache.org/confluence/display/~michael.d.dick@gmail.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Michael Dick&lt;/a&gt;
            &lt;span class=&quot;smallfont&quot;&gt;(Jul 03, 2008)&lt;/span&gt;.
     &lt;/p&gt;
    &lt;p&gt;
      Change summary:
      &lt;div class=&quot;greybox wiki-content&quot;&gt;&lt;p&gt;Updating typos based on Jonas Petersen's comments&lt;/p&gt;&lt;/div&gt;
    &lt;/p&gt;
     &lt;p&gt;
                 &lt;a href=&quot;http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=23625&amp;originalVersion=8&amp;revisedVersion=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;(View changes)&lt;/a&gt;
     &lt;/p&gt;

    &lt;span class=&quot;label&quot;&gt;Content:&lt;/span&gt;&lt;br /&gt;
    &lt;div class=&quot;greybox wiki-content&quot;&gt;

&lt;h1&gt;&lt;a name=&quot;FAQ-FAQ&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;FAQ&lt;/h1&gt;

&lt;h2&gt;&lt;a name=&quot;FAQ-General&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;General&lt;/h2&gt;

&lt;h4&gt;&lt;a name=&quot;FAQ-WhatisOpenJPA%3F&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;What is OpenJPA?&lt;/h4&gt;

&lt;p&gt;OpenJPA is a 100% open-source implementation of the Java Persistence API (JPA), which is the persistence component for EJB in the &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://java.sun.com/javaee/&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;Java EE 5 specification&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;FAQ-WhatisthehistoryofOpenJPA%3F&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;What is the history of OpenJPA?&lt;/h4&gt;

&lt;p&gt;OpenJPA has its roots in the popular Kodo product, which was created by SolarMetric, Inc. in 2001. BEA Systems, Inc. purchased SolarMetric in November of 2005, and soon thereafter &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://dev2dev.bea.com/pub/a/2006/02/interview-kodo-opensource.html&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;announced&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; that they would be donating the bulk of the code to the Apache Software Foundation. OpenJPA is the result of that donation.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;FAQ-WhatisthecurrentrelationshipbetweenKodoandOpenJPA%3F&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;What is the current relationship between Kodo and OpenJPA?&lt;/h4&gt;

&lt;p&gt;Version 4.1 of Kodo will be based on the OpenJPA code base.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;FAQ-Whatisthecurrentstatus