This one looks related, apparently was fixed: https://issues.apache.org/jira/browse/OPENJPA-2056
Please make pure JPA test code working first and then we will proceed from there
Sergey On 04/09/13 16:58, Sergey Beryozkin wrote:
I've run a test with OpenJPA 2.2.0 and HSQLDB, and it works for me. I just quickly modified one of the existing tests, typed: @Test public void testPatient() throws Exception { SearchCondition<Patient> filter = new FiqlParser<Patient>(Patient.class, null, null).parse("firstname==Barry"); SearchConditionVisitor<Patient, TypedQuery<Patient>> jpa = new JPATypedQueryVisitor<Patient>(em, Patient.class, null, null); filter.accept(jpa); TypedQuery<Patient> query = jpa.getQuery(); List<Patient> list = query.getResultList(); Patient p = list.get(0); assertEquals("Barry", p.getFirstname()); } where I added a single Patient Barry to the test DB, OpenJPA prints out it can't dynamically enhance Patient: 431 testUnitOpenJPA INFO [main] openjpa.Runtime - OpenJPA dynamically loaded the class enhancer. Any classes that were not enhanced at build time will be enhanced when they are loaded by the JVM. 456 testUnitOpenJPA INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0 485 testUnitOpenJPA INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.HSQLDictionary". 1289 testUnitOpenJPA WARN [main] openjpa.MetaData - Meta class "org.apache.cxf.jaxrs.ext.search.jpa.Patient_" for entity class org.apache.cxf.jaxrs.ext.search.jpa.Patient can not be registered with following exception "java.security.PrivilegedActionException: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.ext.search.jpa.Patient_" but otherwise test passes. I think the issue is in the OpenJpa Postgress adapter but it needs to be confirmed first. I'd like to suggest you do the following: - ask at OpenJPA forums if they've heard of such Postgresql related issues - do a pure JPA code bypassing CXF which queries Postgresql and it it works - share it with us - I will compare it with how CXF does it Cheers, Sergey On 04/09/13 15:57, gsilverman wrote:Thanks for replying. We are using Postgresql v 9 and I can't change that. Here is my patient entity class. It's nothing special: @Entity @Table(name="patients") public class Patient implements Serializable { private static final long serialVersionUID = 1L; @Id private String patientid; private Boolean active; @Temporal(TemporalType.DATE) private Date addedat; private String address1; private String address2; private String altphoneneumber; private String billtotype; private String chartnumber; private String city; private String country; @Temporal(TemporalType.DATE) private Date dateofbirth; private String driverslicense; private String emailaddress; private String firstname; private String gender; private String language; private String lasteligibilityresult; private String lasteligibilityresultobm; private Timestamp lasteligibilitytimestamp; private Timestamp lasteligibilitytimestampobm; private Timestamp lasteligibilityverification; private Timestamp lasteligibilityverificationobm; private String lastname; private String maritalstatus; private String middleinitial; private Timestamp modifiedat; private String nameofspouse; private String patientnumber; private String phonenumber; private String ssn; private String state; private String zip; //bi-directional many-to-one association to Patientemployer @ManyToOne @JoinColumn(name="patientemployerid") private Patientemployer patientemployer; @OneToMany(mappedBy = "patient", fetch = FetchType.LAZY) private List<Workerscompclaim> workerscompclaims; public Patient() { } public String getPatientid() { return this.patientid; } public void setPatientid(String patientid) { this.patientid = patientid; } public Boolean getActive() { return this.active; } public void setActive(Boolean active) { this.active = active; } public Date getAddedat() { return this.addedat; } public void setAddedat(Date addedat) { this.addedat = addedat; } public String getAddress1() { return this.address1; } public void setAddress1(String address1) { this.address1 = address1; } public String getAddress2() { return this.address2; } public void setAddress2(String address2) { this.address2 = address2; } public String getAltphoneneumber() { return this.altphoneneumber; } public void setAltphoneneumber(String altphoneneumber) { this.altphoneneumber = altphoneneumber; } public String getBilltotype() { return this.billtotype; } public void setBilltotype(String billtotype) { this.billtotype = billtotype; } public String getChartnumber() { return this.chartnumber; } public void setChartnumber(String chartnumber) { this.chartnumber = chartnumber; } public String getCity() { return this.city; } public void setCity(String city) { this.city = city; } public String getCountry() { return this.country; } public void setCountry(String country) { this.country = country; } public Date getDateofbirth() { return this.dateofbirth; } public void setDateofbirth(Date dateofbirth) { this.dateofbirth = dateofbirth; } public String getDriverslicense() { return this.driverslicense; } public void setDriverslicense(String driverslicense) { this.driverslicense = driverslicense; } public String getEmailaddress() { return this.emailaddress; } public void setEmailaddress(String emailaddress) { this.emailaddress = emailaddress; } public String getFirstname() { return this.firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getGender() { return this.gender; } public void setGender(String gender) { this.gender = gender; } public String getLanguage() { return this.language; } public void setLanguage(String language) { this.language = language; } public String getLasteligibilityresult() { return this.lasteligibilityresult; } public void setLasteligibilityresult(String lasteligibilityresult) { this.lasteligibilityresult = lasteligibilityresult; } public String getLasteligibilityresultobm() { return this.lasteligibilityresultobm; } public void setLasteligibilityresultobm(String lasteligibilityresultobm) { this.lasteligibilityresultobm = lasteligibilityresultobm; } public Timestamp getLasteligibilitytimestamp() { return this.lasteligibilitytimestamp; } public void setLasteligibilitytimestamp(Timestamp lasteligibilitytimestamp) { this.lasteligibilitytimestamp = lasteligibilitytimestamp; } public Timestamp getLasteligibilitytimestampobm() { return this.lasteligibilitytimestampobm; } public void setLasteligibilitytimestampobm(Timestamp lasteligibilitytimestampobm) { this.lasteligibilitytimestampobm = lasteligibilitytimestampobm; } public Timestamp getLasteligibilityverification() { return this.lasteligibilityverification; } public void setLasteligibilityverification(Timestamp lasteligibilityverification) { this.lasteligibilityverification = lasteligibilityverification; } public Timestamp getLasteligibilityverificationobm() { return this.lasteligibilityverificationobm; } public void setLasteligibilityverificationobm(Timestamp lasteligibilityverificationobm) { this.lasteligibilityverificationobm = lasteligibilityverificationobm; } public String getLastname() { return this.lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getMaritalstatus() { return this.maritalstatus; } public void setMaritalstatus(String maritalstatus) { this.maritalstatus = maritalstatus; } public String getMiddleinitial() { return this.middleinitial; } public void setMiddleinitial(String middleinitial) { this.middleinitial = middleinitial; } public Timestamp getModifiedat() { return this.modifiedat; } public void setModifiedat(Timestamp modifiedat) { this.modifiedat = modifiedat; } public String getNameofspouse() { return this.nameofspouse; } public void setNameofspouse(String nameofspouse) { this.nameofspouse = nameofspouse; } public String getPatientnumber() { return this.patientnumber; } public void setPatientnumber(String patientnumber) { this.patientnumber = patientnumber; } public String getPhonenumber() { return this.phonenumber; } public void setPhonenumber(String phonenumber) { this.phonenumber = phonenumber; } public String getSsn() { return this.ssn; } public void setSsn(String ssn) { this.ssn = ssn; } public String getState() { return this.state; } public void setState(String state) { this.state = state; } public String getZip() { return this.zip; } public void setZip(String zip) { this.zip = zip; } public Patientemployer getPatientemployer() { return this.patientemployer; } public void setPatientemployer(Patientemployer patientemployer) { this.patientemployer = patientemployer; } public List<Workerscompclaim> getWorkerscompclaims() { return workerscompclaims; } public void setWorkerscompclaims(List<Workerscompclaim> workerscompclaims) { this.workerscompclaims = workerscompclaims; } } Can you tell me if there is a possible workaround should this prove to be a postgresql issue? -- View this message in context: http://cxf.547215.n5.nabble.com/FIQL-error-unterminated-quoted-string-at-or-near-tp5733495p5733520.html Sent from the cxf-user mailing list archive at Nabble.com.
-- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com
