From noreply at atlassian.com Sat Aug 1 12:46:12 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Sat, 1 Aug 2009 11:46:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Moved: (HV-196) validateValue incorrectly reports java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person In-Reply-To: <278757689.14681249076651986.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1829131979.14721249145172457.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard moved BVAL-175 to HV-196: ------------------------------------------ Affects Version/s: (was: 4.0.0.Alpha2) 4.0.0.Beta2 Key: HV-196 (was: BVAL-175) Project: Hibernate Validator (was: Bean Validation) > validateValue incorrectly reports java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person > ----------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-196 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-196 > Project: Hibernate Validator > Issue Type: Bug > Affects Versions: 4.0.0.Beta2 > Environment: HEAD of JSR-303 RI > Reporter: Ed Burns > Attachments: simple-bv-servlet.war > > > Calling validator.validateValue() seems to fail when it shouldn't. > Consider this pojo: > 8<---------------------------------- > package simple_bv_servlet; > import java.util.List; > import javax.validation.constraints.NotNull; > public class Person { > @NotNull > private String firstName; > public String getFirstName() { > return firstName; > } > public void setFirstName(String firstName) { > this.firstName = firstName; > } > @NotNull > private String lastName; > public String getLastName() { > return lastName; > } > public void setLastName(String lastName) { > this.lastName = lastName; > } > private List listOfString; > public List getListOfString() { > return listOfString; > } > public void setListOfString(List listOfString) { > this.listOfString = listOfString; > } > > } > 8<---------------------------- > And consider this selvlet which validates this pojo in its doGet() impl. > 8<-------------------------------------- > package simple_bv_servlet; > import java.io.IOException; > import java.io.PrintWriter; > import java.util.ArrayList; > import java.util.List; > import java.util.Set; > import javax.servlet.ServletException; > import javax.servlet.http.HttpServlet; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > import javax.validation.ConstraintViolation; > import javax.validation.Validation; > import javax.validation.ValidatorContext; > import javax.validation.ValidatorFactory; > public class SimpleBVServlet extends HttpServlet { > @Override > protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { > PrintWriter out = resp.getWriter(); > resp.setContentType("text/html"); > out.print("SimpleBVServlet"); > > ValidatorFactory validatorFactory = null; > > validatorFactory = Validation.buildDefaultValidatorFactory(); > > out.print("

"); > out.print("Obtained ValidatorFactory: " + validatorFactory + "."); > out.print("

"); > > ValidatorContext validatorContext = validatorFactory.usingContext(); > javax.validation.Validator beanValidator = validatorContext.getValidator(); > out.print("

"); > out.print("Validating invalid person class using validateValue."); > out.print("

"); > > List value = new ArrayList(); > value.add("one"); > value.add("two"); > value.add("three"); > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > Person person = new Person(); > > out.print("

"); > out.print("Validating invalid person instance using validate."); > out.print("

"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print("

"); > out.print("Validating valid person."); > out.print("

"); > > person.setFirstName("John"); > person.setLastName("Yaya"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print(""); > > } > > > } > 8<------------------------ > The call to > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > causes this exception to be thrown: > java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person > But I say, doch, there is such a property on the Person. > This is new behavior in 4.0.0.Beta2, and it's breaking Glassfish. > Thanks, > Ed -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 1 12:48:12 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Sat, 1 Aug 2009 11:48:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-196) validateValue incorrectly reports java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person In-Reply-To: <278757689.14681249076651986.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <509923463.14751249145292203.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33692#action_33692 ] Emmanuel Bernard commented on HV-196: ------------------------------------- Reproduced. Need to investigate on two fronts: - fix to comply with the contract - should the contract be altered to ignored nonexisting properties? > validateValue incorrectly reports java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person > ----------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-196 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-196 > Project: Hibernate Validator > Issue Type: Bug > Affects Versions: 4.0.0.Beta2 > Environment: HEAD of JSR-303 RI > Reporter: Ed Burns > Attachments: simple-bv-servlet.war > > > Calling validator.validateValue() seems to fail when it shouldn't. > Consider this pojo: > 8<---------------------------------- > package simple_bv_servlet; > import java.util.List; > import javax.validation.constraints.NotNull; > public class Person { > @NotNull > private String firstName; > public String getFirstName() { > return firstName; > } > public void setFirstName(String firstName) { > this.firstName = firstName; > } > @NotNull > private String lastName; > public String getLastName() { > return lastName; > } > public void setLastName(String lastName) { > this.lastName = lastName; > } > private List listOfString; > public List getListOfString() { > return listOfString; > } > public void setListOfString(List listOfString) { > this.listOfString = listOfString; > } > > } > 8<---------------------------- > And consider this selvlet which validates this pojo in its doGet() impl. > 8<-------------------------------------- > package simple_bv_servlet; > import java.io.IOException; > import java.io.PrintWriter; > import java.util.ArrayList; > import java.util.List; > import java.util.Set; > import javax.servlet.ServletException; > import javax.servlet.http.HttpServlet; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > import javax.validation.ConstraintViolation; > import javax.validation.Validation; > import javax.validation.ValidatorContext; > import javax.validation.ValidatorFactory; > public class SimpleBVServlet extends HttpServlet { > @Override > protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { > PrintWriter out = resp.getWriter(); > resp.setContentType("text/html"); > out.print("SimpleBVServlet"); > > ValidatorFactory validatorFactory = null; > > validatorFactory = Validation.buildDefaultValidatorFactory(); > > out.print("

"); > out.print("Obtained ValidatorFactory: " + validatorFactory + "."); > out.print("

"); > > ValidatorContext validatorContext = validatorFactory.usingContext(); > javax.validation.Validator beanValidator = validatorContext.getValidator(); > out.print("

"); > out.print("Validating invalid person class using validateValue."); > out.print("

"); > > List value = new ArrayList(); > value.add("one"); > value.add("two"); > value.add("three"); > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > Person person = new Person(); > > out.print("

"); > out.print("Validating invalid person instance using validate."); > out.print("

"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print("

"); > out.print("Validating valid person."); > out.print("

"); > > person.setFirstName("John"); > person.setLastName("Yaya"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print(""); > > } > > > } > 8<------------------------ > The call to > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > causes this exception to be thrown: > java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person > But I say, doch, there is such a property on the Person. > This is new behavior in 4.0.0.Beta2, and it's breaking Glassfish. > Thanks, > Ed -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 1 15:58:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Sat, 1 Aug 2009 14:58:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-196) validateValue incorrectly reports java.lang.IllegalArgumentException on non constrained properties In-Reply-To: <278757689.14681249076651986.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <261663452.14771249156693710.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard updated HV-196: -------------------------------- Fix Version/s: 4.0.0.CR1 Summary: validateValue incorrectly reports java.lang.IllegalArgumentException on non constrained properties (was: validateValue incorrectly reports java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person) Component/s: engine > validateValue incorrectly reports java.lang.IllegalArgumentException on non constrained properties > -------------------------------------------------------------------------------------------------- > > Key: HV-196 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-196 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Environment: HEAD of JSR-303 RI > Reporter: Ed Burns > Fix For: 4.0.0.CR1 > > Attachments: simple-bv-servlet.war > > > Calling validator.validateValue() seems to fail when it shouldn't. > Consider this pojo: > 8<---------------------------------- > package simple_bv_servlet; > import java.util.List; > import javax.validation.constraints.NotNull; > public class Person { > @NotNull > private String firstName; > public String getFirstName() { > return firstName; > } > public void setFirstName(String firstName) { > this.firstName = firstName; > } > @NotNull > private String lastName; > public String getLastName() { > return lastName; > } > public void setLastName(String lastName) { > this.lastName = lastName; > } > private List listOfString; > public List getListOfString() { > return listOfString; > } > public void setListOfString(List listOfString) { > this.listOfString = listOfString; > } > > } > 8<---------------------------- > And consider this selvlet which validates this pojo in its doGet() impl. > 8<-------------------------------------- > package simple_bv_servlet; > import java.io.IOException; > import java.io.PrintWriter; > import java.util.ArrayList; > import java.util.List; > import java.util.Set; > import javax.servlet.ServletException; > import javax.servlet.http.HttpServlet; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > import javax.validation.ConstraintViolation; > import javax.validation.Validation; > import javax.validation.ValidatorContext; > import javax.validation.ValidatorFactory; > public class SimpleBVServlet extends HttpServlet { > @Override > protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { > PrintWriter out = resp.getWriter(); > resp.setContentType("text/html"); > out.print("SimpleBVServlet"); > > ValidatorFactory validatorFactory = null; > > validatorFactory = Validation.buildDefaultValidatorFactory(); > > out.print("

"); > out.print("Obtained ValidatorFactory: " + validatorFactory + "."); > out.print("

"); > > ValidatorContext validatorContext = validatorFactory.usingContext(); > javax.validation.Validator beanValidator = validatorContext.getValidator(); > out.print("

"); > out.print("Validating invalid person class using validateValue."); > out.print("

"); > > List value = new ArrayList(); > value.add("one"); > value.add("two"); > value.add("three"); > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > Person person = new Person(); > > out.print("

"); > out.print("Validating invalid person instance using validate."); > out.print("

"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print("

"); > out.print("Validating valid person."); > out.print("

"); > > person.setFirstName("John"); > person.setLastName("Yaya"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print(""); > > } > > > } > 8<------------------------ > The call to > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > causes this exception to be thrown: > java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person > But I say, doch, there is such a property on the Person. > This is new behavior in 4.0.0.Beta2, and it's breaking Glassfish. > Thanks, > Ed -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 1 16:00:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Sat, 1 Aug 2009 15:00:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-196) validateValue incorrectly reports java.lang.IllegalArgumentException on non constrained properties In-Reply-To: <278757689.14681249076651986.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <351231628.14791249156813862.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard resolved HV-196. --------------------------------- Resolution: Fixed > validateValue incorrectly reports java.lang.IllegalArgumentException on non constrained properties > -------------------------------------------------------------------------------------------------- > > Key: HV-196 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-196 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Environment: HEAD of JSR-303 RI > Reporter: Ed Burns > Fix For: 4.0.0.CR1 > > Attachments: simple-bv-servlet.war > > > Calling validator.validateValue() seems to fail when it shouldn't. > Consider this pojo: > 8<---------------------------------- > package simple_bv_servlet; > import java.util.List; > import javax.validation.constraints.NotNull; > public class Person { > @NotNull > private String firstName; > public String getFirstName() { > return firstName; > } > public void setFirstName(String firstName) { > this.firstName = firstName; > } > @NotNull > private String lastName; > public String getLastName() { > return lastName; > } > public void setLastName(String lastName) { > this.lastName = lastName; > } > private List listOfString; > public List getListOfString() { > return listOfString; > } > public void setListOfString(List listOfString) { > this.listOfString = listOfString; > } > > } > 8<---------------------------- > And consider this selvlet which validates this pojo in its doGet() impl. > 8<-------------------------------------- > package simple_bv_servlet; > import java.io.IOException; > import java.io.PrintWriter; > import java.util.ArrayList; > import java.util.List; > import java.util.Set; > import javax.servlet.ServletException; > import javax.servlet.http.HttpServlet; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > import javax.validation.ConstraintViolation; > import javax.validation.Validation; > import javax.validation.ValidatorContext; > import javax.validation.ValidatorFactory; > public class SimpleBVServlet extends HttpServlet { > @Override > protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { > PrintWriter out = resp.getWriter(); > resp.setContentType("text/html"); > out.print("SimpleBVServlet"); > > ValidatorFactory validatorFactory = null; > > validatorFactory = Validation.buildDefaultValidatorFactory(); > > out.print("

"); > out.print("Obtained ValidatorFactory: " + validatorFactory + "."); > out.print("

"); > > ValidatorContext validatorContext = validatorFactory.usingContext(); > javax.validation.Validator beanValidator = validatorContext.getValidator(); > out.print("

"); > out.print("Validating invalid person class using validateValue."); > out.print("

"); > > List value = new ArrayList(); > value.add("one"); > value.add("two"); > value.add("three"); > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > Person person = new Person(); > > out.print("

"); > out.print("Validating invalid person instance using validate."); > out.print("

"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print("

"); > out.print("Validating valid person."); > out.print("

"); > > person.setFirstName("John"); > person.setLastName("Yaya"); > > violations = beanValidator.validate(person); > > if (violations.isEmpty()) { > out.print("

"); > out.print("No ConstraintViolations found."); > out.print("

"); > } else { > for (ConstraintViolation curViolation : violations) { > out.print("

"); > out.print("ConstraintViolation: message: " + curViolation.getMessage() + > " propertyPath: " + curViolation.getPropertyPath()); > out.print("

"); > } > } > > out.print(""); > > } > > > } > 8<------------------------ > The call to > Set> violations = > beanValidator.validateValue(Person.class, "listOfString", value); > > causes this exception to be thrown: > java.lang.IllegalArgumentException: Invalid property path. There is no property listOfString in entity simple_bv_servlet.Person > But I say, doch, there is such a property on the Person. > This is new behavior in 4.0.0.Beta2, and it's breaking Glassfish. > Thanks, > Ed -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 2 03:25:14 2009 From: noreply at atlassian.com (Kenneth Flynn (JIRA)) Date: Sun, 2 Aug 2009 02:25:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (EJB-457) ConcurrentModificationException when initializing unrelated EntityManagerFactories in two different threads Message-ID: <428609597.14831249197914884.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ConcurrentModificationException when initializing unrelated EntityManagerFactories in two different threads ----------------------------------------------------------------------------------------------------------- Key: EJB-457 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-457 Project: Hibernate Entity Manager Issue Type: Bug Components: EntityManager Affects Versions: 3.4.0.GA Reporter: Kenneth Flynn I get the following: -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 2 03:27:14 2009 From: noreply at atlassian.com (Kenneth Flynn (JIRA)) Date: Sun, 2 Aug 2009 02:27:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-457) ConcurrentModificationException when initializing unrelated EntityManagerFactories in two different threads In-Reply-To: <428609597.14831249197914884.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1918590887.14851249198034755.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33693#action_33693 ] Kenneth Flynn commented on EJB-457: ----------------------------------- Okay, somehow I pressed enter before typing the rest of the issue. Rest of the description here,.. When I create two EntityManagerFactories in two different threads, I get the stacktrace below. It looks like I'm determining the persistence provider implementations twice at the same time; the static set in the Persistence class is not thread safe; in particular findAllProviders() fails if it is called concurrently. In this case, the use of the persistence api in the two different threads is completely unrelated--they are using different persistence units, different dbs, etc. This seems like a use case that should be supported? [java] java.util.ConcurrentModificationException [java] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) [java] at java.util.HashMap$KeyIterator.next(HashMap.java:828) [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) [java] at com.darkcorner.minotaur.sa.redline.RedlineDatabaseControl.ensureRunning(RedlineDatabaseControl.java:101) [java] at com.darkcorner.minotaur.sa.redline.RedlineService.restartService(RedlineService.java:316) [java] at com.darkcorner.harmonice.ServiceHandler.callRestart(ServiceHandler.java:241) [java] at com.darkcorner.harmonice.ServiceHandler.access$000(ServiceHandler.java:56) [java] at com.darkcorner.harmonice.ServiceHandler$RestartTask.run(ServiceHandler.java:63) [java] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [java] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [java] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [java] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) [java] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207) [java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [java] at java.lang.Thread.run(Thread.java:619) > ConcurrentModificationException when initializing unrelated EntityManagerFactories in two different threads > ----------------------------------------------------------------------------------------------------------- > > Key: EJB-457 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-457 > Project: Hibernate Entity Manager > Issue Type: Bug > Components: EntityManager > Affects Versions: 3.4.0.GA > Reporter: Kenneth Flynn > > I get the following: -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 3 02:12:23 2009 From: noreply at atlassian.com (Nicklas Nordborg (JIRA)) Date: Mon, 3 Aug 2009 01:12:23 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-530) Allow application of filters on subqueries Message-ID: <1936827046.15011249279943210.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33694#action_33694 ] Nicklas Nordborg commented on HHH-530: -------------------------------------- I think the fix for this issue has caused a problem with filters that use collection-type parameters. See HHH-4065 for more details. > Allow application of filters on subqueries > ------------------------------------------ > > Key: HHH-530 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-530 > Project: Hibernate Core > Issue Type: Patch > Components: core > Reporter: Gavin King > Assignee: Steve Ebersole > Fix For: 3.2.7, 3.3.2, 3.5 > > Attachments: HHH-530.3.3.SP1.patch, HHH-530.3.3.SP1.take2.patch, HHH-530.Additional.Subquery.patch, HHH-530.patch, hibernate_filter_fix-3.0.5.patch, hibernate_filter_fix-3.0.5_14.patch, HqlSqlWalker-branch32.patch, HqlWithFiltersTest.patch, SubqueriesWithFiltersTest.patch > > > Currently filter conditions are applied in subselects, they should not be. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 3 14:26:12 2009 From: noreply at atlassian.com (shaoxian yang (JIRA)) Date: Mon, 3 Aug 2009 13:26:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4067) query cache always returns result with lazy collections even the query eager fetch the collection Message-ID: <1012674035.15091249323972042.JavaMail.j2ee-opensource-projects@vps07.contegix.com> query cache always returns result with lazy collections even the query eager fetch the collection ------------------------------------------------------------------------------------------------- Key: HHH-4067 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4067 Project: Hibernate Core Issue Type: Bug Components: caching (L2), query-criteria Affects Versions: 3.3.2 Environment: hibernate 3.3.2 ehcache 1.6.0 Reporter: shaoxian yang I am trying to give second level cache and query cache a try for my project. here is the versio information: 1. Hibernate: 3.3.2 2. EHCache: 1.6.0 However, although query cache seems to be working. It always return result with lazy collections, even if my original query eagerly fetch the collections. For example: In Service class // open session criteria = session.createCriteria(Podcast.class); criteria.setFirstResult(offset); org.hibernate.Criteria criteria = session.createCriteria(Podcast.class); criteria.setFetchMode("podcastCategoryMappings", FetchMode.JOIN); criteria.add(Restrictions.in("id", podIds)); criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); criteria.addOrder(Order.asc("title")); criteria.setCacheable(true); // turn on cache podcasts = criteria.list(); // close session In client class, I expect getting a podcast class, with podcastCategoryMappings collection fetched. @Test public void testGetAllPodcasts() { // first time, it goes through database, and put into cache the query result (id=1), entity (podcast), collections(podcastCategoryMapppings) List podcasts = _service.getPodcasts(0, 1); for (Podcast pod: podcasts) { Set mappings = pod.getPodcastCategoryMappings(); for (PodcastCategoryMapping mapping: mappings) { System.out.println("pod title/id: " + pod.getTitle() + "/" + pod.getId() + " category id: " + mapping.getCategoryId()); } // second time, the results come from cache. I shall expect cache hit for query result, entity(podcast), and collections. // However, i only see cache hit for query result and entity, not the collections. podcasts = _service.getPodcasts(0, 1); // It will fail with LazyInitializationException since collection is not fully initialized when result returned from cache for (Podcast pod: podcasts) { System.out.println("pod id: " + pod.getId()); Set mappings = pod.getPodcastCategoryMappings(); for (PodcastCategoryMapping mapping: mappings) { System.out.println("pod title/id: " + pod.getTitle() + "/" + pod.getId() + " category id: " + mapping.getCategoryId()); } } } I turned on the debug message for hibernate cache related classes, so that I know what is wrong with cache. log4j.logger.org.hibernate.cache.ReadWriteCache=TRACE log4j.logger.org.hibernate.cache.UpdateTimestampsCache=TRACE log4j.logger.org.hibernate.cache.StandardQueryCache=TRACE Can someone from hibernate team take a look at this and confirm if this is a bug? I am very close to place this into a project. If this is not working, I guess, I have to manage cache myself, rather than using hibernate to manage the cache. The bottom line is that cache should not return inconsistent result like this. Thanks. Feel free to let me know any more information is needed for this problem -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 3 17:10:12 2009 From: noreply at atlassian.com (shaoxian yang (JIRA)) Date: Mon, 3 Aug 2009 16:10:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4068) Hibernate's ReadWriteCache synchronization slow down ehcache Message-ID: <207597176.15121249333812472.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Hibernate's ReadWriteCache synchronization slow down ehcache ------------------------------------------------------------- Key: HHH-4068 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4068 Project: Hibernate Core Issue Type: Bug Reporter: shaoxian yang Hi, I am setting up hibernate to work with ehcache. Hibernate has a wrapper to call underlying ehcache. Their wrappers are ReadWriteCache.java, which internally will call Ehcache. The two major methods in ReadWriteCache are synchronized: public synchronized Object get(Object key, long txTimestamp) throws CacheException { public synchronized boolean put( Object key, Object value, long txTimestamp, Object version, Comparator versionComparator, boolean minimalPut) I understand this is to ensure "read/write" strategy to read committed (when write and read thread get in at the same time, read does not get intermediate result and only get the latest committed result). However, isn't this also make concurrent read impossible when there is no write? ). It looks like we need some more advanced read/write lock at ReadWriteCache level. However, the class also have other synchronized methods which make me hesitate: public synchronized SoftLock lock(Object key, Object version) throws CacheException public synchronized void release(Object key, SoftLock clientLock) throws CacheException public synchronized boolean afterUpdate(Object key, Object value, Object version, SoftLock clientLock) throws CacheException public synchronized boolean afterInsert(Object key, Object value, Object version) throws CacheException public synchronized SoftLock lock(Object key, Object version) throws CacheException Basically I want to get the most out of ehcache performance gain. Currently, if I keep issuing the same query which read item from query cache, there is still overhead. Can you advise me why we have to use read lock for every read when there is no write? And is it necessary to acquire lock for any other operation than put/get in ReadWriteCache class? Thanks in advance. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 4 01:35:13 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Tue, 4 Aug 2009 00:35:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-3686) Sybase - QueryCacheTest.testQueryCacheInvalidation fails In-Reply-To: <12838367.1231237778689.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <65157192.15201249364113050.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] strong liu reassigned HHH-3686: ------------------------------- Assignee: strong liu (was: Gail Badner) > Sybase - QueryCacheTest.testQueryCacheInvalidation fails > -------------------------------------------------------- > > Key: HHH-3686 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > Assignee: strong liu > > QueryCacheTest.testQueryCacheInvalidation fails because SybaseDialect.areStringComparisonsCaseInsensitive(). returns false and the test machine is actually configured for case-insensitive string comparisons. > By default, Sybase string comparisons are case-insensitive. > It may be possible to determine which is configured by looking at DatabaseMetaData to return the appropriate value for SybaseDialect.areStringComparisonsCaseInsensitive(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 4 02:15:12 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Tue, 4 Aug 2009 01:15:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3962) Ingres Hibernate dialect for EAP 4.3.0 GA CP04 In-Reply-To: <1478508776.1245094113747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <45004405.15221249366512108.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33695#action_33695 ] Gail Badner commented on HHH-3962: ---------------------------------- https://jira.jboss.org/jira/browse/JBPAPP-1765 > Ingres Hibernate dialect for EAP 4.3.0 GA CP04 > ---------------------------------------------- > > Key: HHH-3962 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate Core 3.2.4.SP1 CP07, Ingres 9.2.0 > Reporter: Enrico Schenk > Priority: Minor > Attachments: IngresDialect.java, IngresDialect.java > > > This is the Ingres dialect that was used for the EAP 4.3.0 GA CP04 tests. It's based on the latest dialect from the trunk contains changes for the functions current_time, current_timestamp and current_date. The dialect also overrides the method getForUpdateString() to disable the use of "SELECT...FOR UPDATE" statements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 4 04:28:12 2009 From: noreply at atlassian.com (Gajo Csaba (JIRA)) Date: Tue, 4 Aug 2009 03:28:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4069) DetachedCriteria with Projections generates invalid SQL when using inheritance with PostgreSQL Message-ID: <79219321.15271249374492376.JavaMail.j2ee-opensource-projects@vps07.contegix.com> DetachedCriteria with Projections generates invalid SQL when using inheritance with PostgreSQL ---------------------------------------------------------------------------------------------- Key: HHH-4069 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4069 Project: Hibernate Core Issue Type: Bug Components: query-criteria Affects Versions: 3.2.6 Environment: Hibernate 3.2.6 GA with annotations, PostgreSQL 8.3, Ubuntu Linux Reporter: Gajo Csaba Attachments: postgretest.zip PostgreSQL doesn't allow using aliases in the WHERE clause. For example, the following query is invalid: SELECT it.id_item as aaa FROM Item it WHERE aaa=1 The correct query would be: SELECT it.id_item as aaa FROM Item it WHERE it.id_item=1 When having inheritance with a TABLE_PER_CLASS strategy, the HSQL query "select idItem from Item where idItem=:idItem" will generate the correct query. However, doing the same with a DetachedCriteria will generate the invalid query. Note that I'm not selecting everything from Item. It's not select *. I'm only selecting idItem, which means in the DetachedCriteria I'm using Projections. Without projections, the generated query works fine. I've attached a test case, and the following is a short explanation: model.Item - abstract superclass model.Product - extends Item model.Project - extends Item Main is the main class. Removing the following piece of code will make the test case work without errors: criteria.setProjection(Projections.projectionList() .add(Projections.property("idItem"), "idItem") .add(Projections.property("name"), "name")); The test case may be compiled with Maven. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 4 13:04:14 2009 From: noreply at atlassian.com (Philip Borlin (JIRA)) Date: Tue, 4 Aug 2009 12:04:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4070) createProxy() called even when hasProxy() returns false Message-ID: <1950515102.15351249405454469.JavaMail.j2ee-opensource-projects@vps07.contegix.com> createProxy() called even when hasProxy() returns false ------------------------------------------------------- Key: HHH-4070 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4070 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.2 Environment: 3.3.2GA, PostgresQL 8.3 Reporter: Philip Borlin This problem occurs when an EntityTuplizer is used. In my case I throw an UnsupportedOperationException in my createProxy() method. I would expect that would be ok since my hasProxy() method returns false. This was working in 3.3.1 but broke in 3.3.2. In DefaultLoadEventListener in the proxyOrLoad() method there is a call to persister.hasProxy(). This makes a call to AbstractEntityPersister which simply checks to see whether the entityMetamodel isLazy(). That check succeeds since lazy is sent to true. The next check sees if isAllowProxyCreation() is false in the options. Lastly creatProxyIfNecessary() is called which if the entity does not exist calls createProxy() on the persister. AnstractEntityPersister delegates this directly to the tuplizer. At no point was the tuplizer's hasProxy() method ever consulted. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 4 15:53:12 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Tue, 4 Aug 2009 14:53:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4070) createProxy() called even when hasProxy() returns false In-Reply-To: <1950515102.15351249405454469.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1847875161.15371249415592076.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33696#action_33696 ] Gail Badner commented on HHH-4070: ---------------------------------- Please attach a runnable test case (Java + mapping) that reproduces this issue. > createProxy() called even when hasProxy() returns false > ------------------------------------------------------- > > Key: HHH-4070 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4070 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: 3.3.2GA, PostgresQL 8.3 > Reporter: Philip Borlin > > This problem occurs when an EntityTuplizer is used. In my case I throw an UnsupportedOperationException in my createProxy() method. I would expect that would be ok since my hasProxy() method returns false. This was working in 3.3.1 but broke in 3.3.2. > In DefaultLoadEventListener in the proxyOrLoad() method there is a call to persister.hasProxy(). This makes a call to AbstractEntityPersister which simply checks to see whether the entityMetamodel isLazy(). > That check succeeds since lazy is sent to true. > The next check sees if isAllowProxyCreation() is false in the options. > Lastly creatProxyIfNecessary() is called which if the entity does not exist calls createProxy() on the persister. AnstractEntityPersister delegates this directly to the tuplizer. > At no point was the tuplizer's hasProxy() method ever consulted. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 4 18:54:13 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Tue, 4 Aug 2009 17:54:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3962) Ingres Hibernate dialect for EAP 4.3.0 GA CP04 In-Reply-To: <1478508776.1245094113747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <2077918844.15411249426453827.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner updated HHH-3962: ----------------------------- Assignee: Gail Badner Fix Version/s: 3.5 3.3.x Requires Release Note: [Affirmative] > Ingres Hibernate dialect for EAP 4.3.0 GA CP04 > ---------------------------------------------- > > Key: HHH-3962 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate Core 3.2.4.SP1 CP07, Ingres 9.2.0 > Reporter: Enrico Schenk > Assignee: Gail Badner > Priority: Minor > Fix For: 3.3.x, 3.5 > > Attachments: IngresDialect.java, IngresDialect.java > > > This is the Ingres dialect that was used for the EAP 4.3.0 GA CP04 tests. It's based on the latest dialect from the trunk contains changes for the functions current_time, current_timestamp and current_date. The dialect also overrides the method getForUpdateString() to disable the use of "SELECT...FOR UPDATE" statements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 00:01:14 2009 From: noreply at atlassian.com (Richard Dingwall (JIRA)) Date: Tue, 4 Aug 2009 23:01:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-772) null in maps are handled inconsistently Message-ID: <396020001.15471249444874124.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33697#action_33697 ] Richard Dingwall commented on HHH-772: -------------------------------------- I also have a use case that requires this behaviour. Java supports it, the database supports it, why can't Hibernate or NHibernate support it? Otherwise at least an exception should be thrown alerting the caller that it cannot be persisted (as would occur in other situations). > null in maps are handled inconsistently > --------------------------------------- > > Key: HHH-772 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-772 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Reporter: Max Rydahl Andersen > Fix For: 3.1 beta 1 > > > regarding case 00004729. > group.getUsers().put("something", null); > Does not result in any insert. > Inserting "something", null manually into the underlying table and > when hibernate reads the map will have "something"->null in the map. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 04:32:15 2009 From: noreply at atlassian.com (Erik-Berndt Scheper (JIRA)) Date: Wed, 5 Aug 2009 03:32:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3854) Issue with greedy loading of associations (default-lazy=false ) In-Reply-To: <27054431.1239210337479.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1155112128.15531249461135224.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33698#action_33698 ] Erik-Berndt Scheper commented on HHH-3854: ------------------------------------------ I see the same NPE with JPA / annotations, but only if the persistent object is a final class. The reason behind this is that the proxyFactory is null (as above), because the constructor of EntityMetaModel.class (in hibernate core) then declares it as non-lazy (line 267-271 in EntityMetaModel.java, hibernate-core-3.3.2.GA): lazy = persistentClass.isLazy() && ( // TODO: this disables laziness even in non-pojo entity modes: !persistentClass.hasPojoRepresentation() || !ReflectHelper.isFinalClass( persistentClass.getProxyInterface() ) ); Becayse the entityMetamodel is NOT lazy for final classes the constructor of the AbstractEntityTuplizer (i.e. any tuplizer) will set the proxyFactory to null (line 150-158 in AbstractEntityTuplizer .java, hibernate-core-3.3.2.GA): if ( entityMetamodel.isLazy() ) { proxyFactory = buildProxyFactory( mappingInfo, idGetter, idSetter ); if (proxyFactory == null) { entityMetamodel.setLazy( false ); } } else { proxyFactory = null; } This all eventually leads to a NPE in hibernate envers ToOneIdMapper.class java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:394) at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3469) at org.hibernate.envers.entities.mapper.relation.ToOneIdMapper.mapToEntityFromMap(ToOneIdMapper.java:84) at org.hibernate.envers.entities.mapper.MultiPropertyMapper.mapToEntityFromMap(MultiPropertyMapper.java:117) at org.hibernate.envers.entities.EntityInstantiator.createInstanceFromVersionsEntity(EntityInstantiator.java:93) at org.hibernate.envers.entities.EntityInstantiator.addInstancesFromVersionsEntities(EntityInstantiator.java:103) at org.hibernate.envers.query.impl.EntitiesAtRevisionQuery.list(EntitiesAtRevisionQuery.java:90) at org.hibernate.envers.query.impl.AbstractAuditQuery.getSingleResult(AbstractAuditQuery.java:104) at org.hibernate.envers.reader.AuditReaderImpl.find(AuditReaderImpl.java:104) > Issue with greedy loading of associations (default-lazy=false ) > --------------------------------------------------------------- > > Key: HHH-3854 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3854 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Environment: Hibernate - core 3.4.0-SNAPSHOT, Hibernate-envers (from trunk) > Reporter: Amar Singh > Attachments: greedy-loading.zip > > > I have an Entity GP which has a many to one association to entity CA. > > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > > > > > > > > > > > > > > > > > > With this when I load a previous version of BidirectionalRefIngPK, the loading mechanism tries to create a proxy for BidirectionalRefEdPK, but in my case lazy is false so an internal call to createProxy will return NULL hence . > This happens in ToOneIdMapper.java in method mapToEntityFromMap around line 82, which then internally calls for AbstractEntityTuplizer.java line 395 for getProxyFactory() ending in NULL pointer exception because proxy factory is null as mine is a greedy loading. > TO REPRODUCE > ~~~~~~~~~~~~~ > Please find a zipped folder attached. The zipped file has 4 files: > - GreedyLoading.java (actual testng test case) > - BidirectionalRefEdPK.java (Entity 1) > - BidirectionalRefIngPK.java (Entity 2) > - greedyloading.hbm.xml > Please place the three java files in its package (org.hibernate.envers.test.integration.onetoone.bidirectional), couldn't find the right package so created test case accordingly. Put the greedyloading.hbm.xml in src/test/resources. > Now when testng runs GreedyLoading.java you should see NPE. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 07:57:12 2009 From: noreply at atlassian.com (Michal Rost (JIRA)) Date: Wed, 5 Aug 2009 06:57:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3839) Using Criteria.setMaxResults gives a MySQLSyntaxErrorException In-Reply-To: <12795130.1238285438648.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <413853586.15561249473432206.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33699#action_33699 ] Michal Rost commented on HHH-3839: ---------------------------------- Having same problem with Hibernate 3.3.2 log: org.apache.jasper.JasperException: javax.el.ELException: Error reading 'resultList' on type com.example.crud.controller.UsersList org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247) root cause javax.el.ELException: Error reading 'resultList' on type com.example.crud.controller.UsersList javax.el.BeanELResolver.getValue(BeanELResolver.java:66) javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) org.apache.el.parser.AstValue.getValue(AstValue.java:118) org.apache.el.parser.AstEmpty.getValue(AstEmpty.java:45) org.apache.el.parser.AstNot.getValue(AstNot.java:42) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925) org.apache.jsp.UsersList_jsp._jspx_meth_c_005fwhen_005f0(UsersList_jsp.java:255) org.apache.jsp.UsersList_jsp._jspx_meth_c_005fchoose_005f0(UsersList_jsp.java:225) org.apache.jsp.UsersList_jsp._jspx_meth_stripes_005flayout_002dcomponent_005f0(UsersList_jsp.java:190) org.apache.jsp.UsersList_jsp._jspx_meth_stripes_005flayout_002drender_005f0(UsersList_jsp.java:125) org.apache.jsp.UsersList_jsp._jspService(UsersList_jsp.java:85) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247) root cause org.hibernate.exception.SQLGrammarException: could not execute query org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) org.hibernate.loader.Loader.doList(Loader.java:2223) org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) org.hibernate.loader.Loader.list(Loader.java:2099) org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569) org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) com.example.crud.model.HibernateDAO.findByCriteria(HibernateDAO.java:134) com.example.crud.controller.HibernateList.loadResultList(HibernateList.java:221) com.example.crud.controller.HibernateList.getResultList(HibernateList.java:204) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) javax.el.BeanELResolver.getValue(BeanELResolver.java:62) javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) org.apache.el.parser.AstValue.getValue(AstValue.java:118) org.apache.el.parser.AstEmpty.getValue(AstEmpty.java:45) org.apache.el.parser.AstNot.getValue(AstNot.java:42) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925) org.apache.jsp.UsersList_jsp._jspx_meth_c_005fwhen_005f0(UsersList_jsp.java:255) org.apache.jsp.UsersList_jsp._jspx_meth_c_005fchoose_005f0(UsersList_jsp.java:225) org.apache.jsp.UsersList_jsp._jspx_meth_stripes_005flayout_002dcomponent_005f0(UsersList_jsp.java:190) org.apache.jsp.UsersList_jsp._jspx_meth_stripes_005flayout_002drender_005f0(UsersList_jsp.java:125) org.apache.jsp.UsersList_jsp._jspService(UsersList_jsp.java:85) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247) root cause com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.users this_ limit 25' at line 1 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) com.mysql.jdbc.Util.handleNewInstance(Util.java:406) com.mysql.jdbc.Util.getInstance(Util.java:381) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447) com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912) org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) org.hibernate.loader.Loader.getResultSet(Loader.java:1787) org.hibernate.loader.Loader.doQuery(Loader.java:674) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) org.hibernate.loader.Loader.doList(Loader.java:2220) org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) org.hibernate.loader.Loader.list(Loader.java:2099) org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569) org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) com.example.crud.model.HibernateDAO.findByCriteria(HibernateDAO.java:134) com.example.crud.controller.HibernateList.loadResultList(HibernateList.java:221) com.example.crud.controller.HibernateList.getResultList(HibernateList.java:204) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) javax.el.BeanELResolver.getValue(BeanELResolver.java:62) javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) org.apache.el.parser.AstValue.getValue(AstValue.java:118) org.apache.el.parser.AstEmpty.getValue(AstEmpty.java:45) org.apache.el.parser.AstNot.getValue(AstNot.java:42) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925) org.apache.jsp.UsersList_jsp._jspx_meth_c_005fwhen_005f0(UsersList_jsp.java:255) org.apache.jsp.UsersList_jsp._jspx_meth_c_005fchoose_005f0(UsersList_jsp.java:225) org.apache.jsp.UsersList_jsp._jspx_meth_stripes_005flayout_002dcomponent_005f0(UsersList_jsp.java:190) org.apache.jsp.UsersList_jsp._jspx_meth_stripes_005flayout_002drender_005f0(UsersList_jsp.java:125) org.apache.jsp.UsersList_jsp._jspService(UsersList_jsp.java:85) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247) > Using Criteria.setMaxResults gives a MySQLSyntaxErrorException > -------------------------------------------------------------- > > Key: HHH-3839 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3839 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.3.1 > Environment: MySQL 5.0.51a > Reporter: Kevin DIMEY > Attachments: hibernate.cfg.xml > > > Hi, > When trying to limit the number of rows returned by Criteria.list() method, exception is thrown about bad SQL grammar. The "limit" SQL statement is put just after the select keyword. It should be placed at the end of the request. > Moreover, it seems there is no coma between the start row and the amount of objects to retrieve. > Here is the method called : > session.createCriteria(Etude.class).setFirstResult(5).setMaxResults(10).list(); > I get the same issue while using only setMaxResults, it puts the "top" keyword just after the "select" one. > Here is the request generated and the stack trace : > Hibernate: select limit ? ? this_.id as id7_6_, this_.avorte_id as avorte11_7_6_, this_.confidentielle as confiden2_7_6_, this_.contact_id as contact12_7_6_, this_.created_at as created3_7_6_, this_.date_fin as date4_7_6_, this_.date_signature as date5_7_6_, this_.date_sollicitation as date6_7_6_, this_.entreprise_id as entreprise13_7_6_, this_.etat_code as etat7_7_6_, this_.numero as numero7_6_, this_.sujet as sujet7_6_, this_.updated_at as updated10_7_6_, avortement2_.id as id1_0_, avortement2_.created_at as created2_1_0_, avortement2_.created_by as created3_1_0_, avortement2_.raison as raison1_0_, contact3_.id as id2_1_, contact3_.adresse_id as adresse18_2_1_, contact3_.civilite_code as civilite2_2_1_, contact3_.connu_par_code as connu3_2_1_, contact3_.connu_par_detail as connu4_2_1_, contact3_.created_at as created5_2_1_, contact3_.entreprise_id as entreprise19_2_1_, contact3_.fax as fax2_1_, contact3_.fonction as fonction2_1_, contact3_.mail as mail2_1_, contact3_.news_dernier_envoi as news9_2_1_, contact3_.news_desinscrit as news10_2_1_, contact3_.nom as nom2_1_, contact3_.parti as parti2_1_, contact3_.prenom as prenom2_1_, contact3_.service_code as service14_2_1_, contact3_.tel_fixe as tel15_2_1_, contact3_.tel_portable as tel16_2_1_, contact3_.updated_at as updated17_2_1_, adresse4_.id as id0_2_, adresse4_.adresse1 as adresse2_0_2_, adresse4_.adresse2 as adresse3_0_2_, adresse4_.adresse3 as adresse4_0_2_, adresse4_.code_postal as code5_0_2_, adresse4_.ville as ville0_2_, entreprise5_.id as id5_3_, entreprise5_.adresse_id as adresse14_5_3_, entreprise5_.created_at as created2_5_3_, entreprise5_.disparue as disparue5_3_, entreprise5_.domaine_code as domaine4_5_3_, entreprise5_.effectif_code as effectif5_5_3_, entreprise5_.etat_code as etat6_5_3_, entreprise5_.fax as fax5_3_, entreprise5_.nom as nom5_3_, entreprise5_.num_siret as num9_5_3_, entreprise5_.particulier as particu10_5_3_, entreprise5_.site_web as site11_5_3_, entreprise5_.tel as tel5_3_, entreprise5_.updated_at as updated13_5_3_, adresse6_.id as id0_4_, adresse6_.adresse1 as adresse2_0_4_, adresse6_.adresse2 as adresse3_0_4_, adresse6_.adresse3 as adresse4_0_4_, adresse6_.code_postal as code5_0_4_, adresse6_.ville as ville0_4_, entreprise7_.id as id5_5_, entreprise7_.adresse_id as adresse14_5_5_, entreprise7_.created_at as created2_5_5_, entreprise7_.disparue as disparue5_5_, entreprise7_.domaine_code as domaine4_5_5_, entreprise7_.effectif_code as effectif5_5_5_, entreprise7_.etat_code as etat6_5_5_, entreprise7_.fax as fax5_5_, entreprise7_.nom as nom5_5_, entreprise7_.num_siret as num9_5_5_, entreprise7_.particulier as particu10_5_5_, entreprise7_.site_web as site11_5_5_, entreprise7_.tel as tel5_5_, entreprise7_.updated_at as updated13_5_5_ from etude this_ left outer join avortement avortement2_ on this_.avorte_id=avortement2_.id left outer join contact contact3_ on this_.contact_id=contact3_.id left outer join adresse adresse4_ on contact3_.adresse_id=adresse4_.id left outer join entreprise entreprise5_ on contact3_.entreprise_id=entreprise5_.id left outer join adresse adresse6_ on entreprise5_.adresse_id=adresse6_.id left outer join entreprise entreprise7_ on this_.entreprise_id=entreprise7_.id > 29 mars 2009 00:52:29 org.hibernate.util.JDBCExceptionReporter logExceptions > ATTENTION: SQL Error: 1064, SQLState: 42000 > 29 mars 2009 00:52:29 org.hibernate.util.JDBCExceptionReporter logExceptions > GRAVE: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 5 10 this_.id as id7_6_, this_.avorte_id as avorte11_7_6_, this_.confident' at line 1 > 29 mars 2009 00:52:29 org.apache.catalina.core.ApplicationDispatcher invoke > GRAVE: "Servlet.service()" pour la servlet jsp a lanc??? une exception > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 5 10 this_.id as id7_6_, this_.avorte_id as avorte11_7_6_, this_.confident' at line 1 > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) > at java.lang.reflect.Constructor.newInstance(Unknown Source) > at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) > at com.mysql.jdbc.Util.getInstance(Util.java:381) > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515) > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447) > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) > at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) > at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912) > at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) > at org.hibernate.loader.Loader.getResultSet(Loader.java:1808) > at org.hibernate.loader.Loader.doQuery(Loader.java:697) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) > at org.hibernate.loader.Loader.doList(Loader.java:2228) > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125) > at org.hibernate.loader.Loader.list(Loader.java:2120) > at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596) > at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306) > at easytic.support.EtudesSupport$EtudesList.getList(EtudesSupport.java:41) > I've attached my hibernate.cfg.xml. > This issue seemed resolved in 3.2.5 : http://opensource.atlassian.com/projects/hibernate/browse/HHH-2954 but I got it with 3.3.1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 08:22:12 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 5 Aug 2009 07:22:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-191) JPA 2 Dependency In-Reply-To: <1105123604.12741248695532074.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1769221823.15601249474932967.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-191: --------------------------------- Component/s: build > JPA 2 Dependency > ---------------- > > Key: HV-191 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-191 > Project: Hibernate Validator > Issue Type: Bug > Components: build > Affects Versions: 4.0.0.Beta2 > Reporter: Stephan Bublava > > Hibernate Validator 4 Beta 2 depends on JPA 2. It would be great, if it remained compatible with version 1. > In addition the dependency is declared a using non-standard group and package name: > org.hibernate.java-persistence > jpa-api > instead of: > javax.persistence > persistence-api > Somehow this breaks my build - "mvn test" works, but "mvn site" fails with java.lang.NoSuchMethodError: javax.persistence.Persistence.getPersistenceUtil() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 08:22:13 2009 From: noreply at atlassian.com (Erik-Berndt Scheper (JIRA)) Date: Wed, 5 Aug 2009 07:22:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3854) Issue with greedy loading of associations (default-lazy=false ) In-Reply-To: <27054431.1239210337479.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <19395709.15651249474933202.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Erik-Berndt Scheper updated HHH-3854: ------------------------------------- Attachment: envers-HHH-3854-testcases.patch Attached patch file containing tests to reproduce problem both as HBM, and using annotations. > Issue with greedy loading of associations (default-lazy=false ) > --------------------------------------------------------------- > > Key: HHH-3854 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3854 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Environment: Hibernate - core 3.4.0-SNAPSHOT, Hibernate-envers (from trunk) > Reporter: Amar Singh > Attachments: envers-HHH-3854-testcases.patch, greedy-loading.zip > > > I have an Entity GP which has a many to one association to entity CA. > > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > > > > > > > > > > > > > > > > > > With this when I load a previous version of BidirectionalRefIngPK, the loading mechanism tries to create a proxy for BidirectionalRefEdPK, but in my case lazy is false so an internal call to createProxy will return NULL hence . > This happens in ToOneIdMapper.java in method mapToEntityFromMap around line 82, which then internally calls for AbstractEntityTuplizer.java line 395 for getProxyFactory() ending in NULL pointer exception because proxy factory is null as mine is a greedy loading. > TO REPRODUCE > ~~~~~~~~~~~~~ > Please find a zipped folder attached. The zipped file has 4 files: > - GreedyLoading.java (actual testng test case) > - BidirectionalRefEdPK.java (Entity 1) > - BidirectionalRefIngPK.java (Entity 2) > - greedyloading.hbm.xml > Please place the three java files in its package (org.hibernate.envers.test.integration.onetoone.bidirectional), couldn't find the right package so created test case accordingly. Put the greedyloading.hbm.xml in src/test/resources. > Now when testng runs GreedyLoading.java you should see NPE. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 08:36:53 2009 From: noreply at atlassian.com (Maillefer Jean-David (JIRA)) Date: Wed, 5 Aug 2009 07:36:53 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HCANN-8) Hibernate allow to embed non embeddable class Message-ID: <71661618.15671249475813734.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Hibernate allow to embed non embeddable class --------------------------------------------- Key: HCANN-8 URL: http://opensource.atlassian.com/projects/hibernate/browse/HCANN-8 Project: Hibernate Commons Annotations Issue Type: Bug Environment: JBoss-5.1.0.GA, postgresql 8.4.0 Reporter: Maillefer Jean-David Priority: Minor Hibernate allows to embed (successfully !) a non embeddable class (if it was embeddable, it would throw a compiler exception) @Entity public class BanqueId { @Id int id; } public class Compte{ @ManyToOne @JoinColumn(name = "compte_banqueId_id", insertable = false, updatable = false) private BanqueId banqueId; @Column(name = "compte_iban", length = 30) private String iban; } @Entity public class Cotisation { @Id int id; @Embedded private Compte compte; } In this case, using @Embeddable on Compte yields the following compiler error: "Attribute "banqueId" has invalid mapping type in this context" Not using this annotation (as in this example) generates (at least partially) working code, but seems not to follow the specification (ejb 3.0 spec persistance, 9.1.35) ! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 08:43:11 2009 From: noreply at atlassian.com (Maillefer Jean-David (JIRA)) Date: Wed, 5 Aug 2009 07:43:11 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HCANN-8) Hibernate allow to embed non embeddable class In-Reply-To: <71661618.15671249475813734.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1129553001.15691249476191993.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HCANN-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33701#action_33701 ] Maillefer Jean-David commented on HCANN-8: ------------------------------------------ Section section "2.1.6 Mapping Defaults for Non-Relationship Fields or Properties" of the spec too. > Hibernate allow to embed non embeddable class > --------------------------------------------- > > Key: HCANN-8 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HCANN-8 > Project: Hibernate Commons Annotations > Issue Type: Bug > Environment: JBoss-5.1.0.GA, postgresql 8.4.0 > Reporter: Maillefer Jean-David > Priority: Minor > > Hibernate allows to embed (successfully !) a non embeddable class (if it was embeddable, it would throw a compiler exception) > @Entity > public class BanqueId { > @Id > int id; > } > public class Compte{ > @ManyToOne > @JoinColumn(name = "compte_banqueId_id", insertable = false, updatable = false) > private BanqueId banqueId; > @Column(name = "compte_iban", length = 30) > private String iban; > } > @Entity > public class Cotisation { > @Id > int id; > @Embedded > private Compte compte; > } > In this case, using @Embeddable on Compte yields the following compiler error: "Attribute "banqueId" has invalid mapping type in this context" > Not using this annotation (as in this example) generates (at least partially) working code, but seems not to follow the specification (ejb 3.0 spec persistance, 9.1.35) ! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 08:48:12 2009 From: noreply at atlassian.com (Stefan Schedl (JIRA)) Date: Wed, 5 Aug 2009 07:48:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2656) Using EntityMode.DOM4J results in an exception when mapping more than one collection to the root node (node=".") In-Reply-To: <177203972.1181168344327.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1750331318.15721249476492533.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33702#action_33702 ] Stefan Schedl commented on HHH-2656: ------------------------------------ I have the same problem with hibernate core 3.3.2. I tried the above patch, but i need to modify it. my solution is public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException { Element newXML = (Element)xml.clone(); newXML.content().clear(); newXML.attributes().clear(); newXML.attributes().addAll(((Element)xml).attributes()); newXML.content().addAll(((Element)xml).content()); newXML.setDocument(xml.getDocument()); return newXML; } > Using EntityMode.DOM4J results in an exception when mapping more than one collection to the root node (node=".") > ---------------------------------------------------------------------------------------------------------------- > > Key: HHH-2656 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2656 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate 3.2.4 SP1, tested with MySQL 5.0. > Reporter: Andries Schutte > > When mapping multiple collections to the root node, an exception results (mapping and exception stack trace is shown below). This works fine if only one collection is mapped to the root node, or if one explicitly specifies unique names for each collection parent node. We are unfortunately restricted by having to use customer-defined XSDs, so this is a show-stopper for us. > > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > > > > > > > > > > > > > > > table="REQ_ACTIVITIES" node = "." embed-xml="true" lazy="false" cascade="all"> > > > > table="RET_GUIDELINES" node = "." embed-xml="true" lazy="false" cascade="all"> > > > > > node = "." embed-xml="true" lazy="false" cascade="all"> > > embed-xml="true" node="suspendedGuideline"/> > > > > > Exception stack trace: > [6/6/07 22:11:41:246 GMT] 00000012 SystemErr R org.hibernate.HibernateException: Found shared references to a collection: ProcessImpl.retractedGuidelines > at org.hibernate.engine.Collections.processReachableCollection(Collections.java:163) > at org.hibernate.event.def.FlushVisitor.processCollection(FlushVisitor.java:37) > at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101) > at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61) > at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55) > at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:131) > at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196) > at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) > at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) > at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) > at com.resonant.persistence.ExternalDataMgrHibernateDom4jImpl.persistHibernateEntity(ExternalDataMgrHibernateDom4jImpl.java:194) > at com.resonant.persistence.ExternalDataMgrHibernateDom4jImpl.store(ExternalDataMgrHibernateDom4jImpl.java:172) > at com.resonant.persistence.PersistenceHibernateDom4jImpl.storeObject(PersistenceHibernateDom4jImpl.java:215) > at com.resonant.persistence.ejb.PersistenceLocalBean.storeObject(PersistenceLocalBean.java:192) > at com.resonant.persistence.ejb.EJSLocalStatelessPersistenceLocalEJB_68e55914.storeObject(EJSLocalStatelessPersistenceLocalEJB_68e55914.java:1179) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:615) > at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:65) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at $Proxy2.storeObject(Unknown Source) > at com.resonant.hub.processmanager.ProcessHubImpl.startProcess(ProcessHubImpl.java:179) > at com.resonant.hub.processmanager.ejb.ProcessHubBean.startProcess(ProcessHubBean.java:138) > at com.resonant.hub.processmanager.ejb.EJSRemoteStatelessProcessHubEJB_f45832db.startProcess(EJSRemoteStatelessProcessHubEJB_f45832db.java:208) > at com.resonant.hub.processmanager.ejb._EJSRemoteStatelessProcessHubEJB_f45832db_Tie.startProcess(_EJSRemoteStatelessProcessHubEJB_f45832db_Tie.java:261) > at com.resonant.hub.processmanager.ejb._EJSRemoteStatelessProcessHubEJB_f45832db_Tie._invoke(_EJSRemoteStatelessProcessHubEJB_f45832db_Tie.java:122) > at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613) > at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466) > at com.ibm.rmi.iiop.ORB.process(ORB.java:503) > at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552) > at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673) > at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551) > at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62) > at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95) > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 09:30:12 2009 From: noreply at atlassian.com (Erik-Berndt Scheper (JIRA)) Date: Wed, 5 Aug 2009 08:30:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3957) Audited Null Embeddable objects not returned as null In-Reply-To: <716480636.1244789833745.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <261392976.15751249479012130.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Erik-Berndt Scheper updated HHH-3957: ------------------------------------- Attachment: envers-HHH-3957-testcases.patch Attached patch to reproduce issue (based on sample in JBoss Envers forum ) > Audited Null Embeddable objects not returned as null > ---------------------------------------------------- > > Key: HHH-3957 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3957 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Environment: 3.5.0-SNAPSHOT, Oracle, HSQL > Reporter: Aslak Knutsen > Attachments: envers-HHH-3957-testcases.patch > > > HIbernate Core and Hibernate Envers have different behaviour when it comes to handling null embeddable objects. > Hibernate Core will return the Embeddable object as null when all of its properties are, Hibernate Envers will return the Embeddable object with all null properties. > Description, TestCase: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=156716 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 11:11:12 2009 From: noreply at atlassian.com (Yannick le Restif (JIRA)) Date: Wed, 5 Aug 2009 10:11:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4071) Need for a new -to-many fetch mode, retrieving children ids only (otherwise L2 cache is poorly used when retrieving collections of cached objects) Message-ID: <2114700177.15781249485072009.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Need for a new -to-many fetch mode, retrieving children ids only (otherwise L2 cache is poorly used when retrieving collections of cached objects) -------------------------------------------------------------------------------------------------------------------------------------------------- Key: HHH-4071 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4071 Project: Hibernate Core Issue Type: Improvement Components: caching (L2) Affects Versions: 3.3.0.SP1 Environment: hibernate : 3.3.0 database : probably not pertinent (sybase 12.5) Reporter: Yannick le Restif The proposed improvement is a -to-many association fetch mode (maybe lazy mode) where only children ids would be fetched when we fetch the collection, rather than whole children entities, as it is the case now. Suppose we use a second level cache for children entities, and that we warm this cache up at application start : We will still fetch these children entites each time we fetch a collection of such entities, althought all of them were available in the second level cache ! Of course using a collections cache helps a bit, but only a bit, because of course we will then fetch a *given* collection only once, but that could still mean a lot of unnecessary entity fetching if one entity is in many collections. With the new fetch mode proposed, we would only fetch the children ids list, and then get the entities one by one lazily, allowing for using the cache, so the only SQL generated would for example be if we are fetching Bids for an Item : SELECT bids.id FROM bids WHERE bids.item_id = 123 instead of SELECT bids.id, bids.user, bids.date, ... FROM bids WHERE bids.item_id = 123 If the collection itself is cached, the result can be cached as the collection value (L2 collections cache only contains collections of ids, if I'm not mistaking...?) The mode could then also be used warm collections caches up. Maybe there is a way to get around this, but I found neither that was satisfactory. The "best" I found is to link the father entity to a collection of "id entities", themselves linked (one-to-one) to the "real", big entity. But this is not handy. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 11:58:12 2009 From: noreply at atlassian.com (Paul Benedict (JIRA)) Date: Wed, 5 Aug 2009 10:58:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3414) fetch profiles In-Reply-To: <27915724.1217885971206.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <274883625.15881249487892411.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33704#action_33704 ] Paul Benedict commented on HHH-3414: ------------------------------------ I definitely believe this is an important feature. Especially if the fetch profiles can be enabled outside a criteria or hql -- such as at the session level. I would like to see something like session.setFetchProfile(MyEntity.class, profileName). > fetch profiles > -------------- > > Key: HHH-3414 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3414 > Project: Hibernate Core > Issue Type: New Feature > Components: core, metamodel > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.7 > > > The concept of fetch profiles as we are discussing here is basically to allow users to dynamically affect the mapped fetching strategy for associations at runtime. > Consider the following example: > > ... > > ... > > > > ... > > This follows the normal recommendation to map associations as lazy and use a dynamic fetching strategy (ala HQL/Criteria) to modify this lazy behavior at runtime. > The fetaure discussed here would allow the same behavior for loading as well: > > > > > > Or: > > > ... > > > > > ... > > > > Now, doing: > session.enableFetchProfile( "person-details" ).get( Person.class, 1 )... > will load Person#1 as well as their addresses in a single joined query. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 13:52:13 2009 From: noreply at atlassian.com (Ana Carolina (JIRA)) Date: Wed, 5 Aug 2009 12:52:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2603) Deprecate the Session.connection() method In-Reply-To: <114675607.1178675764313.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <678693402.15981249494733064.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33705#action_33705 ] Ana Carolina commented on HHH-2603: ------------------------------------ Hellow, I need to call an oracle stored procedure which does not return a resultset or cursor, but it return a NUMBER. According to Hibernate documentation "they are not usable with Hibernate. If you still want to use these procedures you have to execute them via session.connection()." Problem is that session.connection() generates exception: java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader Do I have any alternative? Thanks in advanced. > Deprecate the Session.connection() method > ----------------------------------------- > > Key: HHH-2603 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2603 > Project: Hibernate Core > Issue Type: Deprecation > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.4 > > > Deprecate the Session.connection() method, in favor of a "JDBC work" API. Schedule for removal in 4.0 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 14:50:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Wed, 5 Aug 2009 13:50:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-197) Implement a LazyValidatorFactory Message-ID: <857256831.16011249498213120.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Implement a LazyValidatorFactory -------------------------------- Key: HV-197 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-197 Project: Hibernate Validator Issue Type: New Feature Affects Versions: 4.0.0.Beta2 Reporter: Emmanuel Bernard Assignee: Emmanuel Bernard Fix For: 4.0.0.CR1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 14:50:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Wed, 5 Aug 2009 13:50:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-197) Implement a LazyValidatorFactory In-Reply-To: <857256831.16011249498213120.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <902716370.16031249498213211.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard resolved HV-197. --------------------------------- Resolution: Fixed > Implement a LazyValidatorFactory > -------------------------------- > > Key: HV-197 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-197 > Project: Hibernate Validator > Issue Type: New Feature > Affects Versions: 4.0.0.Beta2 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 15:03:15 2009 From: noreply at atlassian.com (Krasimir Chobantonov (JIRA)) Date: Wed, 5 Aug 2009 14:03:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3544) Nullability.checkNullability() throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences() just nulled In-Reply-To: <4127300.1224851764513.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1563953401.16141249498995428.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33706#action_33706 ] Krasimir Chobantonov commented on HHH-3544: ------------------------------------------- Hi Gail, I read the description for issue HHH-3810 and I do not believe that both are actually very related - The thing with that bug is that the Hibernate does indeed try to nullify a relationship that is marked as not-nullable just because the entity is marked for persistence but it is not yet in the database - then the check for non null fails. For example the following picture C / \ A - B - D All A. B, C, D are entitieis and all links are setup to cascade the operation - also the link from B to A and C is required and the link from D to B is reqiired - then this means that you need to save A, C, then B and the D Now if we want to save the graph and pass the entity B then hibernate will try to save B it will mark the entity as persistent and will try to save A and C then it will see the D and will break the link because the link can be nullable so it will do INSERT followed by UPDATE but then when it is processing D it will find that there is a required link to B which now is peristent but it is not yet in the database - because of that even that the link is not nullable and just because the entity state is persistent even if it is not in the database the hibernate will break the link in order to cause the framework to issue INSERT, UPDATE instead of just a single INSERT - once the link is broken then the hibernate will check for nullability and at that time it will fail. Let me know if this helps in regard to debug the issue. Also would you mind to point us to the actual changes that you made and believe that it will fix this particular issue ? Thanks Krasimir > Nullability.checkNullability() throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences() just nulled > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HHH-3544 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3544 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.1 > Environment: Hibernate 3.3.1, Hibernate Annotations 3.4, Hibernate Commons-Annotation 3.3.1, Hibernate EntityManager 3.4, PostgreSQL 8.2.5, Java 5 > Reporter: Jeppe Cramon > Assignee: Gail Badner > Attachments: 3.3.1.GA-HHH-3544, 3.3.1.GA-HHH-3544.v2.patch, 3.3.1.GA-HHH-3544.v3.patch, HibernateNullabilityProblem.zip > > > Nullability.checkNullability throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences just nulled. > I've included an Eclipse Java project which can reproduce the problem (didn't include the jars). > The problem requires a pretty big graph to be reproduce able. The file "Domain Model.jpg" displays the Classes that take part in the problem. > The Domain Model is a simplification of the entities from our application. > In the example, ModelTest.java, there's only one active instance entity of each type (from A to H). > With the given test case, when an instance of a is passed to entityManager.persist(..), then the following exception is thrown: > javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: dk.hibernatetest.model.C.b > at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) > at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:226) > at dk.hibernatetest.model.ModelTest.test(ModelTest.java:49) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) > at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) > at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) > at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) > at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) > at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: dk.hibernatetest.model.C.b > at org.hibernate.engine.Nullability.checkNullability(Nullability.java:95) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:313) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) > at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:357) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) > at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:357) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:645) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:619) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:623) > at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:220) > ... 21 more > As noted in TestModel.java, if some of the other entities (namely c, g or h) are passed to persist(), then the problem doesn't occur. > I've tried to debug the problem and the only difference I've seen inside ForeignKeys.Nullifier.nullifyTransientReferences() is that, in the cases where an exception is thrown, then the B instance that C.b points to has the state SAVING, whereas when the exception isn't thrown, then it has state MANAGED. > When the B instance has state SAVING, then ForeignKeys.Nullifier.nullifyTransientReferences() nulls then entry in it's value array. > After that, Nullability.checkNullability(), performs a null check, which fails because ForeignKeys.Nullifier.nullifyTransientReferences() just nulled the property in the values array. > Could it be a solution to reverse the order of the ForeignKeys.Nullifier.nullifyTransientReferences() and Nullability.checkNullability() (See AbstractEventListener.performSaveOrReplicate(...)) > or does ForeignKeys.Nullifier.nullifyTransientReferences() instead have to take nullability into considerations? > /Jeppe -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 15:41:14 2009 From: noreply at atlassian.com (Shawn Clowater (JIRA)) Date: Wed, 5 Aug 2009 14:41:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3694) ResultTransformer not used when scroll() is used on a named SQLQuery In-Reply-To: <7789760.1231375238740.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1442448488.16181249501274377.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33707#action_33707 ] Shawn Clowater commented on HHH-3694: ------------------------------------- The issue I'm currently running into is the fact that the criteria I've supplied to scroll isn't unique and it is ignoring my DistinctRootEntityResultTransformer that I was applying. Even with your suggested change the Distinct Transformer is going to be useless since it would try to distinct on a single tuple basis and just return itself resulting in still having duplicates. I'm not seeing a clear way use a transformer to distinct the results in this case. Path of least resistance for me is to handle it as I'm processing but I'm throwing the distinct out for discussion. > ResultTransformer not used when scroll() is used on a named SQLQuery > -------------------------------------------------------------------- > > Key: HHH-3694 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.3.1 > Environment: Hibernate Core 3.3.1, PostgreSQL 8.1, HSQLDB 1.8 > Reporter: Oscar Pearce > Priority: Minor > Attachments: sqlqueryrestrans.zip > > > If a ResultTransformer is set on a named SQLQuery, and then scroll() is used on the query, the ResultTransformer is never used. The unit test in the attached Maven project shows this. > The fix seems simple - a one-line change in org.hibernate.loader.custom.CustomLoader#getHolderInstantiator(ResultTransformer resultTransformer, String[] queryReturnAliases). The sense of the test of resultTransformer against null should be reversed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 15:46:44 2009 From: noreply at atlassian.com (Shawn Clowater (JIRA)) Date: Wed, 5 Aug 2009 14:46:44 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3694) ResultTransformer not used when scroll() is used on a named SQLQuery In-Reply-To: <7789760.1231375238740.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1282232832.16221249501604479.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33708#action_33708 ] Shawn Clowater commented on HHH-3694: ------------------------------------- The issue I'm currently running into is duplicates even though my criteria has a DistinctRootEntityResultTransformer set on it. However, even with the supposed fix it would be useless since it would try to distinct based on a single result which would essentially just return the tuple anyways. I would think to do it in the core I'd need some sort of Stateful transformer that could keep track of what it already scrolled over but that gets messy as when the ScrollableResultSet would attempt to get a record it could be a duplicate that you'd want to ignore so it would have to try again. The path of least resistance for me is going to be to keep track of it during my processing (which I have a good point to tie into) but I thought I'd throw out the fact that scroll would return duplicates even if it was properly using a DistinctRootEntityResultTransformer for discussion. > ResultTransformer not used when scroll() is used on a named SQLQuery > -------------------------------------------------------------------- > > Key: HHH-3694 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.3.1 > Environment: Hibernate Core 3.3.1, PostgreSQL 8.1, HSQLDB 1.8 > Reporter: Oscar Pearce > Priority: Minor > Attachments: sqlqueryrestrans.zip > > > If a ResultTransformer is set on a named SQLQuery, and then scroll() is used on the query, the ResultTransformer is never used. The unit test in the attached Maven project shows this. > The fix seems simple - a one-line change in org.hibernate.loader.custom.CustomLoader#getHolderInstantiator(ResultTransformer resultTransformer, String[] queryReturnAliases). The sense of the test of resultTransformer against null should be reversed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 15:48:14 2009 From: noreply at atlassian.com (Shawn Clowater (JIRA)) Date: Wed, 5 Aug 2009 14:48:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3694) ResultTransformer not used when scroll() is used on a named SQLQuery In-Reply-To: <7789760.1231375238740.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <289952054.16261249501694427.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33709#action_33709 ] Shawn Clowater commented on HHH-3694: ------------------------------------- The issue I'm currently running into is duplicates even though my criteria has a DistinctRootEntityResultTransformer set on it. However, even with the supposed fix it would be useless since it would try to distinct based on a single result which would essentially just return the tuple anyways. I would think to do it in the core I'd need some sort of Stateful transformer that could keep track of what it already scrolled over but that gets messy as when the ScrollableResultSet would attempt to get a record it could be a duplicate that you'd want to ignore so it would have to try again. The path of least resistance for me is going to be to keep track of it during my processing (which I have a good point to tie into) but I thought I'd throw out the fact that scroll would return duplicates even if it was properly using a DistinctRootEntityResultTransformer for discussion. > ResultTransformer not used when scroll() is used on a named SQLQuery > -------------------------------------------------------------------- > > Key: HHH-3694 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.3.1 > Environment: Hibernate Core 3.3.1, PostgreSQL 8.1, HSQLDB 1.8 > Reporter: Oscar Pearce > Priority: Minor > Attachments: sqlqueryrestrans.zip > > > If a ResultTransformer is set on a named SQLQuery, and then scroll() is used on the query, the ResultTransformer is never used. The unit test in the attached Maven project shows this. > The fix seems simple - a one-line change in org.hibernate.loader.custom.CustomLoader#getHolderInstantiator(ResultTransformer resultTransformer, String[] queryReturnAliases). The sense of the test of resultTransformer against null should be reversed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 15:50:12 2009 From: noreply at atlassian.com (Shawn Clowater (JIRA)) Date: Wed, 5 Aug 2009 14:50:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3694) ResultTransformer not used when scroll() is used on a named SQLQuery In-Reply-To: <7789760.1231375238740.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <951217185.16301249501812109.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33710#action_33710 ] Shawn Clowater commented on HHH-3694: ------------------------------------- I apologize if my last comment ends up triple posting. I just got an email notification yet it wasn't appearing in the JIRA post. > ResultTransformer not used when scroll() is used on a named SQLQuery > -------------------------------------------------------------------- > > Key: HHH-3694 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.3.1 > Environment: Hibernate Core 3.3.1, PostgreSQL 8.1, HSQLDB 1.8 > Reporter: Oscar Pearce > Priority: Minor > Attachments: sqlqueryrestrans.zip > > > If a ResultTransformer is set on a named SQLQuery, and then scroll() is used on the query, the ResultTransformer is never used. The unit test in the attached Maven project shows this. > The fix seems simple - a one-line change in org.hibernate.loader.custom.CustomLoader#getHolderInstantiator(ResultTransformer resultTransformer, String[] queryReturnAliases). The sense of the test of resultTransformer against null should be reversed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 16:23:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Wed, 5 Aug 2009 15:23:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3544) Nullability.checkNullability() throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences() just nulled In-Reply-To: <4127300.1224851764513.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <610592722.16411249503795381.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33711#action_33711 ] Gail Badner commented on HHH-3544: ---------------------------------- Hi Krasimir, This was only fixed for merge events in HHH-3810 and released in 3.2.7 and 3.3.2. The other events that can cascade an entity save have not been fixed yet. You can see the fix by looking at the "FishEye" tab on HHH-3810 (http://opensource.atlassian.com/projects/hibernate/browse/HHH-3810?page=com.atlassian.jira.ext.fisheye%3Afisheye-issuepanel). That fix (for HHH-3810) depends on the fix for HHH-3229 (http://opensource.atlassian.com/projects/hibernate/browse/HHH-3229?page=com.atlassian.jira.ext.fisheye%3Afisheye-issuepanel), so you'll need that one also. I believe that a simlar fix will also work for these other types of events and should handle this use case properly. I think it may be possible to modify the fix for the merge event to work polymorphically for all save events. Can you give either 3.2.7 or 3.3.2 a try using Session.merge() and let me know if it works? Thanks, Gail > Nullability.checkNullability() throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences() just nulled > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HHH-3544 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3544 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.1 > Environment: Hibernate 3.3.1, Hibernate Annotations 3.4, Hibernate Commons-Annotation 3.3.1, Hibernate EntityManager 3.4, PostgreSQL 8.2.5, Java 5 > Reporter: Jeppe Cramon > Assignee: Gail Badner > Attachments: 3.3.1.GA-HHH-3544, 3.3.1.GA-HHH-3544.v2.patch, 3.3.1.GA-HHH-3544.v3.patch, HibernateNullabilityProblem.zip > > > Nullability.checkNullability throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences just nulled. > I've included an Eclipse Java project which can reproduce the problem (didn't include the jars). > The problem requires a pretty big graph to be reproduce able. The file "Domain Model.jpg" displays the Classes that take part in the problem. > The Domain Model is a simplification of the entities from our application. > In the example, ModelTest.java, there's only one active instance entity of each type (from A to H). > With the given test case, when an instance of a is passed to entityManager.persist(..), then the following exception is thrown: > javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: dk.hibernatetest.model.C.b > at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) > at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:226) > at dk.hibernatetest.model.ModelTest.test(ModelTest.java:49) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) > at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) > at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) > at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) > at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) > at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: dk.hibernatetest.model.C.b > at org.hibernate.engine.Nullability.checkNullability(Nullability.java:95) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:313) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) > at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:357) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) > at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:357) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:645) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:619) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:623) > at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:220) > ... 21 more > As noted in TestModel.java, if some of the other entities (namely c, g or h) are passed to persist(), then the problem doesn't occur. > I've tried to debug the problem and the only difference I've seen inside ForeignKeys.Nullifier.nullifyTransientReferences() is that, in the cases where an exception is thrown, then the B instance that C.b points to has the state SAVING, whereas when the exception isn't thrown, then it has state MANAGED. > When the B instance has state SAVING, then ForeignKeys.Nullifier.nullifyTransientReferences() nulls then entry in it's value array. > After that, Nullability.checkNullability(), performs a null check, which fails because ForeignKeys.Nullifier.nullifyTransientReferences() just nulled the property in the values array. > Could it be a solution to reverse the order of the ForeignKeys.Nullifier.nullifyTransientReferences() and Nullability.checkNullability() (See AbstractEventListener.performSaveOrReplicate(...)) > or does ForeignKeys.Nullifier.nullifyTransientReferences() instead have to take nullability into considerations? > /Jeppe -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 19:25:15 2009 From: noreply at atlassian.com (Krasimir Chobantonov (JIRA)) Date: Wed, 5 Aug 2009 18:25:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3544) Nullability.checkNullability() throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences() just nulled In-Reply-To: <4127300.1224851764513.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1647630560.16521249514715472.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Krasimir Chobantonov updated HHH-3544: -------------------------------------- Attachment: 3.3.1.GA-HHH-3544.v4.patch fixes an issue when determine if the entity reference is nullable. > Nullability.checkNullability() throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences() just nulled > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HHH-3544 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3544 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.1 > Environment: Hibernate 3.3.1, Hibernate Annotations 3.4, Hibernate Commons-Annotation 3.3.1, Hibernate EntityManager 3.4, PostgreSQL 8.2.5, Java 5 > Reporter: Jeppe Cramon > Assignee: Gail Badner > Attachments: 3.3.1.GA-HHH-3544, 3.3.1.GA-HHH-3544.v2.patch, 3.3.1.GA-HHH-3544.v3.patch, 3.3.1.GA-HHH-3544.v4.patch, HibernateNullabilityProblem.zip > > > Nullability.checkNullability throws PropertyValueException (not-null property references a null property) for a property that ForeignKeys.Nullifier.nullifyTransientReferences just nulled. > I've included an Eclipse Java project which can reproduce the problem (didn't include the jars). > The problem requires a pretty big graph to be reproduce able. The file "Domain Model.jpg" displays the Classes that take part in the problem. > The Domain Model is a simplification of the entities from our application. > In the example, ModelTest.java, there's only one active instance entity of each type (from A to H). > With the given test case, when an instance of a is passed to entityManager.persist(..), then the following exception is thrown: > javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: dk.hibernatetest.model.C.b > at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) > at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:226) > at dk.hibernatetest.model.ModelTest.test(ModelTest.java:49) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) > at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) > at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) > at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) > at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) > at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: dk.hibernatetest.model.C.b > at org.hibernate.engine.Nullability.checkNullability(Nullability.java:95) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:313) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) > at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:357) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:636) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:628) > at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:28) > at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) > at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) > at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) > at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) > at org.hibernate.engine.Cascade.cascade(Cascade.java:153) > at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:357) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:144) > at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) > at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110) > at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61) > at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:645) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:619) > at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:623) > at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:220) > ... 21 more > As noted in TestModel.java, if some of the other entities (namely c, g or h) are passed to persist(), then the problem doesn't occur. > I've tried to debug the problem and the only difference I've seen inside ForeignKeys.Nullifier.nullifyTransientReferences() is that, in the cases where an exception is thrown, then the B instance that C.b points to has the state SAVING, whereas when the exception isn't thrown, then it has state MANAGED. > When the B instance has state SAVING, then ForeignKeys.Nullifier.nullifyTransientReferences() nulls then entry in it's value array. > After that, Nullability.checkNullability(), performs a null check, which fails because ForeignKeys.Nullifier.nullifyTransientReferences() just nulled the property in the values array. > Could it be a solution to reverse the order of the ForeignKeys.Nullifier.nullifyTransientReferences() and Nullability.checkNullability() (See AbstractEventListener.performSaveOrReplicate(...)) > or does ForeignKeys.Nullifier.nullifyTransientReferences() instead have to take nullability into considerations? > /Jeppe -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 5 23:48:13 2009 From: noreply at atlassian.com (Sven (JIRA)) Date: Wed, 5 Aug 2009 22:48:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-391) Two-Level embedded objects don't get an index update Message-ID: <1367643564.16551249530493059.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Two-Level embedded objects don't get an index update ---------------------------------------------------- Key: HSEARCH-391 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-391 Project: Hibernate Search Issue Type: Bug Affects Versions: 3.1.1.GA Reporter: Sven Priority: Minor refering to my post in the forum, i should write a jira issue: https://forum.hibernate.org/viewtopic.php?f=9&t=998709 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 01:24:12 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 00:24:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-2388) Insert w/ identity column fails on Sybase but no exception occurs In-Reply-To: <73498484.1169849299583.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <557745391.16631249536252985.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] strong liu reassigned HHH-2388: ------------------------------- Assignee: strong liu (was: Gail Badner) > Insert w/ identity column fails on Sybase but no exception occurs > ----------------------------------------------------------------- > > Key: HHH-2388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.1 > Environment: Hibernate 3.2.1.GA with annotations > Sybase jConnect 6.05 JDBC driver > Sybase ASE 15 database > Reporter: Tim Morrow > Assignee: strong liu > > I have a scenario where storing a new entity fails (i.e. the row is not inserted) but Hibernate does not realize this. No exceptions are thrown. Later, this leads to AssertionFailures (if two such entities fail in the same session - they both have the same PK). > The problem specifically occurs with a table that has a numeric column with precision (e.g. numeric(10,4)) and an identity column when using Sybase ASE. > ========== > To reproduce: > 1. Use Sybase jConnect 6.05 JDBC driver with Sybase ASE 15 database. > 2. Define an Entity with a long ID and BigDecimal numeric column. > 3. Create a corresponding table with an identity column and numeric(10, 4) column. > For example: > hibernate.MyEntity.java: > ----------------------------------------- > package hibernate; > import java.math.BigDecimal; > import javax.persistence.Column; > import javax.persistence.Entity; > import javax.persistence.GeneratedValue; > import javax.persistence.GenerationType; > import javax.persistence.Id; > import javax.persistence.Table; > import org.hibernate.validator.NotNull; > @Entity > @Table(name = "z_tim_test") > public class MyEntity { > private BigDecimal cost; > private long id; > public MyEntity() {} > @Column(columnDefinition = "numeric(10,4)") > @NotNull public final BigDecimal getCost() { > return cost; > } > @GeneratedValue(strategy = GenerationType.AUTO) > @Id public final long getId() { > return id; > } > public final void setCost(BigDecimal cost) { > this.cost = cost; > } > public final void setId(long id) { > this.id = id; > } > } > Table: > ----------------------------------------- > CREATE TABLE z_tim_test > ( > id numeric(19) PRIMARY KEY not null, > cost numeric(10,4) not null > ); > 4. Write some code that stores a new entity and tries to load it: > MyEntity myEntity = new MyEntity(); > myEntity.setCost(new BigDecimal("123.12345")); > session.save(myEntity); > session.flush(); > session.clear(); > List results = session.createCriteria(MyEntity.class).list(); > if (results.size() != 1) { > throw new IllegalStateException("Expected 1 result"); > } > This test will throw the IllegalStateException because the row was not persisted and no errors occurred. > Reason: > * Sybase does not thrown any SQLException when you try and persist a numeric value whose scale exceeds that defined on the column. Instead, it returns an updateCount of zero and an identity column value of zero. > * Hibernate does not check the updateCount after executing the statement when using an Identity column. The offending code is in: > org.hibernate.id.IdentityGenerator$InsertSelectDelegate > public Serializable executeAndExtract(PreparedStatement insert) throws SQLException { > if ( !insert.execute() ) { > while ( !insert.getMoreResults() && insert.getUpdateCount() != -1 ) { > // do nothing until we hit the rsult set containing the generated id > } > } > ResultSet rs = insert.getResultSet(); > try { > return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); > } > finally { > rs.close(); > } > } > It ignores the updateCount. > The net result is that the object is assigned a PK value of zero. Hibernate continues. My applicaiton is unaware that the row failed to insert. > Solution: > It would seem to me replacing the above code with: > if (!insert.execute()) { > if (insert.getUpdateCount() < 1) { > throw new HibernateException("No update occurred"); > } > while (!insert.getMoreResults()) { > // do nothing until we hit the rsult set containing the generated id > } > } > Would take care of the problem? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 02:51:12 2009 From: noreply at atlassian.com (Alexey Romanchuk (JIRA)) Date: Thu, 6 Aug 2009 01:51:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-198) Wront constraint violation path when adding subnode error to subnode Message-ID: <527132366.16651249541472329.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Wront constraint violation path when adding subnode error to subnode -------------------------------------------------------------------- Key: HV-198 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-198 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta2 Environment: Hibernate Validator Beta 2, JRE 1.6 Reporter: Alexey Romanchuk Priority: Critical When I use subnode error in validator and object is part of another with @Valid tag I have incorrect path in ConstrainViolation. Example: I got "start" instead of "interval.start". Looks like we need merge paths when ConstraintViolationImpl is created class Item { @Valid Interval interval; } @StartLessThatEnd class Interval { int start; int end; } public class ValidatorTest { public static void main( String[] args ) { Item item = new Item(); item.interval = new Interval(); item.interval.start = 10; item.interval.end = 5; ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); ConstraintViolation c = factory.getValidator().validate( item ).iterator().next(); System.out.println( c.getPropertyPath() ); } } @Target( ElementType.TYPE ) @Retention( RetentionPolicy.RUNTIME ) @Constraint( validatedBy = StartLessThatEndImpl.class ) public @interface StartLessThatEnd { String message() default "x"; Class[] groups() default {}; Class[] payload() default { }; } public class StartLessThatEndImpl implements ConstraintValidator { @Override public void initialize( StartLessThatEnd constraintAnnotation ) { } @Override public boolean isValid( Interval value, ConstraintValidatorContext c ) { if ( value.start > value.end ) { c.disableDefaultError(); c.buildErrorWithMessageTemplate( c.getDefaultErrorMessageTemplate() ).addSubNode( "start" ).addError(); return false; } return true; } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 03:35:16 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 02:35:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2388) Insert w/ identity column fails on Sybase but no exception occurs In-Reply-To: <73498484.1169849299583.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <930686578.16721249544116278.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33713#action_33713 ] strong liu commented on HHH-2388: --------------------------------- I try to reproduce this issue with the unit test in the *Description* section. but I got another result, it didn't throw the IllegalStateException, but org.hibernate.exception.GenericJDBCException: could not insert: [hibernate.MyEntity] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2162) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2642) at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519) at hibernate.MyEntityTest.testSDFS(MyEntityTest.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) -------------------------------------------------------------------- and the log is 15:27:28,299 DEBUG SchemaExport:303 - create table MyEntity ( id numeric(19,0) identity not null, cost numeric(10,4) not null, primary key (id) ) 15:27:28,727 INFO SchemaExport:196 - schema export complete Hibernate: insert into MyEntity (cost) values (?) 15:27:30,060 WARN JDBCExceptionReporter:77 - SQL Error: 0, SQLState: JZ0NK 15:27:30,061 ERROR JDBCExceptionReporter:78 - JZ0NK: Generated keys are not available because either the Statement.NO_GENERATED_KEYS was used or no keys were automatically generated. 15:27:30,870 INFO SessionFactoryImpl:769 - closing 15:27:30,870 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:sybase:Tds:dev77.qa.atl2.redhat.com:5000/stliu 15:27:31,232 INFO SchemaExport:154 - Running hbm2ddl schema export 15:27:31,233 DEBUG SchemaExport:170 - import file not found: /import.sql 15:27:31,233 INFO SchemaExport:179 - exporting generated schema to database 15:27:35,315 DEBUG SchemaExport:303 - drop table MyEntity 15:27:35,707 INFO SchemaExport:196 - schema export complete > Insert w/ identity column fails on Sybase but no exception occurs > ----------------------------------------------------------------- > > Key: HHH-2388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.1 > Environment: Hibernate 3.2.1.GA with annotations > Sybase jConnect 6.05 JDBC driver > Sybase ASE 15 database > Reporter: Tim Morrow > Assignee: strong liu > > I have a scenario where storing a new entity fails (i.e. the row is not inserted) but Hibernate does not realize this. No exceptions are thrown. Later, this leads to AssertionFailures (if two such entities fail in the same session - they both have the same PK). > The problem specifically occurs with a table that has a numeric column with precision (e.g. numeric(10,4)) and an identity column when using Sybase ASE. > ========== > To reproduce: > 1. Use Sybase jConnect 6.05 JDBC driver with Sybase ASE 15 database. > 2. Define an Entity with a long ID and BigDecimal numeric column. > 3. Create a corresponding table with an identity column and numeric(10, 4) column. > For example: > hibernate.MyEntity.java: > ----------------------------------------- > package hibernate; > import java.math.BigDecimal; > import javax.persistence.Column; > import javax.persistence.Entity; > import javax.persistence.GeneratedValue; > import javax.persistence.GenerationType; > import javax.persistence.Id; > import javax.persistence.Table; > import org.hibernate.validator.NotNull; > @Entity > @Table(name = "z_tim_test") > public class MyEntity { > private BigDecimal cost; > private long id; > public MyEntity() {} > @Column(columnDefinition = "numeric(10,4)") > @NotNull public final BigDecimal getCost() { > return cost; > } > @GeneratedValue(strategy = GenerationType.AUTO) > @Id public final long getId() { > return id; > } > public final void setCost(BigDecimal cost) { > this.cost = cost; > } > public final void setId(long id) { > this.id = id; > } > } > Table: > ----------------------------------------- > CREATE TABLE z_tim_test > ( > id numeric(19) PRIMARY KEY not null, > cost numeric(10,4) not null > ); > 4. Write some code that stores a new entity and tries to load it: > MyEntity myEntity = new MyEntity(); > myEntity.setCost(new BigDecimal("123.12345")); > session.save(myEntity); > session.flush(); > session.clear(); > List results = session.createCriteria(MyEntity.class).list(); > if (results.size() != 1) { > throw new IllegalStateException("Expected 1 result"); > } > This test will throw the IllegalStateException because the row was not persisted and no errors occurred. > Reason: > * Sybase does not thrown any SQLException when you try and persist a numeric value whose scale exceeds that defined on the column. Instead, it returns an updateCount of zero and an identity column value of zero. > * Hibernate does not check the updateCount after executing the statement when using an Identity column. The offending code is in: > org.hibernate.id.IdentityGenerator$InsertSelectDelegate > public Serializable executeAndExtract(PreparedStatement insert) throws SQLException { > if ( !insert.execute() ) { > while ( !insert.getMoreResults() && insert.getUpdateCount() != -1 ) { > // do nothing until we hit the rsult set containing the generated id > } > } > ResultSet rs = insert.getResultSet(); > try { > return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); > } > finally { > rs.close(); > } > } > It ignores the updateCount. > The net result is that the object is assigned a PK value of zero. Hibernate continues. My applicaiton is unaware that the row failed to insert. > Solution: > It would seem to me replacing the above code with: > if (!insert.execute()) { > if (insert.getUpdateCount() < 1) { > throw new HibernateException("No update occurred"); > } > while (!insert.getMoreResults()) { > // do nothing until we hit the rsult set containing the generated id > } > } > Would take care of the problem? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 03:43:13 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 02:43:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2388) Insert w/ identity column fails on Sybase but no exception occurs In-Reply-To: <73498484.1169849299583.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <804413526.16841249544593866.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33714#action_33714 ] strong liu commented on HHH-2388: --------------------------------- now the Insert w/ identity column fails on Sybase with exception, I don't know why this happen, has someone fixed this bug? well, I'm working on Branch_3_2_4_SP1_CP, somebody can take a look at this? > Insert w/ identity column fails on Sybase but no exception occurs > ----------------------------------------------------------------- > > Key: HHH-2388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.1 > Environment: Hibernate 3.2.1.GA with annotations > Sybase jConnect 6.05 JDBC driver > Sybase ASE 15 database > Reporter: Tim Morrow > Assignee: strong liu > > I have a scenario where storing a new entity fails (i.e. the row is not inserted) but Hibernate does not realize this. No exceptions are thrown. Later, this leads to AssertionFailures (if two such entities fail in the same session - they both have the same PK). > The problem specifically occurs with a table that has a numeric column with precision (e.g. numeric(10,4)) and an identity column when using Sybase ASE. > ========== > To reproduce: > 1. Use Sybase jConnect 6.05 JDBC driver with Sybase ASE 15 database. > 2. Define an Entity with a long ID and BigDecimal numeric column. > 3. Create a corresponding table with an identity column and numeric(10, 4) column. > For example: > hibernate.MyEntity.java: > ----------------------------------------- > package hibernate; > import java.math.BigDecimal; > import javax.persistence.Column; > import javax.persistence.Entity; > import javax.persistence.GeneratedValue; > import javax.persistence.GenerationType; > import javax.persistence.Id; > import javax.persistence.Table; > import org.hibernate.validator.NotNull; > @Entity > @Table(name = "z_tim_test") > public class MyEntity { > private BigDecimal cost; > private long id; > public MyEntity() {} > @Column(columnDefinition = "numeric(10,4)") > @NotNull public final BigDecimal getCost() { > return cost; > } > @GeneratedValue(strategy = GenerationType.AUTO) > @Id public final long getId() { > return id; > } > public final void setCost(BigDecimal cost) { > this.cost = cost; > } > public final void setId(long id) { > this.id = id; > } > } > Table: > ----------------------------------------- > CREATE TABLE z_tim_test > ( > id numeric(19) PRIMARY KEY not null, > cost numeric(10,4) not null > ); > 4. Write some code that stores a new entity and tries to load it: > MyEntity myEntity = new MyEntity(); > myEntity.setCost(new BigDecimal("123.12345")); > session.save(myEntity); > session.flush(); > session.clear(); > List results = session.createCriteria(MyEntity.class).list(); > if (results.size() != 1) { > throw new IllegalStateException("Expected 1 result"); > } > This test will throw the IllegalStateException because the row was not persisted and no errors occurred. > Reason: > * Sybase does not thrown any SQLException when you try and persist a numeric value whose scale exceeds that defined on the column. Instead, it returns an updateCount of zero and an identity column value of zero. > * Hibernate does not check the updateCount after executing the statement when using an Identity column. The offending code is in: > org.hibernate.id.IdentityGenerator$InsertSelectDelegate > public Serializable executeAndExtract(PreparedStatement insert) throws SQLException { > if ( !insert.execute() ) { > while ( !insert.getMoreResults() && insert.getUpdateCount() != -1 ) { > // do nothing until we hit the rsult set containing the generated id > } > } > ResultSet rs = insert.getResultSet(); > try { > return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); > } > finally { > rs.close(); > } > } > It ignores the updateCount. > The net result is that the object is assigned a PK value of zero. Hibernate continues. My applicaiton is unaware that the row failed to insert. > Solution: > It would seem to me replacing the above code with: > if (!insert.execute()) { > if (insert.getUpdateCount() < 1) { > throw new HibernateException("No update occurred"); > } > while (!insert.getMoreResults()) { > // do nothing until we hit the rsult set containing the generated id > } > } > Would take care of the problem? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 03:55:14 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 02:55:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2830) Insert error ignored when using sybase generated identity column In-Reply-To: <121260518.1189169654439.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2019677338.16881249545314697.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33715#action_33715 ] strong liu commented on HHH-2830: --------------------------------- I tried the method you mentioned in HHH-2503, it seems don't work with this issue, and HHH-2388 in Branch_3_2_4_SP1_CP > Insert error ignored when using sybase generated identity column > ---------------------------------------------------------------- > > Key: HHH-2830 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2830 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.2 > Environment: Hibernate 3.2.2, Sybase 12.5.3 > Reporter: Martin van Dijken > Assignee: Diego Plentz > Attachments: create-test-tables.sql, TestExchangeRate.hbm.xml, TestExchangeRate.java, TestRateOwner.hbm.xml, TestRateOwner.java, TestRateTest.java > > > All our tables have a single database generated identity column. This column is specified in Sybase as: > objectId numeric(12) identity > A little while ago, Hibernate started throwing NonUniqueObjectExceptions upon insert of a certain object. It turns out, the insert statement could not possibly succeed as the value of one of the columns was larger than the database column. The error is however ignored because Hibernate generates a query: > insert into objectTable (objectName, objectNumericErrorField) values (?,?) select @@ identity > The value of objectNumericErrorField was larger than the database column allows. The insert statement would therefore fail. The select @@identity however would succeed, only because no new row was inserted it would return the previous ID. > Hibernate then assumes the entire query worked fine and would assign the already assigned id to a different object. It would then check whether or not the id was already in use and throw a NonUniqueObjectException -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 04:00:13 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 03:00:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2388) Insert w/ identity column fails on Sybase but no exception occurs In-Reply-To: <73498484.1169849299583.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <382395888.16941249545613875.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33716#action_33716 ] strong liu commented on HHH-2388: --------------------------------- and I tried insert w/ identity column using JDBC, the code belowed ------------------------------------ try { Class.forName("com.sybase.jdbc3.jdbc.SybDriver"); Connection conn = DriverManager.getConnection(...); Statement stmt = conn.createStatement(); //stmt.execute("create table TestExchangeRate (id numeric(19,0) identity not null,usedRate numeric(20,10) not null,primary key (id))"); int r=stmt.executeUpdate("insert into TestExchangeRate (usedRate) values (0.123456789123)"); System.out.println(r); ResultSet rs=stmt.executeQuery("select * from TestExchangeRate"); while(rs.next()){ System.out.println("id: "+rs.getLong("id")+" "+"usedRate: "+rs.getBigDecimal("usedRate")); } } catch (Exception e) { e.printStackTrace(); } ----------------------------------------------------- and it throws a SybSQLException An exception occurred.com.sybase.jdbc3.jdbc.SybSQLException: Scale error during implicit conversion of NUMERIC value '0.123456789123' to a NUMERIC field. at com.sybase.jdbc3.tds.Tds.a(Unknown Source) at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.updateLoop(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(Unknown Source) > Insert w/ identity column fails on Sybase but no exception occurs > ----------------------------------------------------------------- > > Key: HHH-2388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.1 > Environment: Hibernate 3.2.1.GA with annotations > Sybase jConnect 6.05 JDBC driver > Sybase ASE 15 database > Reporter: Tim Morrow > Assignee: strong liu > > I have a scenario where storing a new entity fails (i.e. the row is not inserted) but Hibernate does not realize this. No exceptions are thrown. Later, this leads to AssertionFailures (if two such entities fail in the same session - they both have the same PK). > The problem specifically occurs with a table that has a numeric column with precision (e.g. numeric(10,4)) and an identity column when using Sybase ASE. > ========== > To reproduce: > 1. Use Sybase jConnect 6.05 JDBC driver with Sybase ASE 15 database. > 2. Define an Entity with a long ID and BigDecimal numeric column. > 3. Create a corresponding table with an identity column and numeric(10, 4) column. > For example: > hibernate.MyEntity.java: > ----------------------------------------- > package hibernate; > import java.math.BigDecimal; > import javax.persistence.Column; > import javax.persistence.Entity; > import javax.persistence.GeneratedValue; > import javax.persistence.GenerationType; > import javax.persistence.Id; > import javax.persistence.Table; > import org.hibernate.validator.NotNull; > @Entity > @Table(name = "z_tim_test") > public class MyEntity { > private BigDecimal cost; > private long id; > public MyEntity() {} > @Column(columnDefinition = "numeric(10,4)") > @NotNull public final BigDecimal getCost() { > return cost; > } > @GeneratedValue(strategy = GenerationType.AUTO) > @Id public final long getId() { > return id; > } > public final void setCost(BigDecimal cost) { > this.cost = cost; > } > public final void setId(long id) { > this.id = id; > } > } > Table: > ----------------------------------------- > CREATE TABLE z_tim_test > ( > id numeric(19) PRIMARY KEY not null, > cost numeric(10,4) not null > ); > 4. Write some code that stores a new entity and tries to load it: > MyEntity myEntity = new MyEntity(); > myEntity.setCost(new BigDecimal("123.12345")); > session.save(myEntity); > session.flush(); > session.clear(); > List results = session.createCriteria(MyEntity.class).list(); > if (results.size() != 1) { > throw new IllegalStateException("Expected 1 result"); > } > This test will throw the IllegalStateException because the row was not persisted and no errors occurred. > Reason: > * Sybase does not thrown any SQLException when you try and persist a numeric value whose scale exceeds that defined on the column. Instead, it returns an updateCount of zero and an identity column value of zero. > * Hibernate does not check the updateCount after executing the statement when using an Identity column. The offending code is in: > org.hibernate.id.IdentityGenerator$InsertSelectDelegate > public Serializable executeAndExtract(PreparedStatement insert) throws SQLException { > if ( !insert.execute() ) { > while ( !insert.getMoreResults() && insert.getUpdateCount() != -1 ) { > // do nothing until we hit the rsult set containing the generated id > } > } > ResultSet rs = insert.getResultSet(); > try { > return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); > } > finally { > rs.close(); > } > } > It ignores the updateCount. > The net result is that the object is assigned a PK value of zero. Hibernate continues. My applicaiton is unaware that the row failed to insert. > Solution: > It would seem to me replacing the above code with: > if (!insert.execute()) { > if (insert.getUpdateCount() < 1) { > throw new HibernateException("No update occurred"); > } > while (!insert.getMoreResults()) { > // do nothing until we hit the rsult set containing the generated id > } > } > Would take care of the problem? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 04:44:12 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 03:44:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3686) Sybase - QueryCacheTest.testQueryCacheInvalidation fails In-Reply-To: <12838367.1231237778689.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <16867088.16991249548252126.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33717#action_33717 ] strong liu commented on HHH-3686: --------------------------------- yes, I'd think dialects should not use DatabaseMetaData directly for now, I simply return the default( true for Sybase) in the Dialect.areStringComparisonsCaseInsensitive() > Sybase - QueryCacheTest.testQueryCacheInvalidation fails > -------------------------------------------------------- > > Key: HHH-3686 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > Assignee: strong liu > > QueryCacheTest.testQueryCacheInvalidation fails because SybaseDialect.areStringComparisonsCaseInsensitive(). returns false and the test machine is actually configured for case-insensitive string comparisons. > By default, Sybase string comparisons are case-insensitive. > It may be possible to determine which is configured by looking at DatabaseMetaData to return the appropriate value for SybaseDialect.areStringComparisonsCaseInsensitive(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 05:02:14 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 04:02:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3686) Sybase - QueryCacheTest.testQueryCacheInvalidation fails In-Reply-To: <12838367.1231237778689.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <985377897.17021249549334927.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33718#action_33718 ] strong liu commented on HHH-3686: --------------------------------- maybe we should add more test cases about this methon > Sybase - QueryCacheTest.testQueryCacheInvalidation fails > -------------------------------------------------------- > > Key: HHH-3686 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > Assignee: strong liu > > QueryCacheTest.testQueryCacheInvalidation fails because SybaseDialect.areStringComparisonsCaseInsensitive(). returns false and the test machine is actually configured for case-insensitive string comparisons. > By default, Sybase string comparisons are case-insensitive. > It may be possible to determine which is configured by looking at DatabaseMetaData to return the appropriate value for SybaseDialect.areStringComparisonsCaseInsensitive(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 05:17:14 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 6 Aug 2009 04:17:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3686) Sybase - QueryCacheTest.testQueryCacheInvalidation fails In-Reply-To: <12838367.1231237778689.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <611613048.17051249550234712.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] strong liu resolved HHH-3686. ----------------------------- Resolution: Fixed > Sybase - QueryCacheTest.testQueryCacheInvalidation fails > -------------------------------------------------------- > > Key: HHH-3686 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > Assignee: strong liu > > QueryCacheTest.testQueryCacheInvalidation fails because SybaseDialect.areStringComparisonsCaseInsensitive(). returns false and the test machine is actually configured for case-insensitive string comparisons. > By default, Sybase string comparisons are case-insensitive. > It may be possible to determine which is configured by looking at DatabaseMetaData to return the appropriate value for SybaseDialect.areStringComparisonsCaseInsensitive(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 05:53:12 2009 From: noreply at atlassian.com (Michael Joyce (JIRA)) Date: Thu, 6 Aug 2009 04:53:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2388) Insert w/ identity column fails on Sybase but no exception occurs In-Reply-To: <73498484.1169849299583.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <204431376.17141249552392312.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33719#action_33719 ] Michael Joyce commented on HHH-2388: ------------------------------------ As posted earlier the Sybase documentation mentions a problem with jConnect 6.05 and ASE 12.0 to 12.5. We don't use Sybase 15 so I can't comment on that version. from: http://www.sybase.com/detail?id=1037380#BABHCIBG "6.5 Numeric errors returned as warnings In ASE 12.0 through 12.5, numeric errors are handled by default as severity 10. A severity-level 10 message is classified as a status information message, not as an error, and its content is transferred in a SQLWarning object. The ExecuteQueryNumeric sample program demonstrates how to process such warnings." > Insert w/ identity column fails on Sybase but no exception occurs > ----------------------------------------------------------------- > > Key: HHH-2388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.1 > Environment: Hibernate 3.2.1.GA with annotations > Sybase jConnect 6.05 JDBC driver > Sybase ASE 15 database > Reporter: Tim Morrow > Assignee: strong liu > > I have a scenario where storing a new entity fails (i.e. the row is not inserted) but Hibernate does not realize this. No exceptions are thrown. Later, this leads to AssertionFailures (if two such entities fail in the same session - they both have the same PK). > The problem specifically occurs with a table that has a numeric column with precision (e.g. numeric(10,4)) and an identity column when using Sybase ASE. > ========== > To reproduce: > 1. Use Sybase jConnect 6.05 JDBC driver with Sybase ASE 15 database. > 2. Define an Entity with a long ID and BigDecimal numeric column. > 3. Create a corresponding table with an identity column and numeric(10, 4) column. > For example: > hibernate.MyEntity.java: > ----------------------------------------- > package hibernate; > import java.math.BigDecimal; > import javax.persistence.Column; > import javax.persistence.Entity; > import javax.persistence.GeneratedValue; > import javax.persistence.GenerationType; > import javax.persistence.Id; > import javax.persistence.Table; > import org.hibernate.validator.NotNull; > @Entity > @Table(name = "z_tim_test") > public class MyEntity { > private BigDecimal cost; > private long id; > public MyEntity() {} > @Column(columnDefinition = "numeric(10,4)") > @NotNull public final BigDecimal getCost() { > return cost; > } > @GeneratedValue(strategy = GenerationType.AUTO) > @Id public final long getId() { > return id; > } > public final void setCost(BigDecimal cost) { > this.cost = cost; > } > public final void setId(long id) { > this.id = id; > } > } > Table: > ----------------------------------------- > CREATE TABLE z_tim_test > ( > id numeric(19) PRIMARY KEY not null, > cost numeric(10,4) not null > ); > 4. Write some code that stores a new entity and tries to load it: > MyEntity myEntity = new MyEntity(); > myEntity.setCost(new BigDecimal("123.12345")); > session.save(myEntity); > session.flush(); > session.clear(); > List results = session.createCriteria(MyEntity.class).list(); > if (results.size() != 1) { > throw new IllegalStateException("Expected 1 result"); > } > This test will throw the IllegalStateException because the row was not persisted and no errors occurred. > Reason: > * Sybase does not thrown any SQLException when you try and persist a numeric value whose scale exceeds that defined on the column. Instead, it returns an updateCount of zero and an identity column value of zero. > * Hibernate does not check the updateCount after executing the statement when using an Identity column. The offending code is in: > org.hibernate.id.IdentityGenerator$InsertSelectDelegate > public Serializable executeAndExtract(PreparedStatement insert) throws SQLException { > if ( !insert.execute() ) { > while ( !insert.getMoreResults() && insert.getUpdateCount() != -1 ) { > // do nothing until we hit the rsult set containing the generated id > } > } > ResultSet rs = insert.getResultSet(); > try { > return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); > } > finally { > rs.close(); > } > } > It ignores the updateCount. > The net result is that the object is assigned a PK value of zero. Hibernate continues. My applicaiton is unaware that the row failed to insert. > Solution: > It would seem to me replacing the above code with: > if (!insert.execute()) { > if (insert.getUpdateCount() < 1) { > throw new HibernateException("No update occurred"); > } > while (!insert.getMoreResults()) { > // do nothing until we hit the rsult set containing the generated id > } > } > Would take care of the problem? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 07:27:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 6 Aug 2009 06:27:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-198) Wront constraint violation path when adding subnode error to subnode In-Reply-To: <527132366.16651249541472329.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1736893332.17161249558035304.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-198: --------------------------------- Fix Version/s: 4.0.0.CR1 > Wront constraint violation path when adding subnode error to subnode > -------------------------------------------------------------------- > > Key: HV-198 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-198 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Environment: Hibernate Validator Beta 2, JRE 1.6 > Reporter: Alexey Romanchuk > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > When I use subnode error in validator and object is part of another with @Valid tag I have incorrect path in ConstrainViolation. > Example: > I got "start" instead of "interval.start". Looks like we need merge paths when ConstraintViolationImpl is created > class Item > { > @Valid > Interval interval; > } > @StartLessThatEnd > class Interval > { > int start; > int end; > } > public class ValidatorTest > { > public static void main( String[] args ) > { > Item item = new Item(); > item.interval = new Interval(); > item.interval.start = 10; > item.interval.end = 5; > > ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); > ConstraintViolation c = factory.getValidator().validate( item ).iterator().next(); > System.out.println( c.getPropertyPath() ); > } > } > @Target( ElementType.TYPE ) > @Retention( RetentionPolicy.RUNTIME ) > @Constraint( validatedBy = StartLessThatEndImpl.class ) > public @interface StartLessThatEnd > { > String message() default "x"; > Class[] groups() default {}; > > Class[] payload() default { }; > } > public class StartLessThatEndImpl implements ConstraintValidator > { > @Override > public void initialize( StartLessThatEnd constraintAnnotation ) > { > } > @Override > public boolean isValid( Interval value, ConstraintValidatorContext c ) > { > if ( value.start > value.end ) > { > c.disableDefaultError(); > c.buildErrorWithMessageTemplate( c.getDefaultErrorMessageTemplate() ).addSubNode( "start" ).addError(); > return false; > } > return true; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 07:29:12 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 6 Aug 2009 06:29:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-198) Wront constraint violation path when adding subnode error to subnode In-Reply-To: <527132366.16651249541472329.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1479702546.17191249558152065.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-198: --------------------------------- Assignee: Hardy Ferentschik > Wront constraint violation path when adding subnode error to subnode > -------------------------------------------------------------------- > > Key: HV-198 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-198 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Environment: Hibernate Validator Beta 2, JRE 1.6 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > When I use subnode error in validator and object is part of another with @Valid tag I have incorrect path in ConstrainViolation. > Example: > I got "start" instead of "interval.start". Looks like we need merge paths when ConstraintViolationImpl is created > class Item > { > @Valid > Interval interval; > } > @StartLessThatEnd > class Interval > { > int start; > int end; > } > public class ValidatorTest > { > public static void main( String[] args ) > { > Item item = new Item(); > item.interval = new Interval(); > item.interval.start = 10; > item.interval.end = 5; > > ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); > ConstraintViolation c = factory.getValidator().validate( item ).iterator().next(); > System.out.println( c.getPropertyPath() ); > } > } > @Target( ElementType.TYPE ) > @Retention( RetentionPolicy.RUNTIME ) > @Constraint( validatedBy = StartLessThatEndImpl.class ) > public @interface StartLessThatEnd > { > String message() default "x"; > Class[] groups() default {}; > > Class[] payload() default { }; > } > public class StartLessThatEndImpl implements ConstraintValidator > { > @Override > public void initialize( StartLessThatEnd constraintAnnotation ) > { > } > @Override > public boolean isValid( Interval value, ConstraintValidatorContext c ) > { > if ( value.start > value.end ) > { > c.disableDefaultError(); > c.buildErrorWithMessageTemplate( c.getDefaultErrorMessageTemplate() ).addSubNode( "start" ).addError(); > return false; > } > return true; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:22:12 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 6 Aug 2009 07:22:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-198) Wront constraint violation path when adding subnode error to subnode In-Reply-To: <527132366.16651249541472329.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1916353530.17291249561332866.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-198. ---------------------------------- Resolution: Fixed > Wront constraint violation path when adding subnode error to subnode > -------------------------------------------------------------------- > > Key: HV-198 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-198 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Environment: Hibernate Validator Beta 2, JRE 1.6 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Time Spent: 52 minutes > Remaining Estimate: 0 minutes > > When I use subnode error in validator and object is part of another with @Valid tag I have incorrect path in ConstrainViolation. > Example: > I got "start" instead of "interval.start". Looks like we need merge paths when ConstraintViolationImpl is created > class Item > { > @Valid > Interval interval; > } > @StartLessThatEnd > class Interval > { > int start; > int end; > } > public class ValidatorTest > { > public static void main( String[] args ) > { > Item item = new Item(); > item.interval = new Interval(); > item.interval.start = 10; > item.interval.end = 5; > > ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); > ConstraintViolation c = factory.getValidator().validate( item ).iterator().next(); > System.out.println( c.getPropertyPath() ); > } > } > @Target( ElementType.TYPE ) > @Retention( RetentionPolicy.RUNTIME ) > @Constraint( validatedBy = StartLessThatEndImpl.class ) > public @interface StartLessThatEnd > { > String message() default "x"; > Class[] groups() default {}; > > Class[] payload() default { }; > } > public class StartLessThatEndImpl implements ConstraintValidator > { > @Override > public void initialize( StartLessThatEnd constraintAnnotation ) > { > } > @Override > public boolean isValid( Interval value, ConstraintValidatorContext c ) > { > if ( value.start > value.end ) > { > c.disableDefaultError(); > c.buildErrorWithMessageTemplate( c.getDefaultErrorMessageTemplate() ).addSubNode( "start" ).addError(); > return false; > } > return true; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:28:12 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 6 Aug 2009 07:28:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-186) ResourceBundleMessageInterpolator has to allow all characters as message parameter In-Reply-To: <584553595.8181248098892028.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1095004756.17321249561692264.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-186: --------------------------------- Fix Version/s: (was: 4.0.0.GA) 4.0.0.CR1 > ResourceBundleMessageInterpolator has to allow all characters as message parameter > ---------------------------------------------------------------------------------- > > Key: HV-186 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-186 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > At the moment only word characters and '.' are allowed. This excludes for example '-'. However, does it really make sense to allow any character? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:31:45 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:31:45 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-200) ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? Message-ID: <2022642327.17401249561905352.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? ------------------------------------------------------------------------------------------------------------------ Key: HV-200 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-200 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik why is it set to enable = false? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:31:45 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:31:45 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-201) BootstrapTest#testServiceFileExists shouldn't we test for the actual provider passing the TCK ie get the right name? Message-ID: <382567242.17431249561905727.JavaMail.j2ee-opensource-projects@vps07.contegix.com> BootstrapTest#testServiceFileExists shouldn't we test for the actual provider passing the TCK ie get the right name? -------------------------------------------------------------------------------------------------------------------- Key: HV-201 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-201 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:31:47 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:31:47 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-202) BootstrapTest#testCustomMessageInterpolatorViaConfiguration is not testing via configuration but via validator context (ie like testCustomMessageInterpolatorViaValidatorContext) Message-ID: <1017972504.17461249561907024.JavaMail.j2ee-opensource-projects@vps07.contegix.com> BootstrapTest#testCustomMessageInterpolatorViaConfiguration is not testing via configuration but via validator context (ie like testCustomMessageInterpolatorViaValidatorContext) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Key: HV-202 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-202 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:31:47 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:31:47 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-203) MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV Message-ID: <1573447967.17491249561907372.JavaMail.j2ee-opensource-projects@vps07.contegix.com> MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV ------------------------------------------------------------------------------------------------------------------------------------------ Key: HV-203 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-203 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:31:40 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:31:40 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-199) Various TCK issues Message-ID: <816928030.17341249561900846.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Various TCK issues ------------------ Key: HV-199 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-199 Project: Hibernate Validator Issue Type: Bug Affects Versions: 4.0.0.Beta2 Reporter: Emmanuel Bernard Here are oddities in the TCK that require investigation. Ideally, let's open a subtask for each one. Dumping it here for now. I will close the case when I'm done with my review, but Hardy, you can start checking each individual one and mark it a fixed or irrelevant. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:31:47 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:31:47 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-203) MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV In-Reply-To: <1573447967.17491249561907372.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <133476865.17521249561907535.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33720#action_33720 ] Emmanuel Bernard commented on HV-203: ------------------------------------- a stream passed to addMapping should NOT be closed a file opened by configuration and described in validation.xml SHOULD be closed (but that can;t be tested. > MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV > ------------------------------------------------------------------------------------------------------------------------------------------ > > Key: HV-203 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-203 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:31:47 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:31:47 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-204) ValidationRequirementTest#testFieldAccess / testPropertyAccess => should test with fname / lastname set to null and show failures to make the test complete Message-ID: <1341075750.17551249561907726.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ValidationRequirementTest#testFieldAccess / testPropertyAccess => should test with fname / lastname set to null and show failures to make the test complete ----------------------------------------------------------------------------------------------------------------------------------------------------------- Key: HV-204 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-204 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:33:12 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:33:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-205) ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT Message-ID: <706112669.17581249561992129.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT --------------------------------------------------------------------------------------------- Key: HV-205 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-205 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 08:33:12 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 6 Aug 2009 07:33:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-206) CustomConstraintValidatorTest#testNonInterpolatedMessageParameterIsUsed assumes English locale, needs fix before commented line reactivation Message-ID: <1644413807.17611249561992279.JavaMail.j2ee-opensource-projects@vps07.contegix.com> CustomConstraintValidatorTest#testNonInterpolatedMessageParameterIsUsed assumes English locale, needs fix before commented line reactivation -------------------------------------------------------------------------------------------------------------------------------------------- Key: HV-206 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-206 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 09:05:14 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 6 Aug 2009 08:05:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-186) ResourceBundleMessageInterpolator has to allow all characters as message parameter In-Reply-To: <584553595.8181248098892028.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1323947361.17701249563914270.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33721#action_33721 ] Hardy Ferentschik commented on HV-186: -------------------------------------- Changed the regular expression for extracting paramters > ResourceBundleMessageInterpolator has to allow all characters as message parameter > ---------------------------------------------------------------------------------- > > Key: HV-186 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-186 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > Time Spent: 33 minutes > Remaining Estimate: 0 minutes > > At the moment only word characters and '.' are allowed. This excludes for example '-'. However, does it really make sense to allow any character? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 09:05:14 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 6 Aug 2009 08:05:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-186) ResourceBundleMessageInterpolator has to allow all characters as message parameter In-Reply-To: <584553595.8181248098892028.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1040099557.17671249563914144.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-186. ---------------------------------- Resolution: Fixed > ResourceBundleMessageInterpolator has to allow all characters as message parameter > ---------------------------------------------------------------------------------- > > Key: HV-186 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-186 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > Time Spent: 33 minutes > Remaining Estimate: 0 minutes > > At the moment only word characters and '.' are allowed. This excludes for example '-'. However, does it really make sense to allow any character? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 11:38:15 2009 From: noreply at atlassian.com (Sergey (JIRA)) Date: Thu, 6 Aug 2009 10:38:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2710) Cannot specify on-delete="cascade" for a map or a set with just one element In-Reply-To: <164476031.1183549912239.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1909387647.17801249573096002.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33722#action_33722 ] Sergey commented on HHH-2710: ----------------------------- I let myself to suggest swap places of !isInverse() || !isOneToMany() in if statement so that this will work also for unidirectional @OneToMany associations where there is no inverse="true"(XML) / mappedBy(annotations) side. > Cannot specify on-delete="cascade" for a map or a set with just one element > --------------------------------------------------------------------------- > > Key: HHH-2710 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2710 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4 > Reporter: Gerald Klopp > Priority: Minor > Attachments: hibernate2710.zip, patch.txt > > > I'd like to specify the on-delete="cascade" attribute for a map or for a set with just one element. > When I try to do this, I get the following exception : > Initial SessionFactory creation failed.org.hibernate.MappingException: only inverse one-to-many associations may use on-delete="cascade" > The on-delete="cascade" attribute can be specified for more complex relationships like one-to-many. But it seems that the case of a simple map or set is not covered. > - Mapping document example: > > > > > > > > > > > > > > > > > - Exception stack trace : > Initial SessionFactory creation failed.org.hibernate.MappingException: only inverse one-to-many associations may use on-delete="cascade": Document.references > Exception in thread "main" java.lang.ExceptionInInitializerError > at fr.gklopp.test.hibernate3.util.HibernateUtil.(HibernateUtil.java:17) > at fr.gklopp.test.hibernate3.simple.DocumentManager.createAndStoreDocument(DocumentManager.java:23) > at fr.gklopp.test.hibernate3.simple.DocumentManager.main(DocumentManager.java:68) > Caused by: org.hibernate.MappingException: only inverse one-to-many associations may use on-delete="cascade": fr.gklopp.test.hibernate3.simple.Document.references > at org.hibernate.mapping.Collection.validate(Collection.java:267) > at org.hibernate.mapping.Set.validate(Set.java:19) > at org.hibernate.cfg.Configuration.validate(Configuration.java:1106) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287) > at fr.gklopp.test.hibernate3.util.HibernateUtil.(HibernateUtil.java:13) > ... 2 more > - Database : Oracle 10 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 12:30:12 2009 From: noreply at atlassian.com (Gerard Weatherby (JIRA)) Date: Thu, 6 Aug 2009 11:30:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (EJB-458) Typo Message-ID: <615942482.17821249576212009.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Typo ---- Key: EJB-458 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-458 Project: Hibernate Entity Manager Issue Type: Bug Components: Documentation Reporter: Gerard Weatherby http://docs.jboss.org/hibernate/stable/core/reference/en/html/tutorial.html#tutorial-associations-unidirset "declared" incorrectly spelled ("decalred") -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 14:00:11 2009 From: noreply at atlassian.com (david sinclair (JIRA)) Date: Thu, 6 Aug 2009 13:00:11 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4072) ManyToMany with single table inheritance fails when multiple subclasses Message-ID: <1564395731.17851249581611956.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ManyToMany with single table inheritance fails when multiple subclasses ----------------------------------------------------------------------- Key: HHH-4072 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4072 Project: Hibernate Core Issue Type: Bug Components: envers Affects Versions: 3.3.2 Environment: Windows XP, Java 1.6 Reporter: david sinclair Priority: Critical I have a base entity named BusinessSoftwareMatrixElement declare as such @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "software_type", discriminatorType = DiscriminatorType.STRING) @DiscriminatorValue("Software") @Audited BusinessSoftwareMatrixElement ...{ } I then have a subclass of BusinessSoftwareMatrixElement that is a mapped super class which defines a many to many relationship. @MappedSuperclass @Audited public abstract class BusinessOSProcessServiceMatrixElement extends BusinessSoftwareMatrixElement { private Set applicableOperatingSystems = new HashSet(); @ManyToMany(fetch = FetchType.LAZY, cascade = {CascadeType.REMOVE, CascadeType.REFRESH }, targetEntity = BusinessOSMatrixElement.class) @JoinTable(name="matrix_elements_procserv_aos", joinColumns=@JoinColumn(name="sw_guid"), inverseJoinColumns = @JoinColumn(name="os_guid")) public Set getApplicableOperatingSystems() { return applicableOperatingSystems; } } There are then to subclasses that add no new fields, only different discriminators @Entity @DiscriminatorValue("Database") @Audited public class BusinessDBMatrixElement extends BusinessOSProcessServiceMatrixElement { @Entity @DiscriminatorValue("Application") @Audited public class BusinessAppMatrixElement extends BusinessOSProcessServiceMatrixElement { Running the ant task to create the DDL results in an exception being thrown for that many to many table. Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108) ... 24 more Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD at org.hibernate.cfg.Mappings.addClass(Mappings.java:141) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:167) at org.hibernate.cfg.Configuration.add(Configuration.java:716) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:531) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1162) at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:102) at org.hibernate.envers.ant.AnnotationConfigurationTaskWithEnvers.doConfiguration(AnnotationConfigurationTaskWithEnvers.java:38) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302) at org.hibernate.tool.ant.Hbm2DDLExporterTask.createExporter(Hbm2DDLExporterTask.java:51) at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 14:06:13 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Thu, 6 Aug 2009 13:06:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Reopened: (HHH-3686) Sybase - QueryCacheTest.testQueryCacheInvalidation fails In-Reply-To: <12838367.1231237778689.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <299039485.17881249581973487.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner reopened HHH-3686: ------------------------------ Hi Strong, Please fix this in Branch_3_3 and trunk also. Thanks, Gail > Sybase - QueryCacheTest.testQueryCacheInvalidation fails > -------------------------------------------------------- > > Key: HHH-3686 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > Assignee: strong liu > > QueryCacheTest.testQueryCacheInvalidation fails because SybaseDialect.areStringComparisonsCaseInsensitive(). returns false and the test machine is actually configured for case-insensitive string comparisons. > By default, Sybase string comparisons are case-insensitive. > It may be possible to determine which is configured by looking at DatabaseMetaData to return the appropriate value for SybaseDialect.areStringComparisonsCaseInsensitive(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 14:22:12 2009 From: noreply at atlassian.com (Adam Warski (JIRA)) Date: Thu, 6 Aug 2009 13:22:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-4010) support auditing of entity having reference (many-to-one relation) to not audited entity In-Reply-To: <741464164.2801246547055870.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <578694819.17911249582932296.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Warski resolved HHH-4010. ------------------------------ Assignee: Adam Warski Resolution: Fixed Fix Version/s: 3.5 > support auditing of entity having reference (many-to-one relation) to not audited entity > ---------------------------------------------------------------------------------------- > > Key: HHH-4010 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4010 > Project: Hibernate Core > Issue Type: New Feature > Components: envers > Affects Versions: 3.3.2 > Reporter: Tomasz Bech > Assignee: Adam Warski > Fix For: 3.5 > > Attachments: envers.patch > > > There is an annotated (with @Audited) entity class (lets say - class A), it has ManyToOne reference to another class (lets named this class as B). > For various reason, class B should stay as not audited - for example because B is a static dictionary class with milion of records, so duplications in the Audited table is not advised or possible. > Currently this is not supported by evners (target entity must me audited as well for now). > Related topic on forum: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=157846 > We are going to implement this feature and provide the patch as well. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 6 14:24:14 2009 From: noreply at atlassian.com (Adam Warski (JIRA)) Date: Thu, 6 Aug 2009 13:24:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3560) Assume entities relationships as unversioned by default In-Reply-To: <19552031.1225360145773.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <453452037.17941249583054321.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Warski resolved HHH-3560. ------------------------------ Assignee: Adam Warski Resolution: Fixed Fix Version/s: 3.5 Done with HHH-4010 > Assume entities relationships as unversioned by default > ------------------------------------------------------- > > Key: HHH-3560 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3560 > Project: Hibernate Core > Issue Type: New Feature > Components: envers > Reporter: Adam Warski > Assignee: Adam Warski > Fix For: 3.5 > > > http://www.jboss.com/index.html?module=bb&op=viewtopic&t=141471 > Assume that each relation between entities is unversioned unless entity is explicitly annotated with @Versioned. > In current implementation if versioned entity has reference to non-versioned entity an MappingException is being thrown unless the @Unversioned annotation is used in appropriate field. If there is a lot of entities that are referenced but not versioned it requires to apply lot of @Unversioned annotations. This is quite error-prone while it is easy to forgot about some fields. > I've suggest to treat each reference to entity as it is annotated with @Unversioned unless the entity is annotated with @Versioned. In other words treat entities ralationships as implicitly @Unversioned unless @Versioned is not set explicitly. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 02:09:12 2009 From: noreply at atlassian.com (ashutosh (JIRA)) Date: Fri, 7 Aug 2009 01:09:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (EJB-459) native SQL queries in hibernate not working when using a column more then once using alias providing different alias name Message-ID: <141093466.17991249625352451.JavaMail.j2ee-opensource-projects@vps07.contegix.com> native SQL queries in hibernate not working when using a column more then once using alias providing different alias name ----------------------------------------------------------------------------------------------------------------------------- Key: EJB-459 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-459 Project: Hibernate Entity Manager Issue Type: Bug Environment: mysql 5.0 EJB 3.0 jboss 4.2.2 Reporter: ashutosh while using native SQL queries in hibernate when using aliases to same columns having different name i am putting a sample query down select a.area_id as area_id, a.stn_id as stn_id, b.stn_cd AS area_cd , b.stn_nm AS area_nm , c.stn_cd AS stn_cd ,c.stn_nm AS stn_nm from mst_prncpl_stns a ,mst_stns b, mst_stns c where a.area_id = b.stn_id AND a.stn_id = c.stn_id this is returning duplicate result it should return different result -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 06:40:12 2009 From: noreply at atlassian.com (Saravana Kumar (JIRA)) Date: Fri, 7 Aug 2009 05:40:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4073) discriminator formula creates problem in hibernate envers Message-ID: <2006430774.18051249641612097.JavaMail.j2ee-opensource-projects@vps07.contegix.com> discriminator formula creates problem in hibernate envers --------------------------------------------------------- Key: HHH-4073 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4073 Project: Hibernate Core Issue Type: Bug Components: envers Affects Versions: 3.3.x Environment: hibernate-3.3.x, envers-1.2.1.ga-hibernate-3.3.jar (Oracle 10g or HSQLDB) Reporter: Saravana Kumar I map my classes using Single Table per class hierarchy as below @Entity @DiscriminatorFormula ("(select t.c_type from t_type t where t.c_id = c_type)") @Audited public class Attribute...{ ... } or (select t.c_type from t_type t where t.c_id = c_type) When I use envers I get the follwoing error Caused by: java.lang.ClassCastException: org.hibernate.mapping.Formula at org.hibernate.envers.configuration.metadata.MetadataTools.addColumns(MetadataTools.java:154) at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateMappingData(AuditMetadataGenerator.java:263) at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateFirstPass(AuditMetadataGenerator.java:345) at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:87) at org.hibernate.envers.configuration.AuditConfiguration.(AuditConfiguration.java:86) at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99) at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:260) at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198) at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181) at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194) When I tried to debug the problem (AuditMetadataGenerator.java:263) has 260: // Checking if there is a discriminator column 261: if (hasDiscriminator) { 262: Element discriminator_element = class_mapping.addElement("discriminator"); 263: MetadataTools.addColumns(discriminator_element, pc.getDiscriminator().getColumnIterator()); 264: discriminator_element.addAttribute("type", pc.getDiscriminator().getType().getName()); 265: } (MetadataTools.java:154) has 152: public static void addColumns(Element any_mapping, Iterator columns) { 153: while (columns.hasNext()) { 154: Column column = columns.next(); 155: addColumn(any_mapping, column.getName(), column.getLength(), column.getScale(), column.getPrecision(), 156: column.getSqlType()); 157: } 158: } I see that there is nothing to handle Formula :-( Can you investigate? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 07:46:12 2009 From: noreply at atlassian.com (Stian Brattland (JIRA)) Date: Fri, 7 Aug 2009 06:46:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3524) setFetchMode ignored if using createCriteria In-Reply-To: <30903573.1223896444608.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1498896076.18121249645572229.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33725#action_33725 ] Stian Brattland commented on HHH-3524: -------------------------------------- I'm having the exact same problem using Hibernate 3.2.5.ga and MySQL 5.1. I have disabled the query cache. The workaround introduced by Richard Ogin does not work for me. I can confirm that invoking createCriteria() or createAlias() on any existing Criteria object makes Hibernate ignore everything that has been set through setFetchMode(). The following Criteria succeeds: Criteria a = getSession().createCriteria(AlbumHierarchyNode.class); a.setFetchMode("albums", FetchMode.JOIN).setFetchMode("albums.album", FetchMode.JOIN).setFetchMode("albums.album.library", FetchMode.JOIN); a.add(Restrictions.isNotNull("parent")); a.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); a.list(); The following Criteria fails: Criteria a = getSession().createCriteria(AlbumHierarchyNode.class); a.setFetchMode("albums", FetchMode.JOIN).setFetchMode("albums.album", FetchMode.JOIN).setFetchMode("albums.album.library", FetchMode.JOIN); a.createCriteria("albums").createCriteria("album").add(Restrictions.in("status", filter.getStatuses())); a.add(Restrictions.isNotNull("parent")); a.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); a.list(); > setFetchMode ignored if using createCriteria > -------------------------------------------- > > Key: HHH-3524 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3524 > Project: Hibernate Core > Issue Type: Bug > Components: query-criteria > Affects Versions: 3.2.5 > Environment: Hibernate 3.2.5, Oracle 8 > Reporter: Peter Weemeeuw > Attachments: test.case.tar.gz > > > Hi, > It seems that criteria.setFetchMode gets ignored if you combine it with createCriteria to add a restriction. > This works as expected: > DetachedCriteria c = DetachedCriteria.forClass(MenuItem.class); > c.setFetchMode("menuItemSubscriptions", FetchMode.JOIN); > But in this case the join doesn't happen (and I get a LazyInstantiationException further on). > DetachedCriteria c = DetachedCriteria.forClass(MenuItem.class); > c.setFetchMode("menuItemSubscriptions", FetchMode.JOIN); > c.createCriteria("menuItemSubscriptions").add( > Restrictions.eq("location", "B") > ); > This does not happen if I set lazy="false" in the mappings > file. > Regards, > Peter -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 07:50:11 2009 From: noreply at atlassian.com (Radics Laszlo (JIRA)) Date: Fri, 7 Aug 2009 06:50:11 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4074) Polymorphic queries avoid with polymorphism="explicit" in hbm.xml file doesn't work Message-ID: <1807380645.18141249645811991.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Polymorphic queries avoid with polymorphism="explicit" in hbm.xml file doesn't work ----------------------------------------------------------------------------------- Key: HHH-4074 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4074 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.2 Environment: hibernate 3.3.2 Oracle 9i Reporter: Radics Laszlo hbm.xml: ANCESTOR_SEQ hql: "from AncestorImpl" fetch both ancestor and descendant rows -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 09:24:14 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Fri, 7 Aug 2009 08:24:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2304) Wrong type detection for sql type char(x) columns In-Reply-To: <180525176.1165950724953.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <100149732.18211249651454543.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33726#action_33726 ] Julien Kronegg commented on HHH-2304: ------------------------------------- A cleaner workaround is to define a new Dialect: public class DialectHhh2304 extends DB2390Dialect { public DialectHhh2304() { super(); // workaround for http://opensource.atlassian.com/projects/hibernate/browse/HHH-2304 registerHibernateType( Types.CHAR,1, Hibernate.CHARACTER.getName() ); registerHibernateType( Types.CHAR,255, Hibernate.STRING.getName() ); } } Then to use instead of the original dialect (e.g. in the persistence.xml file). I think defining a new dialect is safer than using "char(xxx as char)" (I did not test it BTW). > Wrong type detection for sql type char(x) columns > ------------------------------------------------- > > Key: HHH-2304 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2304 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.0.ga > Environment: Hibernate 3.2.0, Oracle 9.2, Oracle JDBC driver 10.2 > Reporter: Markus Heiden > Attachments: hibernate.zip > > > When executing a sql query which returns columns of sql type char(x), a java.lang.Character is returned. This leads to returning just the first character of the value. In my eyes a String should be returned when the char(x) type has a width > 1. I wasn't able to determine whether this is a jdbc driver issue or a hibernate issue. When using sql type char(x) for columns of entities no such problems occur. > Test case is attached. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 12:53:12 2009 From: noreply at atlassian.com (Richard Ogin (JIRA)) Date: Fri, 7 Aug 2009 11:53:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3524) setFetchMode ignored if using createCriteria In-Reply-To: <30903573.1223896444608.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1815564754.18271249663992267.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33727#action_33727 ] Richard Ogin commented on HHH-3524: ----------------------------------- @Stian You need to specify JoinFragment.LEFT_OUTER_JOIN in your createCriteria() from the root node. To use your example, a.createCriteria("albums") would become a.createCriteria("albums", JoinFragment.LEFT_OUTER_JOIN). To use my code as an example: Criteria c = session.createCriteria(Company.class); c.createCriteria("addresses", JoinFragment.LEFT_OUTER_JOIN).add( Restrictions.ilike("state", state, MatchMode.EXACT) ); c.setFetchMode("addresses", FetchMode.JOIN); > setFetchMode ignored if using createCriteria > -------------------------------------------- > > Key: HHH-3524 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3524 > Project: Hibernate Core > Issue Type: Bug > Components: query-criteria > Affects Versions: 3.2.5 > Environment: Hibernate 3.2.5, Oracle 8 > Reporter: Peter Weemeeuw > Attachments: test.case.tar.gz > > > Hi, > It seems that criteria.setFetchMode gets ignored if you combine it with createCriteria to add a restriction. > This works as expected: > DetachedCriteria c = DetachedCriteria.forClass(MenuItem.class); > c.setFetchMode("menuItemSubscriptions", FetchMode.JOIN); > But in this case the join doesn't happen (and I get a LazyInstantiationException further on). > DetachedCriteria c = DetachedCriteria.forClass(MenuItem.class); > c.setFetchMode("menuItemSubscriptions", FetchMode.JOIN); > c.createCriteria("menuItemSubscriptions").add( > Restrictions.eq("location", "B") > ); > This does not happen if I set lazy="false" in the mappings > file. > Regards, > Peter -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 14:41:14 2009 From: noreply at atlassian.com (John Sublette (JIRA)) Date: Fri, 7 Aug 2009 13:41:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-361) Query#setParameter(int position, Object value) wrong implementation In-Reply-To: <110452673.1211208993124.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2090699383.18291249670474106.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33728#action_33728 ] John Sublette commented on EJB-361: ----------------------------------- I just ran into what looks like this problem also. I tracked it down to the QueryImpl.isPositionalParameter() function. It looks to me like the comments don't match the code. According to the code, the following queryStrings should return: "SELECT Foo FROM Foo WHERE Foo.param1 = :value" TRUE (index == -1, Should have been false, right?) "SELECT Foo FROM Foo WHERE Foo.param1 = ?" FALSE (found index is last char, Should have been true, right?) "SELECT Foo FROM Foo WHERE Foo.param1 = ?1" TRUE (found index is followed by a digit) I noticed this problem when I tried using a query similar to the first (by name) but was trying to set the parameters by index (similar to Fabrice Daugan). It looks like it would work correctly if the return values were swapped for the first two cases. private boolean isPositionalParameter() { 256 if (isPositional == null) { 257 //compute it 258 String queryString = query.getQueryString(); 259 int index = queryString.indexOf( '?' ); 260 //there is a ? and the following char is a digit 261 if (index == -1) { 262 //no ? 263 isPositional = true; 264 } 265 else if ( index == queryString.length() - 1 ) { 266 // "... ?" 267 isPositional = false; 268 } 269 else { 270 isPositional = Character.isDigit( queryString.charAt( index + 1 ) ); 271 } 272 } 273 return isPositional; 274 } 275 > Query#setParameter(int position, Object value) wrong implementation > ------------------------------------------------------------------- > > Key: EJB-361 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-361 > Project: Hibernate Entity Manager > Issue Type: Bug > Components: EntityManager > Affects Versions: 3.3.2.GA > Reporter: Fabrice Daugan > Original Estimate: 2 hours > Remaining Estimate: 2 hours > > The Hibernate JPA javax.persistence.Query#setParameter(int position, Object value) implementation does not suit to the JPA specicafication. > Indeed, the actual integer passed to the operation is converted to String by Hibernate and then used to find the named parameter. > Please have a look to the folowing stack trace : > java.lang.Thread.run(Thread.java:619) > Caused by: java.lang.IllegalArgumentException: > org.hibernate.QueryParameterException: could not locate named parameter [1] > at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:185) > at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:240) > at org.springframework.orm.jpa.JpaTemplate$9.doInJpa(JpaTemplate.java:316) > To repoduce this error : -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 14:46:15 2009 From: noreply at atlassian.com (John Sublette (JIRA)) Date: Fri, 7 Aug 2009 13:46:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-361) Query#setParameter(int position, Object value) wrong implementation In-Reply-To: <110452673.1211208993124.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1711044128.18311249670775297.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33729#action_33729 ] John Sublette commented on EJB-361: ----------------------------------- Missed a potential problem "SELECT Foo FROM Foo WHERE Foo.param1 = ? AND Foo.param2 = 5" FALSE (found index is followed by a non-digit (space) -- should be true, right?) > Query#setParameter(int position, Object value) wrong implementation > ------------------------------------------------------------------- > > Key: EJB-361 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-361 > Project: Hibernate Entity Manager > Issue Type: Bug > Components: EntityManager > Affects Versions: 3.3.2.GA > Reporter: Fabrice Daugan > Original Estimate: 2 hours > Remaining Estimate: 2 hours > > The Hibernate JPA javax.persistence.Query#setParameter(int position, Object value) implementation does not suit to the JPA specicafication. > Indeed, the actual integer passed to the operation is converted to String by Hibernate and then used to find the named parameter. > Please have a look to the folowing stack trace : > java.lang.Thread.run(Thread.java:619) > Caused by: java.lang.IllegalArgumentException: > org.hibernate.QueryParameterException: could not locate named parameter [1] > at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:185) > at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:240) > at org.springframework.orm.jpa.JpaTemplate$9.doInJpa(JpaTemplate.java:316) > To repoduce this error : -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 17:50:13 2009 From: noreply at atlassian.com (Robert Wruck (JIRA)) Date: Fri, 7 Aug 2009 16:50:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4075) UnsupportedOperationException when assigning an alias to an indexed collection Message-ID: <1701616485.18341249681813327.JavaMail.j2ee-opensource-projects@vps07.contegix.com> UnsupportedOperationException when assigning an alias to an indexed collection ------------------------------------------------------------------------------ Key: HHH-4075 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4075 Project: Hibernate Core Issue Type: Bug Components: query-hql Affects Versions: 3.3.2 Environment: Hibernate 3.3.2.GA, MySQL5InnoDBDialect Reporter: Robert Wruck This works: select count(*) from Order o left join o.orderAttributes oa, Attribute a where a.id = 1 and index(oa) = a but accessing elements throws an exception: select count(*) from Order o left join o.orderAttributes oa, Attribute a where a.id = 1 and oa[a] is null or oa[a] = '2' Replacing oa[a] with o.orderAttributes[a] does not throw an exception but also does an inner join, so it's not a workaround. Stack trace: java.lang.UnsupportedOperationException at org.hibernate.hql.ast.tree.IdentNode.resolveIndex(IdentNode.java:66) at org.hibernate.hql.ast.tree.IndexNode.resolve(IndexNode.java:94) at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:117) at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:113) at org.hibernate.hql.ast.HqlSqlWalker.processIndex(HqlSqlWalker.java:956) at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4576) at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1289) at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:4084) at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1792) at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 18:20:11 2009 From: noreply at atlassian.com (Robert Wruck (JIRA)) Date: Fri, 7 Aug 2009 17:20:11 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4075) UnsupportedOperationException when assigning an alias to an indexed collection In-Reply-To: <1701616485.18341249681813327.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <397396379.18361249683611962.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33731#action_33731 ] Robert Wruck commented on HHH-4075: ----------------------------------- Oh and there is another issue: select count(*) from Order o left join o.orderAttributes oa where maxelement(oa) = '2' java.lang.StringIndexOutOfBoundsException: String index out of range: -5 at java.lang.String.substring(String.java:1768) at java.lang.String.substring(String.java:1735) at org.hibernate.hql.CollectionSubqueryFactory.createCollectionSubquery(CollectionSubqueryFactory.java:55) at org.hibernate.hql.ast.tree.FromElementType.toColumns(FromElementType.java:325) at org.hibernate.hql.ast.tree.FromElementType.toColumns(FromElementType.java:315) at org.hibernate.hql.ast.tree.FromElement.toColumns(FromElement.java:414) at org.hibernate.hql.ast.tree.MethodNode.resolveCollectionProperty(MethodNode.java:138) at org.hibernate.hql.ast.tree.MethodNode.collectionProperty(MethodNode.java:118) at org.hibernate.hql.ast.tree.MethodNode.resolve(MethodNode.java:67) at org.hibernate.hql.ast.HqlSqlWalker.processFunction(HqlSqlWalker.java:961) at org.hibernate.hql.antlr.HqlSqlBaseWalker.functionCall(HqlSqlBaseWalker.java:2465) at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1364) at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3722) at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) > UnsupportedOperationException when assigning an alias to an indexed collection > ------------------------------------------------------------------------------ > > Key: HHH-4075 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4075 > Project: Hibernate Core > Issue Type: Bug > Components: query-hql > Affects Versions: 3.3.2 > Environment: Hibernate 3.3.2.GA, MySQL5InnoDBDialect > Reporter: Robert Wruck > > This works: > select count(*) from Order o left join o.orderAttributes oa, Attribute a > where a.id = 1 > and index(oa) = a > but accessing elements throws an exception: > select count(*) from Order o left join o.orderAttributes oa, Attribute a > where a.id = 1 > and oa[a] is null or oa[a] = '2' > Replacing oa[a] with o.orderAttributes[a] does not throw an exception but also does an inner join, so it's not a workaround. > Stack trace: > java.lang.UnsupportedOperationException > at org.hibernate.hql.ast.tree.IdentNode.resolveIndex(IdentNode.java:66) > at org.hibernate.hql.ast.tree.IndexNode.resolve(IndexNode.java:94) > at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:117) > at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:113) > at org.hibernate.hql.ast.HqlSqlWalker.processIndex(HqlSqlWalker.java:956) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4576) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1289) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:4084) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1792) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231) > at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 7 23:42:14 2009 From: noreply at atlassian.com (Sing (JIRA)) Date: Fri, 7 Aug 2009 22:42:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4076) Transaction Rollback error Message-ID: <1769909190.18391249702934644.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Transaction Rollback error -------------------------- Key: HHH-4076 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4076 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.2.0.ga Environment: Hibernate-Version: 3.2.0.ga; Oracle 10g Reporter: Sing Hi, We are getting the below error when especially concurrent tranaction occurs. Any help is appreciated. We use: Hibernate-Version: 3.2.0.ga / Spring-Version: 2.0 Below is hibernate config. org.hibernate.dialect.OracleDialect DataSource org.hibernate.transaction.WeblogicTransactionManagerLookup org.hibernate.transaction.JTATransactionFactory org.hibernate.cache.EhCacheProvider Error Stack Trace: Message-ID: <497937635.18501249746853760.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33732#action_33732 ] Greg Woolsey commented on HHH-2697: ----------------------------------- I understand the need for a solution that doesn't allow invalid constructs in SQL for other databases than MySQL, but there does need to be some fix - not only does this break for valid MySQL queries, any query for any database with a text string with a ":=" or some other character in the array of "space" characters after a colon will get the same exception, even if the query is indeed valid. Unfortunately that makes this a much harder problem to fix, and will make the parser much more complex - perhaps needing to track open quotes, skip any colon inside an open quote, and delegate to the current SQL grammar for allowed language constructs with colons. Perhaps a simpler option would be to make colon a default variable prefix, and allow users to set a different one on SQLQuery creation. This would leave it to the developer to pick a value that is unique to variable references in the query in special cases where colon would otherwise cause problems. > Can't use := for variable assignment within a SQL-Statement > ----------------------------------------------------------- > > Key: HHH-2697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2697 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.2.4.sp1 > Environment: MySQL Datasource, Hibernate 3.2.4.sp1 > Reporter: Benjamin Gniza > Priority: Minor > Attachments: allowvariableassignment.patch > > > i found a kind of bug in org.hibernate.engine.query.ParameterParser.java: > I have an exotic mysql-statement where I want to use mysql variables. > VERY SIMPLE example: > SET @pos=0; > SELECT @pos:=@pos+1 FROM TABLE; > Steps to reproduce: > Session s = sessionFactory.openSession(); > s.createSQLQuery("SET @pos=0").executeUpdate(); > SQLQuery qry = s.createSQLQuery("select @pos:=@pos from SomeTable"); > List lst = qry.list(); > Exception: > org.hibernate.QueryException: Space is not allowed after parameter prefix ':' 'SELECT @pos:=@pos+1 FROM TABLE' > at org.hibernate.engine.query.ParameterParser.parse(ParameterParser.java:68) > ... > ... > Suggested fix: > ParameterParser Lines 62 to 73: > if (c == ':' && (indx + 1 >= stringLength || sqlString.charAt(indx + 1) != '=')) { > // named parameter > int right = StringHelper.firstIndexOfChar( sqlString, ParserHelper.HQL_SEPARATORS, indx + 1 ); > int chopLocation = right < 0 ? sqlString.length() : right; > String param = sqlString.substring( indx + 1, chopLocation ); > if ( StringHelper.isEmpty( param ) ) { > throw new QueryException("Space is not allowed after parameter prefix ':' '" > + sqlString + "'"); > } > recognizer.namedParameter( param, indx ); > indx = chopLocation - 1; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 9 08:40:14 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Sun, 9 Aug 2009 07:40:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3962) Ingres Hibernate dialect for EAP 4.3.0 GA CP04 In-Reply-To: <1478508776.1245094113747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <495276776.18591249821614974.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] strong liu updated HHH-3962: ---------------------------- Fix Version/s: (was: 3.3.x) (was: 3.5) wait ingres folks provide the patch > Ingres Hibernate dialect for EAP 4.3.0 GA CP04 > ---------------------------------------------- > > Key: HHH-3962 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate Core 3.2.4.SP1 CP07, Ingres 9.2.0 > Reporter: Enrico Schenk > Assignee: strong liu > Priority: Minor > Attachments: IngresDialect.java, IngresDialect.java > > > This is the Ingres dialect that was used for the EAP 4.3.0 GA CP04 tests. It's based on the latest dialect from the trunk contains changes for the functions current_time, current_timestamp and current_date. The dialect also overrides the method getForUpdateString() to disable the use of "SELECT...FOR UPDATE" statements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 9 08:40:14 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Sun, 9 Aug 2009 07:40:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-3962) Ingres Hibernate dialect for EAP 4.3.0 GA CP04 In-Reply-To: <1478508776.1245094113747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1332045103.18561249821614857.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] strong liu reassigned HHH-3962: ------------------------------- Assignee: strong liu (was: Gail Badner) > Ingres Hibernate dialect for EAP 4.3.0 GA CP04 > ---------------------------------------------- > > Key: HHH-3962 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate Core 3.2.4.SP1 CP07, Ingres 9.2.0 > Reporter: Enrico Schenk > Assignee: strong liu > Priority: Minor > Attachments: IngresDialect.java, IngresDialect.java > > > This is the Ingres dialect that was used for the EAP 4.3.0 GA CP04 tests. It's based on the latest dialect from the trunk contains changes for the functions current_time, current_timestamp and current_date. The dialect also overrides the method getForUpdateString() to disable the use of "SELECT...FOR UPDATE" statements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 9 14:09:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Sun, 9 Aug 2009 13:09:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-456) Implement JPA 2.0 metamodel APIs In-Reply-To: <1163881521.14661249073594632.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <321354501.18621249841353932.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33734#action_33734 ] Emmanuel Bernard commented on EJB-456: -------------------------------------- initial commit in. I have not tested it, so don't even try, it will explode to your face most likely :) Missing: - mapped superclass (not sure how to do that) - declared is implemented but not non declared attributes (should be just aggregation though) - the whole ManyToOne vs OneToOne and ManyToMany vs OneToMany is a scam. Hib register the physical model while we need the logical model. - Member are not exposed (not sure how to do that) and will need to solve the serializability issue - some minor type checking mandated by the spec > Implement JPA 2.0 metamodel APIs > -------------------------------- > > Key: EJB-456 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-456 > Project: Hibernate Entity Manager > Issue Type: Sub-task > Reporter: Steve Ebersole > Assignee: Emmanuel Bernard > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 9 15:44:14 2009 From: noreply at atlassian.com (Paul Benedict (JIRA)) Date: Sun, 9 Aug 2009 14:44:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3414) fetch profiles In-Reply-To: <27915724.1217885971206.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <369345295.18721249847054759.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33735#action_33735 ] Paul Benedict commented on HHH-3414: ------------------------------------ Fetch profiles aren't a necessity, but it is one solution to the problem. One issue that I have with Hibernate is that Criteria and HQL allow queries to be more eagerly in their fetch strategies (setFetchMode), but you can't relax it. Once something is mapped as eager, it cannot be undone. This is where the deprecated FetchMode.LAZY could make a nice return. > fetch profiles > -------------- > > Key: HHH-3414 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3414 > Project: Hibernate Core > Issue Type: New Feature > Components: core, metamodel > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.7 > > > The concept of fetch profiles as we are discussing here is basically to allow users to dynamically affect the mapped fetching strategy for associations at runtime. > Consider the following example: > > ... > > ... > > > > ... > > This follows the normal recommendation to map associations as lazy and use a dynamic fetching strategy (ala HQL/Criteria) to modify this lazy behavior at runtime. > The fetaure discussed here would allow the same behavior for loading as well: > > > > > > Or: > > > ... > > > > > ... > > > > Now, doing: > session.enableFetchProfile( "person-details" ).get( Person.class, 1 )... > will load Person#1 as well as their addresses in a single joined query. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 05:24:14 2009 From: noreply at atlassian.com (Radics Laszlo (JIRA)) Date: Mon, 10 Aug 2009 04:24:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4074) Polymorphic queries avoid with polymorphism="explicit" in hbm.xml file doesn't work In-Reply-To: <1807380645.18141249645811991.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <733636027.18761249896254188.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33736#action_33736 ] Radics Laszlo commented on HHH-4074: ------------------------------------ Maybe i was not so clear. So I want to avoid "Polymorphic queries" hibernate feature, but i couldn't, because this bug. > Polymorphic queries avoid with polymorphism="explicit" in hbm.xml file doesn't work > ----------------------------------------------------------------------------------- > > Key: HHH-4074 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4074 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: hibernate 3.3.2 > Oracle 9i > Reporter: Radics Laszlo > > hbm.xml: > > > > > > ANCESTOR_SEQ > > > > > > > > > > > > > hql: "from AncestorImpl" fetch both ancestor and descendant rows -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 10:48:12 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 10 Aug 2009 09:48:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4077) Misuse of NamingStrategy and logical column names in HbmBinder Message-ID: <1148823973.18801249915692933.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Misuse of NamingStrategy and logical column names in HbmBinder -------------------------------------------------------------- Key: HHH-4077 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077 Project: Hibernate Core Issue Type: Bug Components: metamodel Affects Versions: 3.3.2 Reporter: Emmanuel Bernard Assignee: Emmanuel Bernard Fix For: 3.5 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 10:53:12 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 10 Aug 2009 09:53:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4077) Misuse of NamingStrategy and logical column names in HbmBinder In-Reply-To: <1148823973.18801249915692933.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1839671156.18821249915992085.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33737#action_33737 ] Emmanuel Bernard commented on HHH-4077: --------------------------------------- >From Dmitry Geraskov public class TestNamingStrategy extends DefaultNamingStrategy{ public String propertyToColumnName(String propertyName) { return "PTCN_"+propertyName;} public String columnName(String columnName) {return "CN_"+columnName; } public String logicalColumnName(String columnName, String propertyName) { return "LCN_"+super.logicalColumnName(columnName, propertyName);} } @Entity public class Customers implements java.io.Serializable { @Id @Column(name="id") private int id; @Column(name = "specified_column") private String specified_column; ... } ----------------------------------------------------------------------- Class mapped as: Generated ddl for jpa console configuration is create table Customers ( CN_id int4 not null, CN_specified_column varchar(255), primary key (CN_id) ); ------- for core: create table Customers ( CN_LCN_id int4 not null, CN_LCN_specified_column varchar(255), primary key (PTCN_id) ) > Misuse of NamingStrategy and logical column names in HbmBinder > -------------------------------------------------------------- > > Key: HHH-4077 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077 > Project: Hibernate Core > Issue Type: Bug > Components: metamodel > Affects Versions: 3.3.2 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 10:55:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 10 Aug 2009 09:55:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4077) Misuse of NamingStrategy and logical column names in HbmBinder In-Reply-To: <1148823973.18801249915692933.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <179147762.18841249916113003.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33738#action_33738 ] Emmanuel Bernard commented on HHH-4077: --------------------------------------- logicalColumnName is the name by which a column should be referred in metadata descriptors (like unique constraints, indexes etc). I don't think a user needs to use the logical mapping in HBM files (the metadata structure don't require it contrary to annotations). Anyway, the logical name should never appear in a physical column name, so HbmBinder #fail. I will attach a patch > Misuse of NamingStrategy and logical column names in HbmBinder > -------------------------------------------------------------- > > Key: HHH-4077 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077 > Project: Hibernate Core > Issue Type: Bug > Components: metamodel > Affects Versions: 3.3.2 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 11:14:14 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 10 Aug 2009 10:14:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4077) Misuse of NamingStrategy and logical column names in HbmBinder In-Reply-To: <1148823973.18801249915692933.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <152661732.18861249917254693.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard updated HHH-4077: ---------------------------------- Attachment: HHH-4077.patch Applied to trunk. > Misuse of NamingStrategy and logical column names in HbmBinder > -------------------------------------------------------------- > > Key: HHH-4077 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077 > Project: Hibernate Core > Issue Type: Bug > Components: metamodel > Affects Versions: 3.3.2 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.5 > > Attachments: HHH-4077.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 14:24:14 2009 From: noreply at atlassian.com (Philip Borlin (JIRA)) Date: Mon, 10 Aug 2009 13:24:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4070) createProxy() called even when hasProxy() returns false In-Reply-To: <1950515102.15351249405454469.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1396258561.18881249928654237.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Borlin updated HHH-4070: ------------------------------- Attachment: HHH4070.mapping HHH4070.java Attached is the test file and mapping as requested. The test file has a standard main method so it can be run from the command line. Depends on hsqldb but that can be changed to a database of your choice by modifying the setupDatabase() method. HHH4070.java is in the default package. Here is the stacktrace that I get when I run the file: Exception in thread "main" java.lang.UnsupportedOperationException: Does not support proxies at HHH4070$BugReportTuplizer.createProxy(HHH4070.java:85) at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3469) at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:298) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:219) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:906) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:874) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590) at org.hibernate.type.EntityType.resolve(EntityType.java:412) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877) at org.hibernate.loader.Loader.doQuery(Loader.java:752) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2232) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129) at org.hibernate.loader.Loader.list(Loader.java:2124) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at HHH4070.main(HHH4070.java:41) > createProxy() called even when hasProxy() returns false > ------------------------------------------------------- > > Key: HHH-4070 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4070 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: 3.3.2GA, PostgresQL 8.3 > Reporter: Philip Borlin > Attachments: HHH4070.java, HHH4070.mapping > > > This problem occurs when an EntityTuplizer is used. In my case I throw an UnsupportedOperationException in my createProxy() method. I would expect that would be ok since my hasProxy() method returns false. This was working in 3.3.1 but broke in 3.3.2. > In DefaultLoadEventListener in the proxyOrLoad() method there is a call to persister.hasProxy(). This makes a call to AbstractEntityPersister which simply checks to see whether the entityMetamodel isLazy(). > That check succeeds since lazy is sent to true. > The next check sees if isAllowProxyCreation() is false in the options. > Lastly creatProxyIfNecessary() is called which if the entity does not exist calls createProxy() on the persister. AnstractEntityPersister delegates this directly to the tuplizer. > At no point was the tuplizer's hasProxy() method ever consulted. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 15:45:12 2009 From: noreply at atlassian.com (Tsering Shrestha (JIRA)) Date: Mon, 10 Aug 2009 14:45:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4078) EntityMetamodel#entityNameByInheritenceClassNameMap mapping from class or class names? Message-ID: <927586096.18911249933512946.JavaMail.j2ee-opensource-projects@vps07.contegix.com> EntityMetamodel#entityNameByInheritenceClassNameMap mapping from class or class names? -------------------------------------------------------------------------------------- Key: HHH-4078 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4078 Project: Hibernate Core Issue Type: Bug Affects Versions: 3.5 Reporter: Tsering Shrestha In the constructor of EntityMetaModel (http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java revision 15258) Line 314: if ( persistentClass.hasPojoRepresentation() ) { entityNameByInheritenceClassNameMap.put( persistentClass.getMappedClass(), persistentClass.getEntityName() ); However at Line 578: public String findEntityNameByEntityClass(Class inheritenceClass) { return ( String ) entityNameByInheritenceClassNameMap.get( inheritenceClass.getName() ); } Why are we using java.lang.Class as the keys when we put new entries to the map but try to read with java.lang.String keys? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 18:01:13 2009 From: noreply at atlassian.com (Thomas Edwin (JIRA)) Date: Mon, 10 Aug 2009 17:01:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3064) unnecessary update when merge managed entity In-Reply-To: <153370072.1190996397254.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1918585483.18991249941673034.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33741#action_33741 ] Thomas Edwin commented on HHH-3064: ----------------------------------- Is there any workaround? > unnecessary update when merge managed entity > -------------------------------------------- > > Key: HHH-3064 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3064 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.2.5 > Environment: Hibernate Core 3.2.5.ga > Hibernate Annotations 3.3.0 GA > hsqldb > Reporter: Jifeng Liu > Attachments: testcase.zip > > > If the entity in em.merge(entity) is managed entity, the merge operation should be ignored. However it issues a update statement in the test case even if there is no changes. > In the test case, Parent entity has a list of Image entity with Many-To-Many relation. em.merge() somehow marks the list as dirty, which causes the update statement. > The following is trace log of the test case. > 07.20,23 INFO ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory > 07.20,601 DEBUG SQL - /* insert test.Parent */ insert into Parent (updateDateTime, Parent_No) values (?, ?) > 07.20,617 DEBUG SQL - /* insert test.Image */ insert into Image (name, imageNo) values (?, ?) > 07.20,617 DEBUG SQL - /* insert collection row test.Parent.images */ insert into Parent_Image (Parent_Parent_No, images_ > imageNo) values (?, ?) > 07.20,632 DEBUG SQL - /* load test.Parent */ select parent0_.Parent_No as Parent1_0_0_, parent0_.updateDateTime as updat > eDa2_0_0_ from Parent parent0_ where parent0_.Parent_No=? > 07.20,648 DEBUG SQL - /* load collection test.Parent.images */ select images0_.Parent_Parent_No as Parent1_1_, images0_. > images_imageNo as images2_1_, image1_.imageNo as imageNo1_0_, image1_.name as name1_0_ from Parent_Image images0_ left o > uter join Image image1_ on images0_.images_imageNo=image1_.imageNo where images0_.Parent_Parent_No=? > 07.20,679 DEBUG SQL - /* update test.Parent */ update Parent set updateDateTime=? where Parent_No=? and updateDateTime=? > 07.20,679 DEBUG SQL - /* delete collection test.Parent.images */ delete from Parent_Image where Parent_Parent_No=? > 07.20,679 DEBUG SQL - /* insert collection row test.Parent.images */ insert into Parent_Image (Parent_Parent_No, images_ > imageNo) values (?, ?) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 18:03:12 2009 From: noreply at atlassian.com (Thomas Edwin (JIRA)) Date: Mon, 10 Aug 2009 17:03:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2955) Unnecessary version updates in two cases. In-Reply-To: <95771261.1195393918473.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <945442907.19021249941792022.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33742#action_33742 ] Thomas Edwin commented on HHH-2955: ----------------------------------- Is there any workaround? > Unnecessary version updates in two cases. > ----------------------------------------- > > Key: HHH-2955 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2955 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.5 > Environment: JDK 5.0 > Reporter: S?awomir Wojtasiak > Attachments: HibernateTest.zip > > > I found two situations where hibernate generates unnecessary version updates. Let's illustrate it with a simple example: > Session session = SessionFactory.getSession(); > Transaction transaction = session.getTransaction(); > transaction.begin(); > > Article a = new Article(); > a.setName( "atricle" ); > ********************************************* > *** Quantity is the owner of the relation *** > ********************************************* > Quantity q = new Quantity(); > q.setName( "quantity" ); > q.setArticle( a ); > > a.getQuantities().add( q ); > > session.persist( a ); > session.flush(); > ***** Hibernate generates following SQLs ***** > Hibernate: select nextval ('hibernate_sequence') > Hibernate: select nextval ('hibernate_sequence') > Hibernate: insert into Article (name, version, id) values (?, ?, ?) > Hibernate: insert into Quantity (article_id, name, version, id) values (?, ?, ?, ?) > ********************************************** > > a.getQuantities().clear(); > > session.flush(); > > *** Hibernate generates following SQLs *** > Hibernate: update Article set name=?, version=? where id=? and version=? > This update of version field is performed because collection of quantities is marked as dirty, but Article entity is not relation owner so nothing change in database after this clear. Should it works like this? It looks like a bug because database remain unchanged so version changing is unnecessary in my opinion. > ****************************************** > session.clear(); > > **** SECOND PROBLEM *** > Now I generate true copy of persisted objects. > Notice that I use HashSet instead of PersistSet which was set during persist operation. This operation is similar to merging objects prepared by SOAP, during communication with remote client for example. > *********************** > > Article a1 = new Article(); > a1.setId( a.getId() ); > a1.setName( a.getName() ); > a1.setVersion( a.getVersion() ); > > Quantity q1 = new Quantity(); > q1.setArticle( a1 ); > q1.setName( q.getName() ); > q1.setVersion( q.getVersion() ); > q1.setId( q.getId() ); > > a1.getQuantities().add( q1 ); > > a1 = (Article)session.merge( a1 ); > > session.flush(); > ***** This operation generates following SQLs ***** > Hibernate: select article0_.id as id0_1_, article0_.name as name0_1_, article0_.version as version0_1_, quantities1_.article_id as article4_3_, quantities1_.id as id3_, quantities1_.id as id1_0_, quantities1_.article_id as article4_1_0_, quantities1_.name as name1_0_, quantities1_.version as version1_0_ from Article article0_ left outer join Quantity quantities1_ on article0_.id=quantities1_.article_id where article0_.id=? > Hibernate: update Article set name=?, version=? where id=? and version=? > It looks like problem is located in replaceElements() method of CollectgionType class (or somewhere near it). Maybe I'm wrong but this collection was checked for changes during merge operation (See this select above.) so why it remains dirty if it contains the same data as database?. I checked this issue on other JPA implementations (OpenJPA for example) and version is not incremented after similar merge operation. > ***************************************************** > transaction.rollback(); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 21:11:13 2009 From: noreply at atlassian.com (Andrew Lee Rubinger (JIRA)) Date: Mon, 10 Aug 2009 20:11:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4079) Fail-fast a build using JDK6 In-Reply-To: <37861431.19081249953072055.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1053826592.19101249953073515.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Lee Rubinger updated HHH-4079: ------------------------------------- Attachment: HHH-4079.patch > Fail-fast a build using JDK6 > ---------------------------- > > Key: HHH-4079 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4079 > Project: Hibernate Core > Issue Type: Improvement > Environment: JDK6 > Reporter: Andrew Lee Rubinger > Attachments: HHH-4079.patch > > > Emmanuel tells me that JDK5 is a requirement for building Hibernate Core. If JDK6 is an invalid choice, this patch will tell developers. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 21:11:12 2009 From: noreply at atlassian.com (Andrew Lee Rubinger (JIRA)) Date: Mon, 10 Aug 2009 20:11:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4079) Fail-fast a build using JDK6 Message-ID: <37861431.19081249953072055.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Fail-fast a build using JDK6 ---------------------------- Key: HHH-4079 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4079 Project: Hibernate Core Issue Type: Improvement Environment: JDK6 Reporter: Andrew Lee Rubinger Attachments: HHH-4079.patch Emmanuel tells me that JDK5 is a requirement for building Hibernate Core. If JDK6 is an invalid choice, this patch will tell developers. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 10 21:32:12 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Mon, 10 Aug 2009 20:32:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4077) Misuse of NamingStrategy and logical column names in HbmBinder In-Reply-To: <1148823973.18801249915692933.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <549003275.19121249954332357.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33743#action_33743 ] strong liu commented on HHH-4077: --------------------------------- is this also affect the Branch_3_3_2_GA_CP? should I create a JBPAPP issue for this one? > Misuse of NamingStrategy and logical column names in HbmBinder > -------------------------------------------------------------- > > Key: HHH-4077 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077 > Project: Hibernate Core > Issue Type: Bug > Components: metamodel > Affects Versions: 3.3.2 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.5 > > Attachments: HHH-4077.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 11 05:55:12 2009 From: noreply at atlassian.com (Kai Hoerder (JIRA)) Date: Tue, 11 Aug 2009 04:55:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1803) Allow fetching with criteria when scrolling Message-ID: <1980466526.19191249984512598.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33744#action_33744 ] Kai Hoerder commented on HHH-1803: ---------------------------------- Can confirm the bug and the provided patch, applied on hibernate-core-3.3.2.GA. ScrollableResultSet in conjunction with FetchMode.JOIN is an important feature when using hibernate-search for large datasets and embedded indexes. Building the initial index without this feature was a matter of several hours for us, with ScrollableResultSet/FetchMode.JOIN it's a matter of minutes. As this bug exists since 2005 (see HHH-1283, HHH-1751, HHH-3394) and the provided patch seams to work, could please someone fix it for the next hibernate-version? > Allow fetching with criteria when scrolling > ------------------------------------------- > > Key: HHH-1803 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803 > Project: Hibernate Core > Issue Type: Improvement > Components: query-criteria > Affects Versions: 3.2.0.cr2 > Reporter: Maarten Winkels > Attachments: Child.java, criteria-scroll-fetch-collection.patch, CriteriaScrollFetchTest.java, Parent.java, ParentChild.hbm.xml > > > When querying by criteria, fetching is allowed, but when scrolling a criteria, the fetching corrupts the result. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 11 17:14:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Tue, 11 Aug 2009 16:14:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-171) Hibernate Validator must specify how to run in environments that use a SecurityManager In-Reply-To: <934316467.1245436353436.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <2120711904.19261250025253040.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard resolved HV-171. --------------------------------- Resolution: Fixed Fix Version/s: 4.0.0.CR1 > Hibernate Validator must specify how to run in environments that use a SecurityManager > -------------------------------------------------------------------------------------- > > Key: HV-171 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-171 > Project: Hibernate Validator > Issue Type: Improvement > Components: documentation > Affects Versions: 4.0.0.Beta1 > Environment: Glassfish V3 with Security Manager Enabled > Reporter: Ed Burns > Fix For: 4.0.0.CR1 > > Attachments: message.txt > > > When running the JSR-303 Impl that is Hibernate Validator 4.0.0.Beta1 on a container with a SecurityManager, such as Glassfishv3 with the SecurityManager enabled, calling simple validator code such as: > Set> violations = > beanValidator.validate(person); > Will cause an AccessControlException, as shown in the following stack trace: > [#|2009-06-19T11:22:20.347-0400|SEVERE|glassfish|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-1;|StandardWrapperValve[SimpleBVServlet]: PWC1406: Servlet.service() for servlet SimpleBVServlet threw exception > java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) > at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) > at java.security.AccessController.checkPermission(AccessController.java:546) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) > at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107) > at org.hibernate.validation.util.ReflectionHelper.setAccessibility(ReflectionHelper.java:195) > at org.hibernate.validation.engine.BeanMetaDataImpl.initFieldConstraints(BeanMetaDataImpl.java:233) > at org.hibernate.validation.engine.BeanMetaDataImpl.initClass(BeanMetaDataImpl.java:207) > at org.hibernate.validation.engine.BeanMetaDataImpl.createMetaData(BeanMetaDataImpl.java:179) > at org.hibernate.validation.engine.BeanMetaDataImpl.(BeanMetaDataImpl.java:106) > at org.hibernate.validation.engine.BeanMetaDataImpl.(BeanMetaDataImpl.java:96) > at org.hibernate.validation.engine.ValidatorImpl.getBeanMetaData(ValidatorImpl.java:559) > at org.hibernate.validation.engine.ValidatorImpl.validateConstraints(ValidatorImpl.java:225) > at org.hibernate.validation.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:189) > at org.hibernate.validation.engine.ValidatorImpl.validate(ValidatorImpl.java:110) > at simple_bv_servlet.SimpleBVServlet.doGet(SimpleBVServlet.java:76) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:319) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) > at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:352) > at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:209) > at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1499) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:187) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) > at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) > at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:353) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:249) > at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:147) > at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746) > at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:655) > at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:905) > at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161) > at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) > at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) > at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) > at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) > at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) > at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) > at com.sun.grizzly.ContextTask.run(ContextTask.java:69) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:637) > Some remedies include: > 1. Explicitly accounting for SecurityManager considerations in the JSR-303 Java API > 2. Mentioning in the spec prose what a caller that wishes to use SecurityManager must do to enable JSR-303 to work without throwing security related exceptions. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 11 17:16:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Tue, 11 Aug 2009 16:16:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-99) Write unit tests for bootstrapping In-Reply-To: <20883815.1233662740460.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1012783490.19281250025375220.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard updated HV-99: ------------------------------- Fix Version/s: (was: 4.0.0.Beta3) 4.0.0.CR1 > Write unit tests for bootstrapping > ----------------------------------- > > Key: HV-99 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-99 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > There are already some tests in ValidationTest, but we need more tests. Especially we have to test that we can plug custom MessageInterpolator, ConstraintValidatorFactory and TraversableResolver using different ConfigurationStates. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 11 23:10:12 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Tue, 11 Aug 2009 22:10:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3686) Sybase - QueryCacheTest.testQueryCacheInvalidation fails In-Reply-To: <12838367.1231237778689.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1103059704.19321250046612760.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] strong liu resolved HHH-3686. ----------------------------- Resolution: Fixed Fix Version/s: 3.5 3.3.x fixed in trunk and Branch_3_3 > Sybase - QueryCacheTest.testQueryCacheInvalidation fails > -------------------------------------------------------- > > Key: HHH-3686 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > Assignee: strong liu > Fix For: 3.3.x, 3.5 > > > QueryCacheTest.testQueryCacheInvalidation fails because SybaseDialect.areStringComparisonsCaseInsensitive(). returns false and the test machine is actually configured for case-insensitive string comparisons. > By default, Sybase string comparisons are case-insensitive. > It may be possible to determine which is configured by looking at DatabaseMetaData to return the appropriate value for SybaseDialect.areStringComparisonsCaseInsensitive(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 00:17:11 2009 From: noreply at atlassian.com (Darren Salomons (JIRA)) Date: Tue, 11 Aug 2009 23:17:11 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1120) Incorrect ManyToMany Generation In-Reply-To: <1604579085.1239773957392.JavaMail.j2ee_opensource.atlassian.com-projects@atlassian12.managed.contegix.com> Message-ID: <1974368752.19351250050631975.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33746#action_33746 ] Darren Salomons commented on HBX-1120: -------------------------------------- Hi I found your issue when I was also having problems with many-to-many generation. I took a look at your schema and renamed your columns in your join table to user_id and role_id and the generation worked correctly. I haven't looked into the technical reason why this is the case but I just wanted to let you know. > Incorrect ManyToMany Generation > ------------------------------- > > Key: HBX-1120 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1120 > Project: Hibernate Tools > Issue Type: Bug > Environment: MySQL v5.1 > Hibernate Tools 3.2.4 > Reporter: Henry Chan > Attachments: hibernateSchemaExport.sql > > > When I run the reverse Engineering Tool to generate my classes, one of these classes does not have the correct manytomany annotation defined correctly: > In the example below, the I have User, User_Role and Role > The User classgets generated correctly: > User.java ... > @ManyToMany(fetch = FetchType.LAZY) > @JoinTable(name = "user_role", catalog = "exms", joinColumns = { @JoinColumn(name = "userID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "roleID", nullable = false, updatable = false) }) > public Set getRoles() { > return this.roles; > } > but Role.java class isn't correct: > @ManyToMany(fetch = FetchType.LAZY, mappedBy = "roles") > public Set getUsers() { > return this.users; > } > Where is the @JoinTable in Role.java? > DROP TABLE IF EXISTS `exms`.`Role` ; > CREATE TABLE IF NOT EXISTS `exms`.`Role` ( > `roleID` INT NOT NULL AUTO_INCREMENT , > `roleName` VARCHAR(45) NOT NULL , > PRIMARY KEY (`roleID`) ) > ENGINE = InnoDB; > -- ----------------------------------------------------- > -- Table `exms`.`Login` > -- ----------------------------------------------------- > DROP TABLE IF EXISTS `exms`.`Login` ; > CREATE TABLE IF NOT EXISTS `exms`.`Login` ( > `loginID` INT NOT NULL AUTO_INCREMENT , > `userID` INT NULL , > `timeStamp` DATETIME NULL , > `failedLogins` INT NULL , > PRIMARY KEY (`loginID`) , > INDEX `fk_Login_User` (`userID` ASC) , > CONSTRAINT `fk_Login_User` > FOREIGN KEY (`userID` ) > REFERENCES `exms`.`User` (`userID` ) > ON DELETE NO ACTION > ON UPDATE NO ACTION) > ENGINE = InnoDB; > -- ----------------------------------------------------- > -- Table `exms`.`User_Role` > -- ----------------------------------------------------- > DROP TABLE IF EXISTS `exms`.`User_Role` ; > CREATE TABLE IF NOT EXISTS `exms`.`User_Role` ( > `userID` INT NOT NULL , > `roleID` INT NOT NULL , > INDEX `fk_User_Role_User` (`userID` ASC) , > INDEX `fk_User_Role_Role` (`roleID` ASC) , > PRIMARY KEY (`userID`, `roleID`) , > CONSTRAINT `fk_User_Role_User` > FOREIGN KEY (`userID` ) > REFERENCES `exms`.`User` (`userID` ) > ON DELETE NO ACTION > ON UPDATE NO ACTION, > CONSTRAINT `fk_User_Role_Role` > FOREIGN KEY (`roleID` ) > REFERENCES `exms`.`Role` (`roleID` ) > ON DELETE NO ACTION > ON UPDATE NO ACTION) > ENGINE = InnoDB; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 00:22:13 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Tue, 11 Aug 2009 23:22:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-198) Wrong constraint violation path when adding subnode error to subnode In-Reply-To: <527132366.16651249541472329.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1355692268.19381250050933057.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard updated HV-198: -------------------------------- Summary: Wrong constraint violation path when adding subnode error to subnode (was: Wront constraint violation path when adding subnode error to subnode) > Wrong constraint violation path when adding subnode error to subnode > -------------------------------------------------------------------- > > Key: HV-198 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-198 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Environment: Hibernate Validator Beta 2, JRE 1.6 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.Beta3 > > Original Estimate: 1 hour > Time Spent: 52 minutes > Remaining Estimate: 0 minutes > > When I use subnode error in validator and object is part of another with @Valid tag I have incorrect path in ConstrainViolation. > Example: > I got "start" instead of "interval.start". Looks like we need merge paths when ConstraintViolationImpl is created > class Item > { > @Valid > Interval interval; > } > @StartLessThatEnd > class Interval > { > int start; > int end; > } > public class ValidatorTest > { > public static void main( String[] args ) > { > Item item = new Item(); > item.interval = new Interval(); > item.interval.start = 10; > item.interval.end = 5; > > ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); > ConstraintViolation c = factory.getValidator().validate( item ).iterator().next(); > System.out.println( c.getPropertyPath() ); > } > } > @Target( ElementType.TYPE ) > @Retention( RetentionPolicy.RUNTIME ) > @Constraint( validatedBy = StartLessThatEndImpl.class ) > public @interface StartLessThatEnd > { > String message() default "x"; > Class[] groups() default {}; > > Class[] payload() default { }; > } > public class StartLessThatEndImpl implements ConstraintValidator > { > @Override > public void initialize( StartLessThatEnd constraintAnnotation ) > { > } > @Override > public boolean isValid( Interval value, ConstraintValidatorContext c ) > { > if ( value.start > value.end ) > { > c.disableDefaultError(); > c.buildErrorWithMessageTemplate( c.getDefaultErrorMessageTemplate() ).addSubNode( "start" ).addError(); > return false; > } > return true; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 03:47:12 2009 From: noreply at atlassian.com (Alexey Romanchuk (JIRA)) Date: Wed, 12 Aug 2009 02:47:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-207) No way to add custom error from collection validator to item Message-ID: <1083955888.19441250063232657.JavaMail.j2ee-opensource-projects@vps07.contegix.com> No way to add custom error from collection validator to item ------------------------------------------------------------ Key: HV-207 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-207 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta2 Reporter: Alexey Romanchuk Assume we have object, that contains collection of items. This collection itself contains some business restriction like every item should have unique name. I create validator for this collection and want to add custom ConstrainViolation on each collection element that causes this violation. Now by API I can only use inIterable only for subnodes. The solution is to allow inIterable for ErrorBuilder -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 05:28:12 2009 From: noreply at atlassian.com (Alexey Romanchuk (JIRA)) Date: Wed, 12 Aug 2009 04:28:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-208) Wrong Path in ConstrinViolations Message-ID: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Wrong Path in ConstrinViolations -------------------------------- Key: HV-208 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta3 Environment: beta 3 snapshot from aug 11 Reporter: Alexey Romanchuk Priority: Critical In Path we always have leading dot for every validate field. class A { @NotNull String b; } causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 06:56:12 2009 From: noreply at atlassian.com (andreas bester (JIRA)) Date: Wed, 12 Aug 2009 05:56:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4080) Distributed QueryCache does not evict Message-ID: <1145920225.19501250074572169.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Distributed QueryCache does not evict -------------------------------------- Key: HHH-4080 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4080 Project: Hibernate Core Issue Type: Bug Components: caching (L2) Affects Versions: 3.3.2, 3.3.1 Environment: Hibernate 3.3.1/2 + ehcache1.5& 1.6, multiple Tomcats Reporter: andreas bester This is essentially the exact same issue described in http://opensource.atlassian.com/projects/hibernate/browse/HHH-3734 further to this : https://forum.hibernate.org/viewtopic.php?t=979125&highlight=querycache Except It's a bug and not really an enhancement as it stops you from using Distributed QueryCache when using Invalidation. I am more than willing to test any patches. or provide more information. Details: -App1 (user facing website) -App2 (cms) 1. App1 calls: StandardQueryCache.cacheRegion.put() placing an HQL query in cache referencing table "A" 2. App2 makes an update to the entity representing table "A" 3. EHCache on App2 broadcasts an "UPDATE" message to update the UpdateTimestampsCache for table "A" 4. App1 receives the "UPDATE" message from App2 but ignores it because the UpdateTimestampsCache for App1 does not contain an entry for table "A" 5. App1 holds onto it's originally cached value and does not reflect the update that has taken place Basically, the user facing application is not receiving CMS updates for HQL queries when distributed. This is because the QueryCache API does not pass the Set of "spaces" and the StandardQueryCache does not populate the UpdateTimestampsCache with an initial entry when an HQL query is cached. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 08:18:15 2009 From: noreply at atlassian.com (Vladimir Kralik (JIRA)) Date: Wed, 12 Aug 2009 07:18:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3529) ConnectionWrapper is not visible from class loader In-Reply-To: <29749948.1223979666049.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <39075409.19671250079495654.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33747#action_33747 ] Vladimir Kralik commented on HHH-3529: -------------------------------------- > How to use this pathc? appreciate if some can can share the steps.. Download source code for hibernate. Then mkdir hibernate-src/ cd hibernate-src/ tar xvfz hibernate-src-X.Y.Z.tar.gz cd hiber* patch -p1 ConnectionWrapper is not visible from class loader > --------------------------------------------------- > > Key: HHH-3529 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.6, 3.3.1 > Environment: SpringFramework 2.5.5, Hibernate 3.2.6 / 3.3.1, Tomcat 5.5, CommonJ Timer ( http://www.myfoo.de/commonj/ ) > Reporter: Vladimir Kralik > Attachments: hibernate-3.2.6_p2.patch > > > Hibernate/Spring libraries are in app.war/WEB-INF/lib. > Timer is configured as resources in Tomcat and his libraries are in $CATALINA_HOME/common/lib/. > Function call from GUI works, but the same function called by timers gives this exception : > org.springframework.transaction.CannotCreateTransactionException: Could not openHibernate Session for transaction; nested exception is java.lang.IllegalArgumentException: > interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader > at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:599) > .... > Caused by: java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader > at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) > at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581) > at org.hibernate.jdbc.BorrowedConnectionProxy.generateProxy(BorrowedConnectionProxy.java:67) > at org.hibernate.jdbc.ConnectionManager.borrowConnection(ConnectionManager.java:163) > at org.hibernate.jdbc.JDBCContext.borrowConnection(JDBCContext.java:111) > at org.hibernate.impl.SessionImpl.connection(SessionImpl.java:359) > at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:510) > It's the same bug as was in HHH-2215, but this is not resolved. > I think, that the problem is extracting classloader from currentThread(). This is always not null, so the next test in method getProxyClassLoader() is always false. > I my case, timer thread lives in top class loader, but hibernate libraries are inside application class loader. > Attached patch removes classloader extracting from currentThread(). It works for my case. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 10:34:12 2009 From: noreply at atlassian.com (Adam Warski (JIRA)) Date: Wed, 12 Aug 2009 09:34:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-3957) Audited Null Embeddable objects not returned as null In-Reply-To: <716480636.1244789833745.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1028336075.19721250087652254.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Warski reassigned HHH-3957: -------------------------------- Assignee: Adam Warski > Audited Null Embeddable objects not returned as null > ---------------------------------------------------- > > Key: HHH-3957 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3957 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Environment: 3.5.0-SNAPSHOT, Oracle, HSQL > Reporter: Aslak Knutsen > Assignee: Adam Warski > Attachments: envers-HHH-3957-testcases.patch > > > HIbernate Core and Hibernate Envers have different behaviour when it comes to handling null embeddable objects. > Hibernate Core will return the Embeddable object as null when all of its properties are, Hibernate Envers will return the Embeddable object with all null properties. > Description, TestCase: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=156716 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 10:44:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Wed, 12 Aug 2009 09:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4081) Support for JPA 2.0 "qualified identification variables" (KEY, VALUE and ENTRY) Message-ID: <431704279.19741250088255471.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Support for JPA 2.0 "qualified identification variables" (KEY, VALUE and ENTRY) ------------------------------------------------------------------------------- Key: HHH-4081 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4081 Project: Hibernate Core Issue Type: New Feature Components: query-hql Reporter: Steve Ebersole Assignee: Steve Ebersole Fix For: 3.5 JPA 2.0 QL defines new expressions for dealing with associations of type Map: KEY(a.someMap) -> refers to the key of the someMap attribute VALUE(a.someMap) -> refers to the value of the someMap attribute ENTRY(a.someMap) -> refers to the Map.Entry entries of the someMap attribute -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 10:50:12 2009 From: noreply at atlassian.com (Adam Warski (JIRA)) Date: Wed, 12 Aug 2009 09:50:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3957) Audited Null Embeddable objects not returned as null In-Reply-To: <716480636.1244789833745.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1413500172.19781250088612011.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Warski resolved HHH-3957. ------------------------------ Resolution: Fixed Fix Version/s: 3.5 > Audited Null Embeddable objects not returned as null > ---------------------------------------------------- > > Key: HHH-3957 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3957 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Environment: 3.5.0-SNAPSHOT, Oracle, HSQL > Reporter: Aslak Knutsen > Assignee: Adam Warski > Fix For: 3.5 > > Attachments: envers-HHH-3957-testcases.patch > > > HIbernate Core and Hibernate Envers have different behaviour when it comes to handling null embeddable objects. > Hibernate Core will return the Embeddable object as null when all of its properties are, Hibernate Envers will return the Embeddable object with all null properties. > Description, TestCase: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=156716 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 13:18:13 2009 From: noreply at atlassian.com (Paul Benedict (JIRA)) Date: Wed, 12 Aug 2009 12:18:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2603) Deprecate the Session.connection() method In-Reply-To: <114675607.1178675764313.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1401882071.19881250097493743.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33748#action_33748 ] Paul Benedict commented on HHH-2603: ------------------------------------ Ana, see HHH-2859 for the alternative. > Deprecate the Session.connection() method > ----------------------------------------- > > Key: HHH-2603 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2603 > Project: Hibernate Core > Issue Type: Deprecation > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.4 > > > Deprecate the Session.connection() method, in favor of a "JDBC work" API. Schedule for removal in 4.0 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 15:03:12 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Wed, 12 Aug 2009 14:03:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3032) On Sybase, a subquery is incorrectly generated, causing ''Incorrect syntax near the keyword 'as'. In-Reply-To: <120479533.1198776545595.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1577837044.19921250103792131.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33749#action_33749 ] strong liu commented on HHH-3032: --------------------------------- from Dhimant Chokshi: as mentioned in the notes, alias is not suppoted in subqueries(although it is supported in select list in normal query). So the query is needed to be changed so that subquery does not have alias(AS y0_). Query should look like this: select [ommitted field names] from dtb_trd_resultado.resu.tbl_posicao_produto_trd this_ where this_.ind_situa_regis=? and exists (select distinct this0__.tip_dolar as from dtb_trd_resultado.resu.tbl_det_posicao_produto_trd this0__ where this0__.ind_situa_regis=? and this0__.dat_posic=?) > On Sybase, a subquery is incorrectly generated, causing ''Incorrect syntax near the keyword 'as'. > ------------------------------------------------------------------------------------------------- > > Key: HHH-3032 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3032 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.2.5 > Environment: Hibernate 3.2.5, JDK 1.6, IDE Eclipse 3.3, running on Windows XP > Reporter: Fernando Galdino > Assignee: Gail Badner > Fix For: 3.2.x, 3.3.x, 3.5 > > > I am using Spring 2.5 and Hibernate. I created a method to find a list of ProductPositionData based on an existence of its details represented by class DetalhePosicaoProdutoData. So, there is a relationship 1:n between tables ProductPosition and DetalhePosicaoProduto. > public List findAllBy(Date date, String viewCode, String status) > { > DetachedCriteria subquery = DetachedCriteria.forClass(DetalhePosicaoProdutoData.class); > subquery.add(Expression.eq("indSituaRegis", status)); > subquery.add(Expression.eq("compositeId.datPosic", date)); > subquery.setProjection(Projections.distinct(Property.forName("tipDolar"))); > > DetachedCriteria criteria = DetachedCriteria.forClass(ProductPositionData.class); > criteria.add(Expression.eq("indSituaRegis", status)); > criteria.add(Subqueries.exists(subquery)); > List list = this.hibernateTemplate.findByCriteria(criteria); > return list; > } > It should generate a query on the format SELECT blablabla FROM xyz WHERE exists (SELECT 1 FROM wyz). In really, running this method, I got a similar query. > select [ommitted field names] > from dtb_trd_resultado.resu.tbl_posicao_produto_trd this_ > where this_.ind_situa_regis=? and exists (select distinct this0__.tip_dolar as y0_ > from dtb_trd_resultado.resu.tbl_det_posicao_produto_trd this0__ where this0__.ind_situa_regis=? and this0__.dat_posic=?) > It causes the following error running under Sybase: > Incorrect syntax near the keyword 'as'. > ; nested exception is com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'. > It happens because on the subquery is generated this0__.tip_dolar as y0_ but "as y0_" is not valid in Sybase because using alias is not allowed for Sybase subqueries. > I saw similar problems at: > http://forum.hibernate.org/viewtopic.php?t=949233 > http://opensource.atlassian.com/projects/hibernate/browse/HHH-2905 > ----------------------------------- > Stacktrace: > org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.tip_orige_opera as tip1_4_0_, this_.num_opera as num2_4_0_, this_.ind_ativo_passi as ind3_4_0_, this_.tip_posic_opera as tip4_4_0_, this_.num_book as num5_4_0_, this_.num_regra_produ as num6_4_0_, this_.tip_objet_opera as tip7_4_0_, this_.tip_opera as tip8_4_0_, this_.num_empre as num9_4_0_, this_.num_clien as num10_4_0_, this_.ind_tradi as ind11_4_0_, this_.dat_inici_opera as dat12_4_0_, this_.dat_termi_opera as dat13_4_0_, this_.dat_termi_opera_me as dat14_4_0_, this_.dat_venci_risco as dat15_4_0_, this_.val_parid_moeda as val16_4_0_, this_.pcl_taxa_opera as pcl17_4_0_, this_.pcl_sobre_index as pcl18_4_0_, this_.val_cotac_indic_abert as val19_4_0_, this_.cod_risco_index as cod20_4_0_, this_.num_confi_calcu_produ as num21_4_0_, this_.cod_indic_econo_indic as cod22_4_0_, this_.tip_indic_econo_indic as tip23_4_0_, this_.nat_indic_econo_indic as nat24_4_0_, this_.tip_merca_indic_indic as tip25_4_0_, this_.cod_indic_econo_taxa as cod26_4_0_, this_.tip_indic_econo_taxa as tip27_4_0_, this_.tip_merca_indic_taxa as tip28_4_0_, this_.nat_indic_econo_taxa as nat29_4_0_, this_.ind_situa_regis as ind30_4_0_, this_.dat_situa_regis as dat31_4_0_, this_.cod_user as cod32_4_0_, this_.num_carte as num33_4_0_, this_.dat_liqui_opera as dat34_4_0_, this_.cod_indic_econo_taxa_fwd as cod35_4_0_, this_.tip_indic_econo_taxa_fwd as tip36_4_0_, this_.tip_merca_indic_taxa_fwd as tip37_4_0_, this_.nat_indic_econo_taxa_fwd as nat38_4_0_, this_.dat_limit_varia_indic as dat39_4_0_, this_.tip_metod_preci as tip40_4_0_, this_.tip_estru_sinte as tip41_4_0_, this_.dat_entra_opera as dat42_4_0_ from dtb_trd_resultado.resu.tbl_posicao_produto_trd this_ where this_.ind_situa_regis=? and exists (select distinct this0__.tip_dolar as y0_ from dtb_trd_resultado.resu.tbl_det_posicao_produto_trd this0__ where this0__.ind_situa_regis=? and this0__.dat_posic=?)]; SQL state [ZZZZZ]; error code [156]; Incorrect syntax near the keyword 'as'. > ; nested exception is com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'. > at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:121) > at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322) > at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424) > at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410) > at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:378) > at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:981) > at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:974) > at com.jpmorgan.br.databroker.control.productposition.ProductPositionControlImpl.findAllByx(ProductPositionControlImpl.java:45) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301) > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at $Proxy5.findAllByx(Unknown Source) > at com.jpmorgan.br.databroker.control.productposition.ProductPositionDataProvider.getData(ProductPositionDataProvider.java:32) > at com.jpmorgan.br.databroker.service.OptPriceProcessTest.runProcess(OptPriceProcessTest.java:109) > at com.jpmorgan.br.databroker.service.OptPriceProcessTest.testProcess(OptPriceProcessTest.java:88) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'. > at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:3178) > at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2481) > at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69) > at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220) > at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203) > at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1611) > at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1596) > at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:96) > at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) > at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) > at org.hibernate.loader.Loader.doQuery(Loader.java:674) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) > at org.hibernate.loader.Loader.doList(Loader.java:2220) > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) > at org.hibernate.loader.Loader.list(Loader.java:2099) > at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569) > at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) > at org.springframework.orm.hibernate3.HibernateTemplate$35.doInHibernate(HibernateTemplate.java:991) > at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:373) > ... 35 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 20:50:12 2009 From: noreply at atlassian.com (Ed Burns (JIRA)) Date: Wed, 12 Aug 2009 19:50:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-171) Hibernate Validator must specify how to run in environments that use a SecurityManager In-Reply-To: <934316467.1245436353436.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <461998545.19941250124612199.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33750#action_33750 ] Ed Burns commented on HV-171: ----------------------------- Earlier in the process you stated that you don't think the SecurityManager consideration should be mentioned in the spec. Do you still feel that way, or do you want to put it in there and raise the security of the industry as a whole? > Hibernate Validator must specify how to run in environments that use a SecurityManager > -------------------------------------------------------------------------------------- > > Key: HV-171 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-171 > Project: Hibernate Validator > Issue Type: Improvement > Components: documentation > Affects Versions: 4.0.0.Beta1 > Environment: Glassfish V3 with Security Manager Enabled > Reporter: Ed Burns > Fix For: 4.0.0.Beta3 > > Attachments: message.txt > > > When running the JSR-303 Impl that is Hibernate Validator 4.0.0.Beta1 on a container with a SecurityManager, such as Glassfishv3 with the SecurityManager enabled, calling simple validator code such as: > Set> violations = > beanValidator.validate(person); > Will cause an AccessControlException, as shown in the following stack trace: > [#|2009-06-19T11:22:20.347-0400|SEVERE|glassfish|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-1;|StandardWrapperValve[SimpleBVServlet]: PWC1406: Servlet.service() for servlet SimpleBVServlet threw exception > java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) > at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) > at java.security.AccessController.checkPermission(AccessController.java:546) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) > at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107) > at org.hibernate.validation.util.ReflectionHelper.setAccessibility(ReflectionHelper.java:195) > at org.hibernate.validation.engine.BeanMetaDataImpl.initFieldConstraints(BeanMetaDataImpl.java:233) > at org.hibernate.validation.engine.BeanMetaDataImpl.initClass(BeanMetaDataImpl.java:207) > at org.hibernate.validation.engine.BeanMetaDataImpl.createMetaData(BeanMetaDataImpl.java:179) > at org.hibernate.validation.engine.BeanMetaDataImpl.(BeanMetaDataImpl.java:106) > at org.hibernate.validation.engine.BeanMetaDataImpl.(BeanMetaDataImpl.java:96) > at org.hibernate.validation.engine.ValidatorImpl.getBeanMetaData(ValidatorImpl.java:559) > at org.hibernate.validation.engine.ValidatorImpl.validateConstraints(ValidatorImpl.java:225) > at org.hibernate.validation.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:189) > at org.hibernate.validation.engine.ValidatorImpl.validate(ValidatorImpl.java:110) > at simple_bv_servlet.SimpleBVServlet.doGet(SimpleBVServlet.java:76) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:319) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) > at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:352) > at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:209) > at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1499) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:187) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) > at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) > at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:353) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:249) > at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:147) > at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746) > at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:655) > at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:905) > at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161) > at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) > at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) > at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) > at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) > at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) > at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) > at com.sun.grizzly.ContextTask.run(ContextTask.java:69) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:637) > Some remedies include: > 1. Explicitly accounting for SecurityManager considerations in the JSR-303 Java API > 2. Mentioning in the spec prose what a caller that wishes to use SecurityManager must do to enable JSR-303 to work without throwing security related exceptions. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 12 21:55:12 2009 From: noreply at atlassian.com (Lloyd Fernandes (JIRA)) Date: Wed, 12 Aug 2009 20:55:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4082) detached object exception thrown when cascade objects are in different PU Message-ID: <476960492.19971250128512094.JavaMail.j2ee-opensource-projects@vps07.contegix.com> detached object exception thrown when cascade objects are in different PU ------------------------------------------------------------------------- Key: HHH-4082 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4082 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.1 Environment: Core 3.3.1, MS SQL 2005/2008, Weblogic 10.3, JPA Reporter: Lloyd Fernandes JPA and 2 PUs. All transactions are XA Jar for PU2 has object process definition which has a collection of process paths and each has a collection of process activities Jar for PU1 has object workitem that refers to process definition. All PU2 XML hibernate mapping files are imported into PU1 using maaping-file element in persistence.xml If workitem (in PU1) is read then related process definition, process paths & process activities are read using PU1 A process activity is added, which gets done using PU2 When processing commit/flush a detached object exception is thrown Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: mil.army.us.sec.wfm.ProcessActivityDefinition at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:102) at org.hibernate.impl.SessionImpl.firePersistOnFlush(SessionImpl.java:671) at org.hibernate.impl.SessionImpl.persistOnFlush(SessionImpl.java:663) at org.hibernate.engine.CascadingAction$9.cascade(CascadingAction.java:346) at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) at org.hibernate.engine.Cascade.cascade(Cascade.java:153) at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479) at org.hibernate.event.def.DefaultPersistEventListener.entityIsPersistent(DefaultPersistEventListener.java:134) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:107) at org.hibernate.impl.SessionImpl.firePersistOnFlush(SessionImpl.java:671) at org.hibernate.impl.SessionImpl.persistOnFlush(SessionImpl.java:663) at org.hibernate.engine.CascadingAction$9.cascade(CascadingAction.java:346) at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319) at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192) at org.hibernate.engine.Cascade.cascade(Cascade.java:153) at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:154) at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:145) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1717) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67) ... 55 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 13 02:55:12 2009 From: noreply at atlassian.com (Thomas S (JIRA)) Date: Thu, 13 Aug 2009 01:55:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2971) AbstractFlushingEventListener catches, logs and re-throws HibernateException in performExecutions generating noisy logs In-Reply-To: <119690608.1196101376172.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <77552274.20041250146512205.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33751#action_33751 ] Thomas S commented on HHH-2971: ------------------------------- > And what is the problem of logging the exception? As Craig suggest you can filter out logging from AbstractFlushingEventListener but this is only treating the symptons and not fixing the problem. In my case we have customers that buy and install out system. I can't rely on all customers not to configure or change the log filter. In case they don't filter out those messages we will have them on the phone, and maybe even accept an error report on the exception, causing everybody to waste their time. Instead I would like Diego to explain why the log statement is needed when you rethrow the exception? Removing the log statement doesn't change the behavior of your application ;-) > AbstractFlushingEventListener catches, logs and re-throws HibernateException in performExecutions generating noisy logs > ----------------------------------------------------------------------------------------------------------------------- > > Key: HHH-2971 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2971 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.5 > Environment: v3.2.5 > Reporter: craig mcmillan > Assignee: Diego Plentz > Priority: Minor > Attachments: tags.v325.r14204.patch > > > AbstractFlushingEventListener catches HibernateException, logs an error, and re-throws the same HibernateException... so the Exception gets logged twice, or worse [ in the case i'm looking at, an offline locker ], an expected Exception [ConstraingViolationException] is caught and discarded, but an error is still logged -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 13 05:34:12 2009 From: noreply at atlassian.com (ggsoft@gmx.net (JIRA)) Date: Thu, 13 Aug 2009 04:34:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4083) Custom sql-delete does improper parameter handling Message-ID: <643150413.20081250156052091.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Custom sql-delete does improper parameter handling -------------------------------------------------- Key: HHH-4083 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4083 Project: Hibernate Core Issue Type: Bug Affects Versions: 3.2.6 Environment: 3.2.6GA, MySQL 5.0.75 Reporter: ggsoft at gmx.net With turned on versioning (timestamp) e.g. a custom delete query UPDATE myentity SET deleted = 1 WHERE myentityid = ? gives an exception on wrong parameter (2 having, only 1 to set) Hibernate tries to set the version field too so i integrated it to the query: UPDATE myentity SET deleted = 1, lastupdated = ? WHERE myentityid = ? this gives an exception because hibernate sets lastupdated to the id and myentityid to timestamp in the resulting statement. (any hint welcome to get it working) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 13 12:24:13 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 13 Aug 2009 11:24:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2388) Insert w/ identity column fails on Sybase but no exception occurs In-Reply-To: <73498484.1169849299583.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1361503512.20151250180653443.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] strong liu updated HHH-2388: ---------------------------- Attachment: MyEntity.hbm.xml MyEntityTest.java MyEntity.java Sybase throws an Exception when hibernate try to get generated key before hibernate run into org.hibernate.id.IdentityGenerator$InsertSelectDelegate public Serializable executeAndExtract(PreparedStatement insert) I have attached the test case. -------------------------------------------------------- 23:58:00,354 INFO SchemaExport:196 - schema export complete Hibernate: /* insert MyEntity */ insert into MyEntity (cost) values (?) java.sql.SQLException: JZ0NK: Generated keys are not available because either the Statement.NO_GENERATED_KEYS was used or no keys were autom atically generated. at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.getGeneratedKeys(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.hibernate.util.GetGeneratedKeysHelper.getGeneratedKey(GetGeneratedKeysHelper.java:69) at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:76) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2162) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2642) at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48) > Insert w/ identity column fails on Sybase but no exception occurs > ----------------------------------------------------------------- > > Key: HHH-2388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.1 > Environment: Hibernate 3.2.1.GA with annotations > Sybase jConnect 6.05 JDBC driver > Sybase ASE 15 database > Reporter: Tim Morrow > Assignee: strong liu > Attachments: MyEntity.hbm.xml, MyEntity.java, MyEntityTest.java > > > I have a scenario where storing a new entity fails (i.e. the row is not inserted) but Hibernate does not realize this. No exceptions are thrown. Later, this leads to AssertionFailures (if two such entities fail in the same session - they both have the same PK). > The problem specifically occurs with a table that has a numeric column with precision (e.g. numeric(10,4)) and an identity column when using Sybase ASE. > ========== > To reproduce: > 1. Use Sybase jConnect 6.05 JDBC driver with Sybase ASE 15 database. > 2. Define an Entity with a long ID and BigDecimal numeric column. > 3. Create a corresponding table with an identity column and numeric(10, 4) column. > For example: > hibernate.MyEntity.java: > ----------------------------------------- > package hibernate; > import java.math.BigDecimal; > import javax.persistence.Column; > import javax.persistence.Entity; > import javax.persistence.GeneratedValue; > import javax.persistence.GenerationType; > import javax.persistence.Id; > import javax.persistence.Table; > import org.hibernate.validator.NotNull; > @Entity > @Table(name = "z_tim_test") > public class MyEntity { > private BigDecimal cost; > private long id; > public MyEntity() {} > @Column(columnDefinition = "numeric(10,4)") > @NotNull public final BigDecimal getCost() { > return cost; > } > @GeneratedValue(strategy = GenerationType.AUTO) > @Id public final long getId() { > return id; > } > public final void setCost(BigDecimal cost) { > this.cost = cost; > } > public final void setId(long id) { > this.id = id; > } > } > Table: > ----------------------------------------- > CREATE TABLE z_tim_test > ( > id numeric(19) PRIMARY KEY not null, > cost numeric(10,4) not null > ); > 4. Write some code that stores a new entity and tries to load it: > MyEntity myEntity = new MyEntity(); > myEntity.setCost(new BigDecimal("123.12345")); > session.save(myEntity); > session.flush(); > session.clear(); > List results = session.createCriteria(MyEntity.class).list(); > if (results.size() != 1) { > throw new IllegalStateException("Expected 1 result"); > } > This test will throw the IllegalStateException because the row was not persisted and no errors occurred. > Reason: > * Sybase does not thrown any SQLException when you try and persist a numeric value whose scale exceeds that defined on the column. Instead, it returns an updateCount of zero and an identity column value of zero. > * Hibernate does not check the updateCount after executing the statement when using an Identity column. The offending code is in: > org.hibernate.id.IdentityGenerator$InsertSelectDelegate > public Serializable executeAndExtract(PreparedStatement insert) throws SQLException { > if ( !insert.execute() ) { > while ( !insert.getMoreResults() && insert.getUpdateCount() != -1 ) { > // do nothing until we hit the rsult set containing the generated id > } > } > ResultSet rs = insert.getResultSet(); > try { > return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); > } > finally { > rs.close(); > } > } > It ignores the updateCount. > The net result is that the object is assigned a PK value of zero. Hibernate continues. My applicaiton is unaware that the row failed to insert. > Solution: > It would seem to me replacing the above code with: > if (!insert.execute()) { > if (insert.getUpdateCount() < 1) { > throw new HibernateException("No update occurred"); > } > while (!insert.getMoreResults()) { > // do nothing until we hit the rsult set containing the generated id > } > } > Would take care of the problem? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 13 15:34:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Thu, 13 Aug 2009 14:34:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Closed: (HHH-4081) Support for JPA 2.0 "qualified identification variables" (KEY, VALUE and ENTRY) In-Reply-To: <431704279.19741250088255471.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1040289854.20181250192055253.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole closed HHH-4081. ------------------------------- Resolution: Fixed > Support for JPA 2.0 "qualified identification variables" (KEY, VALUE and ENTRY) > ------------------------------------------------------------------------------- > > Key: HHH-4081 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4081 > Project: Hibernate Core > Issue Type: New Feature > Components: query-hql > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > > JPA 2.0 QL defines new expressions for dealing with associations of type Map: > KEY(a.someMap) -> refers to the key of the someMap attribute > VALUE(a.someMap) -> refers to the value of the someMap attribute > ENTRY(a.someMap) -> refers to the Map.Entry entries of the someMap attribute -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 13 22:46:12 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Thu, 13 Aug 2009 21:46:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3691) Sybase does not support Blobs and Clobs; it uses image and text instead In-Reply-To: <1742352.1231319978641.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <627558781.20211250217972335.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33753#action_33753 ] strong liu commented on HHH-3691: --------------------------------- the following unit tests are passed without error SerializableTypeTest.testNewSerializableType SQLFunctionsTest.testBlobClob can not find BlobTest and ClobTest in the trunk of hibernate core > Sybase does not support Blobs and Clobs; it uses image and text instead > ----------------------------------------------------------------------- > > Key: HHH-3691 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3691 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > > SybaseDialect needs to be set up to use image and text instead of Blob and Clob. > The following unit tests are failing for Sybase with the message, "The method com.sybase.jdbc2.jdbc.SybResultSet.getBlob(String) is not supported and should not be called.": > BlobTest.testBoundedMaterializedBlobAccess > BlobTest.testBoundedBlobLocatorAccess > BlobTest.testUnboundedBlobLocatorAccess > ClobTest.testBoundedMaterializedClobAccess > ClobTest.testBoundedClobLocatorAccess > ClobTest.testUnboundedClobLocatorAccess > SerializableTypeTest.testNewSerializableType > MixedTest.testMixedInheritance > InterfaceProxyTest.testInterfaceProxies > SQLFunctionsTest.testBlobClob -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 01:01:12 2009 From: noreply at atlassian.com (=?UTF-8?Q?Ondra_=C5=BDi=C5=BEka_=28JIRA=29?=) Date: Fri, 14 Aug 2009 00:01:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4084) @UniqueConstraint(columnNames="") causes StringIndexOutOfBoundsException Message-ID: <1724694158.20231250226072079.JavaMail.j2ee-opensource-projects@vps07.contegix.com> @UniqueConstraint(columnNames="") causes StringIndexOutOfBoundsException ------------------------------------------------------------------------ Key: HHH-4084 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4084 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.0.GA Reporter: Ondra ?i?ka Priority: Trivial Empty string in columnNames attribute causes StringIndexOutOfBoundsException: @Entity @Table( name="items", uniqueConstraints=@UniqueConstraint(columnNames="") ) public class Item implements Serializable { ... } --------------- Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:686) at org.hibernate.mapping.Column.setName(Column.java:84) at org.hibernate.mapping.Column.(Column.java:65) at org.hibernate.cfg.AnnotationConfiguration.buildUniqueKeyFromColumnNames(AnnotationConfiguration.java:591) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:348) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 02:18:14 2009 From: noreply at atlassian.com (Kent Tong (JIRA)) Date: Fri, 14 Aug 2009 01:18:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4085) Specifying a select clause triggers the "query specified join fetching, but the owner..." exception Message-ID: <578927660.20261250230694346.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Specifying a select clause triggers the "query specified join fetching, but the owner..." exception --------------------------------------------------------------------------------------------------- Key: HHH-4085 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4085 Project: Hibernate Core Issue Type: Bug Components: query-hql Affects Versions: 3.3.2 Environment: Kubuntu 9.04 Reporter: Kent Tong An Order contains some OrderItem's. Each OrderItem contains a Product and a quantity. To retrieve the Orders, The following HQL works: Code: from Order o left join fetch o.items i join fetch i.product However, if I specify the select clause: Code: select o from Order o left join fetch o.items i join fetch i.product Then Hibernate will return an error: Code: Exception in thread "main" org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=Product,tableAlias=product2_,origin=items items1_,colums={items1_.p_id ,className=lab3.Product}}] [select o from lab3.Order o left join fetch o.items i join fetch i.product] at org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:217) at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:727) at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:551) at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:645) at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:251) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342) at $Proxy0.createQuery(Unknown Source) at lab3.OnlineStoreApp.run(OnlineStoreApp.java:32) at lab3.OnlineStoreApp.main(OnlineStoreApp.java:14) The test code is shown below: Code: package lab3; import java.util.List; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class OnlineStoreApp { private SessionFactory factory; private Session session; public static void main(String[] args) { new OnlineStoreApp().run(); } public OnlineStoreApp() { Configuration cfg = new Configuration(); cfg.configure(); factory = cfg.buildSessionFactory(); } @SuppressWarnings("unchecked") private void run() { session = factory.getCurrentSession(); session.beginTransaction(); Order o = new Order(); o.getItems().add(new OrderItem(new Product("p1"), 10)); o.getItems().add(new OrderItem(new Product("p2"), 20)); session.save(o); List orders = session .createQuery( "select o from Order o left join fetch o.items i join fetch i.product") .list(); System.out.println(orders.size()); session.getTransaction().commit(); } } package lab3; import java.util.ArrayList; import java.util.List; public class Order { private Long internalId; private List items; public Order() { items = new ArrayList(); } public Long getInternalId() { return internalId; } public void setInternalId(Long internalId) { this.internalId = internalId; } public List getItems() { return items; } public void setItems(List items) { this.items = items; } } package lab3; public class OrderItem { private Product product; private int qty; public OrderItem() { } public OrderItem(Product product, int qty) { this(); this.product = product; this.qty = qty; } public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } public int getQty() { return qty; } public void setQty(int qty) { this.qty = qty; } } package lab3; public class Product { private Long internalId; private String name; public Product() { } public Product(String name) { this(); this.name = name; } public Long getInternalId() { return internalId; } public void setInternalId(Long internalId) { this.internalId = internalId; } public String getName() { return name; } public void setName(String name) { this.name = name; } } jdbc:h2:tcp://localhost/~/test org.h2.Driver sa update org.hibernate.dialect.H2Dialect thread false -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 07:18:15 2009 From: noreply at atlassian.com (shubha (JIRA)) Date: Fri, 14 Aug 2009 06:18:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4086) improving the performance of the object loading in hibernate Message-ID: <2143570340.20311250248695458.JavaMail.j2ee-opensource-projects@vps07.contegix.com> improving the performance of the object loading in hibernate ------------------------------------------------------------ Key: HHH-4086 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4086 Project: Hibernate Core Issue Type: Task Components: query-hql Affects Versions: 3.2.3 Environment: hibernate 3.2.3 ga, oracle Reporter: shubha Priority: Critical _sessions = SessionFactoryUtil.getSessionFactory(); session = _sessions.openSession(); Query query = session.getNamedQuery(queryName); tx = session.beginTransaction(); results = query.list(); System.out.println(results.size()); tx.commit(); i am trying to get a collection of objects from query.list(). Even though the SQL generated from hibernate runs very fast in oracle, the O/R mapping in case of hibernate is taking lot of time. To fetch around 15 thousand records it takes 8 to 12 minutes. I am using left join fetch on the query -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 13:59:12 2009 From: noreply at atlassian.com (Brian (JIRA)) Date: Fri, 14 Aug 2009 12:59:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4087) Session.flush() Causes AssertionFailure Message-ID: <528661783.20331250272752539.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Session.flush() Causes AssertionFailure ---------------------------------------- Key: HHH-4087 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.2.4.sp1 Reporter: Brian After calling Session.save() with an entity, calling Session.flush() causes the following error. org.hibernate.AssertionFailure: collection [com.example.myList] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) The mapping used was: -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 14:01:12 2009 From: noreply at atlassian.com (Brian (JIRA)) Date: Fri, 14 Aug 2009 13:01:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4087) Session.flush() Causes AssertionFailure In-Reply-To: <528661783.20331250272752539.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <343935592.20351250272872561.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33754#action_33754 ] Brian commented on HHH-4087: ---------------------------- 3.1.3 version of AbstractEntityPersister which doesn't exhibit the bug: http://anonsvn.jboss.org/repos/hibernate/core/tags/v313/src/org/hibernate/persister/entity/AbstractEntityPersister.java 3.2.4.sp1 version of AbstractEntityPersister which exhibits the bug: http://anonsvn.jboss.org/repos/hibernate/core/tags/JBOSS_EAP_3_2_4_SP1_CP07/src/org/hibernate/persister/entity/AbstractEntityPersister.java > Session.flush() Causes AssertionFailure > ---------------------------------------- > > Key: HHH-4087 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.4.sp1 > Reporter: Brian > > After calling Session.save() with an entity, calling Session.flush() causes the following error. > org.hibernate.AssertionFailure: collection [com.example.myList] was not processed by flush() > at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) > at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) > at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28) > at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) > The mapping used was: > > > > > > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 16:09:14 2009 From: noreply at atlassian.com (Fernando Fernandes (JIRA)) Date: Fri, 14 Aug 2009 15:09:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (EJB-460) Inherited @Embeddable class ignored by Hibernate Message-ID: <415253424.20381250280554753.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Inherited @Embeddable class ignored by Hibernate ------------------------------------------------ Key: EJB-460 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-460 Project: Hibernate Entity Manager Issue Type: Bug Components: EntityManager Environment: Using: hibernate-entitymanager-3.3.1.jar, hibernate-commons-annotations.jar, hibernate-annotations-3.3.0.jar. Reporter: Fernando Fernandes Attachments: Constante.java, Origem.java I have a constant class hierarchy implemented to ease the development of Constants in my projects, but Hibernate is solenely ignoring the embeded attibute of my entity implemented as extension of a base implementation. It neither generates SQL code to manipulate the field data... The implementation with no extension works fine but when descending from other class it stops working, and shouldn't since there's nothing wrong with it (I think). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 17:23:13 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Fri, 14 Aug 2009 16:23:13 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3338) Order of attributes in generated SQL query is dependent on Java version In-Reply-To: <109853607.1212926253186.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <57289409.20431250284993798.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner updated HHH-3338: ----------------------------- Assignee: Gail Badner Fix Version/s: 3.5 > Order of attributes in generated SQL query is dependent on Java version > ----------------------------------------------------------------------- > > Key: HHH-3338 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3338 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.6 > Environment: WIndows XP, Java 5 Update 15, Java 6 update 5 > Reporter: Michael Gerz > Assignee: Gail Badner > Fix For: 3.5 > > > We use Hibernate Core 3.2.6 in combination with Derby 10.4.1.3. > When migrating from Java 5 to Java 6, we noticed a huge performance hit. Our analysis has unveiled that Hibernate 3.2.6 produces semantical identical but syntactically different queries for Java 5 and Java 6. > Java 5: > Hibernate: select logevent0_.ID as ID7_, logevent0_.INDEX_SENT as INDEX2_7_, logevent0_.TEST_RUN_ID as TEST3_7_, logevent0_.SENDER as SENDER7_, logevent0_.TIME_SENT as TIME5_7_, logevent0_.MESSAGE as MESSAGE8_, logevent0_.SEVERITY as SEVERITY8_, logevent0_.SERIALIZED_CONTENT as SERIALIZED1_11_, logevent0_.RECEIVER as RECEIVER11_, logevent0_.TIME_RECEIVED as TIME3_11_, logevent0_.INDEX_RECEIVED as INDEX4_11_, logevent0_.ACTION_REQUEST as ACTION1_13_, logevent0_.ACTION_REPLY as ACTION1_14_, logevent0_.clazz_ as clazz_ from ( select TEST_RUN_ID, SENDER, MESSAGE, SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 2 as clazz_ from USER_LOG_EVENT union all select TEST_RUN_ID, SENDER, MESSAGE, SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 3 as clazz_ from DEVEL_LOG_EVENT union all select TEST_RUN_ID, SENDER, nullif('x','x') as MESSAGE, nullif('x','x') as SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 6 as clazz_ from ACTION_REQUEST_LOG_EVENT union all select TEST_RUN_ID, SENDER, nullif('x','x') as MESSAGE, nullif('x','x') as SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 7 as clazz_ from ACTION_REPLY_LOG_EVENT union all select TEST_RUN_ID, SENDER, nullif('x','x') as MESSAGE, nullif('x','x') as SEVERITY, SERIALIZED_CONTENT, TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, RECEIVER, INDEX_RECEIVED, INDEX_SENT, 4 as clazz_ from DATA_FLOW_LOG_EVENT ) logevent0_ where logevent0_.TEST_RUN_ID=? > Java 6: > Hibernate: select logevent0_.ID as ID7_, logevent0_.INDEX_SENT as INDEX2_7_, logevent0_.TEST_RUN_ID as TEST3_7_, logevent0_.SENDER as SENDER7_, logevent0_.TIME_SENT as TIME5_7_, logevent0_.MESSAGE as MESSAGE8_, logevent0_.SEVERITY as SEVERITY8_, logevent0_.SERIALIZED_CONTENT as SERIALIZED1_11_, logevent0_.RECEIVER as RECEIVER11_, logevent0_.TIME_RECEIVED as TIME3_11_, logevent0_.INDEX_RECEIVED as INDEX4_11_, logevent0_.ACTION_REQUEST as ACTION1_13_, logevent0_.ACTION_REPLY as ACTION1_14_, logevent0_.clazz_ as clazz_ from ( select nullif('x','x') as RECEIVER, TIME_SENT, SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 2 as clazz_ from USER_LOG_EVENT union all select nullif('x','x') as RECEIVER, TIME_SENT, SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 3 as clazz_ from DEVEL_LOG_EVENT union all select nullif('x','x') as RECEIVER, TIME_SENT, nullif('x','x') as SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, nullif('x','x') as MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 6 as clazz_ from ACTION_REQUEST_LOG_EVENT union all select nullif('x','x') as RECEIVER, TIME_SENT, nullif('x','x') as SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, nullif('x','x') as MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, ACTION_REPLY, 7 as clazz_ from ACTION_REPLY_LOG_EVENT union all select RECEIVER, TIME_SENT, nullif('x','x') as SEVERITY, TIME_RECEIVED, ID, SENDER, nullif('x','x') as MESSAGE, TEST_RUN_ID, SERIALIZED_CONTENT, INDEX_SENT, INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 4 as clazz_ from DATA_FLOW_LOG_EVENT ) logevent0_ where logevent0_.TEST_RUN_ID=? > The first order (using Java 5) looks more reasonable, because TEST_RUN_ID is the first column in all of the tables and it is also a foreign key. > The changed order of attributes does not really explain why Derby performs so poor on Java 6 and we have already issued a report to the Derby community. > Nevertheless, the SQL queries generated Hibernate should not depend on a specific version of Java. Maybe a compareTo() method is missing somewhere in the code...? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 18:46:12 2009 From: noreply at atlassian.com (Sanne Grinovero (JIRA)) Date: Fri, 14 Aug 2009 17:46:12 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-392) JGroups based backend Message-ID: <2133242306.20461250289972809.JavaMail.j2ee-opensource-projects@vps07.contegix.com> JGroups based backend --------------------- Key: HSEARCH-392 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-392 Project: Hibernate Search Issue Type: New Feature Reporter: Sanne Grinovero Fix For: 3.2.0 A new JGroups based backend, working similarly as the JMS based backend; There is no need to write code for the master-client communication, just configuration. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 14 19:02:16 2009 From: noreply at atlassian.com (Sanne Grinovero (JIRA)) Date: Fri, 14 Aug 2009 18:02:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-392) JGroups based backend In-Reply-To: <2133242306.20461250289972809.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <629172578.20481250290936092.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33755#action_33755 ] Sanne Grinovero commented on HSEARCH-392: ----------------------------------------- committed patch from ?ukasz More?; neeed before resolution: 1)write docs 2)add some logging, it's very silent. 3)review some static fields usage > JGroups based backend > --------------------- > > Key: HSEARCH-392 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-392 > Project: Hibernate Search > Issue Type: New Feature > Reporter: Sanne Grinovero > Fix For: 3.2.0 > > > A new JGroups based backend, working similarly as the JMS based backend; There is no need to write code for the master-client communication, just configuration. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 04:33:19 2009 From: noreply at atlassian.com (Hepoi Ko (JIRA)) Date: Sat, 15 Aug 2009 03:33:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3851) object load with composite id In-Reply-To: <25487132.1239077499878.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <75277246.20551250325199637.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33756#action_33756 ] Hepoi Ko commented on HHH-3851: ------------------------------- I have similar experience with AS400 Database using JTOpen Library on Hibernate Core 3.3.2 with composite id. There are two folds: 1. JDBC Specification, on 8.3 about DataTruncation. If you are using PreparedStatement and the value is a CHAR or VARCHAR column, the JDBC may truncated your value before comparing the database value and putting SQLWarning after the st.setString(index, value) method. So what that means is if you have a column with CHAR(4) and have value "ABCD" inside the database and you use SQL PreparedStatement like "select * from atable where acolumn = ?" and st.setString(1, "ABCDE"). The JDBC drive should truncate your "ABCDE" value and adding DataTruncation Exception into SQLWarning for client code to track the problem. Since the value is truncated, so the SQL Statement is valid to retrieve the row, and that row would pass it to the client code (such as Hibernate) 2. So the second fold is that Hibernate does not check this SQLWarning at all, so it has no idea about DataTruncation warning. And as soon as database return a row from JDBC, Hibernate "thinks" the SQL statement is correct and it would use this row as a resultset. Even worst I found that if you use session.get(SomeClass, IncorrectCompositeID), it returns an entity with the IncorrectCompositeID. I also tested other JDBC implementation such as Derby and MySQL, both of these drivers do not truncate value and return no row, and that would work fine with Hibernate. You may be better check with your JDBC vender (maybe oracle) to see if they are doing truncation in CHAR value as JDBC specification stated. Following is the request I sent to JTopen Group and find out the reason: http://sourceforge.net/tracker/index.php?func=detail&aid=2836043&group_id=128806&atid=712772 So for the time being, what you could do is using a UserType to specific a TrimmedString https://www.hibernate.org/90.html and apply SQLWarning Check inside the nullSafeSet method Hope this is helpful. > object load with composite id > ----------------------------- > > Key: HHH-3851 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3851 > Project: Hibernate Core > Issue Type: Bug > Components: core > Environment: HIbernate Version : 3.3.1.GA > Database : Oracle 10g > The table column types are CHAR > Reporter: sahasra > Priority: Blocker > Original Estimate: 2 days > Remaining Estimate: 2 days > > Having issues in loading, updating, deleting and querying with bind variable an entity with composite id. The table column types are CHAR > No row with the given identifier exists > but the row exists > I replace "?" by correct values, execute it in the SQL Plus and it works. > Code in the DAO class > public BoardDefinition getBoardDefinitionById(BoardDefinitionId anId) > throws HibernateException > { > > BoardDefinition instance = (BoardDefinition)getHibernateTemplate().get(BoardDefinition.class, anId); > > if (instance == null) > { > System.out.println("get successful, no instance found"); > } > else > { > System.out.println("get successful, instance found"); > } > return instance; > } > Generated SQL on running the test case > select boarddefin0_.STN as STN0_0_, boarddefin0_.BOARD_ID as BOARD2_0_0_, boarddefin0_.DESCRIPTION as DESCRIPT3_0_0_, boarddefin0_.BOARD_TYPE as BOARD4_0_0_, boarddefin0_.ACTV_FRA_RPT_FL as ACTV5_0_0_, boarddefin0_.DEACT_TRN_LINUP_FL as DEACT6_0_0_, boarddefin0_.TMP_MOVE_RESTR_EN as TMP7_0_0_, boarddefin0_.TMP_MOVE_RESTR_TR as TMP8_0_0_, boarddefin0_.TMP_MOVE_ALW_EN as TMP9_0_0_, boarddefin0_.TMP_MOVE_ALW_TR as TMP10_0_0_, boarddefin0_.AUTOSHT_CL_VAC_HRS as AUTOSHT11_0_0_, boarddefin0_.AUTOSHT_CL_VAC_MNS as AUTOSHT12_0_0_, boarddefin0_.AUTOSHT_CL_HRS as AUTOSHT13_0_0_, boarddefin0_.AUTOSHT_CL_MNS as AUTOSHT14_0_0_, boarddefin0_.COMMENTS as COMMENTS0_0_, boarddefin0_.WRK_RST_PROF_EN as WRK16_0_0_, boarddefin0_.WRK_RST_PROF_TR as WRK17_0_0_, boarddefin0_.SEN_MOVE_PROF_EN as SEN18_0_0_, boarddefin0_.SEN_MOVE_PROF_TR as SEN19_0_0_, boarddefin0_.MILES_PROF_EN as MILES20_0_0_, boarddefin0_.MILES_PROF_TR as MILES21_0_0_, boarddefin0_.STARTS_PROF_EN as STARTS22_0_0_, boarddefin0_.STARTS_PROF_TR as STARTS23_0_0_, boarddefin0_.BLE16_EN as BLE24_0_0_, boarddefin0_.FREE_DY_PROF_EN as FREE25_0_0_, boarddefin0_.FREE_DY_PROF_TR as FREE26_0_0_, boarddefin0_.SGL_DY_VAC_EN as SGL27_0_0_, boarddefin0_.SGL_DY_VAC_TR as SGL28_0_0_, boarddefin0_.LOF_RQST_ALW_EN_FL as LOF29_0_0_, boarddefin0_.LOF_RQST_ALW_TR_FL as LOF30_0_0_, boarddefin0_.SVC_TYP_CD as SVC31_0_0_, boarddefin0_.CRW_CONSIST_CD as CRW32_0_0_, boarddefin0_.UPD_TS as UPD33_0_0_, boarddefin0_.USER_ID as USER34_0_0_, boarddefin0_.SPRSS_BRD_ADVRT_FL as SPRSS35_0_0_, boarddefin0_.CRFT_TYP as CRFT36_0_0_, boarddefin0_.HDR_STN as HDR37_0_0_, boarddefin0_.HDR_BOARD as HDR38_0_0_, boarddefin0_.NBR_TRADES_MAX as NBR39_0_0_, boarddefin0_.TRADE_RESET_VALUE as TRADE40_0_0_, boarddefin0_.TRADE_RESET_TYPE as TRADE41_0_0_, boarddefin0_.TRADE_RESET_DT as TRADE42_0_0_, boarddefin0_.TRADE_ALLOWED_IND as TRADE43_0_0_, boarddefin0_.DISPLCE_CU_AWAY_FL as DISPLCE44_0_0_, boarddefin0_.NMS_ACTIVE_FL as NMS45_0_0_, boarddefin0_.SAME_BRD_MOVE_CD as SAME46_0_0_, boarddefin0_.TRADE_AGAINST_CD as TRADE47_0_0_, boarddefin0_.TMP_SEN_POS_PRF_EN as TMP48_0_0_, boarddefin0_.TMP_SEN_POS_PRF_TR as TMP49_0_0_, boarddefin0_.PERM_CUT_ALLW_FL as PERM50_0_0_, boarddefin0_.AUTO_PX_STN1 as AUTO51_0_0_, boarddefin0_.AUTO_PX_BRD1 as AUTO52_0_0_, boarddefin0_.AUTO_PX_STN2 as AUTO53_0_0_, boarddefin0_.AUTO_PX_BRD2 as AUTO54_0_0_, boarddefin0_.TRADE_TYPE_CD as TRADE55_0_0_, boarddefin0_.SPRS_BRD_ADVRT_DYS as SPRS56_0_0_, boarddefin0_.BUMP_PX_STN as BUMP57_0_0_, boarddefin0_.BUMP_PX_BOARD as BUMP58_0_0_, boarddefin0_.BUMP_OPEN_ASG_FL as BUMP59_0_0_, boarddefin0_.BUMP_MOST_JR_FL as BUMP60_0_0_, boarddefin0_.CUTOFF_STN as CUTOFF61_0_0_, boarddefin0_.CUTOFF_BOARD as CUTOFF62_0_0_, boarddefin0_.METRA_BOARD_FL as METRA63_0_0_, boarddefin0_.ADVRT_BID_FL as ADVRT64_0_0_, boarddefin0_.STAND_BID_FL as STAND65_0_0_, boarddefin0_.SEN_MOVE_FL as SEN66_0_0_, boarddefin0_.FORCED1_FB_FL as FORCED67_0_0_, boarddefin0_.FORCED2_FB_FL as FORCED68_0_0_, boarddefin0_.AUTO_DH_TU_FL as AUTO69_0_0_, boarddefin0_.RDE_BLGENBID_EN_FL as RDE70_0_0_, boarddefin0_.RDE_BLGENBID_TR_FL as RDE71_0_0_, boarddefin0_.SEN_MOVE_ALLOW_CD as SEN72_0_0_, boarddefin0_.DISP_ON_DUTY_FL as DISP73_0_0_, boarddefin0_.TRAINING_BOARD_FL as TRAINING74_0_0_ from BOARD_DEFINITION boarddefin0_ where boarddefin0_.STN=? and boarddefin0_.BOARD_ID=? > > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > > > > > > > > > > > > > > > > > > > > > > > CREATE TABLE BOARD_DEFINITION > ( > STN CHAR(6) NOT NULL, > BOARD_ID CHAR(4) NOT NULL, > DESCRIPTION VARCHAR2(25) NOT NULL, > BOARD_TYPE CHAR(1) NULL, > ACTV_FRA_RPT_FL CHAR(1) NULL, > constraint BOARD_DEFINITION_PK primary key (STN, BOARD_ID) > ); > Code snippet of the generated POJOs > import java.math.BigDecimal; > import java.util.Date; > /** > * BoardDefinition generated by hbm2java > */ > public class BoardDefinition > implements java.io.Serializable > { > private BoardDefinitionId id; > private String description; > private Character boardType; > private Character actvFraRptFl; > ------- > ------- > ----- > } > /** > * BoardDefinitionId generated by hbm2java > */ > public class BoardDefinitionId > implements java.io.Serializable > { > private String stn; > private String boardId; > public BoardDefinitionId() > { > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 09:11:15 2009 From: noreply at atlassian.com (Sharath Reddy (JIRA)) Date: Sat, 15 Aug 2009 08:11:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3000) Allow a TypeDef to be associated with a class In-Reply-To: <151070468.1197045956271.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <698393765.11250341875509.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33760#action_33760 ] Sharath Reddy commented on HHH-3000: ------------------------------------ This is already possible, without needing to add the 'targetClass' attribute. Suppose we have a custom class called 'hello.Dog', and we want to use the custom user type 'hello.DogUserType' to persist and retrieve it: import hello.Dog; @TypeDef(name="hello.Dog", typeClass=hello.DogUserType.class) //'hello.Dog' is the fully-qualified class name of our custom class class XX { private Dog dog; //No @Type annotation necessary; Hibernate realizes it has to use DogUserType to persist/retrieve this property This is possible because of the following lines in SimpleValueBinder: String type = BinderHelper.isDefault( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); If 'explicitType' is not set (via the 'Type' attribute), it uses 'returnedClassName' ('hello.Dog' in this example) as the key to look-up the associated Type info. Since we have previously registered the TypeDef with the same key (hello.Dog), it is able to retrieve the value correctly. Probably this issue can be closed. Or else, I could submit a patch to add the 'targetClass' attribute.... > Allow a TypeDef to be associated with a class > --------------------------------------------- > > Key: HHH-3000 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3000 > Project: Hibernate Core > Issue Type: Improvement > Reporter: Darren Bell > > This would allow you to just define it once and not have to worry about adding extra details to the mapping file or by annotating a field. > For instance: > @TypeDef( > name="internalHeaderType", > typeClass=com.dolby.mapics.GenericEnumUserType.class, > targetClass=com.dolby.mapics.InternalHeaderType, > parameters= { > @Parameter(name="enumClass", value="com.dolby.mapics.InternalHeaderType"), > @Parameter(name="identifierMethod", value="toString"), > @Parameter(name="valueOfMethod", value="fromString") > }) > by adding the targetClass attribute would enable this. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 14:06:15 2009 From: noreply at atlassian.com (Eric Sirianni (JIRA)) Date: Sat, 15 Aug 2009 13:06:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1112) Reverse engineering problem with composite primary key In-Reply-To: <7532150.1235163278594.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1835130450.61250359575165.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33761#action_33761 ] Eric Sirianni commented on HBX-1112: ------------------------------------ My reading of this is that this is not a bug in the Sybase driver, not in Hibernate. For a composite primary key, it should be returning the same PK_NAME for each column (since it is, after all, a single primary key). Instead it is returning different PK_NAMEs for each column (namely the column name itself). http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getPrimaryKeys(java.lang.String,%20java.lang.String,%20java.lang.String) As a workaround, I created a class "SybaseAnywhereMetaDataDialect" that simply returns null for PK_NAME (this is allowable in the JDBC spec -- see link above). ... /* * Sybase incorrectly returns the COLUMN_NAME for the PK_NAME * This is incorrect when there is a composite primary key */ element.put("PK_NAME", null); ... > Reverse engineering problem with composite primary key > ------------------------------------------------------ > > Key: HBX-1112 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4 Beta1 > Environment: configuration: > Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154 > Hibernate version: hibernate-3.2.6.ga.zip > Database: Sybase SQL Anywhere 10.0.1.3415 > JDBC-Driver: jconnect 6.05 > Eclipse Version: 3.4.0 > Code Generation Configuration: > Use Java 5 syntax and generate EJB3 annotations switched on. > Exporters: domain code. > Reporter: Christian Meyer > > Hello, > I have a problem reverse engineering domain code from a sybase anywhere 10 database. > For every table with composite primary key i get the following exception: > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Her is one example: > create table DCALLS > ( > AES timestamp default timestamp, > APPLID char(8) not null, > DIALOG integer not null, > COUNTER integer, > constraint PK_DCALLS primary key (APPLID, DIALOG) > ); > For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster > I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826 > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > all Tables with single key are fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 14:08:15 2009 From: noreply at atlassian.com (Eric Sirianni (JIRA)) Date: Sat, 15 Aug 2009 13:08:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1112) Reverse engineering problem with composite primary key In-Reply-To: <7532150.1235163278594.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1641207342.101250359695110.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33762#action_33762 ] Eric Sirianni commented on HBX-1112: ------------------------------------ Sorry - the first sentence above should read "My reading of this is that this *IS* a bug in the Sybase driver, not in Hibernate." > Reverse engineering problem with composite primary key > ------------------------------------------------------ > > Key: HBX-1112 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4 Beta1 > Environment: configuration: > Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154 > Hibernate version: hibernate-3.2.6.ga.zip > Database: Sybase SQL Anywhere 10.0.1.3415 > JDBC-Driver: jconnect 6.05 > Eclipse Version: 3.4.0 > Code Generation Configuration: > Use Java 5 syntax and generate EJB3 annotations switched on. > Exporters: domain code. > Reporter: Christian Meyer > > Hello, > I have a problem reverse engineering domain code from a sybase anywhere 10 database. > For every table with composite primary key i get the following exception: > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Her is one example: > create table DCALLS > ( > AES timestamp default timestamp, > APPLID char(8) not null, > DIALOG integer not null, > COUNTER integer, > constraint PK_DCALLS primary key (APPLID, DIALOG) > ); > For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster > I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826 > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > all Tables with single key are fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 14:31:14 2009 From: noreply at atlassian.com (Eric Sirianni (JIRA)) Date: Sat, 15 Aug 2009 13:31:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1131) JDBCReader incorrectly generates bogus FK names Message-ID: <6349073.121250361074995.JavaMail.j2ee-opensource-projects@vps07.contegix.com> JDBCReader incorrectly generates bogus FK names ----------------------------------------------- Key: HBX-1131 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131 Project: Hibernate Tools Issue Type: Bug Affects Versions: 3.2.4.GA Environment: Tools 3.2.4 GA Reporter: Eric Sirianni Please see my forum post@ https://forum.hibernate.org/viewtopic.php?f=6&t=996016&p=2416464#p2416464 JDBC drivers are allowed to return NULL for the "FK_NAME" metadata field for foreign keys. In this case, hibernate tries to generate a bogus FK name. This FK name must be unique for the Table otherwise an exception is thrown: org.hibernate.cfg.JDBCBinderException: Foreign key name (0) mapped to different tables! Hibernate's algorithm for generating the bogus FK name appears to be wrong. It should increment the bogus FK name for each FK it finds, irrelevant of the "KEY_SEQ" value. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 15:15:14 2009 From: noreply at atlassian.com (Eric Sirianni (JIRA)) Date: Sat, 15 Aug 2009 14:15:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1131) JDBCReader incorrectly generates bogus FK names In-Reply-To: <6349073.121250361074995.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1228441443.141250363714998.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33763#action_33763 ] Eric Sirianni commented on HBX-1131: ------------------------------------ Actually, my suggestion of just blindly incrementing bogusFkName doesn't work when there are keys consisting of multiple columns. > JDBCReader incorrectly generates bogus FK names > ----------------------------------------------- > > Key: HBX-1131 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4.GA > Environment: Tools 3.2.4 GA > Reporter: Eric Sirianni > > Please see my forum post@ https://forum.hibernate.org/viewtopic.php?f=6&t=996016&p=2416464#p2416464 > JDBC drivers are allowed to return NULL for the "FK_NAME" metadata field for foreign keys. > In this case, hibernate tries to generate a bogus FK name. This FK name must be unique for the Table otherwise an exception is thrown: > org.hibernate.cfg.JDBCBinderException: Foreign key name (0) mapped to different tables! > Hibernate's algorithm for generating the bogus FK name appears to be wrong. It should increment the bogus FK name for each FK it finds, irrelevant of the "KEY_SEQ" value. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 15:29:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Sat, 15 Aug 2009 14:29:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4088) Session.getSession should always return sessions from parent (or root) session Message-ID: <1881320734.161250364555002.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Session.getSession should always return sessions from parent (or root) session ------------------------------------------------------------------------------ Key: HHH-4088 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4088 Project: Hibernate Core Issue Type: Bug Components: core Reporter: Steve Ebersole Assignee: Steve Ebersole Fix For: 3.3.x, 3.5 There is a bug in SessionImpl.getSession(): if ( rootSession != null ) { rootSession.getSession( entityMode ); } should read: if ( rootSession != null ) { return rootSession.getSession( entityMode ); } (notice the missing return) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 15 16:11:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Sat, 15 Aug 2009 15:11:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Closed: (HHH-4088) Session.getSession should always return sessions from parent (or root) session In-Reply-To: <1881320734.161250364555002.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1839619043.181250367075791.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole closed HHH-4088. ------------------------------- Resolution: Fixed > Session.getSession should always return sessions from parent (or root) session > ------------------------------------------------------------------------------ > > Key: HHH-4088 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4088 > Project: Hibernate Core > Issue Type: Bug > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > > There is a bug in SessionImpl.getSession(): > if ( rootSession != null ) { > rootSession.getSession( entityMode ); > } > should read: > if ( rootSession != null ) { > return rootSession.getSession( entityMode ); > } > (notice the missing return) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 16 07:36:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Sun, 16 Aug 2009 06:36:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HV-208) Wrong Path in ConstrinViolations In-Reply-To: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1312998459.241250422575096.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik reassigned HV-208: ------------------------------------ Assignee: Hardy Ferentschik > Wrong Path in ConstrinViolations > -------------------------------- > > Key: HV-208 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Environment: beta 3 snapshot from aug 11 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > In Path we always have leading dot for every validate field. > class A > { > @NotNull > String b; > } > causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 16 07:38:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Sun, 16 Aug 2009 06:38:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HV-207) No way to add custom error from collection validator to item In-Reply-To: <1083955888.19441250063232657.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <746216629.271250422695070.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik reassigned HV-207: ------------------------------------ Assignee: Hardy Ferentschik > No way to add custom error from collection validator to item > ------------------------------------------------------------ > > Key: HV-207 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-207 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > > Assume we have object, that contains collection of items. This collection itself contains some business restriction like every item should have unique name. I create validator for this collection and want to add custom ConstrainViolation on each collection element that causes this violation. Now by API I can only use inIterable only for subnodes. > The solution is to allow inIterable for ErrorBuilder -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 16 07:38:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Sun, 16 Aug 2009 06:38:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HSEARCH-391) Two-Level embedded objects don't get an index update In-Reply-To: <1367643564.16551249530493059.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <822135285.301250422695176.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik reassigned HSEARCH-391: ----------------------------------------- Assignee: Hardy Ferentschik > Two-Level embedded objects don't get an index update > ---------------------------------------------------- > > Key: HSEARCH-391 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-391 > Project: Hibernate Search > Issue Type: Bug > Affects Versions: 3.1.1.GA > Reporter: Sven > Assignee: Hardy Ferentschik > Priority: Minor > > refering to my post in the forum, i should write a jira issue: https://forum.hibernate.org/viewtopic.php?f=9&t=998709 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 16 15:46:15 2009 From: noreply at atlassian.com (Sharath Reddy (JIRA)) Date: Sun, 16 Aug 2009 14:46:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (ANN-593) Ability for an @NamedQuery on a @MappedSuperclass to be copied up to the subclass In-Reply-To: <144020038.1175865964283.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1894211145.351250451975334.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sharath Reddy updated ANN-593: ------------------------------ Attachment: ANN-593.patch Adding patch and test case. > Ability for an @NamedQuery on a @MappedSuperclass to be copied up to the subclass > --------------------------------------------------------------------------------- > > Key: ANN-593 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-593 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Affects Versions: 3.2.1 > Environment: INFO Version:15 - Hibernate Annotations 3.2.1.GA > 09:15:01,755 INFO Environment:500 - Hibernate 3.2.1 > INFO SettingsFactory:81 - RDBMS: Microsoft SQL Server, version: 08.00.0760 > 09:15:06,114 INFO SettingsFactory:82 - JDBC driver: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase, version: 1.2 > 09:15:06,255 INFO Dialect:151 - Using dialect: org.hibernate.dialect.SQLServerDialect > Reporter: John Newman > Attachments: ANN-593.patch, BaseUser.java, TestUserService.java, User.java, UserService.java > > Original Estimate: 4 hours > Remaining Estimate: 4 hours > > If I use a @MappedSuperclass (which is a very useful annotation btw) I have to manually copy any queries I want with taht class up to all subclasses. The binder should check any mapped superclasses and pull those named queries up. i.e. > /** > * Base User class that different projects user classes derive from. > * Hibernate annotations doesn't pick up that query, so you have to copy it up to your subclass > */ > @MappedSuperclass > @NamedQueries({ > @NamedQuery(name="User.findByLoginName", > query="FROM User WHERE loginName = ?") // this is useless down here, i just put it here for reference > }) > public class BaseUser extends IdEntity { > private static final long serialVersionUID = -4443522925041212381L; > protected String loginName; > > @Column(unique=true) > public String getLoginName() { > return this.loginName; > } > public void setLoginName(String loginName) { > this.loginName = loginName; > } > } > /** > * Custom user class for a certain application > */ > @Entity > @Table(name="tbl_user") > @GenericGenerator(name=IdGen.NAME, strategy=IdGen.AUTO) > @NamedQueries({ > @NamedQuery(name="User.findByLoginName", > query="FROM User WHERE loginName = ?") // had to copy this up from the base class > }) > public class User extends BaseUser { > private static final long serialVersionUID = -6199544722824321999L; > private String firstName; > ... > } > so in short it would be nice if the scanner would check for that and bind any named queries up to the subclass -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 16 19:38:15 2009 From: noreply at atlassian.com (Antoine van Wel (JIRA)) Date: Sun, 16 Aug 2009 18:38:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-657) @Enumerated(value=EnumType.STRING) for Maps (java.util.EnumMap) ? In-Reply-To: <126983381.1188375144834.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1491653902.481250465895782.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33765#action_33765 ] Antoine van Wel commented on ANN-657: ------------------------------------- for what it's worth, I got Nicolas Berthet's workaround working for EnumType.STRING by adding a @Parameter(name="type", value="12") the 12 is coming from java.sql.Types.VARCHAR == 12 imho it's horribly ugly, if anybody knows a better way please let me know. -- Antoine > @Enumerated(value=EnumType.STRING) for Maps (java.util.EnumMap) ? > ----------------------------------------------------------------- > > Key: ANN-657 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-657 > Project: Hibernate Annotations > Issue Type: Improvement > Affects Versions: 3.3.0.ga > Environment: hibernate 3.2.4.sp1; PostgresSql 8.2 > Reporter: Michael Gr?newald > Priority: Minor > > Hi, > I faced the problem, that I can't enforce a String-Mapping for an enum type key of an Map. > E.g.: > Map, String> > I would suppose to use an attribute for @MapKey to do that. > E.g.: @MapKey (enumerated=EnumType.STRING) > Please read the forum entry for more informations. > http://forum.hibernate.org/viewtopic.php?t=97827 > Greetings Michael -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 03:27:15 2009 From: noreply at atlassian.com (Venod Raveendran (JIRA)) Date: Mon, 17 Aug 2009 02:27:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4089) Hibernate adding top 2 when I call stored procedure Message-ID: <763612950.531250494035706.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Hibernate adding top 2 when I call stored procedure --------------------------------------------------- Key: HHH-4089 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4089 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.0.SP1 Environment: Windows SP, Microsoft SQL Server 2008, Java 6 Reporter: Venod Raveendran When I am creating a nativeQuery and calling my stored procedure to update some table Hibernate is add top 2 in between the call code Query q = em.createNativeQuery("Rx_ManageCacheData(?,?,?,?,?,?," + "?,?,?,?,?,?," + "?,?,?,?,?,?,?," + "?,?,?,?,?,?," + "?,?,?) "); The above sql becomes Rx_ManageCache top 2Data( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) 11297 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 156, SQLState: S0001 11297 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Incorrect syntax near the keyword 'top'. javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:128) at com.venodebiz.middletier.rx.data.serviceimpl.RxDataServiceImpl.manageCachData(RxDataServiceImpl.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy18.manageCachData(Unknown Source) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 03:44:15 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Mon, 17 Aug 2009 02:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-393) unit test of the NotSharedReaderPerfTest hangs on with some database Message-ID: <354723946.561250495055927.JavaMail.j2ee-opensource-projects@vps07.contegix.com> unit test of the NotSharedReaderPerfTest hangs on with some database -------------------------------------------------------------------- Key: HSEARCH-393 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-393 Project: Hibernate Search Issue Type: Bug Environment: oracle, postqresql and sybase Reporter: strong liu Assignee: Emmanuel Bernard the unit test of NotSharedReaderPerfTest hangs on some of databases like oracle / sybase / postqresql, and I tried change the "ulimit -n" to 100000, but still hangs on. as discussed in the email, This doesn't sound like it is the same issue as http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-189. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 03:46:15 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Mon, 17 Aug 2009 02:46:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-393) unit test of the NotSharedReaderPerfTest hangs on with some database In-Reply-To: <354723946.561250495055927.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <2136808692.591250495175341.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33766#action_33766 ] strong liu commented on HSEARCH-393: ------------------------------------ from Juca -------------------------------------- Please find below a thread dump from a "hanged" process. Also, I watched the database and didn't find any locks there. There are a variable amount of databases processes belonging to the test case, but none of them are "locking" any table / record (ie: no records in "v$lock" table in oracle displays "1" in the "block" column). As per the Thread Dump, it seems it is stuck in some infinite loop (Thread.sleep inside a while, on ReaderPerfTestCase). [junit] 2009-08-12 06:28:16 [junit] Full thread dump Java HotSpot(TM) Client VM (14.1-b02 mixed mode): [junit] "pool-2-thread-1" prio=10 tid=0x082b1c00 nid=0x348c waiting on condition [0xab13a000] [junit] java.lang.Thread.State: WAITING (parking) [junit] at sun.misc.Unsafe.park(Native Method) [junit] - parking to wait for <0xabf64378> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) [junit] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925) [junit] at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358) [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947) [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [junit] at java.lang.Thread.run(Thread.java:619) [junit] "pool-1-thread-1" prio=10 tid=0x082b0800 nid=0x348b waiting on condition [0xab18b000] [junit] java.lang.Thread.State: WAITING (parking) [junit] at sun.misc.Unsafe.park(Native Method) [junit] - parking to wait for <0xabf65488> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) [junit] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925) [junit] at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358) [junit] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947) [junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [junit] at java.lang.Thread.run(Thread.java:619) [junit] "Low Memory Detector" daemon prio=10 tid=0x080c0c00 nid=0x3487 runnable [0x00000000] [junit] java.lang.Thread.State: RUNNABLE [junit] "CompilerThread0" daemon prio=10 tid=0x080bd800 nid=0x3486 waiting on condition [0x00000000] [junit] java.lang.Thread.State: RUNNABLE [junit] "Signal Dispatcher" daemon prio=10 tid=0x080bc000 nid=0x3485 waiting on condition [0x00000000] [junit] java.lang.Thread.State: RUNNABLE [junit] "Finalizer" daemon prio=10 tid=0x080a9400 nid=0x3484 in Object.wait() [0xab6b9000] [junit] java.lang.Thread.State: WAITING (on object monitor) [junit] at java.lang.Object.wait(Native Method) [junit] - waiting on <0xabedb270> (a java.lang.ref.ReferenceQueue$Lock) [junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118) [junit] - locked <0xabedb270> (a java.lang.ref.ReferenceQueue$Lock) [junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134) [junit] at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) [junit] "Reference Handler" daemon prio=10 tid=0x080a7c00 nid=0x3483 in Object.wait() [0xab70a000] [junit] java.lang.Thread.State: WAITING (on object monitor) [junit] at java.lang.Object.wait(Native Method) [junit] - waiting on <0xabedb2f8> (a java.lang.ref.Reference$Lock) [junit] at java.lang.Object.wait(Object.java:485) [junit] at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) [junit] - locked <0xabedb2f8> (a java.lang.ref.Reference$Lock) [junit] "main" prio=10 tid=0x0805c000 nid=0x3481 sleeping[0xb7743000] [junit] java.lang.Thread.State: TIMED_WAITING (sleeping) [junit] at java.lang.Thread.sleep(Native Method) [junit] at org.hibernate.search.test.reader.ReaderPerfTestCase.testConcurrency(Unknown Source) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] at java.lang.reflect.Method.invoke(Method.java:597) [junit] at junit.framework.TestCase.runTest(TestCase.java:154) [junit] at org.hibernate.search.test.TestCase.runTest(Unknown Source) [junit] at junit.framework.TestCase.runBare(TestCase.java:127) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:118) [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) [junit] at junit.framework.TestSuite.run(TestSuite.java:203) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567) [junit] "VM Thread" prio=10 tid=0x080a3c00 nid=0x3482 runnable [junit] "VM Periodic Task Thread" prio=10 tid=0x080d4800 nid=0x3488 waiting on condition [junit] JNI global references: 1007 [junit] Heap [junit] def new generation total 2048K, used 1242K [0xab9e0000, 0xabc10000, 0xabec0000) [junit] eden space 1856K, 66% used [0xab9e0000, 0xabb14a48, 0xabbb0000) [junit] from space 192K, 3% used [0xabbe0000, 0xabbe1e50, 0xabc10000) [junit] to space 192K, 0% used [0xabbb0000, 0xabbb0000, 0xabbe0000) [junit] tenured generation total 25596K, used 16020K [0xabec0000, 0xad7bf000, 0xaf9e0000) [junit] the space 25596K, 62% used [0xabec0000, 0xace65210, 0xace65400, 0xad7bf000) [junit] compacting perm gen total 14080K, used 13835K [0xaf9e0000, 0xb07a0000, 0xb39e0000) [junit] the space 14080K, 98% used [0xaf9e0000, 0xb0762ca0, 0xb0762e00, 0xb07a0000) [junit] No shared spaces configured. > unit test of the NotSharedReaderPerfTest hangs on with some database > -------------------------------------------------------------------- > > Key: HSEARCH-393 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-393 > Project: Hibernate Search > Issue Type: Bug > Environment: oracle, postqresql and sybase > Reporter: strong liu > Assignee: Emmanuel Bernard > > the unit test of NotSharedReaderPerfTest hangs on some of databases like oracle / sybase / postqresql, and I tried change the "ulimit -n" to 100000, but still hangs on. > as discussed in the email, This doesn't sound like it is the same issue as http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-189. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 03:48:15 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Mon, 17 Aug 2009 02:48:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-393) unit test of the NotSharedReaderPerfTest hangs on with some database In-Reply-To: <354723946.561250495055927.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <925615673.621250495295204.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33767#action_33767 ] strong liu commented on HSEARCH-393: ------------------------------------ Gail: IUC, JBPAPP-1432 deals with concurrency issues originating with SharedReaderProvider. Recent comments are about NotSharedReaderPerfTest hanging. Emmanuel: Could be related but it's not likely. I don't thing the reader tests do use the master slave directory providers. > unit test of the NotSharedReaderPerfTest hangs on with some database > -------------------------------------------------------------------- > > Key: HSEARCH-393 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-393 > Project: Hibernate Search > Issue Type: Bug > Environment: oracle, postqresql and sybase > Reporter: strong liu > Assignee: Emmanuel Bernard > > the unit test of NotSharedReaderPerfTest hangs on some of databases like oracle / sybase / postqresql, and I tried change the "ulimit -n" to 100000, but still hangs on. > as discussed in the email, This doesn't sound like it is the same issue as http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-189. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 04:38:15 2009 From: noreply at atlassian.com (strong liu (JIRA)) Date: Mon, 17 Aug 2009 03:38:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2388) Insert w/ identity column fails on Sybase but no exception occurs In-Reply-To: <73498484.1169849299583.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1118187328.681250498295922.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33768#action_33768 ] strong liu commented on HHH-2388: --------------------------------- I have reproduced this issue, it seems like a configuration missed in the description that must make " hibernate.jdbc.use_get_generated_keys false" > Insert w/ identity column fails on Sybase but no exception occurs > ----------------------------------------------------------------- > > Key: HHH-2388 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2388 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.1 > Environment: Hibernate 3.2.1.GA with annotations > Sybase jConnect 6.05 JDBC driver > Sybase ASE 15 database > Reporter: Tim Morrow > Assignee: strong liu > Attachments: MyEntity.hbm.xml, MyEntity.java, MyEntityTest.java > > > I have a scenario where storing a new entity fails (i.e. the row is not inserted) but Hibernate does not realize this. No exceptions are thrown. Later, this leads to AssertionFailures (if two such entities fail in the same session - they both have the same PK). > The problem specifically occurs with a table that has a numeric column with precision (e.g. numeric(10,4)) and an identity column when using Sybase ASE. > ========== > To reproduce: > 1. Use Sybase jConnect 6.05 JDBC driver with Sybase ASE 15 database. > 2. Define an Entity with a long ID and BigDecimal numeric column. > 3. Create a corresponding table with an identity column and numeric(10, 4) column. > For example: > hibernate.MyEntity.java: > ----------------------------------------- > package hibernate; > import java.math.BigDecimal; > import javax.persistence.Column; > import javax.persistence.Entity; > import javax.persistence.GeneratedValue; > import javax.persistence.GenerationType; > import javax.persistence.Id; > import javax.persistence.Table; > import org.hibernate.validator.NotNull; > @Entity > @Table(name = "z_tim_test") > public class MyEntity { > private BigDecimal cost; > private long id; > public MyEntity() {} > @Column(columnDefinition = "numeric(10,4)") > @NotNull public final BigDecimal getCost() { > return cost; > } > @GeneratedValue(strategy = GenerationType.AUTO) > @Id public final long getId() { > return id; > } > public final void setCost(BigDecimal cost) { > this.cost = cost; > } > public final void setId(long id) { > this.id = id; > } > } > Table: > ----------------------------------------- > CREATE TABLE z_tim_test > ( > id numeric(19) PRIMARY KEY not null, > cost numeric(10,4) not null > ); > 4. Write some code that stores a new entity and tries to load it: > MyEntity myEntity = new MyEntity(); > myEntity.setCost(new BigDecimal("123.12345")); > session.save(myEntity); > session.flush(); > session.clear(); > List results = session.createCriteria(MyEntity.class).list(); > if (results.size() != 1) { > throw new IllegalStateException("Expected 1 result"); > } > This test will throw the IllegalStateException because the row was not persisted and no errors occurred. > Reason: > * Sybase does not thrown any SQLException when you try and persist a numeric value whose scale exceeds that defined on the column. Instead, it returns an updateCount of zero and an identity column value of zero. > * Hibernate does not check the updateCount after executing the statement when using an Identity column. The offending code is in: > org.hibernate.id.IdentityGenerator$InsertSelectDelegate > public Serializable executeAndExtract(PreparedStatement insert) throws SQLException { > if ( !insert.execute() ) { > while ( !insert.getMoreResults() && insert.getUpdateCount() != -1 ) { > // do nothing until we hit the rsult set containing the generated id > } > } > ResultSet rs = insert.getResultSet(); > try { > return IdentifierGeneratorFactory.getGeneratedIdentity( rs, persister.getIdentifierType() ); > } > finally { > rs.close(); > } > } > It ignores the updateCount. > The net result is that the object is assigned a PK value of zero. Hibernate continues. My applicaiton is unaware that the row failed to insert. > Solution: > It would seem to me replacing the above code with: > if (!insert.execute()) { > if (insert.getUpdateCount() < 1) { > throw new HibernateException("No update occurred"); > } > while (!insert.getMoreResults()) { > // do nothing until we hit the rsult set containing the generated id > } > } > Would take care of the problem? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 05:41:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 04:41:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-208) Wrong Path in ConstrinViolations In-Reply-To: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <457181908.711250502075611.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-208: --------------------------------- Fix Version/s: 4.0.0.CR1 > Wrong Path in ConstrinViolations > -------------------------------- > > Key: HV-208 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Environment: beta 3 snapshot from aug 11 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > In Path we always have leading dot for every validate field. > class A > { > @NotNull > String b; > } > causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 05:48:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 04:48:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-208) Wrong Path in ConstrinViolations In-Reply-To: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <532845457.741250502495284.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33769#action_33769 ] Hardy Ferentschik commented on HV-208: -------------------------------------- I added your example as test case to the current trunk, but cannot confirm this bug. Do you jsut call Path.toString() ? > Wrong Path in ConstrinViolations > -------------------------------- > > Key: HV-208 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Environment: beta 3 snapshot from aug 11 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > In Path we always have leading dot for every validate field. > class A > { > @NotNull > String b; > } > causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 05:52:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 04:52:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-207) No way to add custom error from collection validator to item In-Reply-To: <1083955888.19441250063232657.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <338339306.771250502735161.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33770#action_33770 ] Hardy Ferentschik commented on HV-207: -------------------------------------- This is really a specification related issue, so I will move this issue into BV. Maybe you could provide some example code for your usecase. That would make it easier to understand. > No way to add custom error from collection validator to item > ------------------------------------------------------------ > > Key: HV-207 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-207 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > > Assume we have object, that contains collection of items. This collection itself contains some business restriction like every item should have unique name. I create validator for this collection and want to add custom ConstrainViolation on each collection element that causes this violation. Now by API I can only use inIterable only for subnodes. > The solution is to allow inIterable for ErrorBuilder -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 05:54:14 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 04:54:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Moved: (BVAL-176) No way to add custom error from collection validator to item In-Reply-To: <1083955888.19441250063232657.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <886125589.781250502854922.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik moved HV-207 to BVAL-176: ------------------------------------------- Affects Version/s: (was: 4.0.0.Beta2) Component/s: (was: engine) spec-general Issue Type: New Feature (was: Bug) Key: BVAL-176 (was: HV-207) Project: Bean Validation (was: Hibernate Validator) > No way to add custom error from collection validator to item > ------------------------------------------------------------ > > Key: BVAL-176 > URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-176 > Project: Bean Validation > Issue Type: New Feature > Components: spec-general > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > > Assume we have object, that contains collection of items. This collection itself contains some business restriction like every item should have unique name. I create validator for this collection and want to add custom ConstrainViolation on each collection element that causes this violation. Now by API I can only use inIterable only for subnodes. > The solution is to allow inIterable for ErrorBuilder -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 05:57:15 2009 From: noreply at atlassian.com (Alexey Romanchuk (JIRA)) Date: Mon, 17 Aug 2009 04:57:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-208) Wrong Path in ConstrinViolations In-Reply-To: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1172721456.821250503035167.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33771#action_33771 ] Alexey Romanchuk commented on HV-208: ------------------------------------- I test it on latest snapshot you made for me in snapshots.maven.org. Here it is testcase. I got ".start" instead of "start" @Target( ElementType.TYPE ) @Retention( RetentionPolicy.RUNTIME ) @Constraint( validatedBy = StartLessThatEndImpl.class ) public @interface StartLessThatEnd { String message() default "x"; Class[] groups() default {}; Class[] payload() default { }; } class Item { @Valid Interval interval; } @StartLessThatEnd class Interval { int start; int end; } public class ValidatorTest { public static void main( String[] args ) { Item item = new Item(); item.interval = new Interval(); item.interval.start = 10; item.interval.end = 5; ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); ConstraintViolation c = factory.getValidator().validate( item.interval ).iterator().next(); System.out.println( c.getPropertyPath() ); } } > Wrong Path in ConstrinViolations > -------------------------------- > > Key: HV-208 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Environment: beta 3 snapshot from aug 11 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > In Path we always have leading dot for every validate field. > class A > { > @NotNull > String b; > } > causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 06:03:15 2009 From: noreply at atlassian.com (Alexey Romanchuk (JIRA)) Date: Mon, 17 Aug 2009 05:03:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (BVAL-176) No way to add custom error from collection validator to item In-Reply-To: <1083955888.19441250063232657.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <741040029.851250503395050.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33772#action_33772 ] Alexey Romanchuk commented on BVAL-176: --------------------------------------- Here it is short example. class Item { @Valid @NoItersectedIntervals Collection intervals; } @StartLessThatEnd class Interval { int start; int end; } When it implement @NoItersectedIntervals I want to add ConstraintViolation for intervals[i].start and intervals[i].end fields of intersected intervals. But API does not allow me to add index for validated field. > No way to add custom error from collection validator to item > ------------------------------------------------------------ > > Key: BVAL-176 > URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-176 > Project: Bean Validation > Issue Type: New Feature > Components: spec-general > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > > Assume we have object, that contains collection of items. This collection itself contains some business restriction like every item should have unique name. I create validator for this collection and want to add custom ConstrainViolation on each collection element that causes this violation. Now by API I can only use inIterable only for subnodes. > The solution is to allow inIterable for ErrorBuilder -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 06:05:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 05:05:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-200) ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? In-Reply-To: <2022642327.17401249561905352.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1646764194.881250503515276.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33773#action_33773 ] Hardy Ferentschik commented on HV-200: -------------------------------------- The test is currently disabled, since it fails in javax.validation.Validation.configure(). This method does not take into account any RuntimeException thrown by getValidationProviders(). Wanted to check with you first whether it is ok to change the implementation. > ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-200 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-200 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > > why is it set to enable = false? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 06:33:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Mon, 17 Aug 2009 05:33:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3892) Improve support for mapping SQL LONGVARCHAR and CLOB to Java String, SQL LONGVARBINARY and BLOB to Java byte[] In-Reply-To: <1163086227.1241219837416.JavaMail.j2ee_opensource.atlassian.com-projects@atlassian12.managed.contegix.com> Message-ID: <112241343.911250505195227.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner resolved HHH-3892. ------------------------------ Resolution: Fixed Fix Version/s: (was: 3.3.x) (was: 3.2.x) Fixed in trunk. > Improve support for mapping SQL LONGVARCHAR and CLOB to Java String, SQL LONGVARBINARY and BLOB to Java byte[] > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-3892 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3892 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Reporter: Gail Badner > Assignee: Gail Badner > Fix For: 3.5 > > > Property types will be provided to enable an application to process data for a java.sql.Types.LONGVARCHAR or java.sql.Types.CLOB column as a Java String. Hibernate will internally process the data as a streams. On a read, stream data will immediately be materialized into a Java string. > text - property type to map java.sql.Types.LONGVARCHAR column data as a Java String (via org.hibernate.type.TextType); > (NOTE: currently, org.hibernate.type.TextType incorrectly maps "text" to java.sql.Types.CLOB; this will be fixed by this issue and updated in database dialects) > materialized_clob - property type to map java.sql.Types.CLOB column data as a Java String (via org.hibernate.type.MaterializedClobType); > In addition, new property types will be provided to enable an application to process data for a java.sql.Types.LONGVARBINARY or java.sql.Types.BLOB column as Java byte[]. Hibernate will internally process the data as a streams. On a read, stream data will immediately be materialized into a Java byte[]. > image - property type to map java.sql.Types.LONGVARBINARY column data as byte[] (via org.hibernate.type.ImageType); > materialized_blob - property type to map java.sql.Types.BLOB column data as byte[] (via org.hibernate.type.MaterializedBlobType); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 08:19:17 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 17 Aug 2009 07:19:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-393) unit test of the NotSharedReaderPerfTest hangs on with some database In-Reply-To: <354723946.561250495055927.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1602973965.941250511557647.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard updated HSEARCH-393: ------------------------------------- Fix Version/s: 3.2.0 > unit test of the NotSharedReaderPerfTest hangs on with some database > -------------------------------------------------------------------- > > Key: HSEARCH-393 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-393 > Project: Hibernate Search > Issue Type: Bug > Environment: oracle, postqresql and sybase > Reporter: strong liu > Assignee: Emmanuel Bernard > Fix For: 3.2.0 > > > the unit test of NotSharedReaderPerfTest hangs on some of databases like oracle / sybase / postqresql, and I tried change the "ulimit -n" to 100000, but still hangs on. > as discussed in the email, This doesn't sound like it is the same issue as http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-189. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 08:23:19 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 17 Aug 2009 07:23:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-200) ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? In-Reply-To: <2022642327.17401249561905352.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <846392373.971250511799459.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33775#action_33775 ] Emmanuel Bernard commented on HV-200: ------------------------------------- I guess it should be wrapped in a ValidationException. Go ahead. > ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-200 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-200 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > > why is it set to enable = false? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 08:43:20 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Mon, 17 Aug 2009 07:43:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2762) getUnflushedChanges()/applyUnflushedChanges() API In-Reply-To: <160514931.1186026371398.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <595521109.1011250513000328.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner updated HHH-2762: ----------------------------- Attachment: HHH-2762.patch I'm attaching a patch for the proposed API. > getUnflushedChanges()/applyUnflushedChanges() API > ------------------------------------------------- > > Key: HHH-2762 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Reporter: Steve Ebersole > Assignee: Gail Badner > Fix For: 3.5 > > Attachments: HHH-2762.patch > > > The intention is state replication from one Session to another (presumably on another cluster node, though not necessarily). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:06:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Mon, 17 Aug 2009 08:06:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2762) getUnflushedChanges()/applyUnflushedChanges() API In-Reply-To: <160514931.1186026371398.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1250052046.1061250514375119.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33777#action_33777 ] Gail Badner commented on HHH-2762: ---------------------------------- Steve, Please take a quick look at the patch and let me know if the changes in existing APIs look OK to you. I've added a unit test, org.hibernate.test.nonflushedchanges.NonFlushedAPIWithListenerTest, that has an example of a FindNonFlushedChangesEventListener. It also defines an ActionVisitor which currently does nothing; the intention is that a NonFlushedChangesActionVisitor will get non-flushed change data from the actions in the ActionQueue. Thanks, Gail > getUnflushedChanges()/applyUnflushedChanges() API > ------------------------------------------------- > > Key: HHH-2762 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Reporter: Steve Ebersole > Assignee: Gail Badner > Fix For: 3.5 > > Attachments: HHH-2762.patch > > > The intention is state replication from one Session to another (presumably on another cluster node, though not necessarily). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:24:15 2009 From: noreply at atlassian.com (Jacek Kunicki (JIRA)) Date: Mon, 17 Aug 2009 08:24:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4090) RelationTargetAuditMode.NOT_AUDITED not working with many-to-many relations Message-ID: <1207991346.1101250515455018.JavaMail.j2ee-opensource-projects@vps07.contegix.com> RelationTargetAuditMode.NOT_AUDITED not working with many-to-many relations --------------------------------------------------------------------------- Key: HHH-4090 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4090 Project: Hibernate Core Issue Type: Bug Components: envers Affects Versions: 3.3.1 Environment: Hibernate 3.3.1-GA, PostgreSQL 8.2 Reporter: Jacek Kunicki When defining a @ManyToMany relation from an @Audited entity to a non- at Audited one using RelationTargetAuditMode.NOT_AUDITED: @Entity @Audited class A { @ManyToMany @JoinTable(...) @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED) private B b; // getters, setters ... } @Entity class B { ... } the following error occurs during deployment: Caused by: org.hibernate.HibernateException: could not init listeners at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205) at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1338) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669) ... 145 more Caused by: org.hibernate.MappingException: An audited relation from A to a non-audited entity: B at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.throwRelationNotAudited(CollectionMetadataGenerator.java:537) at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addValueToMiddleTable(CollectionMetadataGenerator.java:390) at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addWithMiddleTable(CollectionMetadataGenerator.java:310) at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addCollection(CollectionMetadataGenerator.java:154) at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addValue(AuditMetadataGenerator.java:144) at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addProperties(AuditMetadataGenerator.java:164) at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateSecondPass(AuditMetadataGenerator.java:419) at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:100) at org.hibernate.envers.configuration.AuditConfiguration.(AuditConfiguration.java:86) at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99) at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:260) at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198) at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181) at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:27:16 2009 From: noreply at atlassian.com (Adam Warski (JIRA)) Date: Mon, 17 Aug 2009 08:27:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-4090) RelationTargetAuditMode.NOT_AUDITED not working with many-to-many relations In-Reply-To: <1207991346.1101250515455018.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1179114965.1131250515636001.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Warski reassigned HHH-4090: -------------------------------- Assignee: Adam Warski > RelationTargetAuditMode.NOT_AUDITED not working with many-to-many relations > --------------------------------------------------------------------------- > > Key: HHH-4090 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4090 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Affects Versions: 3.3.1 > Environment: Hibernate 3.3.1-GA, PostgreSQL 8.2 > Reporter: Jacek Kunicki > Assignee: Adam Warski > > When defining a @ManyToMany relation from an @Audited entity to a non- at Audited one using RelationTargetAuditMode.NOT_AUDITED: > @Entity > @Audited > class A { > @ManyToMany > @JoinTable(...) > @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED) > private B b; > // getters, setters ... > } > @Entity > class B { > ... > } > the following error occurs during deployment: > Caused by: org.hibernate.HibernateException: could not init listeners > at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205) > at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1338) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327) > at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669) > ... 145 more > Caused by: org.hibernate.MappingException: An audited relation from A to a non-audited entity: B > at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.throwRelationNotAudited(CollectionMetadataGenerator.java:537) > at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addValueToMiddleTable(CollectionMetadataGenerator.java:390) > at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addWithMiddleTable(CollectionMetadataGenerator.java:310) > at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addCollection(CollectionMetadataGenerator.java:154) > at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addValue(AuditMetadataGenerator.java:144) > at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addProperties(AuditMetadataGenerator.java:164) > at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateSecondPass(AuditMetadataGenerator.java:419) > at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:100) > at org.hibernate.envers.configuration.AuditConfiguration.(AuditConfiguration.java:86) > at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99) > at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:260) > at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198) > at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181) > at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:38:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 08:38:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2762) getUnflushedChanges()/applyUnflushedChanges() API In-Reply-To: <160514931.1186026371398.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1806723619.1171250516295155.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33778#action_33778 ] Steve Ebersole commented on HHH-2762: ------------------------------------- 1) javadoc, especially on the interfaces and their methods, though we should be striving to add javadoc everywhere. 2) I am still not understanding how you are dealing with entity-mode. My uneasiness comes specifically from NonFlushedChanges#getEntityMode() and #add(NonFlushedChanges). What makes me nervous is that I personally think this is leaking an implementation detail (wrt how the sessions are structured) into. Lets discuss a bit when you come on-line > getUnflushedChanges()/applyUnflushedChanges() API > ------------------------------------------------- > > Key: HHH-2762 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Reporter: Steve Ebersole > Assignee: Gail Badner > Fix For: 3.5 > > Attachments: HHH-2762.patch > > > The intention is state replication from one Session to another (presumably on another cluster node, though not necessarily). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:44:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-99) Write unit tests for bootstrapping In-Reply-To: <20883815.1233662740460.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1473949121.1191250516655327.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-99. --------------------------------- Resolution: Fixed > Write unit tests for bootstrapping > ----------------------------------- > > Key: HV-99 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-99 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > There are already some tests in ValidationTest, but we need more tests. Especially we have to test that we can plug custom MessageInterpolator, ConstraintValidatorFactory and TraversableResolver using different ConfigurationStates. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:44:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-200) ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? In-Reply-To: <2022642327.17401249561905352.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <60890354.1221250516655521.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-200. ---------------------------------- Resolution: Fixed > ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-200 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-200 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > > why is it set to enable = false? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:44:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-200) ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? In-Reply-To: <2022642327.17401249561905352.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1186999317.1251250516655661.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-200: --------------------------------- Fix Version/s: 4.0.0.CR1 > ValidationProviderResolverTest#testValidationExceptionIsThrownInCaseValidatorFactoryCreationFails => enable=false? > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-200 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-200 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > why is it set to enable = false? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:44:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-201) BootstrapTest#testServiceFileExists shouldn't we test for the actual provider passing the TCK ie get the right name? In-Reply-To: <382567242.17431249561905727.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <788275494.1281250516655761.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-201: --------------------------------- Fix Version/s: 4.0.0.CR1 > BootstrapTest#testServiceFileExists shouldn't we test for the actual provider passing the TCK ie get the right name? > -------------------------------------------------------------------------------------------------------------------- > > Key: HV-201 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-201 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:44:15 2009 From: noreply at atlassian.com (Eric Sirianni (JIRA)) Date: Mon, 17 Aug 2009 08:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3002) database field name 'version' causes ClassCastException while building session factory In-Reply-To: <110136869.1197048356128.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1993340948.1301250516655852.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33779#action_33779 ] Eric Sirianni commented on HHH-3002: ------------------------------------ Why has this issue been rejected? It is clearly a bug > database field name 'version' causes ClassCastException while building session factory > -------------------------------------------------------------------------------------- > > Key: HHH-3002 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3002 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.5 > Environment: Hibernate 3.2.5, Java 1.6.0_03, MySQL 5.0.41 > Reporter: Patrick Burke > Attachments: out.hib4 > > > When a database table contains a field named 'version', like his one: > DROP TABLE IF EXISTS `tester`.`software_package`; > CREATE TABLE `tester`.`software_package` ( > `software_id` int(11) NOT NULL auto_increment, > `version` varchar(100) default NULL, > `name` varchar(100) default NULL, > `root_file_id` int(11) default NULL, > PRIMARY KEY (`software_id`) > ) ENGINE=InnoDB DEFAULT CHARSET=latin1; > The following error is thrown: > [java] Initial SessionFactory creation failed.java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType > [java] Exception in thread "main" java.lang.ExceptionInInitializerError > [java] at util.HibernateUtil.(Unknown Source) > [java] at events.EventManager.listNodes(Unknown Source) > [java] at events.EventManager.main(Unknown Source) > [java] Caused by: java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType > [java] at org.hibernate.tuple.PropertyFactory.buildVersionProperty(PropertyFactory.java:84) > [java] at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:168) > [java] at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434) > [java] at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:109) > [java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) > [java] at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226) > [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) > [java] ... 3 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:44:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-201) BootstrapTest#testServiceFileExists shouldn't we test for the actual provider passing the TCK ie get the right name? In-Reply-To: <382567242.17431249561905727.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <554250441.1331250516655999.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-201. ---------------------------------- Resolution: Fixed > BootstrapTest#testServiceFileExists shouldn't we test for the actual provider passing the TCK ie get the right name? > -------------------------------------------------------------------------------------------------------------------- > > Key: HV-201 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-201 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:56:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:56:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-191) JPA 2 Dependency In-Reply-To: <1105123604.12741248695532074.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <350871448.1351250517375017.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33780#action_33780 ] Hardy Ferentschik commented on HV-191: -------------------------------------- The dependency to JPA is optional. The spec specifies the integration with JPA 2, hence the dependency. Due to licensing issues we have to use our own version of the persistence API. We have also done this for JPA 1. Of course you can use Validator also with JPA 1. It seems your tests are actually working. Why 'mvn site' is not working I cannot say. It seems to be that this is a maven problem. > JPA 2 Dependency > ---------------- > > Key: HV-191 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-191 > Project: Hibernate Validator > Issue Type: Bug > Components: build > Affects Versions: 4.0.0.Beta2 > Reporter: Stephan Bublava > > Hibernate Validator 4 Beta 2 depends on JPA 2. It would be great, if it remained compatible with version 1. > In addition the dependency is declared a using non-standard group and package name: > org.hibernate.java-persistence > jpa-api > instead of: > javax.persistence > persistence-api > Somehow this breaks my build - "mvn test" works, but "mvn site" fails with java.lang.NoSuchMethodError: javax.persistence.Persistence.getPersistenceUtil() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:58:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:58:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-191) JPA 2 Dependency In-Reply-To: <1105123604.12741248695532074.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <159851990.1371250517495165.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-191: --------------------------------- Fix Version/s: 4.0.0.CR1 > JPA 2 Dependency > ---------------- > > Key: HV-191 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-191 > Project: Hibernate Validator > Issue Type: Bug > Components: build > Affects Versions: 4.0.0.Beta2 > Reporter: Stephan Bublava > Fix For: 4.0.0.CR1 > > > Hibernate Validator 4 Beta 2 depends on JPA 2. It would be great, if it remained compatible with version 1. > In addition the dependency is declared a using non-standard group and package name: > org.hibernate.java-persistence > jpa-api > instead of: > javax.persistence > persistence-api > Somehow this breaks my build - "mvn test" works, but "mvn site" fails with java.lang.NoSuchMethodError: javax.persistence.Persistence.getPersistenceUtil() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 09:58:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 08:58:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-191) JPA 2 Dependency In-Reply-To: <1105123604.12741248695532074.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <418509191.1391250517495231.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-191. ---------------------------------- Resolution: Won't Fix > JPA 2 Dependency > ---------------- > > Key: HV-191 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-191 > Project: Hibernate Validator > Issue Type: Bug > Components: build > Affects Versions: 4.0.0.Beta2 > Reporter: Stephan Bublava > Fix For: 4.0.0.CR1 > > > Hibernate Validator 4 Beta 2 depends on JPA 2. It would be great, if it remained compatible with version 1. > In addition the dependency is declared a using non-standard group and package name: > org.hibernate.java-persistence > jpa-api > instead of: > javax.persistence > persistence-api > Somehow this breaks my build - "mvn test" works, but "mvn site" fails with java.lang.NoSuchMethodError: javax.persistence.Persistence.getPersistenceUtil() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 10:27:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 09:27:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-202) BootstrapTest#testCustomMessageInterpolatorViaConfiguration is not testing via configuration but via validator context (ie like testCustomMessageInterpolatorViaValidatorContext) In-Reply-To: <1017972504.17461249561907024.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1704168591.1421250519235441.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-202: --------------------------------- Fix Version/s: 4.0.0.CR1 > BootstrapTest#testCustomMessageInterpolatorViaConfiguration is not testing via configuration but via validator context (ie like testCustomMessageInterpolatorViaValidatorContext) > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-202 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-202 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 10:29:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 09:29:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-202) BootstrapTest#testCustomMessageInterpolatorViaConfiguration is not testing via configuration but via validator context (ie like testCustomMessageInterpolatorViaValidatorContext) In-Reply-To: <1017972504.17461249561907024.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1841215285.1451250519355154.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-202. ---------------------------------- Resolution: Fixed > BootstrapTest#testCustomMessageInterpolatorViaConfiguration is not testing via configuration but via validator context (ie like testCustomMessageInterpolatorViaValidatorContext) > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-202 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-202 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 10:35:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 09:35:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-205) ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT In-Reply-To: <706112669.17581249561992129.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1623494179.1481250519715073.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33781#action_33781 ] Hardy Ferentschik commented on HV-205: -------------------------------------- Exclude it, because the behavior for validating fields and properties is not specified? The spec just says that "Static fields and static methods are excluded from validation". It does not say whether an exception should be thrown or wether the provider should silently ignore these type of validation. Unless we change the spec to be more specific, disabling the test seems reasonable. > ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT > --------------------------------------------------------------------------------------------- > > Key: HV-205 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-205 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 10:42:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 09:42:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-205) ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT In-Reply-To: <706112669.17581249561992129.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1649616431.1511250520135243.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-205. ---------------------------------- Resolution: Fixed > ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT > --------------------------------------------------------------------------------------------- > > Key: HV-205 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-205 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 10:48:16 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 17 Aug 2009 09:48:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-205) ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT In-Reply-To: <706112669.17581249561992129.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <944691436.1541250520496632.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33782#action_33782 ] Emmanuel Bernard commented on HV-205: ------------------------------------- ok let's do that then > ValidationRequirementTest#testIgnoreStaticFieldsAndProperties I would disable this test, WDYT > --------------------------------------------------------------------------------------------- > > Key: HV-205 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-205 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 11:24:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 10:24:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (EJB-447) Implement JPA 2.0 criteria apis (building) In-Reply-To: <1724998057.6171247586731958.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1269286925.1571250522655108.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated EJB-447: ------------------------------- Summary: Implement JPA 2.0 criteria apis (building) (was: Implement JPA 2.0 criteria apis) Splitting notions of building and compiling for better JIRA tracking. > Implement JPA 2.0 criteria apis (building) > ------------------------------------------ > > Key: EJB-447 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-447 > Project: Hibernate Entity Manager > Issue Type: Sub-task > Components: EntityManager > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > > Implement the various interfaces needed to implement JPA 2.0 criteria query support. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 11:24:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 10:24:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (EJB-461) Implement JPA 2.0 criteria apis (compiling) Message-ID: <1360518807.1591250522655180.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Implement JPA 2.0 criteria apis (compiling) ------------------------------------------- Key: EJB-461 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-461 Project: Hibernate Entity Manager Issue Type: Sub-task Reporter: Steve Ebersole Assignee: Steve Ebersole -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 11:26:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 17 Aug 2009 10:26:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-203) MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV In-Reply-To: <1573447967.17491249561907372.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1516291530.1621250522775119.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-203: --------------------------------- Fix Version/s: 4.0.0.CR1 > MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV > ------------------------------------------------------------------------------------------------------------------------------------------ > > Key: HV-203 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-203 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 11:28:15 2009 From: noreply at atlassian.com (=?UTF-8?Q?Arturo_Frapp=C3=A9_=28JIRA=29?=) Date: Mon, 17 Aug 2009 10:28:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J In-Reply-To: <77836459.1173475749647.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1302400809.1741250522895581.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arturo Frapp? updated ANN-572: ------------------------------ Attachment: ANN-572-patch-by-afm.patch This is my own version of Node annotation. I tested against Many ToOne, OneToMany, Property, Class > @Node(name=, embedXml=true|false) for DOM4J > ------------------------------------------- > > Key: ANN-572 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-572 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.4.1 > > Attachments: ANN-572-patch-by-afm.patch, hibernate-node-annotation.zip > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 11:36:15 2009 From: noreply at atlassian.com (=?UTF-8?Q?Arturo_Frapp=C3=A9_=28JIRA=29?=) Date: Mon, 17 Aug 2009 10:36:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J In-Reply-To: <77836459.1173475749647.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1337334667.1851250523375747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33785#action_33785 ] Arturo Frapp? commented on ANN-572: ----------------------------------- I really do need this functionality working on my hibernate environment, so I've studied Epardaud's patch, then I studied HbmBinder and then I get this patch. - vini vidi vinci- ;) I tested against a .cfg.xml configuration and it seems to work. > @Node(name=, embedXml=true|false) for DOM4J > ------------------------------------------- > > Key: ANN-572 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-572 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.4.1 > > Attachments: ANN-572-patch-by-afm.patch, hibernate-node-annotation.zip > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 11:45:22 2009 From: noreply at atlassian.com (=?UTF-8?Q?Arturo_Frapp=C3=A9_=28JIRA=29?=) Date: Mon, 17 Aug 2009 10:45:22 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J In-Reply-To: <77836459.1173475749647.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1073512780.1961250523922208.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33786#action_33786 ] Arturo Frapp? commented on ANN-572: ----------------------------------- Did I forget something? - Tanks to Stephane Epardaud for his initial patch. > @Node(name=, embedXml=true|false) for DOM4J > ------------------------------------------- > > Key: ANN-572 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-572 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.4.1 > > Attachments: ANN-572-patch-by-afm.patch, hibernate-node-annotation.zip > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 11:51:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 10:51:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-456) Implement JPA 2.0 metamodel APIs In-Reply-To: <1163881521.14661249073594632.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1183740661.2001250524278022.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33787#action_33787 ] Steve Ebersole commented on EJB-456: ------------------------------------ I played with it a bit in some of my criteria tests. It works ok, as long as we stick to your guidelines above for the time being (using decalred vs non-declared etc). Some thoughts on your points: 1) wrt distinguishing many-to-many and one-to-many, that is not true -> CollectionPersister#isOneToMany() and CollectionPersister#isManyToMany() 2) wrt distinguishing many-to-one versus one-to-one, that is much more accurate. It is doable, but there is not a simple, single contract method one can call to determine it. 3) for Member, do you mean java.lang.reflect.Member? or javax.persistence.metamodel.Member? In either case we need to be able to report the java.lang.reflect.Member, which was not clear to me from javax.persistence.metamodel.Member what is expected in the case of method access: the getter I assume? At any rate, for Hibernate this is all contained in the underlying PropertyAccessor contract for said property. The problem here is that the PropertyAccessor contract only allows (optionally) reporting the Method. So we would need to update this contract a bit to support this requirement. > Implement JPA 2.0 metamodel APIs > -------------------------------- > > Key: EJB-456 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-456 > Project: Hibernate Entity Manager > Issue Type: Sub-task > Reporter: Steve Ebersole > Assignee: Emmanuel Bernard > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 13:24:16 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 17 Aug 2009 12:24:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J In-Reply-To: <77836459.1173475749647.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1490255014.2111250529856516.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard updated ANN-572: --------------------------------- Description: If there are unit tests for each then that's all good. Fix Version/s: (was: 3.4.1) 3.5 > @Node(name=, embedXml=true|false) for DOM4J > ------------------------------------------- > > Key: ANN-572 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-572 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.5 > > Attachments: ANN-572-patch-by-afm.patch, hibernate-node-annotation.zip > > > If there are unit tests for each then that's all good. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 13:28:18 2009 From: noreply at atlassian.com (Adam Ringel (JIRA)) Date: Mon, 17 Aug 2009 12:28:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2308) Adjusting the Outer Join Predicate using Criteria Query In-Reply-To: <165774343.1166030585055.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <151339234.2291250530098104.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33788#action_33788 ] Adam Ringel commented on HHH-2308: ---------------------------------- Are there any plans to implement the new createAlias method with the extraJoinClauses parameter in an official release? This is a highly valuable addition to the Criteria API. I have used the Filter work around but I find it rather clunky. Plus I don't want to have a filter enabled in a session when it is possible that another query in that session could be invoked that doesn't want that filter!! I tried doing a disable followed by a session flush but it didn't seem to work: crit.list(); //doesn't work, have to live with filter being live in this session session.flush(); session.disableFilter("ackFilter"); > Adjusting the Outer Join Predicate using Criteria Query > ------------------------------------------------------- > > Key: HHH-2308 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2308 > Project: Hibernate Core > Issue Type: New Feature > Components: query-criteria > Affects Versions: 3.2.1 > Environment: Linux Using MS SQLServer > Reporter: Ben Grant > Attachments: hibernate-3.3.2.GA-createAlias_withClause.patch, hibernate-3.3.2.GA-createAlias_withClause.zip, hibernate-joinOn-sorted.ZIP, hibernate-joinOn.ZIP > > > I have two tables > Table A > ||Col_1||Col_2|| > |London| UK | > |Liverpool| UK | > | New York | USA | > Table B > ||Col_1||Col_2|| Col_3|| > | UK | Europe | 0 > | USA | Americas | 1 > Using the Criteria class, Restriction Class and FetchMode, Hibernate manages to create a query that looks like this > select distinct top 2000 > this_.Col_1 as y0_, TableB3_.Col2 as y1_ > from TableA this_ > left outer join TableB TableB3_ on this_.Col_2= TableB3_.Col_1 > where TableB3_.Col_3=1 > When really i need the query to be like this > select distinct top 2000 > this_.Col_1 as y0_, TableB3_.Col2 as y1_ > from TableA this_ > left outer join TableB TableB3_ on this_.Col_2= TableB3_.Col_1 AND TableB3_.Col_3=1 > currently their isn't any know way for hibernate to adjust or apply filters within the join clause. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 13:35:14 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 12:35:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4091) HQLTest#testDuplicateImplicitJoinInSelect Message-ID: <715271847.2311250530514999.JavaMail.j2ee-opensource-projects@vps07.contegix.com> HQLTest#testDuplicateImplicitJoinInSelect ----------------------------------------- Key: HHH-4091 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4091 Project: Hibernate Core Issue Type: Bug Components: testsuite Reporter: Steve Ebersole Assignee: Steve Ebersole An assertion in HQLTest#testDuplicateImplicitJoinInSelect is currently incorrect, because the classic translator does not handle it correctly: select an.mother.bodyWeight from Animal an join an.mother m where an.mother.bodyWeight > 10 The explicit join (join an.mother m) and the implicit join (an.mother.bodyWeight ) should result in separate SQL joins. The classic translator is using the same SQL join for all. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 13:37:14 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 12:37:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4091) HQLTest#testDuplicateImplicitJoinInSelect In-Reply-To: <715271847.2311250530514999.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <739913589.2331250530634998.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-4091: -------------------------------- Fix Version/s: 3.5 3.3.x > HQLTest#testDuplicateImplicitJoinInSelect > ----------------------------------------- > > Key: HHH-4091 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4091 > Project: Hibernate Core > Issue Type: Bug > Components: testsuite > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > > An assertion in HQLTest#testDuplicateImplicitJoinInSelect is currently incorrect, because the classic translator does not handle it correctly: > select an.mother.bodyWeight from Animal an join an.mother m where an.mother.bodyWeight > 10 > The explicit join (join an.mother m) and the implicit join (an.mother.bodyWeight ) should result in separate SQL joins. The classic translator is using the same SQL join for all. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 13:42:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 12:42:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Closed: (HHH-4091) HQLTest#testDuplicateImplicitJoinInSelect In-Reply-To: <715271847.2311250530514999.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <2070956465.2351250530935013.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole closed HHH-4091. ------------------------------- Resolution: Fixed > HQLTest#testDuplicateImplicitJoinInSelect > ----------------------------------------- > > Key: HHH-4091 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4091 > Project: Hibernate Core > Issue Type: Bug > Components: testsuite > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > > An assertion in HQLTest#testDuplicateImplicitJoinInSelect is currently incorrect, because the classic translator does not handle it correctly: > select an.mother.bodyWeight from Animal an join an.mother m where an.mother.bodyWeight > 10 > The explicit join (join an.mother m) and the implicit join (an.mother.bodyWeight ) should result in separate SQL joins. The classic translator is using the same SQL join for all. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 13:53:18 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 17 Aug 2009 12:53:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-456) Implement JPA 2.0 metamodel APIs In-Reply-To: <1163881521.14661249073594632.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <816483916.2391250531598840.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33789#action_33789 ] Emmanuel Bernard commented on EJB-456: -------------------------------------- 1. Are you sure Steve? @OneToMany @JoinTable is mapped in HBM files. The main difference in this case between a @OneToMany and a @ManyToMany is a unique constraint on the FK 3. I am refering to java.land.reflect.Member Attrubute#getJavaMember() Where have you seen javax.persistence.metamodel.Member? I can't find it. Is PropertyAccessor accessible from PersistentClass or its associated objects? > Implement JPA 2.0 metamodel APIs > -------------------------------- > > Key: EJB-456 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-456 > Project: Hibernate Entity Manager > Issue Type: Sub-task > Reporter: Steve Ebersole > Assignee: Emmanuel Bernard > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 14:25:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 13:25:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-456) Implement JPA 2.0 metamodel APIs In-Reply-To: <1163881521.14661249073594632.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1094627635.2431250533515752.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33790#action_33790 ] Steve Ebersole commented on EJB-456: ------------------------------------ 1) I don't understand what "is mapped ..." means. AFAIK, you mean that you interpret that as many-to-many in the annotation binder??? Obviously, if you tell core that something is a many-to-many, it treats it as a many-to-many :) javax.persistence.ManyToMany is the proper corollary to . In my limited knowledge, it looks like @OneToMany @JoinTable would map more naturally to: <[collection type] ...> ... which is not currently supported by core (collections within a ). But, if that is a construct that needs to be supported then it should have been and should be accounted for in the hibernate metamodel properly. 3) It was in the PFD. Looks like it is since removed and its members pulled up into Attribute (Attribute had extended Member). But the same concern remains; now from Attribute: /** * Return the java.lang.reflect.Member for the represented * attribute. * * @return corresponding java.lang.reflect.Member */ java.lang.reflect.Member getJavaMember(); Ok, great... java.lang.reflect.Member can be either a Field or a Method. So what are we returning when? I mean the logical answer seems to be based on the access. For field access return the Field. But what about method access? The getter? > Implement JPA 2.0 metamodel APIs > -------------------------------- > > Key: EJB-456 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-456 > Project: Hibernate Entity Manager > Issue Type: Sub-task > Reporter: Steve Ebersole > Assignee: Emmanuel Bernard > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 14:50:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 13:50:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4092) ParentChildTest#testProxyReuse regression Message-ID: <1370884860.2451250535015130.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ParentChildTest#testProxyReuse regression ----------------------------------------- Key: HHH-4092 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4092 Project: Hibernate Core Issue Type: Bug Components: testsuite Reporter: Steve Ebersole Assignee: Steve Ebersole Unfortunately with CI down I have no clue when, how, etc but currently 2 tests on ParentChildTest are now failing (see also HHH-3852). This issue is for the testProxyReuse() test method. Somehow a Glarch instance is hanging around unexpectedly after all the deletes are performed and causes assertEquals( 2, doDelete( s, "from java.lang.Object" ) ) to fail (the result is 3). Temporarily marking this (along with HHH-3852) as FailureExpected to move forward with 3.5.0.Beta-1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 14:50:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 13:50:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3852) error in generated sql from criteria api on an array property In-Reply-To: <8223025.1239199417445.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1443900067.2481250535015383.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3852: -------------------------------- Assignee: Steve Ebersole Confirmed. Temporarily marking this (along with HHH-4092) as FailureExpected to move forward with 3.5.0.Beta-1 > error in generated sql from criteria api on an array property > -------------------------------------------------------------- > > Key: HHH-3852 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3852 > Project: Hibernate Core > Issue Type: Bug > Components: query-criteria > Affects Versions: 3.5 > Environment: hibernate from trunk, database hqsldb. > Reporter: Elhanan Maayan > Assignee: Steve Ebersole > Attachments: ParentChildTest2.java > > > i'm assuming this is hibernate 3.5 version as i took it from the trunk > the test case ParentChildTest fails under testComplexCriteria, i believe i've managed to isolated the issue to this api: > i'm attaching a modified version ParentChildTest, showing the criteria api and it's parallel hql counterpart, as you will see the criteria api fails while the hql version passes -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 14:57:14 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Mon, 17 Aug 2009 13:57:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4092) ParentChildTest#testProxyReuse regression In-Reply-To: <1370884860.2451250535015130.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <2003899265.2501250535434961.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33792#action_33792 ] Steve Ebersole commented on HHH-4092: ------------------------------------- Actually not sure which is the unexpected one. After the deletes, there are still 2 Fees and a Glarch in the db. One of those objects was clearly not expected to be there when the test was originally written. > ParentChildTest#testProxyReuse regression > ----------------------------------------- > > Key: HHH-4092 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4092 > Project: Hibernate Core > Issue Type: Bug > Components: testsuite > Reporter: Steve Ebersole > Assignee: Steve Ebersole > > Unfortunately with CI down I have no clue when, how, etc but currently 2 tests on ParentChildTest are now failing (see also HHH-3852). This issue is for the testProxyReuse() test method. Somehow a Glarch instance is hanging around unexpectedly after all the deletes are performed and causes assertEquals( 2, doDelete( s, "from java.lang.Object" ) ) to fail (the result is 3). > Temporarily marking this (along with HHH-3852) as FailureExpected to move forward with 3.5.0.Beta-1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 15:30:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Mon, 17 Aug 2009 14:30:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (EJB-456) Implement JPA 2.0 metamodel APIs In-Reply-To: <1163881521.14661249073594632.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1895462521.2551250537415374.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33793#action_33793 ] Emmanuel Bernard commented on EJB-456: -------------------------------------- 1. It's old in my mind but AFAIR, there was no other way to implement it (as you said because collections in joins are not supported). 3. yes agreed that's the same problem. Yes the Method corresponding to the getter is returned. > Implement JPA 2.0 metamodel APIs > -------------------------------- > > Key: EJB-456 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-456 > Project: Hibernate Entity Manager > Issue Type: Sub-task > Reporter: Steve Ebersole > Assignee: Emmanuel Bernard > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 17:34:19 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Mon, 17 Aug 2009 16:34:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2762) getUnflushedChanges()/applyUnflushedChanges() API In-Reply-To: <160514931.1186026371398.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <454663459.2601250544859368.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner updated HHH-2762: ----------------------------- Fix Version/s: (was: 3.5) 3.6 > getUnflushedChanges()/applyUnflushedChanges() API > ------------------------------------------------- > > Key: HHH-2762 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2762 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Reporter: Steve Ebersole > Assignee: Gail Badner > Fix For: 3.6 > > Attachments: HHH-2762.patch > > > The intention is state replication from one Session to another (presumably on another cluster node, though not necessarily). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 18:27:15 2009 From: noreply at atlassian.com (Burkhard Vogel (JIRA)) Date: Mon, 17 Aug 2009 17:27:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1112) Reverse engineering problem with composite primary key In-Reply-To: <7532150.1235163278594.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2118222493.2691250548035211.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33794#action_33794 ] Burkhard Vogel commented on HBX-1112: ------------------------------------- This class extends which class? is it available from the source code repository? Thanks for te efford! > Reverse engineering problem with composite primary key > ------------------------------------------------------ > > Key: HBX-1112 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4 Beta1 > Environment: configuration: > Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154 > Hibernate version: hibernate-3.2.6.ga.zip > Database: Sybase SQL Anywhere 10.0.1.3415 > JDBC-Driver: jconnect 6.05 > Eclipse Version: 3.4.0 > Code Generation Configuration: > Use Java 5 syntax and generate EJB3 annotations switched on. > Exporters: domain code. > Reporter: Christian Meyer > > Hello, > I have a problem reverse engineering domain code from a sybase anywhere 10 database. > For every table with composite primary key i get the following exception: > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Her is one example: > create table DCALLS > ( > AES timestamp default timestamp, > APPLID char(8) not null, > DIALOG integer not null, > COUNTER integer, > constraint PK_DCALLS primary key (APPLID, DIALOG) > ); > For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster > I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826 > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > all Tables with single key are fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 20:00:15 2009 From: noreply at atlassian.com (David Driscoll (JIRA)) Date: Mon, 17 Aug 2009 19:00:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3579) Support for PostgreSQL UUID data type In-Reply-To: <30493995.1225470964435.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1572825758.2791250553615813.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Driscoll updated HHH-3579: -------------------------------- Attachment: patch_HH_3579_PostgresSQLDialect.txt patch_HH_3579_NullableType.txt patch_HH_3579_Hibernate.txt I noticed that Hibernate did not have support for UUID as well. But, fortunately the guys over in NHibernate to implement UUID support for PostgreSQL. WIth the help of the NHibernate implementation , I have create a patches to support this in Hibernate. This is the first 3 of 5 patch files. > Support for PostgreSQL UUID data type > ------------------------------------- > > Key: HHH-3579 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Affects Versions: 3.3.1 > Reporter: Olivier Van Acker > Attachments: patch_HH_3579_Hibernate.txt, patch_HH_3579_NullableType.txt, patch_HH_3579_PostgresSQLDialect.txt > > > PostgreSQL has since version 8.3 UUID as data type nativly supported in the database. > The only way to get this to work in Hibernate is to add to your mappings file (or @columnDefinition via annotations) > and create your own custom usertype (e.g. public class UUIDUserType implements UserType, Serializable {..} ) and map this to java.util.UUID > worth mentioning is that java.util.UUID is only introduced in java 1.5 so there might be a backwards compatibility problem > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 20:02:15 2009 From: noreply at atlassian.com (David Driscoll (JIRA)) Date: Mon, 17 Aug 2009 19:02:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3579) Support for PostgreSQL UUID data type In-Reply-To: <30493995.1225470964435.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1618478064.2871250553735483.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Driscoll updated HHH-3579: -------------------------------- Attachment: patch_HH_3579_UuidType.txt patch_HH_3579_TypeFactory.txt These are the last 2 of 5 files for this patch. > Support for PostgreSQL UUID data type > ------------------------------------- > > Key: HHH-3579 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Affects Versions: 3.3.1 > Reporter: Olivier Van Acker > Attachments: patch_HH_3579_Hibernate.txt, patch_HH_3579_NullableType.txt, patch_HH_3579_PostgresSQLDialect.txt, patch_HH_3579_TypeFactory.txt, patch_HH_3579_UuidType.txt > > > PostgreSQL has since version 8.3 UUID as data type nativly supported in the database. > The only way to get this to work in Hibernate is to add to your mappings file (or @columnDefinition via annotations) > and create your own custom usertype (e.g. public class UUIDUserType implements UserType, Serializable {..} ) and map this to java.util.UUID > worth mentioning is that java.util.UUID is only introduced in java 1.5 so there might be a backwards compatibility problem > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 20:41:15 2009 From: noreply at atlassian.com (David Driscoll (JIRA)) Date: Mon, 17 Aug 2009 19:41:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4093) Tutorial Project to illustrate use of Hibernate using Annotations and additionally provide Unit Testing for Support for PostgreSQL UUID data type Message-ID: <148068905.2891250556075063.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Tutorial Project to illustrate use of Hibernate using Annotations and additionally provide Unit Testing for Support for PostgreSQL UUID data type ------------------------------------------------------------------------------------------------------------------------------------------------- Key: HHH-4093 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4093 Project: Hibernate Core Issue Type: Improvement Components: documentation Environment: Hibernate 3.5.0 (Trunk), Postgresql 8.3 or greater Reporter: David Driscoll Attachments: hibernate-tutorials-annotations.zip Ran into issue HH-3579, and needed support for Uuid type in Postgresql. I have create patches for HH-3579, so that Hibernate now support the Uuid type in Postgresql. I created this project (attached as zip) to be able to Unit Test these patches in a web application environment using Unit Tests via JUnit 4. Here is an excerpt from the readme file in this project: This project was created for the main purpose of unit testing a Hibernate enhancement (HH-3579) that added uuid sql types to hibernate. Specifically, for unit testing against Postgresql 8.3 or greater which allows uuid data types. Additionally, it demonstrates how to use Hibernate with Annotations. This tutorial implements a basic web application using Hibernate 3.5 (trunk), Spring Framework 3.0 (trunk), Spring's MVC, and Atomikos Transaction Manager 3.5.5. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 20:46:15 2009 From: noreply at atlassian.com (David Driscoll (JIRA)) Date: Mon, 17 Aug 2009 19:46:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3579) Support for PostgreSQL UUID data type In-Reply-To: <30493995.1225470964435.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <992326884.2971250556375673.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33797#action_33797 ] David Driscoll commented on HHH-3579: ------------------------------------- Create a tutorial project for Unit Testing these patches in a web application environment using using Hibernate 3.5 (trunk), Spring Framework 3.0 (trunk), Spring's MVC, and Atomikos Transaction Manager 3.5.5, attached project to ticket HHH-4093. > Support for PostgreSQL UUID data type > ------------------------------------- > > Key: HHH-3579 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Affects Versions: 3.3.1 > Reporter: Olivier Van Acker > Attachments: patch_HH_3579_Hibernate.txt, patch_HH_3579_NullableType.txt, patch_HH_3579_PostgresSQLDialect.txt, patch_HH_3579_TypeFactory.txt, patch_HH_3579_UuidType.txt > > > PostgreSQL has since version 8.3 UUID as data type nativly supported in the database. > The only way to get this to work in Hibernate is to add to your mappings file (or @columnDefinition via annotations) > and create your own custom usertype (e.g. public class UUIDUserType implements UserType, Serializable {..} ) and map this to java.util.UUID > worth mentioning is that java.util.UUID is only introduced in java 1.5 so there might be a backwards compatibility problem > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 17 21:02:15 2009 From: noreply at atlassian.com (David Driscoll (JIRA)) Date: Mon, 17 Aug 2009 20:02:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2412) Hibernate 3 cannot be compiled under JDK 6 In-Reply-To: <101313881.1170980140826.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1378938970.3041250557335665.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Driscoll updated HHH-2412: -------------------------------- Attachment: patch_HH2412_Blob_Interface_Types.txt patch_HH2412_ResultSetWrapper.txt I also ran into this issue when trying to resolve HHH-3579. Since the 20 or so new methods are required by java.sql.ResultSet are new, for now generated them as stubs. The classes BlobImpl, ClobImpl, SerializableBlob, SerializableClob also have 2 new methods that needed to be implemented since java.sql.Blob and java.sql.Clob in Java 1.5 were updated. For now these methods generated them as stubs. Legacy code won't call these methods since they didn't yet exist and current code base needs them implemented in order to compile. > Hibernate 3 cannot be compiled under JDK 6 > ------------------------------------------ > > Key: HHH-2412 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412 > Project: Hibernate Core > Issue Type: Task > Components: core > Affects Versions: 3.2.1, 3.2.2 > Environment: windows xp, JDK 6 > Reporter: Ahmet A. Akin > Assignee: Steve Ebersole > Fix For: 3.6 > > Attachments: patch_HH2412_Blob_Interface_Types.txt, patch_HH2412_ResultSetWrapper.txt > > > Hibernate code cannot be compiled under JDK 6. Problems and possible solutions: > 1- org.hibernate.jdbc.ResultSetWrapper implements ResultSet. But in Java 6, there are big changes in Resultset interface, and maybe 20+ more methods needs to be implemented in the ResultSetWrapper class. i would suggest eliminating this wrapper class once and for all, because it is only used in one method (in ColumnNameCache, getIndexForColumnName method) and i dont think there is a justification for using that wrapper class. > 2- org.hibernate.lob.SerializableBlob needs to implement new Blob interface methods: > public void free() throws SQLException; > public InputStream getBinaryStream(long pos, long length) throws SQLException > But, if this class is publicly accesible or used by API's back compatibility issues needs to be checked. > 3- Same as number 2, org.hibernate.lob.BlobImpl class needs to implement new Blob methods. > 4- org.hibernate.lob.SerializableClob class needs to implent new Clob methods. > 5- org.hibernate.lob.ClobImpl , same as 4. > In fact, Java 6 has a lot of JDBC improvements, maybe a java6 special extra package can be created., but that is a whole different issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:17 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4035) skip org.hibernate.action.BulkOperationCleanupAction on INSERT HQL queries In-Reply-To: <1047377449.4981247496792680.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <58413729.3181250598377570.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-4035: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > skip org.hibernate.action.BulkOperationCleanupAction on INSERT HQL queries > -------------------------------------------------------------------------- > > Key: HHH-4035 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4035 > Project: Hibernate Core > Issue Type: Improvement > Components: caching (L2) > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > > For INSERT queries it is really not needed to cleanup caches as we'd have no invalid entity/collection data to cleanup (we'd still nee to invalidate the appropriate update-timestamps regions) as a result of the query. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:17 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4047) Phase 1 - API & implement join-strategy In-Reply-To: <1316897703.8531248109692013.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1438512299.3161250598377482.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-4047: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Phase 1 - API & implement join-strategy > --------------------------------------- > > Key: HHH-4047 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4047 > Project: Hibernate Core > Issue Type: Sub-task > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > > Phase 1 will focus on the API and the metadata infastructure needed to support fetch profiles. It will also provide implementation for using the join strategy. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:17 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4006) Document fetch profiles In-Reply-To: <1616181916.2231246469235843.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1120252789.3211250598377775.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-4006: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Document fetch profiles > ----------------------- > > Key: HHH-4006 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4006 > Project: Hibernate Core > Issue Type: Task > Components: documentation > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:17 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4000) Utlize jhighlight hooks for rendered syntax coloration of XML and Java based programlisting docbook elements In-Reply-To: <1050437759.961246379777052.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <56421083.3231250598377895.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-4000: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Utlize jhighlight hooks for rendered syntax coloration of XML and Java based programlisting docbook elements > ------------------------------------------------------------------------------------------------------------ > > Key: HHH-4000 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4000 > Project: Hibernate Core > Issue Type: Improvement > Components: documentation > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > > The semantic is where both XML and JAVA are valid options. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3995) Cleanup test data In-Reply-To: <1986349261.211246284255890.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <346204175.3271250598378036.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3995: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Cleanup test data > ----------------- > > Key: HHH-3995 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3995 > Project: Hibernate Core > Issue Type: Task > Components: testsuite > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Priority: Minor > Fix For: 3.2.x, 3.3.x, 3.5 > > > Lots of tests are leaving test data hanging around. That works on a particular assumption wrt the execution order of tests or that only a single test method exists. That cuases problems later in many cases. All tests should clean up the test data they create. Currently on trunk I see 246 tests leaving data around. > The sys prop hibernate.test.validateDataCleanup can be used to check for this; set it to true. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:17 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3997) Configure the maven javadoc plugin In-Reply-To: <708107978.281246288515866.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <993129579.3251250598377963.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3997: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Configure the maven javadoc plugin > ---------------------------------- > > Key: HHH-3997 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3997 > Project: Hibernate Core > Issue Type: Task > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > > So far we have been just accepting the defaults. We need to start applying our customizations. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3972) Adding FETCH FIRST and OFFSET support to DerbyDialect In-Reply-To: <291060233.1245360633494.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <421208876.3301250598378225.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3972: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Adding FETCH FIRST and OFFSET support to DerbyDialect > ----------------------------------------------------- > > Key: HHH-3972 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3972 > Project: Hibernate Core > Issue Type: Patch > Components: core > Affects Versions: 3.2.0.ga, 3.3.1 > Reporter: Evan Leonard > Assignee: Steve Ebersole > Fix For: 3.2.x, 3.3.x, 3.5 > > Attachments: Added_FETCH_FIRST_and_OFFSET_support_to_Derby_Dialect.patch, Derby_Dialect_FETCH_FIRST_and_OFFSET_support_with_back_compat_.patch > > > I've add support to the DerbyDialect for its recent addition of a limit clause [1]. > Attached is a patch for this addition. > Thank you, > Evan Leonard > [1] - http://db.apache.org/derby/docs/10.5/ref/rrefsqljoffsetfetch.html -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3946) Test FooBarTest isn't opening transactions and contains an invalid assertion In-Reply-To: <1656962278.1244203753789.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1922661823.3321250598378306.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3946: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Test FooBarTest isn't opening transactions and contains an invalid assertion > ---------------------------------------------------------------------------- > > Key: HHH-3946 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3946 > Project: Hibernate Core > Issue Type: Bug > Components: testsuite > Reporter: Juraci Paixao Krohling > Assignee: Juraci Paixao Krohling > Fix For: 3.5 > > Attachments: FooBarTest.java.diff > > > Test FooBarTest have three tests failing: > - testDisconnect > - testOrderBy > - testVeto > All of them are issuing commit to transactions which were not started, causing "Transaction not successfully started" error. Also, the test testOrderBy contains an invalid assertion. The code reads: > assertEquals( "'b' isn't second element", "b", ( (One) results.get(2) ).getValue() ); > But as the method "get" is 0-indexed, the parameter should be 1, instead of 2. > The attached patch fixes those issues. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3911) Remove openConnection()/closeConnection() from Batcher interface In-Reply-To: <436218911.1242147673689.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1638808128.3361250598378460.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3911: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Remove openConnection()/closeConnection() from Batcher interface > ---------------------------------------------------------------- > > Key: HHH-3911 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3911 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > > All access to a session-scoped connection should go through ConnectionManager. And in fact AbstractBatcher does get its connection from ConnectionManager as well. > Currently the Batcher open/close connection methods are only used during Isolator. Those uses can be replaced with direct calls to the ConnectionProvider. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3940) Remove hasSelfReferentialForeignKeyBug (returning true) override from MySQL dialects In-Reply-To: <608783575.1244038333703.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1169794026.3341250598378381.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3940: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Remove hasSelfReferentialForeignKeyBug (returning true) override from MySQL dialects > ------------------------------------------------------------------------------------ > > Key: HHH-3940 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3940 > Project: Hibernate Core > Issue Type: Task > Components: core > Affects Versions: 3.2.7, 3.3.1 > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.x, 3.3.x, 3.5 > > > Previous versions of MySQL had a nasty bug when using self-referential foreign keys with the innodb storage engine. This Dialect#hasSelfReferentialForeignKeyBug was originally added to account for that. > Testing against the lastest (5.1) MySQL versions shows this to no longer be present. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3908) Expose way to fully control fetching in native-sql queries in API In-Reply-To: <38849064.1241799434053.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <747674060.3381250598378538.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3908: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Expose way to fully control fetching in native-sql queries in API > ----------------------------------------------------------------- > > Key: HHH-3908 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3908 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Reporter: Steve Ebersole > Fix For: 3.5 > > > Currently, in order to fully control fetching in native-sql queries, users must revert to using a named sql query (at least the xml, not sure if the annotations variety supports as well). We alreasy have all the objects/contracts in place to handle this for the named queries, just need to clean-up and properly document them. > The current API calls to deal with this are the overloaded SQLQuery#addJoin methods. Ideally I'd see these changed to return the representation of the join-fetch to be configured; but addJoin already defines a return : the query itself :( So probably we will need new methods like addFetch: > 1) public JoinFetch addFetch(String alias, String ownerAlias, String ownerProperty) > 2) public JoinFetch addFetch(String alias, String ownerAlias, String ownerProperty, LockMode lockMode) > interface JoinFetch { > public void addPropertyMapping(String propertyName, String sqlAlias); > } > This can be expanded to the "root returns" as well (currently the overloaded #addEntity methods): > public RootReturn addRoot(String alias, Class entityClass) > etc... > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Example > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > SQLQuery query = session.createSQLQuery( > "select c.cust_id as cid, " + > " c.cust_name as cname, " + > " o.order_id as oid, " + > " o.order_num as onum " + > " from customer c " + > " inner join orders o " + > " on c.cust_id = o.cust_id" > ); > query.addRoot( "c", Customer.class ) > .addPropertyMapping( "id", "cid" ) > .addPropertyMapping( "name", "cname" ); > query.addFetch( "o", "c", "orders" ) > .addPropertyMapping( "id", "oid" ) > .addPropertyMapping( "orderNumber", "onum" ); > ... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3849) Disable lock striping in JBoss Cache configs In-Reply-To: <1418587.1238705559471.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <6804527.3411250598378642.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3849: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Disable lock striping in JBoss Cache configs > -------------------------------------------- > > Key: HHH-3849 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3849 > Project: Hibernate Core > Issue Type: Task > Components: caching (L2) > Reporter: Brian Stansberry > Assignee: Brian Stansberry > Fix For: 3.5 > > > JBC's MVCC lock striping leads to irresolvable lock conflicts; need to disable it once at least JBC 3.1.0 is integrated. (3.1.0 is the first version that includes the configuration property to disable it.) > See http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218836#4218836 for more details. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3804) Cleanup usage of deprecated APIs in testsuite (Session#find, etc) In-Reply-To: <17495633.1236365438580.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <925437579.3431250598378734.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3804: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Cleanup usage of deprecated APIs in testsuite (Session#find, etc) > ----------------------------------------------------------------- > > Key: HHH-3804 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3804 > Project: Hibernate Core > Issue Type: Task > Components: testsuite > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3800) Allow chopping of class names in various logging scenarios In-Reply-To: <11301371.1236289778627.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <442868407.3451250598378819.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3800: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Allow chopping of class names in various logging scenarios > ---------------------------------------------------------- > > Key: HHH-3800 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3800 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Priority: Minor > Fix For: 3.3.x, 3.5 > > Time Spent: 30 minutes > Remaining Estimate: 0 minutes > > When logging enti ty class names, it would be nice to allow "collapsing" or "stripping" the entity name in various ways. Or when referencing Hibernate classes... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:18 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3716) Sybase - null values for columns mapped as "boolean" are persisted as 0 (zero) instead of NULL In-Reply-To: <28215078.1232075978667.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1493075633.3471250598378892.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3716: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Sybase - null values for columns mapped as "boolean" are persisted as 0 (zero) instead of NULL > ---------------------------------------------------------------------------------------------- > > Key: HHH-3716 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3716 > Project: Hibernate Core > Issue Type: Bug > Components: core > Environment: Sybase > Reporter: Gail Badner > Assignee: Gail Badner > Fix For: 3.2.x, 3.3.x, 3.5 > > > Null values for columns mapped as "boolean" are persisted as 0 (zero) instead of NULL. This happens because Hibernate persists a null Boolean value by calling: > PreparedStatement.setNull( index, java.sql.Types.BIT ) > The SQL code, java.sql.Types.BIT, is used because the Hibernate BooleanType defines its code as java.sql.Type.BIT. > Sybase JDBC converts the null to 0, apparently because Sybase does not allow nullable bit columns. > This can be reproduced using an annotations unit test, Java5FeaturesTest.testAutoboxing().. > Sybase maps bit columns to tinyint, so when the unit test is executed, the column in the underlying table is actually of type tinyint, not bit. Sybase allows nullable tinyint columns, so there should be no problem persisting a null value as null. > I've verified that changing the call to: > PreparedStatement.setNull( index, java.sql.Types.TINYINT ) > persists the null value without being converted to 0. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:19 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3580) import entitymanager into core as a module In-Reply-To: <25076743.1225472884319.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <517191030.3521250598379061.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3580: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > import entitymanager into core as a module > ------------------------------------------ > > Key: HHH-3580 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3580 > Project: Hibernate Core > Issue Type: Task > Components: core > Reporter: Steve Ebersole > Assignee: Hardy Ferentschik > Fix For: 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:19 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3571) Change the default revision entity configuration In-Reply-To: <22617216.1225362125793.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <287088362.3541250598379168.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3571: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Change the default revision entity configuration > ------------------------------------------------ > > Key: HHH-3571 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3571 > Project: Hibernate Core > Issue Type: Task > Components: envers > Reporter: Adam Warski > Assignee: Adam Warski > Fix For: 3.5 > > > The current revision table and field names are not accepted by databases such as Oracle. Hence: > - change the revision entity name from _revision_entity to something acceptable by all databases (REVISION_ENTITY?) > - change the revision field name from _revision (to revision?) > Also, change the default id generation strategy from native to org.hibernate.id.enhanced.SequenceStyleGenerator > Document those changes in the manual with a migration note! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:19 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3538) Criteria.createAlias/Criteria.createCriteria forces join fetching of association In-Reply-To: <1242179.1224240846974.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <996690602.3631250598379528.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3538: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Criteria.createAlias/Criteria.createCriteria forces join fetching of association > -------------------------------------------------------------------------------- > > Key: HHH-3538 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3538 > Project: Hibernate Core > Issue Type: Bug > Components: query-criteria > Affects Versions: 3.2.6, 3.3.1 > Reporter: Hauke Rabe > Assignee: Steve Ebersole > Fix For: 3.2.x, 3.3.x, 3.5 > > Attachments: hhh-3538.zip, hhh-3538b.zip > > > The underlying cause is an invalid assumption made in JoinWalker that every association found in its association member list is to be fetched (added to the select fragment). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:19 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3338) Order of attributes in generated SQL query is dependent on Java version In-Reply-To: <109853607.1212926253186.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1250290454.3681250598379744.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3338: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Order of attributes in generated SQL query is dependent on Java version > ----------------------------------------------------------------------- > > Key: HHH-3338 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3338 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.6 > Environment: WIndows XP, Java 5 Update 15, Java 6 update 5 > Reporter: Michael Gerz > Assignee: Gail Badner > Fix For: 3.5 > > > We use Hibernate Core 3.2.6 in combination with Derby 10.4.1.3. > When migrating from Java 5 to Java 6, we noticed a huge performance hit. Our analysis has unveiled that Hibernate 3.2.6 produces semantical identical but syntactically different queries for Java 5 and Java 6. > Java 5: > Hibernate: select logevent0_.ID as ID7_, logevent0_.INDEX_SENT as INDEX2_7_, logevent0_.TEST_RUN_ID as TEST3_7_, logevent0_.SENDER as SENDER7_, logevent0_.TIME_SENT as TIME5_7_, logevent0_.MESSAGE as MESSAGE8_, logevent0_.SEVERITY as SEVERITY8_, logevent0_.SERIALIZED_CONTENT as SERIALIZED1_11_, logevent0_.RECEIVER as RECEIVER11_, logevent0_.TIME_RECEIVED as TIME3_11_, logevent0_.INDEX_RECEIVED as INDEX4_11_, logevent0_.ACTION_REQUEST as ACTION1_13_, logevent0_.ACTION_REPLY as ACTION1_14_, logevent0_.clazz_ as clazz_ from ( select TEST_RUN_ID, SENDER, MESSAGE, SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 2 as clazz_ from USER_LOG_EVENT union all select TEST_RUN_ID, SENDER, MESSAGE, SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 3 as clazz_ from DEVEL_LOG_EVENT union all select TEST_RUN_ID, SENDER, nullif('x','x') as MESSAGE, nullif('x','x') as SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 6 as clazz_ from ACTION_REQUEST_LOG_EVENT union all select TEST_RUN_ID, SENDER, nullif('x','x') as MESSAGE, nullif('x','x') as SEVERITY, nullif('x','x') as SERIALIZED_CONTENT, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, ACTION_REPLY, nullif('x','x') as RECEIVER, nullif(0,0) as INDEX_RECEIVED, INDEX_SENT, 7 as clazz_ from ACTION_REPLY_LOG_EVENT union all select TEST_RUN_ID, SENDER, nullif('x','x') as MESSAGE, nullif('x','x') as SEVERITY, SERIALIZED_CONTENT, TIME_RECEIVED, ID, nullif('x','x') as ACTION_REQUEST, TIME_SENT, nullif('x','x') as ACTION_REPLY, RECEIVER, INDEX_RECEIVED, INDEX_SENT, 4 as clazz_ from DATA_FLOW_LOG_EVENT ) logevent0_ where logevent0_.TEST_RUN_ID=? > Java 6: > Hibernate: select logevent0_.ID as ID7_, logevent0_.INDEX_SENT as INDEX2_7_, logevent0_.TEST_RUN_ID as TEST3_7_, logevent0_.SENDER as SENDER7_, logevent0_.TIME_SENT as TIME5_7_, logevent0_.MESSAGE as MESSAGE8_, logevent0_.SEVERITY as SEVERITY8_, logevent0_.SERIALIZED_CONTENT as SERIALIZED1_11_, logevent0_.RECEIVER as RECEIVER11_, logevent0_.TIME_RECEIVED as TIME3_11_, logevent0_.INDEX_RECEIVED as INDEX4_11_, logevent0_.ACTION_REQUEST as ACTION1_13_, logevent0_.ACTION_REPLY as ACTION1_14_, logevent0_.clazz_ as clazz_ from ( select nullif('x','x') as RECEIVER, TIME_SENT, SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 2 as clazz_ from USER_LOG_EVENT union all select nullif('x','x') as RECEIVER, TIME_SENT, SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 3 as clazz_ from DEVEL_LOG_EVENT union all select nullif('x','x') as RECEIVER, TIME_SENT, nullif('x','x') as SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, nullif('x','x') as MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 6 as clazz_ from ACTION_REQUEST_LOG_EVENT union all select nullif('x','x') as RECEIVER, TIME_SENT, nullif('x','x') as SEVERITY, nullif('2000-1-1 00:00:00','2000-1-1 00:00:00') as TIME_RECEIVED, ID, SENDER, nullif('x','x') as MESSAGE, TEST_RUN_ID, nullif('x','x') as SERIALIZED_CONTENT, INDEX_SENT, nullif(0,0) as INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, ACTION_REPLY, 7 as clazz_ from ACTION_REPLY_LOG_EVENT union all select RECEIVER, TIME_SENT, nullif('x','x') as SEVERITY, TIME_RECEIVED, ID, SENDER, nullif('x','x') as MESSAGE, TEST_RUN_ID, SERIALIZED_CONTENT, INDEX_SENT, INDEX_RECEIVED, nullif('x','x') as ACTION_REQUEST, nullif('x','x') as ACTION_REPLY, 4 as clazz_ from DATA_FLOW_LOG_EVENT ) logevent0_ where logevent0_.TEST_RUN_ID=? > The first order (using Java 5) looks more reasonable, because TEST_RUN_ID is the first column in all of the tables and it is also a foreign key. > The changed order of attributes does not really explain why Derby performs so poor on Java 6 and we have already issued a report to the Derby community. > Nevertheless, the SQL queries generated Hibernate should not depend on a specific version of Java. Maybe a compareTo() method is missing somewhere in the code...? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:20 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3279) create series of maven plugins offering functionality of the ant tools In-Reply-To: <112596080.1210691373921.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1213469178.3751250598380013.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3279: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > create series of maven plugins offering functionality of the ant tools > ---------------------------------------------------------------------- > > Key: HHH-3279 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3279 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > Original Estimate: 0 minutes > Remaining Estimate: 0 minutes > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:20 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3032) On Sybase, a subquery is incorrectly generated, causing ''Incorrect syntax near the keyword 'as'. In-Reply-To: <120479533.1198776545595.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1234243818.3791250598380174.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-3032: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > On Sybase, a subquery is incorrectly generated, causing ''Incorrect syntax near the keyword 'as'. > ------------------------------------------------------------------------------------------------- > > Key: HHH-3032 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3032 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.2.5 > Environment: Hibernate 3.2.5, JDK 1.6, IDE Eclipse 3.3, running on Windows XP > Reporter: Fernando Galdino > Assignee: Gail Badner > Fix For: 3.2.x, 3.3.x, 3.5 > > > I am using Spring 2.5 and Hibernate. I created a method to find a list of ProductPositionData based on an existence of its details represented by class DetalhePosicaoProdutoData. So, there is a relationship 1:n between tables ProductPosition and DetalhePosicaoProduto. > public List findAllBy(Date date, String viewCode, String status) > { > DetachedCriteria subquery = DetachedCriteria.forClass(DetalhePosicaoProdutoData.class); > subquery.add(Expression.eq("indSituaRegis", status)); > subquery.add(Expression.eq("compositeId.datPosic", date)); > subquery.setProjection(Projections.distinct(Property.forName("tipDolar"))); > > DetachedCriteria criteria = DetachedCriteria.forClass(ProductPositionData.class); > criteria.add(Expression.eq("indSituaRegis", status)); > criteria.add(Subqueries.exists(subquery)); > List list = this.hibernateTemplate.findByCriteria(criteria); > return list; > } > It should generate a query on the format SELECT blablabla FROM xyz WHERE exists (SELECT 1 FROM wyz). In really, running this method, I got a similar query. > select [ommitted field names] > from dtb_trd_resultado.resu.tbl_posicao_produto_trd this_ > where this_.ind_situa_regis=? and exists (select distinct this0__.tip_dolar as y0_ > from dtb_trd_resultado.resu.tbl_det_posicao_produto_trd this0__ where this0__.ind_situa_regis=? and this0__.dat_posic=?) > It causes the following error running under Sybase: > Incorrect syntax near the keyword 'as'. > ; nested exception is com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'. > It happens because on the subquery is generated this0__.tip_dolar as y0_ but "as y0_" is not valid in Sybase because using alias is not allowed for Sybase subqueries. > I saw similar problems at: > http://forum.hibernate.org/viewtopic.php?t=949233 > http://opensource.atlassian.com/projects/hibernate/browse/HHH-2905 > ----------------------------------- > Stacktrace: > org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.tip_orige_opera as tip1_4_0_, this_.num_opera as num2_4_0_, this_.ind_ativo_passi as ind3_4_0_, this_.tip_posic_opera as tip4_4_0_, this_.num_book as num5_4_0_, this_.num_regra_produ as num6_4_0_, this_.tip_objet_opera as tip7_4_0_, this_.tip_opera as tip8_4_0_, this_.num_empre as num9_4_0_, this_.num_clien as num10_4_0_, this_.ind_tradi as ind11_4_0_, this_.dat_inici_opera as dat12_4_0_, this_.dat_termi_opera as dat13_4_0_, this_.dat_termi_opera_me as dat14_4_0_, this_.dat_venci_risco as dat15_4_0_, this_.val_parid_moeda as val16_4_0_, this_.pcl_taxa_opera as pcl17_4_0_, this_.pcl_sobre_index as pcl18_4_0_, this_.val_cotac_indic_abert as val19_4_0_, this_.cod_risco_index as cod20_4_0_, this_.num_confi_calcu_produ as num21_4_0_, this_.cod_indic_econo_indic as cod22_4_0_, this_.tip_indic_econo_indic as tip23_4_0_, this_.nat_indic_econo_indic as nat24_4_0_, this_.tip_merca_indic_indic as tip25_4_0_, this_.cod_indic_econo_taxa as cod26_4_0_, this_.tip_indic_econo_taxa as tip27_4_0_, this_.tip_merca_indic_taxa as tip28_4_0_, this_.nat_indic_econo_taxa as nat29_4_0_, this_.ind_situa_regis as ind30_4_0_, this_.dat_situa_regis as dat31_4_0_, this_.cod_user as cod32_4_0_, this_.num_carte as num33_4_0_, this_.dat_liqui_opera as dat34_4_0_, this_.cod_indic_econo_taxa_fwd as cod35_4_0_, this_.tip_indic_econo_taxa_fwd as tip36_4_0_, this_.tip_merca_indic_taxa_fwd as tip37_4_0_, this_.nat_indic_econo_taxa_fwd as nat38_4_0_, this_.dat_limit_varia_indic as dat39_4_0_, this_.tip_metod_preci as tip40_4_0_, this_.tip_estru_sinte as tip41_4_0_, this_.dat_entra_opera as dat42_4_0_ from dtb_trd_resultado.resu.tbl_posicao_produto_trd this_ where this_.ind_situa_regis=? and exists (select distinct this0__.tip_dolar as y0_ from dtb_trd_resultado.resu.tbl_det_posicao_produto_trd this0__ where this0__.ind_situa_regis=? and this0__.dat_posic=?)]; SQL state [ZZZZZ]; error code [156]; Incorrect syntax near the keyword 'as'. > ; nested exception is com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'. > at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:121) > at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322) > at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424) > at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410) > at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:378) > at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:981) > at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:974) > at com.jpmorgan.br.databroker.control.productposition.ProductPositionControlImpl.findAllByx(ProductPositionControlImpl.java:45) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301) > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at $Proxy5.findAllByx(Unknown Source) > at com.jpmorgan.br.databroker.control.productposition.ProductPositionDataProvider.getData(ProductPositionDataProvider.java:32) > at com.jpmorgan.br.databroker.service.OptPriceProcessTest.runProcess(OptPriceProcessTest.java:109) > at com.jpmorgan.br.databroker.service.OptPriceProcessTest.testProcess(OptPriceProcessTest.java:88) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'. > at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:3178) > at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2481) > at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69) > at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220) > at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203) > at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1611) > at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1596) > at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:96) > at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) > at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) > at org.hibernate.loader.Loader.doQuery(Loader.java:674) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) > at org.hibernate.loader.Loader.doList(Loader.java:2220) > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) > at org.hibernate.loader.Loader.list(Loader.java:2099) > at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569) > at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) > at org.springframework.orm.hibernate3.HibernateTemplate$35.doInHibernate(HibernateTemplate.java:991) > at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:373) > ... 35 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:20 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2990) Bad usage of ClassLoader.loadClass() for Java6 in SerializationHelper$CustomObjectInputStream - deserialization bottleneck for arrays In-Reply-To: <96390187.1196770496045.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <448626897.3841250598380355.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-2990: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Bad usage of ClassLoader.loadClass() for Java6 in SerializationHelper$CustomObjectInputStream - deserialization bottleneck for arrays > ------------------------------------------------------------------------------------------------------------------------------------- > > Key: HHH-2990 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2990 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.2.5 > Environment: Hibernate 3.2.5, Java 6 Sun (any), any platform (tested Linux x64, Mac x64 (J6dp1)) > Reporter: Tom Eicher > Assignee: Gail Badner > Fix For: 3.2.x, 3.3.x, 3.5 > > > Sun has "clarified" (others say modified) the API of "ClassLoader.loadClass()" and no longer allows this to be called for arrays, e.g. String[]. > ( see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500212 and duplicates ) > and states that this has always been very unstable to use/do in the first place. > So trying to load an array of something using this method results in ClassNotFoundException. > The correct thing to do is call Class.forName(className,false,myClassLoader); instead of myClassLoader.loadClass(className); > In SerializationHelper$CustomObjectInputStream.resolveClass() we do > ClassLoader loader = Thread.currentThread().getContextClassLoader(); > try { > resolvedClass = loader.loadClass(className); > log.trace("Class resolved through context class loader"); > } > catch(ClassNotFoundException e) { > log.trace("Asking super to resolve"); > resolvedClass = super.resolveClass(v); > } > which results in the deserialization process for a String[] always searching String[] in all the application's jars/wars/etc before really loading it. > The bad thing is, loadClass() is synchronized. > In our case, we have multiple threads loading database rows containing String[]s, which results in one Thread doing > INFO | jvm 1 | 2007/11/30 16:56:44 | java.lang.Thread.State: RUNNABLE > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.zip.ZipFile.getEntry(Native Method) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.zip.ZipFile.getEntry(ZipFile.java:149) > INFO | jvm 1 | 2007/11/30 16:56:44 | - locked <0x00002aaab4047c20> (a java.util.jar.JarFile) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.jar.JarFile.getEntry(JarFile.java:206) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.jar.JarFile.getJarEntry(JarFile.java:189) > INFO | jvm 1 | 2007/11/30 16:56:44 | at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:754) > INFO | jvm 1 | 2007/11/30 16:56:44 | at sun.misc.URLClassPath.getResource(URLClassPath.java:168) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.net.URLClassLoader$1.run(URLClassLoader.java:192) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.security.AccessController.doPrivileged(Native Method) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > INFO | jvm 1 | 2007/11/30 16:56:44 | - locked <0x00002aaab4025998> (a org.apache.catalina.loader.StandardClassLoader) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:299) > INFO | jvm 1 | 2007/11/30 16:56:44 | - locked <0x00002aaab4095a68> (a org.apache.catalina.loader.StandardClassLoader) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1346) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.hibernate.util.SerializationHelper$CustomObjectInputStream.resolveClass(SerializationHelper.java:263) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:210) > and all other threads doing nothing > INFO | jvm 1 | 2007/11/30 16:56:44 | java.lang.Thread.State: BLOCKED (on object monitor) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:295) > INFO | jvm 1 | 2007/11/30 16:56:44 | - waiting to lock <0x00002aaab4095a68> (a org.apache.catalina.loader.StandardClassLoader) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1346) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.hibernate.util.SerializationHelper$CustomObjectInputStream.resolveClass(SerializationHelper.java:263) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575) > (rest of stack trace identical to above) > This can easily be worked around by setting the compatibility property > -Dsun.lang.ClassLoader.allowArraySyntax=true > however a) this workaround might not be around for long and b) most people will never find this bottleneck, therefore will not apply the workaround. > For our case, we got a 35% performance increase just be setting this property (and not a single loadClass() or ZipFile.getEntry() in any thread dump any more). > Cheers, Tom. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:20 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2907) ability to apply 'generation strategy' to generated properties In-Reply-To: <108993330.1193148758863.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1167122546.3891250598380533.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-2907: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > ability to apply 'generation strategy' to generated properties > -------------------------------------------------------------- > > Key: HHH-2907 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2907 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Priority: Minor > Fix For: 3.5 > > > Currently, the support for generated properties allows only for db-generated values (ala triggers etc). Would be great to allow the user to provide a seperate (optional) strategy for generating the generated values. > It would be nice to have a generic solution, which we can build on top of for the more common use cases. Also, we may need to use a name other than 'generated' in the annotations to avoid conflicts with the current @Generated annotation; for now lets use the term @Dynamic. > Consider mapping a 'created timestamp' column. Currently, provided we are using a trigger, that would look like: > @Generated(INSERT) Date created; > The strategy here (^^) is implicitly 'db', as the db is taking care of the generation. In the most generic form, that could be written as: > @Dynamic(time=INSERT,strategy=DB) Date created; > Additionally, since this is such a common case, also allow this: > @CreationTimestamp Date created; > The final form would also allow the definition of strategies. As an example, consider: > @CreationTimestamp(strategy=NOW) Date created; > Here we are not relying on the db to generate the value, but are explicitly telling Hibernate to do it (basically 'use the current timestamp to generate a value here whenever we do an insert'). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:20 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2860) Consolidate Session creation options/parameters In-Reply-To: <153348108.1190730297027.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <883512329.3921250598380641.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-2860: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Consolidate Session creation options/parameters > ----------------------------------------------- > > Key: HHH-2860 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2860 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > > This is a partial follow-on for the deprecation of Session#connection() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:20 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2439) delay IDENTITY insertions in the case of FlushMode.MANUAL/NEVER In-Reply-To: <125742267.1172182351440.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1591116936.3961250598380854.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-2439: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > delay IDENTITY insertions in the case of FlushMode.MANUAL/NEVER > --------------------------------------------------------------- > > Key: HHH-2439 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2439 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > > Much like we do now in 3.2 for out of transaction operations, we should delay performing insertions for post-insert generators with FlushMode.isManualFlushMode -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:21 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:21 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2309) fetch only the lazy property needed In-Reply-To: <171122111.1166039285081.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1416059749.4021250598381064.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-2309: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > fetch only the lazy property needed > ------------------------------------ > > Key: HHH-2309 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2309 > Project: Hibernate Core > Issue Type: New Feature > Components: core > Affects Versions: 3.2.1 > Reporter: German de la Cruz > Assignee: Steve Ebersole > Fix For: 3.3.x, 3.5 > > Attachments: HHH-2309-nikitaAtDoppelgangerDotCom-version1.patch > > > The method AbstractEntityPersister.initializeLazyProperty(..) load all lazy properties when it's called. It would be great if could only load the requested property. > I think the only change we need is in AbstractEntityPersister.initializeLazyPropertiesFromDatastore(...) and AbstractEntityPersister.initializeLazyPropertiesFromCache(...). We must change them in a way that only the referenced property is loaded. > After that, we must change AbstractFieldInterceptor.intercept(..) to update in a better way the unitializedFields collection (I mean, removing the actual property only instead of null it). > Besides. Why in line 777 to 780 a query is executed? I think it isn't necessary. > Thanks. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:21 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:21 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1907) offload metadata information from ComponentType to SessionFactory Message-ID: <929860098.4081250598381334.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-1907: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > offload metadata information from ComponentType to SessionFactory > ----------------------------------------------------------------- > > Key: HHH-1907 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1907 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > > Specifically, we need to move all the code directly dealing with property-access, instantiation, etc out of here. So where do we move it? Well, EntityType for example moves this stuff off to the persisters; the type then just looks up the persister when needed. Not sure we actually need a persister per-se for handling components; perhaps just ComponentMetamodel is enough... > Why is this important? Well the way ComponentType is currently structured leads to the need for certain configuration properties to be classloader scoped (static on Environment) instead of SessionFactory scoped. This is painful for two in particular: 1) whether to use reflection optimization and 2) bytecode provider. > Also, this change should allow us to cleanup how property accessors are built -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:21 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:21 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1851) relax special handling of 'id' property Message-ID: <2030650168.4111250598381514.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-1851: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > relax special handling of 'id' property > --------------------------------------- > > Key: HHH-1851 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851 > Project: Hibernate Core > Issue Type: Improvement > Components: query-hql > Environment: independent, all versions all databases. > Reporter: Gunther Schadow > Assignee: Steve Ebersole > Fix For: 3.5 > > Attachments: IdClassAndAnotherPropertyNamedId.zip > > > Hibernate has long treated 'id' in a special manner in HQL and Criteria queries. The drawback to this has always been that it effectively means users cannot define non-identifier properties named id and refer to those properties in HQL/Criteria queries. > Thus, I will change this such that: > (1) 'id' can still be used to refer to the identifier property, whatever the property's actual name, as long as the entity does not define a non-identitifer property named id. > (2) if the entity defines a non-identifier property named 'id', using 'id' in HQL or Criteria queries will refer to this non-identifier property; users would need to refer to the identifier property by its actual name. > FYI, the original reason for this feature was to support entity's which did not define an identifier property at all (users were responsible for managing the ids seperately. That feature was never really recommended and has been deprecated since early in the 3.x development. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:21 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:21 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1824) Write an Java Agent to avoid the build time enhancement operation Message-ID: <952568895.4151250598381729.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-1824: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Write an Java Agent to avoid the build time enhancement operation > ----------------------------------------------------------------- > > Key: HHH-1824 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1824 > Project: Hibernate Core > Issue Type: New Feature > Components: build, core > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Minor > Fix For: 3.5 > > > requires JDK 5 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:21 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:21 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1724) Critieria needs to be aligned with new aggreation type rules Message-ID: <1759737813.4181250598381900.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-1724: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Critieria needs to be aligned with new aggreation type rules > ------------------------------------------------------------ > > Key: HHH-1724 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1724 > Project: Hibernate Core > Issue Type: Bug > Components: core > Reporter: Max Rydahl Andersen > Assignee: Steve Ebersole > Priority: Blocker > Fix For: 3.5 > > > Criteria does not ask the dialect about the type + it does not always seem to know what the underlying field type is..... > created as blocker to make sure we either document or fix it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:22 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:22 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1496) A new dialect is required for MySQL NDB clustered table types Message-ID: <178524894.4221250598382048.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-1496: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > A new dialect is required for MySQL NDB clustered table types > ------------------------------------------------------------- > > Key: HHH-1496 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1496 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.1.2 > Reporter: Darran Lofthouse > Assignee: Juraci Paixao Krohling > Fix For: 3.2.x, 3.3.x, 3.5 > > Attachments: HHH-1496.diff > > > A new dialect is required for MySQL NDB clustered table types > http://dev.mysql.com/doc/refman/5.0/en/create-table.html > Either ENGINE=NDB or ENGINE=NDBCLUSTER > Also FYI ENGINE is the prefered way of specifying the type over TYPE so MySQLMyISAMDialect and MySQLInnoDBDialect could also be updated to use ENGINE -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:17 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4077) Misuse of NamingStrategy and logical column names in HbmBinder In-Reply-To: <1148823973.18801249915692933.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1852094611.3141250598377358.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-4077: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Misuse of NamingStrategy and logical column names in HbmBinder > -------------------------------------------------------------- > > Key: HHH-4077 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077 > Project: Hibernate Core > Issue Type: Bug > Components: metamodel > Affects Versions: 3.3.2 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.5 > > Attachments: HHH-4077.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:22 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:22 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1480) JOIN precendence rules per SQL-99 Message-ID: <1137196913.4281250598382284.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-1480: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > JOIN precendence rules per SQL-99 > --------------------------------- > > Key: HHH-1480 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1480 > Project: Hibernate Core > Issue Type: New Feature > Components: query-hql > Affects Versions: 3.1.2 > Reporter: trebor iksrazal > Assignee: Steve Ebersole > Fix For: 3.2.x, 3.3.x, 3.5 > > > In SQL-92 joins performed in the where clause (comma operator in from clause) and joins performed in the from clause (join keyword) had the same precedence. SQL-99 clarified this such that the from clause joins had higher precedence. > Hibernate currently treats these as having the same precedence. > A good explanation comes from the MySQL docs ( http://dev.mysql.com/doc/refman/5.0/en/join.html ) : > # > Previously, the comma operator (,) and JOIN both had the same precedence, so the join expression t1, t2 JOIN t3 was interpreted as ((t1, t2) JOIN t3). Now JOIN has higher precedence, so the expression is interpreted as (t1, (t2 JOIN t3)). This change affects statements that use an ON clause, because that clause can refer only to columns in the operands of the join, and the change in precedence changes interpretation of what those operands are. > Example: > CREATE TABLE t1 (i1 INT, j1 INT); > CREATE TABLE t2 (i2 INT, j2 INT); > CREATE TABLE t3 (i3 INT, j3 INT); > INSERT INTO t1 VALUES(1,1); > INSERT INTO t2 VALUES(1,1); > INSERT INTO t3 VALUES(1,1); > SELECT * FROM t1, t2 JOIN t3 ON (t1.i1 = t3.i3); > Previously, the SELECT was legal due to the implicit grouping of t1,t2 as (t1,t2). Now the JOIN takes precedence, so the operands for the ON clause are t2 and t3. Because t1.i1 is not a column in either of the operands, the result is an Unknown column 't1.i1' in 'on clause' error. To allow the join to be processed, group the first two tables explicitly with parentheses so that the operands for the ON clause are (t1,t2) and t3: > SELECT * FROM (t1, t2) JOIN t3 ON (t1.i1 = t3.i3); > Alternatively, avoid the use of the comma operator and use JOIN instead: > SELECT * FROM t1 JOIN t2 JOIN t3 ON (t1.i1 = t3.i3); > This change also applies to statements that mix the comma operator with INNER JOIN, CROSS JOIN, LEFT JOIN, and RIGHT JOIN, all of which now have higher precedence than the comma operator. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:26:23 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 07:26:23 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1012) Index not created by SchemaUpdate Message-ID: <999424565.4621250598383981.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated HHH-1012: -------------------------------- Fix Version/s: (was: 3.5.0.Beta-1) 3.5-tmp > Index not created by SchemaUpdate > --------------------------------- > > Key: HHH-1012 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1012 > Project: Hibernate Core > Issue Type: New Feature > Components: metamodel > Affects Versions: 3.2.5 > Environment: Windows XP, MySQL/PostgreSQL > Reporter: Xavier Farret > Assignee: Steve Ebersole > Priority: Minor > Fix For: 3.2.x, 3.3.x, 3.5 > > Attachments: Indexes.patch > > > i'm using an hbm.xml as describe below and the 'hibernate.hbm2ddl.auto' is egal to update. > > > > > > .... > > > > .... > > Indexes for pk or unique key are well created, but the index explicity named 'FeatStatDocExtSectFeat' is never created. If i put the property 'hibernate.hbm2ddl.auto' in the cfg.xml as 'create' the index is created. But in my case i have to set my property 'hibernate.hbm2ddl.auto' to update. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 08:45:15 2009 From: noreply at atlassian.com (Marcin K (JIRA)) Date: Tue, 18 Aug 2009 07:45:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4094) Session.clear does not fire evict event Message-ID: <1913992748.4651250599515131.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Session.clear does not fire evict event --------------------------------------- Key: HHH-4094 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4094 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.2 Environment: Hibernate core 3.3.2 Reporter: Marcin K Method session.clear should fire evict event for every entity held in the session, now it does not. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 09:31:20 2009 From: noreply at atlassian.com (Eric Sirianni (JIRA)) Date: Tue, 18 Aug 2009 08:31:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1112) Reverse engineering problem with composite primary key In-Reply-To: <7532150.1235163278594.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2000887583.4691250602280037.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Sirianni updated HBX-1112: ------------------------------- Attachment: SybaseAnywhereMetaDataDialect.java File is attached. It extends JDBCMetaDataDialect > Reverse engineering problem with composite primary key > ------------------------------------------------------ > > Key: HBX-1112 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4 Beta1 > Environment: configuration: > Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154 > Hibernate version: hibernate-3.2.6.ga.zip > Database: Sybase SQL Anywhere 10.0.1.3415 > JDBC-Driver: jconnect 6.05 > Eclipse Version: 3.4.0 > Code Generation Configuration: > Use Java 5 syntax and generate EJB3 annotations switched on. > Exporters: domain code. > Reporter: Christian Meyer > Attachments: SybaseAnywhereMetaDataDialect.java > > > Hello, > I have a problem reverse engineering domain code from a sybase anywhere 10 database. > For every table with composite primary key i get the following exception: > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Her is one example: > create table DCALLS > ( > AES timestamp default timestamp, > APPLID char(8) not null, > DIALOG integer not null, > COUNTER integer, > constraint PK_DCALLS primary key (APPLID, DIALOG) > ); > For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster > I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826 > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > all Tables with single key are fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 10:14:19 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Tue, 18 Aug 2009 09:14:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files Message-ID: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> POJO java code exporter () should generate field or property access Java annotated files --------------------------------------------------------------------------------------------------- Key: HBX-1132 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 Project: Hibernate Tools Issue Type: New Feature Components: hbm2java Affects Versions: 3.2.4 Beta1 Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl Reporter: Julien Kronegg Priority: Minor Attachments: GetFieldAnnotation.ftl, PojoFields.ftl, PojoPropertyAccessors.ftl Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). The implementation could be based on the following workaround. Workaround: ------------------ 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: PojoFields.ftl PojoPropertyAccessors.ftl GetPropertyAnnotation.ftl Ejb3PropertyGetAnnotation.ftl 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; + + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> + <#include "GetFieldAnnotation.ftl"/> + + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): - <#include "GetPropertyAnnotation.ftl"/> + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> + <#include "GetPropertyAnnotation.ftl"/> + 6) in the Ant build.xml, add a property to the tag, for example: -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 10:14:19 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Tue, 18 Aug 2009 09:14:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <425803672.4741250604859475.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Kronegg updated HBX-1132: -------------------------------- Attachment: GetFieldAnnotation.ftl PojoPropertyAccessors.ftl PojoFields.ftl > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: GetFieldAnnotation.ftl, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 10:16:14 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Tue, 18 Aug 2009 09:16:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <577252153.4761250604974986.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Kronegg updated HBX-1132: -------------------------------- Attachment: Ejb3FieldGetAnnotation.ftl > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: Ejb3FieldGetAnnotation.ftl, GetFieldAnnotation.ftl, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 10:40:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 18 Aug 2009 09:40:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-394) @ProvidedId gets ignored Message-ID: <463201064.4781250606415338.JavaMail.j2ee-opensource-projects@vps07.contegix.com> @ProvidedId gets ignored ------------------------ Key: HSEARCH-394 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-394 Project: Hibernate Search Issue Type: Bug Components: engine Affects Versions: 3.1.1.GA Reporter: Hardy Ferentschik Assignee: Hardy Ferentschik Fix For: 3.2.0 The check for the @ProvidedId has to be moved into the init() method of DocumentBuilderIndexedEntity -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 11:53:15 2009 From: noreply at atlassian.com (Max Rydahl Andersen (JIRA)) Date: Tue, 18 Aug 2009 10:53:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <449639317.4821250610795161.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33800#action_33800 ] Max Rydahl Andersen commented on HBX-1132: ------------------------------------------ why do you have two different sets of ftl's ? couldn't you just do conditonal include on field or properties ? Could you create a patch for this then this would be much easier to look into and possibly apply ? > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: Ejb3FieldGetAnnotation.ftl, GetFieldAnnotation.ftl, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 11:57:19 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 18 Aug 2009 10:57:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-394) @ProvidedId gets ignored In-Reply-To: <463201064.4781250606415338.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <6105262.4841250611039103.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33801#action_33801 ] Hardy Ferentschik commented on HSEARCH-394: ------------------------------------------- Fixed the actual code. We should, however, also refactor ProvidedIdPerson which is used in ProvidedIdTest. All JPA mappings should be in xml so that the entity class does neither have a @Id nor @DocumentId > @ProvidedId gets ignored > ------------------------ > > Key: HSEARCH-394 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-394 > Project: Hibernate Search > Issue Type: Bug > Components: engine > Affects Versions: 3.1.1.GA > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 3.2.0 > > > The check for the @ProvidedId has to be moved into the init() method of DocumentBuilderIndexedEntity -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 12:06:15 2009 From: noreply at atlassian.com (Paul Benedict (JIRA)) Date: Tue, 18 Aug 2009 11:06:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4006) Document fetch profiles In-Reply-To: <1616181916.2231246469235843.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <402611840.4881250611575890.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33802#action_33802 ] Paul Benedict commented on HHH-4006: ------------------------------------ Since fetch profiles have been re-slated from 3.5 to 3.7, it seems reasonable this issue should be deferred until then too. > Document fetch profiles > ----------------------- > > Key: HHH-4006 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4006 > Project: Hibernate Core > Issue Type: Task > Components: documentation > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 12:08:14 2009 From: noreply at atlassian.com (Ashish Zokarkar (JIRA)) Date: Tue, 18 Aug 2009 11:08:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1133) java.lang.StackOverflowError when I try to use hibernate-tools-3.2.0.beta9a.jar with slf4j jars Message-ID: <2081522652.4901250611694999.JavaMail.j2ee-opensource-projects@vps07.contegix.com> java.lang.StackOverflowError when I try to use hibernate-tools-3.2.0.beta9a.jar with slf4j jars ------------------------------------------------------------------------------------------------ Key: HBX-1133 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1133 Project: Hibernate Tools Issue Type: Bug Components: hbm2java Affects Versions: 3.2.0.GA Reporter: Ashish Zokarkar Hello, I am using hbm2java ant task for creation of java classes from hbm.xml files. I am using hibernate-tools-3.2.0.beta9a.jar hibernate3.jar jcl-over-slf4j-1.5.8.jar slf4j-api-1.5.8.jar slf4j-jcl-1.5.8.jar When I run this task, I get StackoverflowError. But when i try same ant script with hibernate-3.1.3.jar hibernatetools-3.1.0-b4.jar it executed properly. But with hibernate-tools-3.2.0.beta9a & slf4j related jars I got StackOverflowExcpetion. Ant script is as below: Please suggest me how to run this command with new build. Is it a bug in this build? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 12:57:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Tue, 18 Aug 2009 11:57:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4006) Document fetch profiles In-Reply-To: <1616181916.2231246469235843.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <420058296.4931250614635131.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33803#action_33803 ] Steve Ebersole commented on HHH-4006: ------------------------------------- Only support for certain fetch strategies within profiles have been re-slated... > Document fetch profiles > ----------------------- > > Key: HHH-4006 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4006 > Project: Hibernate Core > Issue Type: Task > Components: documentation > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 16:12:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Tue, 18 Aug 2009 15:12:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1112) Reverse engineering problem with composite primary key In-Reply-To: <7532150.1235163278594.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1867449326.4991250626335752.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33804#action_33804 ] Gail Badner commented on HBX-1112: ---------------------------------- This sounds like it is related to HBX-978. Does this issue always come up when an entity class has a composite primary key, or is it only that entity class is associated with another entity class? > Reverse engineering problem with composite primary key > ------------------------------------------------------ > > Key: HBX-1112 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4 Beta1 > Environment: configuration: > Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154 > Hibernate version: hibernate-3.2.6.ga.zip > Database: Sybase SQL Anywhere 10.0.1.3415 > JDBC-Driver: jconnect 6.05 > Eclipse Version: 3.4.0 > Code Generation Configuration: > Use Java 5 syntax and generate EJB3 annotations switched on. > Exporters: domain code. > Reporter: Christian Meyer > Attachments: SybaseAnywhereMetaDataDialect.java > > > Hello, > I have a problem reverse engineering domain code from a sybase anywhere 10 database. > For every table with composite primary key i get the following exception: > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Her is one example: > create table DCALLS > ( > AES timestamp default timestamp, > APPLID char(8) not null, > DIALOG integer not null, > COUNTER integer, > constraint PK_DCALLS primary key (APPLID, DIALOG) > ); > For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster > I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826 > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > all Tables with single key are fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 18 18:23:15 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Tue, 18 Aug 2009 17:23:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <549151424.5011250634195644.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Kronegg updated HBX-1132: -------------------------------- Attachment: patch.txt There is a patch for - PojoFields.ftl - PojoPropertyAccessors.ftl The following files are new: - Ejb3FieldGetAnnotation.ftl - GetFieldAnnotation.ftl These are required because PojoFields.ftl has a foreach loop with a variable name "field" while PojoPropertyAccessors.ftl has a foreach with a variable name "property". Removing them require to unify the foreach variable name. > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: Ejb3FieldGetAnnotation.ftl, GetFieldAnnotation.ftl, patch.txt, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 02:29:15 2009 From: noreply at atlassian.com (=?UTF-8?Q?Stephan_Schr=C3=B6der_=28JIRA=29?=) Date: Wed, 19 Aug 2009 01:29:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4095) bug in org.hibernate.Hibernate.createBlob( InputStream in ) Message-ID: <1715095976.5041250663355310.JavaMail.j2ee-opensource-projects@vps07.contegix.com> bug in org.hibernate.Hibernate.createBlob( InputStream in ) ----------------------------------------------------------- Key: HHH-4095 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.2 Environment: (doesn't matter because ii's just a plain wrong usage of the InputStream.available-mehtode but anyway:) Hibernate. 3.3.2, Hsqldb1.8 Reporter: Stephan Schr?der Priority: Minor The implementation of org.hibernate.Hibernate.createBlob( InputStream in ) looks like this public static Blob createBlob(InputStream stream) throws IOException { return new SerializableBlob( new BlobImpl( stream, stream.available() ) ); } The second parameter here is supposed to be the length of the inputstream. The problem is that stream.available() doesn't return the length of the inputstream. That's explicitly noted in the Java-API (http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#available): "Note that while some implementations of InputStream will return the total number of bytes in the stream (on calling available() ), many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream." This is the source of my problem, only the first available bytes are read out of the inputstream. While the workaround for me is to simply call org.hibernate.Hibernate.createBlob( InputStream in,int length ), the misuse of stream.available() in Hibernate.createBlob( InputStream in ) remains to be resolved. Solution: the only way to get the length of an InputStream ist to read it completly, if you don't want to do that Hibernate.createBlob( InputStream i ) should be removed. (By the way, why is length of type int? java.io.File.length() and java.sql.Blob.length() are of type long, so length should be of type long as well). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 03:16:04 2009 From: noreply at atlassian.com (Marcin Kobylarz (JIRA)) Date: Wed, 19 Aug 2009 02:16:04 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4094) Session.clear does not fire evict event In-Reply-To: <1913992748.4651250599515131.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1877710138.5081250666164002.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33806#action_33806 ] Marcin Kobylarz commented on HHH-4094: -------------------------------------- Alternatively there may be a new, separate ClearEvent for such purposes. Maybe this solution is even more consistent. > Session.clear does not fire evict event > --------------------------------------- > > Key: HHH-4094 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4094 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: Hibernate core 3.3.2 > Reporter: Marcin Kobylarz > > Method session.clear should fire evict event for every entity held in the session, now it does not. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 03:32:19 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Wed, 19 Aug 2009 02:32:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1670879192.5101250667139178.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Kronegg updated HBX-1132: -------------------------------- Attachment: patch2.txt Hi Max, Based on your comment and after a good night of sleep, I wrote a new patch which add an alias "property=field" so that the Ejb3FieldGetAnnotation.ftl and GetFieldAnnotation.ftl files a not required anymore. Rather than using a tag, I added a property in Hbm2JavaExporterTask so that we can write: This modification is included in the patch. Note: I could not find the documentation source for http://docs.jboss.org/tools/3.1.0.M2/en/hibernatetools/html/ant.html#d0e3987 so I did not include it in the patch. > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: Ejb3FieldGetAnnotation.ftl, GetFieldAnnotation.ftl, patch.txt, patch2.txt, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 03:46:15 2009 From: noreply at atlassian.com (Marcin Kobylarz (JIRA)) Date: Wed, 19 Aug 2009 02:46:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4097) Add SessionCreated and SessionClosed events Message-ID: <131658643.5141250667975315.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Add SessionCreated and SessionClosed events ------------------------------------------- Key: HHH-4097 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4097 Project: Hibernate Core Issue Type: Improvement Reporter: Marcin Kobylarz It would be useful to extend event system with events fired when session has been created and before session is closed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 03:50:16 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Wed, 19 Aug 2009 02:50:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <505262301.5161250668216410.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Kronegg updated HBX-1132: -------------------------------- Attachment: patch-doc.txt I added a patch for the documentation (patch-doc.txt) which contains the documentation for the added property. It is based on http://anonsvn.jboss.org/repos/hibernate/trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml but I did not generate the HTML from the XML content so I'm not sure about the "". > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: Ejb3FieldGetAnnotation.ftl, GetFieldAnnotation.ftl, patch-doc.txt, patch.txt, patch2.txt, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 03:44:15 2009 From: noreply at atlassian.com (Marcin Kobylarz (JIRA)) Date: Wed, 19 Aug 2009 02:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4096) Custom data associated with session Message-ID: <842379910.5121250667855194.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Custom data associated with session ----------------------------------- Key: HHH-4096 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4096 Project: Hibernate Core Issue Type: Improvement Components: core Reporter: Marcin Kobylarz It would be nice to have a pair of methods: void Session.setCustomData(Object o) and Object Session.getCustomData() They would allow a user to associate some custom, user defined data with the session. This would make this data available wherever a session object is available. Particular example for such feature is an event system. Event listener is a singleton per session factory and this would made easier to perform operations on session scoped objects which could be obtained via this technique. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 04:23:18 2009 From: noreply at atlassian.com (Max Rydahl Andersen (JIRA)) Date: Wed, 19 Aug 2009 03:23:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1133) java.lang.StackOverflowError when I try to use hibernate-tools-3.2.0.beta9a.jar with slf4j jars In-Reply-To: <2081522652.4901250611694999.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1608812409.5201250670198497.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33809#action_33809 ] Max Rydahl Andersen commented on HBX-1133: ------------------------------------------ what error are you getting ? > java.lang.StackOverflowError when I try to use hibernate-tools-3.2.0.beta9a.jar with slf4j jars > ------------------------------------------------------------------------------------------------ > > Key: HBX-1133 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1133 > Project: Hibernate Tools > Issue Type: Bug > Components: hbm2java > Affects Versions: 3.2.0.GA > Reporter: Ashish Zokarkar > > Hello, > I am using hbm2java ant task for creation of java classes from hbm.xml files. I am using > hibernate-tools-3.2.0.beta9a.jar > hibernate3.jar > jcl-over-slf4j-1.5.8.jar > slf4j-api-1.5.8.jar > slf4j-jcl-1.5.8.jar > When I run this task, I get StackoverflowError. But when i try same ant script with > hibernate-3.1.3.jar > hibernatetools-3.1.0-b4.jar > it executed properly. But with hibernate-tools-3.2.0.beta9a & slf4j related jars I got StackOverflowExcpetion. > Ant script is as below: > > > > > > > > > > > classname="org.hibernate.tool.ant.HibernateToolTask" > classpathref="cp"/> > > > > > > > Please suggest me how to run this command with new build. Is it a bug in this build? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 04:25:15 2009 From: noreply at atlassian.com (Max Rydahl Andersen (JIRA)) Date: Wed, 19 Aug 2009 03:25:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1133) java.lang.StackOverflowError when I try to use hibernate-tools-3.2.0.beta9a.jar with slf4j jars In-Reply-To: <2081522652.4901250611694999.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <387448890.5221250670315419.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33810#action_33810 ] Max Rydahl Andersen commented on HBX-1133: ------------------------------------------ i.e. stacktrace ? > java.lang.StackOverflowError when I try to use hibernate-tools-3.2.0.beta9a.jar with slf4j jars > ------------------------------------------------------------------------------------------------ > > Key: HBX-1133 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1133 > Project: Hibernate Tools > Issue Type: Bug > Components: hbm2java > Affects Versions: 3.2.0.GA > Reporter: Ashish Zokarkar > > Hello, > I am using hbm2java ant task for creation of java classes from hbm.xml files. I am using > hibernate-tools-3.2.0.beta9a.jar > hibernate3.jar > jcl-over-slf4j-1.5.8.jar > slf4j-api-1.5.8.jar > slf4j-jcl-1.5.8.jar > When I run this task, I get StackoverflowError. But when i try same ant script with > hibernate-3.1.3.jar > hibernatetools-3.1.0-b4.jar > it executed properly. But with hibernate-tools-3.2.0.beta9a & slf4j related jars I got StackOverflowExcpetion. > Ant script is as below: > > > > > > > > > > > classname="org.hibernate.tool.ant.HibernateToolTask" > classpathref="cp"/> > > > > > > > Please suggest me how to run this command with new build. Is it a bug in this build? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 04:29:18 2009 From: noreply at atlassian.com (Max Rydahl Andersen (JIRA)) Date: Wed, 19 Aug 2009 03:29:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1122682763.5241250670558836.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33811#action_33811 ] Max Rydahl Andersen commented on HBX-1132: ------------------------------------------ thanks - but why don't you just create *one* patch that has all the changes in it (incl. new files) ? > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: Ejb3FieldGetAnnotation.ftl, GetFieldAnnotation.ftl, patch-doc.txt, patch.txt, patch2.txt, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 04:36:00 2009 From: noreply at atlassian.com (Max Rydahl Andersen (JIRA)) Date: Wed, 19 Aug 2009 03:36:00 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1112) Reverse engineering problem with composite primary key In-Reply-To: <7532150.1235163278594.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1450323232.5281250670960082.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Max Rydahl Andersen updated HBX-1112: ------------------------------------- Fix Version/s: 3.2.4.GA Gail not sure why you think these two issues are related ? Eric - your analysis looks correct. If sybase are returning columnname instead of a consistent PK_NAME then that is IMO a bug in Sybase driver. I'll mark this dialect for incl. in upcoming release. Thanks. > Reverse engineering problem with composite primary key > ------------------------------------------------------ > > Key: HBX-1112 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4 Beta1 > Environment: configuration: > Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154 > Hibernate version: hibernate-3.2.6.ga.zip > Database: Sybase SQL Anywhere 10.0.1.3415 > JDBC-Driver: jconnect 6.05 > Eclipse Version: 3.4.0 > Code Generation Configuration: > Use Java 5 syntax and generate EJB3 annotations switched on. > Exporters: domain code. > Reporter: Christian Meyer > Fix For: 3.2.4.GA > > Attachments: SybaseAnywhereMetaDataDialect.java > > > Hello, > I have a problem reverse engineering domain code from a sybase anywhere 10 database. > For every table with composite primary key i get the following exception: > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Her is one example: > create table DCALLS > ( > AES timestamp default timestamp, > APPLID char(8) not null, > DIALOG integer not null, > COUNTER integer, > constraint PK_DCALLS primary key (APPLID, DIALOG) > ); > For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster > I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826 > org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. > Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS) > all Tables with single key are fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 04:36:00 2009 From: noreply at atlassian.com (Max Rydahl Andersen (JIRA)) Date: Wed, 19 Aug 2009 03:36:00 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1131) JDBCReader incorrectly generates bogus FK names In-Reply-To: <6349073.121250361074995.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1722759505.5301250670960337.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33813#action_33813 ] Max Rydahl Andersen commented on HBX-1131: ------------------------------------------ does this only occur for MS Access ? Got a schema I can try out ? > JDBCReader incorrectly generates bogus FK names > ----------------------------------------------- > > Key: HBX-1131 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4.GA > Environment: Tools 3.2.4 GA > Reporter: Eric Sirianni > > Please see my forum post@ https://forum.hibernate.org/viewtopic.php?f=6&t=996016&p=2416464#p2416464 > JDBC drivers are allowed to return NULL for the "FK_NAME" metadata field for foreign keys. > In this case, hibernate tries to generate a bogus FK name. This FK name must be unique for the Table otherwise an exception is thrown: > org.hibernate.cfg.JDBCBinderException: Foreign key name (0) mapped to different tables! > Hibernate's algorithm for generating the bogus FK name appears to be wrong. It should increment the bogus FK name for each FK it finds, irrelevant of the "KEY_SEQ" value. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 04:37:15 2009 From: noreply at atlassian.com (Max Rydahl Andersen (JIRA)) Date: Wed, 19 Aug 2009 03:37:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1093) Missing inverseJoinColumn at ManyToMany relations with composite keys In-Reply-To: <19810197.1225462324673.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <31675045.5331250671035488.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Max Rydahl Andersen updated HBX-1093: ------------------------------------- Fix Version/s: 3.2.4.GA > Missing inverseJoinColumn at ManyToMany relations with composite keys > --------------------------------------------------------------------- > > Key: HBX-1093 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1093 > Project: Hibernate Tools > Issue Type: Bug > Components: hbm2java > Affects Versions: 3.2.2, 3.2LATER > Environment: Hibernate Tools version 3.2.2.Beta1 and 3.2.4.CR1-N200810300202, Oracle Database > Reporter: Nils Kelleter > Fix For: 3.2.4.GA > > Attachments: JdbcBinder.patch, simpleTest.zip > > > Using the hbm2java tool for reverse engineering of database tables, the following problem exists: > At ManyToMany relations with composite keys an inverseJoinColumn is missing. > Wrong code: > @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) > @JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING", > joinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false), > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP11_ID", nullable = false, updatable = false) }, > inverseJoinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false) }) > public Set getEtManyToManyComp2s() { > return this.etManyToManyComp2s; > } > @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) > @JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING", > joinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false), > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP22_ID", nullable = false, updatable = false) }, > inverseJoinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false) }) > public Set getEtManyToManyComp1s() { > return this.etManyToManyComp1s; > } > Correct code: > @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) > @JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING", > joinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false), > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP11_ID", nullable = false, updatable = false) }, > inverseJoinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false), > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP22_ID", nullable = false, updatable = false) }) > public Set getEtManyToManyComp2s() { > return this.etManyToManyComp2s; > } > @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) > @JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING", > joinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false), > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP22_ID", nullable = false, updatable = false) }, > inverseJoinColumns = { > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false), > @JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP11_ID", nullable = false, updatable = false) }) > public Set getEtManyToManyComp1s() { > return this.etManyToManyComp1s; > } > For reproducing this, you can use the following Oracle SQL scripts: > CREATE TABLE ET_MANY_TO_MANY_COMP1 ( > ET_MANY_TO_MANY_COMP1_ID NUMBER, > ET_MANY_TO_MANY_COMP11_ID NUMBER, > FIELD VARCHAR2(10), > PRIMARY KEY (ET_MANY_TO_MANY_COMP1_ID, ET_MANY_TO_MANY_COMP11_ID) > ); > CREATE TABLE ET_MANY_TO_MANY_COMP2 ( > ET_MANY_TO_MANY_COMP2_ID NUMBER, > ET_MANY_TO_MANY_COMP22_ID NUMBER, > FIELD VARCHAR2(10), > PRIMARY KEY (ET_MANY_TO_MANY_COMP2_ID, ET_MANY_TO_MANY_COMP22_ID) > ); > CREATE TABLE ET_MANY_TO_MANY_COMP_MAPPING ( > FK_ET_MANY_TO_MANY_COMP1_ID NUMBER, > FK_ET_MANY_TO_MANY_COMP11_ID NUMBER, > FK_ET_MANY_TO_MANY_COMP2_ID NUMBER, > FK_ET_MANY_TO_MANY_COMP22_ID NUMBER, > FOREIGN KEY (FK_ET_MANY_TO_MANY_COMP1_ID,FK_ET_MANY_TO_MANY_COMP11_ID) > REFERENCES ET_MANY_TO_MANY_COMP1(ET_MANY_TO_MANY_COMP1_ID,ET_MANY_TO_MANY_COMP11_ID), > FOREIGN KEY (FK_ET_MANY_TO_MANY_COMP2_ID, FK_ET_MANY_TO_MANY_COMP22_ID) > REFERENCES ET_MANY_TO_MANY_COMP2(ET_MANY_TO_MANY_COMP2_ID, ET_MANY_TO_MANY_COMP22_ID), > PRIMARY KEY (FK_ET_MANY_TO_MANY_COMP1_ID,FK_ET_MANY_TO_MANY_COMP11_ID,FK_ET_MANY_TO_MANY_COMP2_ID,FK_ET_MANY_TO_MANY_COMP22_ID) > ); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 04:49:15 2009 From: noreply at atlassian.com (Jean-Louis MONTEIRO (JIRA)) Date: Wed, 19 Aug 2009 03:49:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-751) Hibernate reports erroneous "possible typo error" for properties with protected accessor methods In-Reply-To: <151119147.1213374213099.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1685388287.5361250671755685.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33814#action_33814 ] Jean-Louis MONTEIRO commented on ANN-751: ----------------------------------------- As the spec allows using protected fields, it seems to me this issue is more a bug than an improvement. In the constructor of EJB3OverridenAnnotationReader, Hibernate already looks for DeclaredFields and DeclaredMethods instead of just public fields and methods. So I believe checkForOrphanProperties must do that too. > Hibernate reports erroneous "possible typo error" for properties with protected accessor methods > ------------------------------------------------------------------------------------------------ > > Key: ANN-751 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-751 > Project: Hibernate Annotations > Issue Type: Improvement > Affects Versions: 3.3.0.ga > Reporter: Stephen R. Saucier > Priority: Minor > Attachments: checkForOrphanProperties.patch > > > According to the EJB3 spec, section 2.1.1 (Persistent Fields and Properties), "property accessor methods must be public or protected." However, the checkForOrphanProperties method of org.hibernate.cfg.annotations.reflection.EJB3OverridenAnnotationReader only looks for public methods (by virtue of the fact that it is using the getMethods method of Class. I believe that the checkForOrphanProperties method ought to look at the protected methods implemented in the entity class as well in order to eliminate the erroneous warning messages that are reported when using hibernate with protected property accessor methods. > I've attached a patch which implements this additional behavior. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 05:23:15 2009 From: noreply at atlassian.com (Julien Kronegg (JIRA)) Date: Wed, 19 Aug 2009 04:23:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HBX-1132) POJO java code exporter () should generate field or property access Java annotated files In-Reply-To: <1946500493.4721250604859139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1199080239.5391250673795595.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Kronegg updated HBX-1132: -------------------------------- Attachment: patch3.txt Ok, there it is (patch3.txt). Remember: I did not test changes in ant.xml. > POJO java code exporter () should generate field or property access Java annotated files > --------------------------------------------------------------------------------------------------- > > Key: HBX-1132 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1132 > Project: Hibernate Tools > Issue Type: New Feature > Components: hbm2java > Affects Versions: 3.2.4 Beta1 > Environment: http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoFields.ftl > http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/tools/src/templates/pojo/PojoPropertyAccessors.ftl > Reporter: Julien Kronegg > Priority: Minor > Attachments: Ejb3FieldGetAnnotation.ftl, GetFieldAnnotation.ftl, patch-doc.txt, patch.txt, patch2.txt, patch3.txt, PojoFields.ftl, PojoPropertyAccessors.ftl > > > Currently, the POJO java code exporter generates only property access mode Java files, i.e. the JPA annotations are put on the getters only. > This is done in PojoFields.ftl (which does not contain annotations on fields) and in PojoPropertyAccessors.ftl (which includes the GetPropertyAnnotation.ftl that produces annotations on the methods). > It would be nice if the hbm2java task generate also field or property access mode entities (with property access mode by default). > The implementation could be based on the following workaround. > Workaround: > ------------------ > 1) extract the following files from the hibernate-tools.jar/ and put them in the /pojo/ directory: > PojoFields.ftl > PojoPropertyAccessors.ftl > GetPropertyAnnotation.ftl > Ejb3PropertyGetAnnotation.ftl > 2) rename GetPropertyAnnotation.ftl to GetFieldAnnotation.ftl and change references from "property" to "field", resulting in the attached file GetFieldAnnotation.ftl > 3) rename Ejb3PropertyGetAnnotation.ftl to Ejb3FieldGetAnnotation.ftl and change references from "property" to "field", resulting in the attached file Ejb3FieldGetAnnotation.ftl > 4) edit PojoFields.ftl to add a conditional inclusion of GetFieldAnnotation.ftl (resulting in the attached PojoFields.ftl): > - ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > + > + <#if exporter.properties.containsKey('jpaAccessMode') && jpaAccessMode.equals('field')> > + <#include "GetFieldAnnotation.ftl"/> > + > + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; > 5) edit the PojoPropertyAccessors.ftl to change to a conditional inclusion of GetPropertyAnnotation.ftl (resulting in the attached PojoPropertyAccessors.ftl): > - <#include "GetPropertyAnnotation.ftl"/> > + <#if !exporter.properties.containsKey('jpaAccessMode') || !jpaAccessMode.equals('field')> > + <#include "GetPropertyAnnotation.ftl"/> > + > 6) in the Ant build.xml, add a property to the tag, for example: > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 06:58:15 2009 From: noreply at atlassian.com (Holger Schildberg (JIRA)) Date: Wed, 19 Aug 2009 05:58:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2767) TimestampType uses SimpleDateFormat, which does not include Timestamp nanoseconds In-Reply-To: <135802886.1186171871529.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <927792874.5441250679495151.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33816#action_33816 ] Holger Schildberg commented on HHH-2767: ---------------------------------------- This also affects the logging of the bind parameters when the log level on the category org.hibernate.type is set to TRACE - as no nanoseconds are displayed, this makes the logging nearly useless. Really annoying. > TimestampType uses SimpleDateFormat, which does not include Timestamp nanoseconds > --------------------------------------------------------------------------------- > > Key: HHH-2767 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2767 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.2 > Environment: Hibernate 3.2.2 > Reporter: Alan Krueger > Priority: Minor > > TimestampType uses SimpleDateFormat when storing the value as a string, which does not include java.sql.Timestamp's nanoseconds. This appears to mean that auto-flushes see Timestamp fields changing value when using EntityType.DOM4J when there is a nanosecond component to the timestamp. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 07:06:15 2009 From: noreply at atlassian.com (Christian Luebke (JIRA)) Date: Wed, 19 Aug 2009 06:06:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4098) VARBINARY should be BLOB in DB2400Dialect Message-ID: <558921414.5461250679975087.JavaMail.j2ee-opensource-projects@vps07.contegix.com> VARBINARY should be BLOB in DB2400Dialect ----------------------------------------- Key: HHH-4098 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4098 Project: Hibernate Core Issue Type: Improvement Components: core Affects Versions: 3.5.0.Beta-1 Environment: tested with hibernate 3.2.6ga, IBM DB2/400 on i5/os V5R4 Reporter: Christian Luebke Priority: Minor VARBINARY is registered in DB2Dialect (superclass of DB2400Dialect) as "varchar($l) for bit data". As DB2/400 (aka IBM DB2 for i) has a record length limitation of 32766 bytes, VARBINARY should be implemented as BLOB. Blobs are being stored outside the db record. I successfully tried adding the following constructor in DB2400Dialect.java: public DB2400Dialect() { super(); registerColumnType( Types.VARBINARY, "blob($l)" ); } As I'm not a hibernate user by myself, I can't provide a test case. I tried to get Bonita Workflow (http://www.bonitasoft.com/) to run with my DB2/400. It failed initially because of the usage of a 64 K varbinary. After patching DB2400Dialect to use a blob, everything worked fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 07:54:15 2009 From: noreply at atlassian.com (Eric Sirianni (JIRA)) Date: Wed, 19 Aug 2009 06:54:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1131) JDBCReader incorrectly generates bogus FK names In-Reply-To: <6349073.121250361074995.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1481924938.5491250682855992.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33817#action_33817 ] Eric Sirianni commented on HBX-1131: ------------------------------------ Max - thanks for your quick comment. My guess is that the MS Access JDBC driver has the same issue (returns null for FK_NAME). My error actually came from using the sybase jConnect JDBC driver. Because it doesn't return unique names for FK_NAME, I created my own metadata dialect that returned null for the FK_NAME, hoping that the hibernate code would then handle this appropriately. Instead, I hit this issue. Any table whose primary key is a referent from multiple foreign keys should be enough to make it fail. The schema I'm working with is large and proprietary so I'll have to make a toy example. Table A { Integer id (PRIMARY KEY) String foo } Table B { Integer a (FOREIGN KEY REFERENCES A.id) String bar } Table C { Integer a (FOREIGN KEY REFERENCES A.id) String baz } When hibernate is calculating the referents of A's primary key, it asks the JDBC driver for the foreign keys and gets back B (with FK_NAME null) and C (with FK_NAME null). Hibernate assigns the FK_NAME "0" to both foreign keys, which leads to the observed failure. You should be able to simulate this with the above schema and a bogus MetadataDialect. > JDBCReader incorrectly generates bogus FK names > ----------------------------------------------- > > Key: HBX-1131 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1131 > Project: Hibernate Tools > Issue Type: Bug > Affects Versions: 3.2.4.GA > Environment: Tools 3.2.4 GA > Reporter: Eric Sirianni > > Please see my forum post@ https://forum.hibernate.org/viewtopic.php?f=6&t=996016&p=2416464#p2416464 > JDBC drivers are allowed to return NULL for the "FK_NAME" metadata field for foreign keys. > In this case, hibernate tries to generate a bogus FK name. This FK name must be unique for the Table otherwise an exception is thrown: > org.hibernate.cfg.JDBCBinderException: Foreign key name (0) mapped to different tables! > Hibernate's algorithm for generating the bogus FK name appears to be wrong. It should increment the bogus FK name for each FK it finds, irrelevant of the "KEY_SEQ" value. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 11:16:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Wed, 19 Aug 2009 10:16:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4099) Doc build error (http://jira.codehaus.org/browse/MNG-1323) Message-ID: <758664446.5511250694975185.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Doc build error (http://jira.codehaus.org/browse/MNG-1323) ---------------------------------------------------------- Key: HHH-4099 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4099 Project: Hibernate Core Issue Type: Bug Components: documentation Reporter: Steve Ebersole Assignee: Steve Ebersole Fix For: 3.5.0.Beta-1 Due to: 1) our consolidation of multiple docs into the core build 2) http://jira.codehaus.org/browse/MNG-1323 We have a problem building documentation. The gist of the problem is that maven resolves the depedencies for a plugin once during an entire build. Since we have multiple definitions of the jdocbook plugin (one in each dobook module) the dependencies for the plugin come from the "first one maven sees" (rather than each plugin+module combo getting resolved independently). This is Maven bug is fixed in Maven 3, which unfortunately just released its first alpha... The workaround in Maven 2 is to make sure that plugin dependencies for all the plugin definitions are the same :( -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 13:18:15 2009 From: noreply at atlassian.com (Paul Benedict (JIRA)) Date: Wed, 19 Aug 2009 12:18:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4099) Doc build error (http://jira.codehaus.org/browse/MNG-1323) In-Reply-To: <758664446.5511250694975185.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <123018503.5541250702295137.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33818#action_33818 ] Paul Benedict commented on HHH-4099: ------------------------------------ Steve, have you considered creating a project module for each definition? I would recommend building them as their own projects. > Doc build error (http://jira.codehaus.org/browse/MNG-1323) > ---------------------------------------------------------- > > Key: HHH-4099 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4099 > Project: Hibernate Core > Issue Type: Bug > Components: documentation > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5.0.Beta-1 > > > Due to: > 1) our consolidation of multiple docs into the core build > 2) http://jira.codehaus.org/browse/MNG-1323 > We have a problem building documentation. The gist of the problem is that maven resolves the depedencies for a plugin once during an entire build. Since we have multiple definitions of the jdocbook plugin (one in each dobook module) the dependencies for the plugin come from the "first one maven sees" (rather than each plugin+module combo getting resolved independently). > This is Maven bug is fixed in Maven 3, which unfortunately just released its first alpha... The workaround in Maven 2 is to make sure that plugin dependencies for all the plugin definitions are the same :( -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 14:14:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Wed, 19 Aug 2009 13:14:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4100) Problems with Envers docbook sources Message-ID: <353350083.5571250705655053.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Problems with Envers docbook sources ------------------------------------ Key: HHH-4100 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4100 Project: Hibernate Core Issue Type: Bug Components: documentation, envers Affects Versions: 3.5.0.Beta-1 Reporter: Steve Ebersole Assignee: Adam Warski Fix For: 3.5 Getting errors building envers docs after fixing HHH-4099 which basically set standardized docbook versions, stylings and formats across all the separate docs. There appears to be a mismatch between the number of columns declared to be included in a table and the number of columns actually used in a given row somewhere. This is a strictness thing that changed in newer versions of FOP. I had to fix the many occurrences of this in the hibernate docs as well. In the meantime I disabled the envers doc module for this beta. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 14:16:17 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Wed, 19 Aug 2009 13:16:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Closed: (HHH-4099) Doc build error (http://jira.codehaus.org/browse/MNG-1323) In-Reply-To: <758664446.5511250694975185.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1842794942.5591250705777606.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole closed HHH-4099. ------------------------------- Resolution: Fixed > Doc build error (http://jira.codehaus.org/browse/MNG-1323) > ---------------------------------------------------------- > > Key: HHH-4099 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4099 > Project: Hibernate Core > Issue Type: Bug > Components: documentation > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5.0.Beta-1 > > > Due to: > 1) our consolidation of multiple docs into the core build > 2) http://jira.codehaus.org/browse/MNG-1323 > We have a problem building documentation. The gist of the problem is that maven resolves the depedencies for a plugin once during an entire build. Since we have multiple definitions of the jdocbook plugin (one in each dobook module) the dependencies for the plugin come from the "first one maven sees" (rather than each plugin+module combo getting resolved independently). > This is Maven bug is fixed in Maven 3, which unfortunately just released its first alpha... The workaround in Maven 2 is to make sure that plugin dependencies for all the plugin definitions are the same :( -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 16:17:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Wed, 19 Aug 2009 15:17:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3962) Ingres Hibernate dialect for EAP 4.3.0 GA CP04 In-Reply-To: <1478508776.1245094113747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1669455076.5631250713035192.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner updated HHH-3962: ----------------------------- Fix Version/s: 3.5 > Ingres Hibernate dialect for EAP 4.3.0 GA CP04 > ---------------------------------------------- > > Key: HHH-3962 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate Core 3.2.4.SP1 CP07, Ingres 9.2.0 > Reporter: Enrico Schenk > Assignee: strong liu > Priority: Minor > Fix For: 3.5 > > Attachments: IngresDialect.java, IngresDialect.java > > > This is the Ingres dialect that was used for the EAP 4.3.0 GA CP04 tests. It's based on the latest dialect from the trunk contains changes for the functions current_time, current_timestamp and current_date. The dialect also overrides the method getForUpdateString() to disable the use of "SELECT...FOR UPDATE" statements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 16:33:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Wed, 19 Aug 2009 15:33:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-1483) MySQL5: No Dialect mapping for JDBC type: -1 Message-ID: <175270973.5761250713995890.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner resolved HHH-1483. ------------------------------ Resolution: Duplicate Fixed by HHH-3892. > MySQL5: No Dialect mapping for JDBC type: -1 > -------------------------------------------- > > Key: HHH-1483 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.1.2 > Environment: MySQL 5.0.18-nt > Reporter: Sergey Vladimirov > Assignee: Gail Badner > Priority: Minor > Attachments: hhh-1483-patch.txt > > > MySQL5: No Dialect mapping for JDBC type: -1 > SELECT answpos,answer FROM votes_answers WHERE question=? ORDER BY answpos > mysql> describe votes_answers; > +----------+---------+------+-----+---------+-------+ > | Field | Type | Null | Key | Default | Extra | > +----------+---------+------+-----+---------+-------+ > | question | int(11) | NO | MUL | | | > | answpos | int(11) | NO | | | | > | answer | text | YES | | NULL | | > +----------+---------+------+-----+---------+-------+ > mysql> describe temp; > +---------+---------+------+-----+---------+-------+ > | Field | Type | Null | Key | Default | Extra | > +---------+---------+------+-----+---------+-------+ > | answpos | int(11) | NO | | 0 | | > | answer | text | YES | | NULL | | > +---------+---------+------+-----+---------+-------+ > Please, let me know what to add to MySQL5Dialect :) > Will it be ok to add? : > registerColumnType( Types.LONGVARCHAR, "text" ); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 16:35:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Wed, 19 Aug 2009 15:35:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3691) Sybase does not support Blobs and Clobs; it uses image and text instead In-Reply-To: <1742352.1231319978641.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <227014962.5791250714115139.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner resolved HHH-3691. ------------------------------ Assignee: Gail Badner Resolution: Duplicate Fixed by HHH-3892. > Sybase does not support Blobs and Clobs; it uses image and text instead > ----------------------------------------------------------------------- > > Key: HHH-3691 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3691 > Project: Hibernate Core > Issue Type: Bug > Reporter: Gail Badner > Assignee: Gail Badner > > SybaseDialect needs to be set up to use image and text instead of Blob and Clob. > The following unit tests are failing for Sybase with the message, "The method com.sybase.jdbc2.jdbc.SybResultSet.getBlob(String) is not supported and should not be called.": > BlobTest.testBoundedMaterializedBlobAccess > BlobTest.testBoundedBlobLocatorAccess > BlobTest.testUnboundedBlobLocatorAccess > ClobTest.testBoundedMaterializedClobAccess > ClobTest.testBoundedClobLocatorAccess > ClobTest.testUnboundedClobLocatorAccess > SerializableTypeTest.testNewSerializableType > MixedTest.testMixedInheritance > InterfaceProxyTest.testInterfaceProxies > SQLFunctionsTest.testBlobClob -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 16:35:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Wed, 19 Aug 2009 15:35:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3161) No Dialect mapping for JDBC type: -4 In-Reply-To: <135581556.1204676374025.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <334939962.5841250714115442.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner resolved HHH-3161. ------------------------------ Resolution: Duplicate Fixed by HHH-3892. > No Dialect mapping for JDBC type: -4 > ------------------------------------ > > Key: HHH-3161 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3161 > Project: Hibernate Core > Issue Type: Bug > Components: core, query-hql, query-sql > Affects Versions: 3.2.1 > Environment: hibernate 3.2.1 + mysql > Reporter: cyrus > Priority: Critical > > When I execute the statement below: > SELECT concat(case ip_protocol when 6 then 'TCP' when 17 then 'UDP' else 'OTHER' end, ', PORT ', repeat(' ', 5 - length(if(port is NULL, 0, port))), if(port is NULL, 0, port)) as protocol, concat(case ip_protocol when 6 then 'TCP' when 17 then 'UDP' else 'OTHER' end, if(port is NULL, 0, port)) as id, sum(byte_subtotal) as total FROM usage_sum_minute WHERE from_unixtime(time_min * 60) between '2008-02-03 14:00:00' and '2008-03-05 13:59:00' GROUP BY protocol ORDER BY total DESC LIMIT 0, 20 > DB schema: > CREATE TABLE `ascot`.`usage_sum_minute` ( > `id` int(11) NOT NULL auto_increment, > `igateway_id` smallint(5) NOT NULL, > `time_min` int(11) NOT NULL, > `user_name` varchar(255) default NULL, > `mac_local` varchar(80) NOT NULL, > `ip_local` bigint(20) NOT NULL, > `ip_remote` bigint(20) NOT NULL, > `ip_protocol` smallint(5) NOT NULL, > `port` smallint(6) default NULL, > `domain_name` char(80) default NULL, > `url` varchar(1024) default NULL, > `byte_subtotal` int(11) NOT NULL, > PRIMARY KEY (`id`), > UNIQUE KEY `id` (`id`), > KEY `index_igateway` (`igateway_id`), > KEY `index_protocol` (`ip_protocol`), > KEY `index_minute` (`time_min`), > KEY `index_user` (`user_name`), > KEY `index_port` (`port`), > KEY `index_ip` (`ip_remote`) > ) ENGINE=InnoDB AUTO_INCREMENT=505699 DEFAULT CHARSET=latin1 > It give an exception "No Dialect mapping for JDBC type: -4" -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 16:45:15 2009 From: noreply at atlassian.com (Jim Locum (JIRA)) Date: Wed, 19 Aug 2009 15:45:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2412) Hibernate 3 cannot be compiled under JDK 6 In-Reply-To: <101313881.1170980140826.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1082322729.5901250714715271.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33822#action_33822 ] Jim Locum commented on HHH-2412: -------------------------------- FWIW, my system exhibited very similar behavior to [Ben's|http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412?focusedCommentId=33605&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_33605] comment above. The solution for us was upgrading our JDBC driver implementation and Hibernate to the latest versions. Before: Hibernate 3.2.6 jt400 6.2 After: Hibernate 3.3.2 javassist 3.9.0 jt400 6.5.1 > Hibernate 3 cannot be compiled under JDK 6 > ------------------------------------------ > > Key: HHH-2412 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412 > Project: Hibernate Core > Issue Type: Task > Components: core > Affects Versions: 3.2.1, 3.2.2 > Environment: windows xp, JDK 6 > Reporter: Ahmet A. Akin > Assignee: Steve Ebersole > Fix For: 3.6 > > Attachments: patch_HH2412_Blob_Interface_Types.txt, patch_HH2412_ResultSetWrapper.txt > > > Hibernate code cannot be compiled under JDK 6. Problems and possible solutions: > 1- org.hibernate.jdbc.ResultSetWrapper implements ResultSet. But in Java 6, there are big changes in Resultset interface, and maybe 20+ more methods needs to be implemented in the ResultSetWrapper class. i would suggest eliminating this wrapper class once and for all, because it is only used in one method (in ColumnNameCache, getIndexForColumnName method) and i dont think there is a justification for using that wrapper class. > 2- org.hibernate.lob.SerializableBlob needs to implement new Blob interface methods: > public void free() throws SQLException; > public InputStream getBinaryStream(long pos, long length) throws SQLException > But, if this class is publicly accesible or used by API's back compatibility issues needs to be checked. > 3- Same as number 2, org.hibernate.lob.BlobImpl class needs to implement new Blob methods. > 4- org.hibernate.lob.SerializableClob class needs to implent new Clob methods. > 5- org.hibernate.lob.ClobImpl , same as 4. > In fact, Java 6 has a lot of JDBC improvements, maybe a java6 special extra package can be created., but that is a whole different issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 17:04:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Wed, 19 Aug 2009 16:04:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3962) Ingres Hibernate dialect for EAP 4.3.0 GA CP04 In-Reply-To: <1478508776.1245094113747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <809767530.5931250715855405.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33823#action_33823 ] Gail Badner commented on HHH-3962: ---------------------------------- Hi Enrico, I saw from an email thread that you were having problems with mapping Blob and Clob. The fix for HHH-3892 (currently applied to trunk only) may have resolved some problems you saw. Please try building your updated IngresDialect in trunk and run the unit tests. If you are not able to configure IngresDialect so that BlobLocatorTest, ClobLocatorTest, MaterializedBlobTest, and MaterializedClobTest pass, then IngresDialect will need to be updated to override: public boolean supportsExpectedLobUsagePattern() { return false; } Please let us know your test results using trunk. If you need to update your dialect, please attach a patch (e.g., using "svn diff") against IngresDialect in trunk (http://anonsvn.jboss.org/repos/hibernate/core/trunk/). Thanks, Gail > Ingres Hibernate dialect for EAP 4.3.0 GA CP04 > ---------------------------------------------- > > Key: HHH-3962 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate Core 3.2.4.SP1 CP07, Ingres 9.2.0 > Reporter: Enrico Schenk > Assignee: strong liu > Priority: Minor > Fix For: 3.5 > > Attachments: IngresDialect.java, IngresDialect.java > > > This is the Ingres dialect that was used for the EAP 4.3.0 GA CP04 tests. It's based on the latest dialect from the trunk contains changes for the functions current_time, current_timestamp and current_date. The dialect also overrides the method getForUpdateString() to disable the use of "SELECT...FOR UPDATE" statements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 17:47:31 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Wed, 19 Aug 2009 16:47:31 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2412) Hibernate 3 cannot be compiled under JDK 6 In-Reply-To: <101313881.1170980140826.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <23383322.6001250718451084.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33824#action_33824 ] Gail Badner commented on HHH-2412: ---------------------------------- Hi Jim, Thanks for the feedback. Was it necessary to upgrade Hibernate to get things to work? Would it have worked by just upgrading the JDBC driver? Thanks, Gail > Hibernate 3 cannot be compiled under JDK 6 > ------------------------------------------ > > Key: HHH-2412 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412 > Project: Hibernate Core > Issue Type: Task > Components: core > Affects Versions: 3.2.1, 3.2.2 > Environment: windows xp, JDK 6 > Reporter: Ahmet A. Akin > Assignee: Steve Ebersole > Fix For: 3.6 > > Attachments: patch_HH2412_Blob_Interface_Types.txt, patch_HH2412_ResultSetWrapper.txt > > > Hibernate code cannot be compiled under JDK 6. Problems and possible solutions: > 1- org.hibernate.jdbc.ResultSetWrapper implements ResultSet. But in Java 6, there are big changes in Resultset interface, and maybe 20+ more methods needs to be implemented in the ResultSetWrapper class. i would suggest eliminating this wrapper class once and for all, because it is only used in one method (in ColumnNameCache, getIndexForColumnName method) and i dont think there is a justification for using that wrapper class. > 2- org.hibernate.lob.SerializableBlob needs to implement new Blob interface methods: > public void free() throws SQLException; > public InputStream getBinaryStream(long pos, long length) throws SQLException > But, if this class is publicly accesible or used by API's back compatibility issues needs to be checked. > 3- Same as number 2, org.hibernate.lob.BlobImpl class needs to implement new Blob methods. > 4- org.hibernate.lob.SerializableClob class needs to implent new Clob methods. > 5- org.hibernate.lob.ClobImpl , same as 4. > In fact, Java 6 has a lot of JDBC improvements, maybe a java6 special extra package can be created., but that is a whole different issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 19:24:15 2009 From: noreply at atlassian.com (Bob Tiernay (JIRA)) Date: Wed, 19 Aug 2009 18:24:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1352) Session.setReadOnly(Object, boolean) fails for proxies Message-ID: <219702782.6151250724255980.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33825#action_33825 ] Bob Tiernay commented on HHH-1352: ---------------------------------- What isn't accounting for proxies, is there a workaround, and is this intended to be fixed? Thanks > Session.setReadOnly(Object, boolean) fails for proxies > ------------------------------------------------------ > > Key: HHH-1352 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1352 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.1 > Environment: Hibernate 3.1, MySQL 5.0.15-nt > Reporter: Stewart Cambridge > Assignee: Steve Ebersole > Priority: Minor > Original Estimate: 1 day > Remaining Estimate: 1 day > > Session.setReadOnly(Object, boolean) is broken. It throws a TransientObjectException with the message "Instance was not associated with the session" when the object is quite obvious associated with the current session, because we only just loaded it using Session.load(Class, Serializable) > Here is a simple JUnit test, for an arbitrary entity: > public void testReadOnly() > throws Exception > { > User user = (User) session.load(User.class, new Long(7)); > System.out.println("\n=== " + user + " ==="); > session.setReadOnly(user, true); > } > This is the exception stack trace: > org.hibernate.TransientObjectException: Instance was not associated with the session at org.hibernate.engine.StatefulPersistenceContext.setReadOnly(StatefulPersistenceContext.java:1167) at org.hibernate.impl.SessionImpl.setReadOnly(SessionImpl.java:1740) at > test.persistence.HibernateObjectTest.testReadOnly(HibernateObjectTest.java:30) .... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 19 19:51:17 2009 From: noreply at atlassian.com (=?UTF-8?Q?Arturo_Frapp=C3=A9_=28JIRA=29?=) Date: Wed, 19 Aug 2009 18:51:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (ANN-861) ANN-572 patch with junit Message-ID: <1210830300.6171250725877218.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ANN-572 patch with junit ------------------------ Key: ANN-861 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-861 Project: Hibernate Annotations Issue Type: Patch Components: binder Affects Versions: 3.4.0.GA Environment: Hibernate 3.3.2.GA Reporter: Arturo Frapp? Attachments: ANN-572-junit-update.patch ANN-572 patch with junit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 01:28:15 2009 From: noreply at atlassian.com (Sharath Reddy (JIRA)) Date: Thu, 20 Aug 2009 00:28:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (ANN-820) TypeDef does not work when used on @Embeddable or @MappedSuperClass classes. In-Reply-To: <156251770.1239663557445.JavaMail.j2ee_opensource.atlassian.com-projects@atlassian12.managed.contegix.com> Message-ID: <1945101075.6211250746095085.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sharath Reddy updated ANN-820: ------------------------------ Attachment: ANN-820.patch Attached patch along with test case > TypeDef does not work when used on @Embeddable or @MappedSuperClass classes. > ---------------------------------------------------------------------------- > > Key: ANN-820 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-820 > Project: Hibernate Annotations > Issue Type: Bug > Components: binder > Affects Versions: 3.4.0.GA > Environment: Oracle 11, hibernate 3.4.0 GA > Reporter: Ted Bergeron > Attachments: ANN-820.patch > > > @TypeDefs({ > @TypeDef( > name = "status", > typeClass = EnumUserType.class, > parameters = {@Parameter(name = "enumClass", value = "com.acme.common.model.Status")} > ) > }) > I declare various @TypeDefs such as this. They all work fine when used in @Entity classes. When used in a @MappedSuperclass, or an @Embeddable, they fail. > I see from the docs that these are global and double checked that I do not have any duplicate @TypeDef definitions. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 02:28:15 2009 From: noreply at atlassian.com (Ian Hayes (JIRA)) Date: Thu, 20 Aug 2009 01:28:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4101) add mapping inheritance to allow read only classes to be used for reporting Message-ID: <1830552591.6241250749695099.JavaMail.j2ee-opensource-projects@vps07.contegix.com> add mapping inheritance to allow read only classes to be used for reporting --------------------------------------------------------------------------- Key: HHH-4101 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4101 Project: Hibernate Core Issue Type: New Feature Environment: All Reporter: Ian Hayes I'm finding that with a number of hibernate mappings I have a simple version of an entity defined for basic CRUD operations, and then I really need an expanded version of the same entity that includes all of its associations for reporting process optimization. For example: I have an entity (e.g. course) that has a number of related sub entities (e.g. attendees, class times etc) but I don't want to include these sub entities as properties in the main entity class used for CRUD operations. To get around this I'm using the following class hierarchy... Code: AbstractCourse |---- Course |---- CoursePlusBookings public abstract class AbstractCourse { private int CourseID; private String Title; private String Teacher } public class Course extends AbstractCourse { } public class Attendee { private int AttendeeID; private int CourseID; private String StudentName; } public CoursePlusBookings extends AbstractCourse { private Set Attendees; } Now for all entity level CRUD operations I'm using 'Course' and 'Attendee' separately to add entries to the underlying database. However, for reporting purposes I want to use 'CoursePlusBookings, which allows me to show a list of courses with the number of bookings. Now the only way I can find to support this approach is to have two separate mappings - one for 'Course' and a second for 'CoursePlusBookings' - both of which map to the same table. I can't find a way of implementing mapping inheritance to avoid this duplication. I did raise this question sometime ago on the support forums (see viewtopic.php?f=1&t=984333) but unfortunately the respondents misunderstood my question, so I'm asking it again. I suppose in a way this posting boils down to a question about whether it is possible to have mapping element associations that are read only in nature. In otherwords if persisted CoursePlusBookings then the Attendee set would not be persisted as part of that operation. An alternative approach would be to allow mapping inheritance where a sub class has no discriminator and is marked as 'read only'. Such read only sub classes could have multiple properties representing sub entity set associations. Or is there another way to achieve what I'm after? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 08:08:15 2009 From: noreply at atlassian.com (Sharath Reddy (JIRA)) Date: Thu, 20 Aug 2009 07:08:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-666) @SQLInsert does not work In-Reply-To: <87060839.1192626398848.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1667597487.6281250770095759.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33827#action_33827 ] Sharath Reddy commented on ANN-666: ----------------------------------- I downloaded and ran the test case posted by Alex. It works fine for me against TRUNK. > @SQLInsert does not work > ------------------------- > > Key: ANN-666 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-666 > Project: Hibernate Annotations > Issue Type: Bug > Affects Versions: 3.2.1 > Environment: hibernate-3.2.3.ga.zip, MySQL client version: 5.0.22, MSSQL 2005 > Reporter: Alex > Attachments: SQLInsertTest.zip > > > http://forum.hibernate.org/viewtopic.php?p=2367176#2367176 > @Entity > @Table(name = "CONTACTS") > @SQLInsert(sql="INSERT INTO CONTACT(FIRST_NAME, LAST_NAME) VALUES(upper('aaa'),upper('bbb'))") > public class Contact { > // ... > } > > I've tried the both - sql-query and stored procedure inside the @SQLInsert. But the both not work for me. It looks like the @SQLInsert annotation is just ignored for some reason. Usual "insert into CONTACT (FIRST_NAME, LAST_NAME) values (?, ?)" statement is generated despite of the @SQLInsert annotation. At the same time other annotations (@NamedNativeQuery, @Loader) work ok for the class. > How to make it works, please? > Thanks a lot in advance. > Hibernate version: > hibernate-3.2.3.ga.zip > Mapping documents: > sessionFactory = new AnnotationConfiguration() > .addPackage("model") > .addAnnotatedClass(Contact.class) > .addAnnotatedClass(SpaceShip.class) > .setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLMyISAMDialect") > .setProperty("hibernate.connection.url", "jdbc:mysql://localhost/test") > .setProperty("hibernate.connection.driver_class", "com.mysql.jdbc.Driver") > .setProperty("hibernate.connection.username", "usname") > .setProperty("hibernate.connection.password", "1231123") > .setProperty(Environment.HBM2DDL_AUTO, "update") > .setProperty(Environment.SHOW_SQL, "true") > .setProperty("hibernate.cache.provider_class", "org.hibernate.cache.NoCacheProvider") > .buildSessionFactory(); > > Code between sessionFactory.openSession() and session.close(): > session = HibernateUtil.getSession(); > session.beginTransaction(); > session.saveOrUpdate(newContact); > session.getTransaction().commit(); > > Full stack trace of any exception that occurs: > None > Name and version of the database you are using: > MySQL client version: 5.0.22 > The generated SQL (show_sql=true): > Hibernate: insert into CONTACT (FIRST_NAME, LAST_NAME) values (?, ?) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:08:17 2009 From: noreply at atlassian.com (Enrico Schenk (JIRA)) Date: Thu, 20 Aug 2009 08:08:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3962) Ingres Hibernate dialect for EAP 4.3.0 GA CP04 In-Reply-To: <1478508776.1245094113747.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1897691466.6311250773697174.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33828#action_33828 ] Enrico Schenk commented on HHH-3962: ------------------------------------ Hi Gail, thank you for pointing me to HHH-3892. I'll rerun the tests and update the dialect if required. I'll provide the patch afterwards. Thanks, Enrico > Ingres Hibernate dialect for EAP 4.3.0 GA CP04 > ---------------------------------------------- > > Key: HHH-3962 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3962 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.2.4.sp1 > Environment: Hibernate Core 3.2.4.SP1 CP07, Ingres 9.2.0 > Reporter: Enrico Schenk > Assignee: strong liu > Priority: Minor > Fix For: 3.5 > > Attachments: IngresDialect.java, IngresDialect.java > > > This is the Ingres dialect that was used for the EAP 4.3.0 GA CP04 tests. It's based on the latest dialect from the trunk contains changes for the functions current_time, current_timestamp and current_date. The dialect also overrides the method getForUpdateString() to disable the use of "SELECT...FOR UPDATE" statements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:12:15 2009 From: noreply at atlassian.com (Peter Ladanyi (JIRA)) Date: Thu, 20 Aug 2009 08:12:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4102) Same applies to version 3.3.1 Message-ID: <456552826.6331250773935028.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Same applies to version 3.3.1 ----------------------------- Key: HHH-4102 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4102 Project: Hibernate Core Issue Type: Sub-task Components: core Affects Versions: 3.3.1 Reporter: Peter Ladanyi Priority: Critical Can u please validate my change ThreadLocalSessionContext.TransactionProtectionWrapper.invoke(line:328 ) Modified to if ( "beginTransaction".equals( method.getName() ) || "getTransaction".equals( method.getName() ) || "isTransactionInProgress".equals( method.getName() ) || "setFlushMode".equals( method.getName() ) || "createCriteria".equals( method.getName() ) || "createFilter".equals( method.getName() ) || "createQuery".equals( method.getName() ) || "get".equals( method.getName() ) || "load".equals( method.getName() ) || "refresh".equals( method.getName() ) || "update".equals( method.getName() ) || "getSessionFactory".equals( method.getName() ) ) { log.trace( "allowing method [" + method.getName() + "] in non-transacted context" ); } else if ( "reconnect".equals( method.getName() ) || "disconnect".equals( method.getName() ) ) { // allow these (deprecated) methods to pass through } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:28:16 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 20 Aug 2009 08:28:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-203) MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV In-Reply-To: <1573447967.17491249561907372.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <253023060.6391250774896063.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-203. ---------------------------------- Resolution: Fixed removed the test > MappingStreamHandlingTest#testMappingStreamGetsClosed and testMappingStreamGetsClosedInExceptionalCondition are wrong and a failure for HV > ------------------------------------------------------------------------------------------------------------------------------------------ > > Key: HV-203 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-203 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:35:19 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 20 Aug 2009 08:35:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-206) CustomConstraintValidatorTest#testNonInterpolatedMessageParameterIsUsed assumes English locale, needs fix before commented line reactivation In-Reply-To: <1644413807.17611249561992279.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1368279845.6421250775319646.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33831#action_33831 ] Hardy Ferentschik commented on HV-206: -------------------------------------- I don't think this is a problem in this case since a custom message gets interpolated which is defined in entity itself. It does not matter which locale for this particular case. That said, there might be other tests which still rely on a Locale. I tried to make sure that if we make assertions about messages that the templates are specified in the entities directly. > CustomConstraintValidatorTest#testNonInterpolatedMessageParameterIsUsed assumes English locale, needs fix before commented line reactivation > -------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-206 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-206 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:37:15 2009 From: noreply at atlassian.com (Charles Honton (JIRA)) Date: Thu, 20 Aug 2009 08:37:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1134) ReverseEngineeringStrategyUtil.simplePluralize does not properly pluralize key Message-ID: <862480743.6441250775435045.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ReverseEngineeringStrategyUtil.simplePluralize does not properly pluralize key ------------------------------------------------------------------------------ Key: HBX-1134 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1134 Project: Hibernate Tools Issue Type: Bug Components: reverse-engineer Affects Versions: 3.2.4 Beta1 Reporter: Charles Honton Priority: Trivial Attachments: pluralize.patch Words ending in [aeiou]y should be pluralized with single 's' instead of replacement with 'ies' -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:37:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 20 Aug 2009 08:37:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-206) CustomConstraintValidatorTest#testNonInterpolatedMessageParameterIsUsed assumes English locale, needs fix before commented line reactivation In-Reply-To: <1644413807.17611249561992279.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1506517006.6471250775435309.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-206. ---------------------------------- Resolution: Fixed Fix Version/s: 4.0.0.CR1 > CustomConstraintValidatorTest#testNonInterpolatedMessageParameterIsUsed assumes English locale, needs fix before commented line reactivation > -------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-206 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-206 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:47:15 2009 From: noreply at atlassian.com (Charles Honton (JIRA)) Date: Thu, 20 Aug 2009 08:47:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1135) org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.getExtends() should import package of superclass Message-ID: <586259700.6491250776035089.JavaMail.j2ee-opensource-projects@vps07.contegix.com> org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.getExtends() should import package of superclass ---------------------------------------------------------------------------------------------- Key: HBX-1135 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1135 Project: Hibernate Tools Issue Type: Bug Components: reverse-engineer Affects Versions: 3.2.4 Beta1 Reporter: Charles Honton Priority: Trivial Attachments: import_extends.patch getExtends should use importType so that extends clause in generated class has simple super classname instead of full class path. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 09:22:14 2009 From: noreply at atlassian.com (david sinclair (JIRA)) Date: Thu, 20 Aug 2009 08:22:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4072) ManyToMany with single table inheritance fails when multiple subclasses In-Reply-To: <1564395731.17851249581611956.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <690753010.6351250774535000.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33829#action_33829 ] david sinclair commented on HHH-4072: ------------------------------------- I am still digging in on this, but I believe my initial report is not entirely correct. It is the MappedSuperclass with the ManyToMany that is causing the problem, not the single table inheritance. > ManyToMany with single table inheritance fails when multiple subclasses > ----------------------------------------------------------------------- > > Key: HHH-4072 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4072 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Affects Versions: 3.3.2 > Environment: Windows XP, Java 1.6 > Reporter: david sinclair > Priority: Critical > > I have a base entity named BusinessSoftwareMatrixElement declare as such > @Entity > @Inheritance(strategy = InheritanceType.SINGLE_TABLE) > @DiscriminatorColumn(name = "software_type", discriminatorType = DiscriminatorType.STRING) > @DiscriminatorValue("Software") > @Audited > BusinessSoftwareMatrixElement ...{ } > I then have a subclass of BusinessSoftwareMatrixElement that is a mapped super class which defines a many to many relationship. > @MappedSuperclass > @Audited > public abstract class BusinessOSProcessServiceMatrixElement extends BusinessSoftwareMatrixElement { > > private Set applicableOperatingSystems = new HashSet(); > @ManyToMany(fetch = FetchType.LAZY, cascade = {CascadeType.REMOVE, CascadeType.REFRESH }, targetEntity = BusinessOSMatrixElement.class) > @JoinTable(name="matrix_elements_procserv_aos", > joinColumns=@JoinColumn(name="sw_guid"), > inverseJoinColumns = @JoinColumn(name="os_guid")) > public Set getApplicableOperatingSystems() { > return applicableOperatingSystems; > } > } > There are then to subclasses that add no new fields, only different discriminators > @Entity > @DiscriminatorValue("Database") > @Audited > public class BusinessDBMatrixElement extends BusinessOSProcessServiceMatrixElement { > @Entity > @DiscriminatorValue("Application") > @Audited > public class BusinessAppMatrixElement extends BusinessOSProcessServiceMatrixElement { > Running the ant task to create the DDL results in an exception being thrown for that many to many table. > Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD > at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226) > at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108) > ... 24 more > Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD > at org.hibernate.cfg.Mappings.addClass(Mappings.java:141) > at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:167) > at org.hibernate.cfg.Configuration.add(Configuration.java:716) > at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:531) > at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291) > at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1162) > at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:102) > at org.hibernate.envers.ant.AnnotationConfigurationTaskWithEnvers.doConfiguration(AnnotationConfigurationTaskWithEnvers.java:38) > at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55) > at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302) > at org.hibernate.tool.ant.Hbm2DDLExporterTask.createExporter(Hbm2DDLExporterTask.java:51) > at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39) > at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 10:15:18 2009 From: noreply at atlassian.com (Charles Honton (JIRA)) Date: Thu, 20 Aug 2009 09:15:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1136) Use unique generator names instead of "generator" Message-ID: <383103795.6511250777718584.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Use unique generator names instead of "generator" ------------------------------------------------- Key: HBX-1136 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1136 Project: Hibernate Tools Issue Type: Improvement Components: reverse-engineer Affects Versions: 3.2.4 Beta1 Reporter: Charles Honton Priority: Trivial Attachments: unique_generators.patch Update org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateAnnIdGenerator() to use the class name as a unique generator name. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 11:02:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 20 Aug 2009 10:02:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-204) ValidationRequirementTest#testFieldAccess / testPropertyAccess => should test with fname / lastname set to null and show failures to make the test complete In-Reply-To: <1341075750.17551249561907726.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1132382460.6541250780535301.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-204. ---------------------------------- Resolution: Fixed > ValidationRequirementTest#testFieldAccess / testPropertyAccess => should test with fname / lastname set to null and show failures to make the test complete > ----------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-204 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-204 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 11:47:21 2009 From: noreply at atlassian.com (Martin Taal (JIRA)) Date: Thu, 20 Aug 2009 10:47:21 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4078) EntityMetamodel#entityNameByInheritenceClassNameMap mapping from class or class names? In-Reply-To: <927586096.18911249933512946.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1662798795.6561250783241125.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33832#action_33832 ] Martin Taal commented on HHH-4078: ---------------------------------- I am encountering an issue with this and have the same question as the original reporter. gr. Martin > EntityMetamodel#entityNameByInheritenceClassNameMap mapping from class or class names? > -------------------------------------------------------------------------------------- > > Key: HHH-4078 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4078 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.5.0.Beta-1 > Reporter: Tsering Shrestha > > In the constructor of EntityMetaModel (http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java revision 15258) > Line 314: > if ( persistentClass.hasPojoRepresentation() ) { > entityNameByInheritenceClassNameMap.put( persistentClass.getMappedClass(), persistentClass.getEntityName() ); > However at Line 578: > public String findEntityNameByEntityClass(Class inheritenceClass) { > return ( String ) entityNameByInheritenceClassNameMap.get( inheritenceClass.getName() ); > } > Why are we using java.lang.Class as the keys when we put new entries to the map but try to read with java.lang.String keys? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 13:24:15 2009 From: noreply at atlassian.com (david sinclair (JIRA)) Date: Thu, 20 Aug 2009 12:24:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4072) ManyToMany with single table inheritance fails when multiple subclasses In-Reply-To: <1564395731.17851249581611956.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <507249713.6581250789055261.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33833#action_33833 ] david sinclair commented on HHH-4072: ------------------------------------- Adam, sorry this was a false alarm. It has to do with the fact that the MappedSuperclass's ManyToMany specifies a name for the JoinTable. Envers is correctly trying to create tables for each subclass but since it is the same name for each subclass, it trys to create dups. Removing the name from the join table makes hibernate creates separate join tables for each subclass and envers creates one for each. This can be marked as invalid. Sorry again. dave > ManyToMany with single table inheritance fails when multiple subclasses > ----------------------------------------------------------------------- > > Key: HHH-4072 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4072 > Project: Hibernate Core > Issue Type: Bug > Components: envers > Affects Versions: 3.3.2 > Environment: Windows XP, Java 1.6 > Reporter: david sinclair > Priority: Critical > > I have a base entity named BusinessSoftwareMatrixElement declare as such > @Entity > @Inheritance(strategy = InheritanceType.SINGLE_TABLE) > @DiscriminatorColumn(name = "software_type", discriminatorType = DiscriminatorType.STRING) > @DiscriminatorValue("Software") > @Audited > BusinessSoftwareMatrixElement ...{ } > I then have a subclass of BusinessSoftwareMatrixElement that is a mapped super class which defines a many to many relationship. > @MappedSuperclass > @Audited > public abstract class BusinessOSProcessServiceMatrixElement extends BusinessSoftwareMatrixElement { > > private Set applicableOperatingSystems = new HashSet(); > @ManyToMany(fetch = FetchType.LAZY, cascade = {CascadeType.REMOVE, CascadeType.REFRESH }, targetEntity = BusinessOSMatrixElement.class) > @JoinTable(name="matrix_elements_procserv_aos", > joinColumns=@JoinColumn(name="sw_guid"), > inverseJoinColumns = @JoinColumn(name="os_guid")) > public Set getApplicableOperatingSystems() { > return applicableOperatingSystems; > } > } > There are then to subclasses that add no new fields, only different discriminators > @Entity > @DiscriminatorValue("Database") > @Audited > public class BusinessDBMatrixElement extends BusinessOSProcessServiceMatrixElement { > @Entity > @DiscriminatorValue("Application") > @Audited > public class BusinessAppMatrixElement extends BusinessOSProcessServiceMatrixElement { > Running the ant task to create the DDL results in an exception being thrown for that many to many table. > Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD > at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226) > at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108) > ... 24 more > Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD > at org.hibernate.cfg.Mappings.addClass(Mappings.java:141) > at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:167) > at org.hibernate.cfg.Configuration.add(Configuration.java:716) > at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:531) > at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291) > at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1162) > at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:102) > at org.hibernate.envers.ant.AnnotationConfigurationTaskWithEnvers.doConfiguration(AnnotationConfigurationTaskWithEnvers.java:38) > at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55) > at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302) > at org.hibernate.tool.ant.Hbm2DDLExporterTask.createExporter(Hbm2DDLExporterTask.java:51) > at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39) > at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 15:40:15 2009 From: noreply at atlassian.com (Bernardo Orilio Bennett (JIRA)) Date: Thu, 20 Aug 2009 14:40:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4087) Session.flush() Causes AssertionFailure In-Reply-To: <528661783.20331250272752539.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <113401470.6621250797215767.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33834#action_33834 ] Bernardo Orilio Bennett commented on HHH-4087: ---------------------------------------------- It seems related to the fact that Hibernate is issuing a select to retrieve the generated properties of the component before persisting the list. EntityMetamodel.hasInsertGeneratedValues() returns true in 3.2.4, but in 3.1.3 it returns false and because of that 3.1.3 does not perform the select and you must explicitly call refresh(). Maybe it could cascade first and then get the generated values after? > Session.flush() Causes AssertionFailure > ---------------------------------------- > > Key: HHH-4087 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.4.sp1 > Reporter: Brian > > After calling Session.save() with an entity, calling Session.flush() causes the following error. > org.hibernate.AssertionFailure: collection [com.example.myList] was not processed by flush() > at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) > at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) > at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28) > at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) > The mapping used was: > > > > > > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 20 15:46:17 2009 From: noreply at atlassian.com (Bernardo Orilio Bennett (JIRA)) Date: Thu, 20 Aug 2009 14:46:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4087) Session.flush() Causes AssertionFailure In-Reply-To: <528661783.20331250272752539.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <936129766.6671250797577216.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33835#action_33835 ] Bernardo Orilio Bennett commented on HHH-4087: ---------------------------------------------- If I set foundInsertGeneratedValue to false (with a debugger) in the EntityMetamodel's constructor before hasInsertGeneratedValues is set then the error no longer happens. > Session.flush() Causes AssertionFailure > ---------------------------------------- > > Key: HHH-4087 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4087 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.4.sp1 > Reporter: Brian > > After calling Session.save() with an entity, calling Session.flush() causes the following error. > org.hibernate.AssertionFailure: collection [com.example.myList] was not processed by flush() > at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) > at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) > at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28) > at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) > The mapping used was: > > > > > > > > > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 03:10:17 2009 From: noreply at atlassian.com (Adam Warski (JIRA)) Date: Fri, 21 Aug 2009 02:10:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-4100) Problems with Envers docbook sources In-Reply-To: <353350083.5571250705655053.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1372803263.6711250838617547.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Warski resolved HHH-4100. ------------------------------ Resolution: Fixed > Problems with Envers docbook sources > ------------------------------------ > > Key: HHH-4100 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4100 > Project: Hibernate Core > Issue Type: Bug > Components: documentation, envers > Affects Versions: 3.5.0.Beta-1 > Reporter: Steve Ebersole > Assignee: Adam Warski > Fix For: 3.5 > > > Getting errors building envers docs after fixing HHH-4099 which basically set standardized docbook versions, stylings and formats across all the separate docs. > There appears to be a mismatch between the number of columns declared to be included in a table and the number of columns actually used in a given row somewhere. This is a strictness thing that changed in newer versions of FOP. I had to fix the many occurrences of this in the hibernate docs as well. > In the meantime I disabled the envers doc module for this beta. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 04:19:22 2009 From: noreply at atlassian.com (Galder Zamarreno (JIRA)) Date: Fri, 21 Aug 2009 03:19:22 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4103) Implement an Infinispan 2nd level cache provider Message-ID: <2039922986.6731250842762357.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Implement an Infinispan 2nd level cache provider ------------------------------------------------ Key: HHH-4103 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4103 Project: Hibernate Core Issue Type: New Feature Components: caching (L2) Reporter: Galder Zamarreno Assignee: Galder Zamarreno Fix For: 3.5 Implement an Infinispan 2nd level cache provider -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 04:19:22 2009 From: noreply at atlassian.com (Galder Zamarreno (JIRA)) Date: Fri, 21 Aug 2009 03:19:22 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4103) Implement an Infinispan 2nd level cache provider In-Reply-To: <2039922986.6731250842762357.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1204401335.6751250842762543.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33836#action_33836 ] Galder Zamarreno commented on HHH-4103: --------------------------------------- Linked to: https://jira.jboss.org/jira/browse/ISPN-6 > Implement an Infinispan 2nd level cache provider > ------------------------------------------------ > > Key: HHH-4103 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4103 > Project: Hibernate Core > Issue Type: New Feature > Components: caching (L2) > Reporter: Galder Zamarreno > Assignee: Galder Zamarreno > Fix For: 3.5 > > > Implement an Infinispan 2nd level cache provider -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 04:58:15 2009 From: noreply at atlassian.com (Galder Zamarreno (JIRA)) Date: Fri, 21 Aug 2009 03:58:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-3955) Infinispan cache support In-Reply-To: <426138409.1244774534092.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1655942473.6781250845095312.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Galder Zamarreno reassigned HHH-3955: ------------------------------------- Assignee: Galder Zamarreno (was: Chris Bredesen) > Infinispan cache support > ------------------------ > > Key: HHH-3955 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3955 > Project: Hibernate Core > Issue Type: New Feature > Components: caching (L2) > Affects Versions: 3.3.1 > Reporter: Chris Bredesen > Assignee: Galder Zamarreno > Fix For: 3.3.x > > > Provide a RegionFactory and related implementations that support JBoss Infinispan data grid. This request is tracked on the Infinispan JIRA here: > https://jira.jboss.org/jira/browse/ISPN-6 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:00:16 2009 From: noreply at atlassian.com (Galder Zamarreno (JIRA)) Date: Fri, 21 Aug 2009 04:00:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4103) Implement an Infinispan 2nd level cache provider In-Reply-To: <2039922986.6731250842762357.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <351032294.6801250845216280.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33837#action_33837 ] Galder Zamarreno commented on HHH-4103: --------------------------------------- I've just found HHH-3955 but I had already added commits to trunk with HHH-4103 id, so marking 3955 as duplicate. > Implement an Infinispan 2nd level cache provider > ------------------------------------------------ > > Key: HHH-4103 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4103 > Project: Hibernate Core > Issue Type: New Feature > Components: caching (L2) > Reporter: Galder Zamarreno > Assignee: Galder Zamarreno > Fix For: 3.5 > > > Implement an Infinispan 2nd level cache provider -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:00:17 2009 From: noreply at atlassian.com (Galder Zamarreno (JIRA)) Date: Fri, 21 Aug 2009 04:00:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3955) Infinispan cache support In-Reply-To: <426138409.1244774534092.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1307241219.6831250845217055.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Galder Zamarreno resolved HHH-3955. ----------------------------------- Resolution: Duplicate Fix Version/s: (was: 3.3.x) 3.5 > Infinispan cache support > ------------------------ > > Key: HHH-3955 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3955 > Project: Hibernate Core > Issue Type: New Feature > Components: caching (L2) > Affects Versions: 3.3.1 > Reporter: Chris Bredesen > Assignee: Galder Zamarreno > Fix For: 3.5 > > > Provide a RegionFactory and related implementations that support JBoss Infinispan data grid. This request is tracked on the Infinispan JIRA here: > https://jira.jboss.org/jira/browse/ISPN-6 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:00:17 2009 From: noreply at atlassian.com (Galder Zamarreno (JIRA)) Date: Fri, 21 Aug 2009 04:00:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3955) Infinispan cache support In-Reply-To: <426138409.1244774534092.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1007433953.6861250845217356.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33838#action_33838 ] Galder Zamarreno commented on HHH-3955: --------------------------------------- Duplicate of HHH-4103 > Infinispan cache support > ------------------------ > > Key: HHH-3955 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3955 > Project: Hibernate Core > Issue Type: New Feature > Components: caching (L2) > Affects Versions: 3.3.1 > Reporter: Chris Bredesen > Assignee: Galder Zamarreno > Fix For: 3.5 > > > Provide a RegionFactory and related implementations that support JBoss Infinispan data grid. This request is tracked on the Infinispan JIRA here: > https://jira.jboss.org/jira/browse/ISPN-6 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:00:17 2009 From: noreply at atlassian.com (christophe blin (JIRA)) Date: Fri, 21 Aug 2009 04:00:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4104) SqlQuery : problems with constants under Oracle Message-ID: <1885375746.6881250845217500.JavaMail.j2ee-opensource-projects@vps07.contegix.com> SqlQuery : problems with constants under Oracle ----------------------------------------------- Key: HHH-4104 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4104 Project: Hibernate Core Issue Type: Bug Components: query-sql Affects Versions: 3.2.6 Environment: At least Hibernate 3.2.6 and Oracle10g Reporter: christophe blin A "test case " is better than a long description : List l = getSessionFactory().getCurrentSession().createSQLQuery("select 'abc' from dual").list(); System.out.println(l.get(0)); //expected 'abc' but is 'a' under Oracle l = getJdbcTemplate().queryForList("select 'abc' from dual"); System.out.println(l.get(0));//to prove this really is an hibernate issue and not something else Under Oracle 10g : a {'ABC'=abc} Under mySQL 5.0.5 : abc {abc=abc} So we can see that in both case, direct JDBC correctly returns 'abc' whereas using SqlQuery gives a bad result under oracle -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:25:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Fri, 21 Aug 2009 04:25:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-140) Review all unchecked warnings In-Reply-To: <657169002.1239702198412.JavaMail.j2ee_opensource.atlassian.com-projects@atlassian12.managed.contegix.com> Message-ID: <27086600.6961250846715182.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-140. ---------------------------------- Resolution: Fixed Fix Version/s: (was: 4.0.0.GA) 4.0.0.CR1 > Review all unchecked warnings > ----------------------------- > > Key: HV-140 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-140 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Affects Versions: 4.0.0.Alpha3 > Reporter: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Review all unchecked warning and eliminate them were possible. For the ones we need add a short comment why they are safe. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:25:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Fri, 21 Aug 2009 04:25:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-188) Cleanup ElementDescriptorImpl after we depend on bv api post CR3 In-Reply-To: <713911808.9261248179774187.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <971346983.6981250846715544.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-188: --------------------------------- Assignee: Hardy Ferentschik Fix Version/s: (was: 4.0.0.GA) 4.0.0.CR1 > Cleanup ElementDescriptorImpl after we depend on bv api post CR3 > ---------------------------------------------------------------- > > Key: HV-188 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-188 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Check TODO in ElementDescriptorImpl -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:39:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Fri, 21 Aug 2009 04:39:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-188) Cleanup ElementDescriptorImpl after we depend on bv api post CR3 In-Reply-To: <713911808.9261248179774187.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1344109815.7021250847555069.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-188. ---------------------------------- Resolution: Fixed > Cleanup ElementDescriptorImpl after we depend on bv api post CR3 > ---------------------------------------------------------------- > > Key: HV-188 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-188 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Check TODO in ElementDescriptorImpl -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:39:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Fri, 21 Aug 2009 04:39:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-145) Switch some of the more complex constructors to more descriptive factory methods In-Reply-To: <583162104.1240341737474.JavaMail.j2ee_opensource.atlassian.com-projects@atlassian12.managed.contegix.com> Message-ID: <186015831.7041250847555186.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-145: --------------------------------- Fix Version/s: (was: 4.0.0.GA) > Switch some of the more complex constructors to more descriptive factory methods > -------------------------------------------------------------------------------- > > Key: HV-145 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-145 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:23:19 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Fri, 21 Aug 2009 04:23:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-208) Wrong Path in ConstrinViolations In-Reply-To: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <816885672.6941250846599840.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-208. ---------------------------------- Resolution: Fixed > Wrong Path in ConstrinViolations > -------------------------------- > > Key: HV-208 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Environment: beta 3 snapshot from aug 11 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > In Path we always have leading dot for every validate field. > class A > { > @NotNull > String b; > } > causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 05:23:19 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Fri, 21 Aug 2009 04:23:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-208) Wrong Path in ConstrinViolations In-Reply-To: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1996628069.6911250846599621.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33839#action_33839 ] Hardy Ferentschik commented on HV-208: -------------------------------------- You were right. The problem is fixed now. CR1 will be released shortly. > Wrong Path in ConstrinViolations > -------------------------------- > > Key: HV-208 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Environment: beta 3 snapshot from aug 11 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > In Path we always have leading dot for every validate field. > class A > { > @NotNull > String b; > } > causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 10:06:17 2009 From: noreply at atlassian.com (Charles Honton (JIRA)) Date: Fri, 21 Aug 2009 09:06:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1137) OneToOne is assigned improper table for FOREIGN_KEY_FROM_PARENT constraints Message-ID: <1626615418.7101250863577666.JavaMail.j2ee-opensource-projects@vps07.contegix.com> OneToOne is assigned improper table for FOREIGN_KEY_FROM_PARENT constraints --------------------------------------------------------------------------- Key: HBX-1137 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1137 Project: Hibernate Tools Issue Type: Bug Components: reverse-engineer Affects Versions: 3.2.4 Beta1 Reporter: Charles Honton Priority: Minor Attachments: proper_1-1_table.patch org.hibernate.cfg.JDBCBinder.bindOneToOne() creates OneToOne with improper containing table when called with the target table of foreignKey.getReferencedTable(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 10:16:15 2009 From: noreply at atlassian.com (Charles Honton (JIRA)) Date: Fri, 21 Aug 2009 09:16:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1138) EntityPOJOClass.getInverseProperty() provides the inverse property for all different relationship types Message-ID: <1412539281.7121250864175052.JavaMail.j2ee-opensource-projects@vps07.contegix.com> EntityPOJOClass.getInverseProperty() provides the inverse property for all different relationship types ------------------------------------------------------------------------------------------------------- Key: HBX-1138 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1138 Project: Hibernate Tools Issue Type: New Feature Components: reverse-engineer Affects Versions: 3.2.4 Beta1 Reporter: Charles Honton Priority: Minor Attachments: inverse_property.patch Provide a method which the pojo templates can use to obtain the inverse property for any relationship. The attached patch also improves current inverse finding methods by matching the table of the columns as well as the column name. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 10:31:15 2009 From: noreply at atlassian.com (Charles Honton (JIRA)) Date: Fri, 21 Aug 2009 09:31:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HBX-1139) Create joined subclass for constrained 1:1 foreign key Message-ID: <161437955.7141250865075263.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Create joined subclass for constrained 1:1 foreign key ------------------------------------------------------ Key: HBX-1139 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1139 Project: Hibernate Tools Issue Type: New Feature Components: reverse-engineer Affects Versions: 3.2.4 Beta1 Reporter: Charles Honton Attachments: join_subclass.patch Create a joined subclass for a 1:1 foreign key constrained by primary key on each side of relationship. Retain generation of 1:1 if foreign key has non-primary key on one or both sides of relationship -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 14:29:15 2009 From: noreply at atlassian.com (Sam Doyle (JIRA)) Date: Fri, 21 Aug 2009 13:29:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-395) Master/Slave configuration as outlined in Hibernate Search in Action does not work when shared location is on NFS Message-ID: <1819426831.7171250879355882.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Master/Slave configuration as outlined in Hibernate Search in Action does not work when shared location is on NFS ----------------------------------------------------------------------------------------------------------------- Key: HSEARCH-395 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-395 Project: Hibernate Search Issue Type: Bug Components: directory provider Affects Versions: 3.1.1.GA Reporter: Sam Doyle Priority: Critical https://forum.hibernate.org/viewtopic.php?f=9&t=998613&p=2416681#p2416681 There are many .nfs files being generated in slave locations and appear to be still held open by some part of the application since they fail to be cleaned up. 2009-08-21 10:51:08,696 ERROR [org.hibernate.search.util.FileHelper] Could not delete /location/to/slave/index/2/.nfs000000000085a3ce000016 7e -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 14:40:15 2009 From: noreply at atlassian.com (Sam Doyle (JIRA)) Date: Fri, 21 Aug 2009 13:40:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1803) Allow fetching with criteria when scrolling Message-ID: <1529196304.7241250880015298.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33840#action_33840 ] Sam Doyle commented on HHH-1803: -------------------------------- I have confirmed the bug on 3.3.2.GA but unfortunately the patch did not work in my case. Originally I had thought this was a problem with Hibernate Search and as the previous commenter stated this has a serious impact to Hibernate Search indexing performance. > Allow fetching with criteria when scrolling > ------------------------------------------- > > Key: HHH-1803 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803 > Project: Hibernate Core > Issue Type: Improvement > Components: query-criteria > Affects Versions: 3.2.0.cr2 > Reporter: Maarten Winkels > Attachments: Child.java, criteria-scroll-fetch-collection.patch, CriteriaScrollFetchTest.java, Parent.java, ParentChild.hbm.xml > > > When querying by criteria, fetching is allowed, but when scrolling a criteria, the fetching corrupts the result. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 19:06:15 2009 From: noreply at atlassian.com (Paul Benedict (JIRA)) Date: Fri, 21 Aug 2009 18:06:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4105) SessionFactory mispells method to obtain fetch profile definition Message-ID: <1424897411.7271250895975165.JavaMail.j2ee-opensource-projects@vps07.contegix.com> SessionFactory mispells method to obtain fetch profile definition ----------------------------------------------------------------- Key: HHH-4105 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4105 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.5.0.Beta-1 Reporter: Paul Benedict Line 255: containsFetchProfileDefition Definition is mispelled. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 20:26:15 2009 From: noreply at atlassian.com (Anders Wallgren (JIRA)) Date: Fri, 21 Aug 2009 19:26:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4106) SQLStateConverter treats SQLServer snapshot isolation exception as a SQLGrammarException Message-ID: <1560813465.7291250900775101.JavaMail.j2ee-opensource-projects@vps07.contegix.com> SQLStateConverter treats SQLServer snapshot isolation exception as a SQLGrammarException ---------------------------------------------------------------------------------------- Key: HHH-4106 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4106 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.2 Environment: SQL Server 2008, SQL Server 2005, jtds 1.2.2 JDBC driver Reporter: Anders Wallgren A SQLException thrown due to a snapshot isolation conflict gets treated as a SQLGrammarException The SQLState is S0005 and the vendorCode is 3960. The error message is: Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.XXX' directly or indirectly in database 'XYZ' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement. This should be turned into an optimistic locking exception, or something like that. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 21 20:28:14 2009 From: noreply at atlassian.com (Anders Wallgren (JIRA)) Date: Fri, 21 Aug 2009 19:28:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4106) SQLStateConverter treats SQLServer snapshot isolation exception as a SQLGrammarException In-Reply-To: <1560813465.7291250900775101.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1357000840.7311250900894995.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anders Wallgren updated HHH-4106: --------------------------------- Attachment: screenshot-1.jpg > SQLStateConverter treats SQLServer snapshot isolation exception as a SQLGrammarException > ---------------------------------------------------------------------------------------- > > Key: HHH-4106 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4106 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: SQL Server 2008, SQL Server 2005, jtds 1.2.2 JDBC driver > Reporter: Anders Wallgren > Attachments: screenshot-1.jpg > > > A SQLException thrown due to a snapshot isolation conflict gets treated as a SQLGrammarException > The SQLState is S0005 and the vendorCode is 3960. The error message is: Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.XXX' directly or indirectly in database 'XYZ' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement. > This should be turned into an optimistic locking exception, or something like that. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 22 04:41:15 2009 From: noreply at atlassian.com (Juergen Zimmermann (JIRA)) Date: Sat, 22 Aug 2009 03:41:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (EJB-462) 3.5.beta1: Wrong query generation for @EmbeddedId and @MappedById Message-ID: <1925886244.7361250930475975.JavaMail.j2ee-opensource-projects@vps07.contegix.com> 3.5.beta1: Wrong query generation for @EmbeddedId and @MappedById ----------------------------------------------------------------- Key: EJB-462 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-462 Project: Hibernate Entity Manager Issue Type: Bug Affects Versions: 3.5 Environment: Hibernate 3.5.beta1 Reporter: Juergen Zimmermann I'm having this entity class: @Entity @Table(name="reklamation") @NamedQueries({ @NamedQuery(name = "findReklamationenByKundeId", query = "SELECT r FROM Reklamation r WHERE r.bestellung.kunde.id = :kundeId ORDER BY r.bestellung.id") }) public class Reklamation implements Serializable { @EmbeddedId @AttributeOverride(name="bestellungId", column=@Column(name="bestellung_fk")) private ReklamationId id = new ReklamationId(); @MappedById("bestellungId") @ManyToOne private Bestellung bestellung; ... @Embeddable public static class ReklamationId implements Serializable { public Long bestellungId; public Date datum; } } The owner class: @Entity @Table(name="bestellung") @NamedQueries({...}) public class Bestellung implements java.io.Serializable { @Id @GeneratedValue(strategy=AUTO, generator="bestellung_sequence_name") @SequenceGenerator(name="bestellung_sequence_name", sequenceName="bestellung_b_id_seq", allocationSize=1) @Column(name="b_id", unique=true, nullable=false, precision=20) private Long id = null; ... } The table definitions in PostgreSQL: CREATE TABLE reklamation( bestellung_fk BIGINT NOT NULL, datum DATE NOT NULL, ... PRIMARY KEY(bestellung_fk, datum), FOREIGN KEY (bestellung_fk) REFERENCES bestellung(b_id) ); CREATE TABLE bestellung( b_id BIGSERIAL NOT NULL PRIMARY KEY, kunde_fk BIGINT NOT NULL, ... FOREIGN KEY (kunde_fk) REFERENCES kunde(k_id) ); The wrong generation of SQL regarding @EmbeddedId and @MappedById: 2009-08-22 09:04:06,469 DEBUG org.hibernate.SQL - /* named HQL query findReklamationenByKundeId */ select reklamatio0_.bestellung_fk as bestellung1_34_, reklamatio0_.datum as datum34_, reklamatio0_.bestellung_b_id as bestellung4_34_, reklamatio0_.inhalt as inhalt34_ from reklamation reklamatio0_, bestellung bestellung1_ where reklamatio0_.bestellung_b_id=bestellung1_.b_id and bestellung1_.kunde_fk=? order by reklamatio0_.bestellung_b_id -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 23 20:14:15 2009 From: noreply at atlassian.com (Jeff Adama (JIRA)) Date: Sun, 23 Aug 2009 19:14:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1000) Problem with PostgreSQL using uppercase letters in tables In-Reply-To: <174563216.1192787319874.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <347489074.7471251072855268.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33841#action_33841 ] Jeff Adama commented on HBX-1000: --------------------------------- This is still a problem. My version info is: Microsoft Windows Server 2003 Native Japanese Postgresql 8.4. Jboss Application Server 5.1.0.GA Jboss Seam 2.1.2.GA postgresql-8.4-701.jdbc4.jar Eclipse 3.4.2 Fixing this issue would allow for database table and column naming that would be consistent with IBM and Sun Microsystem's naming convensions. Please prioritize this bug. Thank you. IBM Naming Standards: http://www.ibm.com/developerworks/library/ws-tip-namingconv.html Sun's Naming Standards: http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html#367 > Problem with PostgreSQL using uppercase letters in tables > --------------------------------------------------------- > > Key: HBX-1000 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1000 > Project: Hibernate Tools > Issue Type: Bug > Components: reverse-engineer > Affects Versions: 3.2.beta11 > Environment: Hibernate 3.2.5.ga, Hibernate Tools 3.2.0 beta9a, PostgreSql 8.2, postgresql-8.2-506.jdbc3.jar, Eclipse 3.3.0, all running on Windows XP at the moment (including PostgreSql) > Reporter: Ruediger Engelberger > > I have problems using Hibernate tools when using upper case letters in a PostgreSQL database. > I can configure Hibernate Tools for my local PostgreSql installation without any problems. I can access the table structure in the view Hibernate Configurations and do reverse engineering by creating XML mappings and beans. No problem. > But when I'm using upper case characters in table names Hibernate Tools can't access the table structures any more. Hibernate Configuration shows the tables, but when I want to see the columns, it doesn't show anything. Reverse engineering also doesn't work any more. > So, the following works: > TABLE cms_clusterMessage > pk_clustermessageid > fk_clusternodeid > messagetype > messagedetail > The following doesn't work: > TABLE cms_clusterMessage > PK_ClusterMessageId > FK_ClusterNodeId > MessageType > MessageDetail > I tried to use different JDBC drivers because I thought it could be a bug of the driver. But it wasn't. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sun Aug 23 20:56:15 2009 From: noreply at atlassian.com (Jeff Adama (JIRA)) Date: Sun, 23 Aug 2009 19:56:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1000) Problem with PostgreSQL using uppercase letters in tables In-Reply-To: <174563216.1192787319874.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1122250578.7521251075375184.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33842#action_33842 ] Jeff Adama commented on HBX-1000: --------------------------------- I finally found a work-around for using upper case and mixed case column names in postgreSQL with hibernate and Jboss Seam. The post in which I discovered this is at the following link: https://forum.hibernate.org/viewtopic.php?f=1&t=935715&p=2416841#p2416841 The backticks information in hibernate reference is here in section 5.4. SQL quoted identifiers: http://docs.jboss.org/hibernate/stable/core/reference/en/html/mapping.html The following is an example of using the work-around and my suggestion: I have a very large PostgreSQL database that I will be using with JBoss Seam. The database uses mixed-case column names per naming convensions at Sun Microsystems and IBM. Until finding this post, I was very surprised by the potential need to have to change all column names in the PostgreSQL database to lowercase in order for hibernate and PostgreSQL to successfully interact. Per this post, the backtick marks (`) solved the problem. However, I would strongly suggest that either modifying Hibernate to allow for interacting with uppercase (and mixed case) in PostgreSQL without the backtick marks) and/or making it very clear in appropriate sections of hibernate, seam and postgresql documentation that backticks are required for upper case and mixed case column names. The workaround solution to this issue was as follows: In the entity I added an @Column(name="`mixedCaseColumnName`"). For example: @Entity @Name("cat") @Table(name="cats") public class Cat implements Serializable { private Integer id; private String name; private String distinguishingFeatures; public Cat() {} public Cat(Integer id, String name, String distinguishingFeatures) { this.id = id; this.name = name; this.distinguishingFeatures = distinguishingFeatures; } (The definition statements for the id and name variables) @Column(name="`distinguishingFeatures`") public String getDistinguishingFeatures() { return distinguishingFeatures; } public void setDistinguishingFeatures(String distinguishingFeatures) { this.distinguishingFeatures = distinguishingFeatures; } @Override public String toString() { return "Cat(" + id + "," + name + "," + distinguishingFeatures + ")"; } > Problem with PostgreSQL using uppercase letters in tables > --------------------------------------------------------- > > Key: HBX-1000 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1000 > Project: Hibernate Tools > Issue Type: Bug > Components: reverse-engineer > Affects Versions: 3.2.beta11 > Environment: Hibernate 3.2.5.ga, Hibernate Tools 3.2.0 beta9a, PostgreSql 8.2, postgresql-8.2-506.jdbc3.jar, Eclipse 3.3.0, all running on Windows XP at the moment (including PostgreSql) > Reporter: Ruediger Engelberger > > I have problems using Hibernate tools when using upper case letters in a PostgreSQL database. > I can configure Hibernate Tools for my local PostgreSql installation without any problems. I can access the table structure in the view Hibernate Configurations and do reverse engineering by creating XML mappings and beans. No problem. > But when I'm using upper case characters in table names Hibernate Tools can't access the table structures any more. Hibernate Configuration shows the tables, but when I want to see the columns, it doesn't show anything. Reverse engineering also doesn't work any more. > So, the following works: > TABLE cms_clusterMessage > pk_clustermessageid > fk_clusternodeid > messagetype > messagedetail > The following doesn't work: > TABLE cms_clusterMessage > PK_ClusterMessageId > FK_ClusterNodeId > MessageType > MessageDetail > I tried to use different JDBC drivers because I thought it could be a bug of the driver. But it wasn't. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 07:53:16 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 24 Aug 2009 06:53:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-209) Correctly handle configured in xml Message-ID: <1156810662.7581251114796651.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Correctly handle configured in xml ------------------------------------------ Key: HV-209 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-209 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta3 Reporter: Hardy Ferentschik Assignee: Hardy Ferentschik Fix For: 4.0.0.CR1 We have to make sure that: - nodes gets properly picked up and applied - @Valid gets ignored when the field/getter in xml has ignore-annotations set to true -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 07:55:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 24 Aug 2009 06:55:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-209) Correctly handle configured in xml In-Reply-To: <1156810662.7581251114796651.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <889131823.7601251114915081.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-209. ---------------------------------- Resolution: Fixed > Correctly handle configured in xml > ------------------------------------------ > > Key: HV-209 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-209 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > We have to make sure that: > - nodes gets properly picked up and applied > - @Valid gets ignored when the field/getter in xml has ignore-annotations set to true -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 08:00:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 24 Aug 2009 07:00:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-176) Return the list of matching ConstraintDescriptor for a given set of groups In-Reply-To: <795081719.1245691533578.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1244008678.7631251115215286.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-176: --------------------------------- Assignee: Hardy Ferentschik Fix Version/s: (was: 4.0.0.GA) 4.0.0.CR1 > Return the list of matching ConstraintDescriptor for a given set of groups > -------------------------------------------------------------------------- > > Key: HV-176 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-176 > Project: Hibernate Validator > Issue Type: New Feature > Components: engine > Affects Versions: 4.0.0.Beta1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 08:02:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 24 Aug 2009 07:02:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-176) Return the list of matching ConstraintDescriptor for a given set of groups In-Reply-To: <795081719.1245691533578.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <558588055.7661251115335161.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-176. ---------------------------------- Resolution: Fixed > Return the list of matching ConstraintDescriptor for a given set of groups > -------------------------------------------------------------------------- > > Key: HV-176 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-176 > Project: Hibernate Validator > Issue Type: New Feature > Components: engine > Affects Versions: 4.0.0.Beta1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 08:37:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 24 Aug 2009 07:37:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-210) XML constraint declaration with missing mandatory elements throws IllegalArgumentException insteadof ValidationException Message-ID: <1564001237.7681251117435067.JavaMail.j2ee-opensource-projects@vps07.contegix.com> XML constraint declaration with missing mandatory elements throws IllegalArgumentException insteadof ValidationException -------------------------------------------------------------------------------------------------------------------------- Key: HV-210 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-210 Project: Hibernate Validator Issue Type: Bug Affects Versions: 4.0.0.Beta3 Reporter: Hardy Ferentschik Assignee: Hardy Ferentschik Fix For: 4.0.0.CR1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 08:44:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 24 Aug 2009 07:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-210) XML constraint declaration with missing mandatory elements throws IllegalArgumentException insteadof ValidationException In-Reply-To: <1564001237.7681251117435067.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1568535928.7701251117855162.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-210. ---------------------------------- Resolution: Fixed > XML constraint declaration with missing mandatory elements throws IllegalArgumentException insteadof ValidationException > -------------------------------------------------------------------------------------------------------------------------- > > Key: HV-210 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-210 > Project: Hibernate Validator > Issue Type: Bug > Affects Versions: 4.0.0.Beta3 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 10:52:15 2009 From: noreply at atlassian.com (Michael Wyraz (JIRA)) Date: Mon, 24 Aug 2009 09:52:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4095) bug in org.hibernate.Hibernate.createBlob( InputStream in ) In-Reply-To: <1715095976.5041250663355310.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1228353063.7741251125535152.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33843#action_33843 ] Michael Wyraz commented on HHH-4095: ------------------------------------ Please increase the priority of this bug because it really break things and causes loss of data! > bug in org.hibernate.Hibernate.createBlob( InputStream in ) > ----------------------------------------------------------- > > Key: HHH-4095 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: (doesn't matter because ii's just a plain wrong usage of the InputStream.available-mehtode but anyway:) Hibernate. 3.3.2, Hsqldb1.8 > Reporter: Stephan Schr?der > Priority: Minor > Original Estimate: 30 minutes > Remaining Estimate: 30 minutes > > The implementation of org.hibernate.Hibernate.createBlob( InputStream in ) looks like this > public static Blob createBlob(InputStream stream) throws IOException { > return new SerializableBlob( new BlobImpl( stream, stream.available() ) ); > } > The second parameter here is supposed to be the length of the inputstream. The problem is that stream.available() doesn't return the length of the inputstream. That's explicitly noted in the Java-API (http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#available): > "Note that while some implementations of InputStream will return the total number of bytes in the stream (on calling available() ), many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream." > This is the source of my problem, only the first available bytes are read out of the inputstream. While the workaround for me is to simply call org.hibernate.Hibernate.createBlob( InputStream in,int length ), the misuse of stream.available() in Hibernate.createBlob( InputStream in ) remains to be resolved. > Solution: the only way to get the length of an InputStream ist to read it completly, if you don't want to do that Hibernate.createBlob( InputStream i ) should be removed. > (By the way, why is length of type int? java.io.File.length() and java.sql.Blob.length() are of type long, so length should be of type long as well). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 12:23:15 2009 From: noreply at atlassian.com (=?UTF-8?Q?Stephan_Schr=C3=B6der_=28JIRA=29?=) Date: Mon, 24 Aug 2009 11:23:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4095) bug in org.hibernate.Hibernate.createBlob( InputStream in ) In-Reply-To: <1715095976.5041250663355310.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <297937413.7761251130995206.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33844#action_33844 ] Stephan Schr?der commented on HHH-4095: --------------------------------------- I don't seem to have the option to increase the priority. I guess only the admins can do that. > bug in org.hibernate.Hibernate.createBlob( InputStream in ) > ----------------------------------------------------------- > > Key: HHH-4095 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: (doesn't matter because ii's just a plain wrong usage of the InputStream.available-mehtode but anyway:) Hibernate. 3.3.2, Hsqldb1.8 > Reporter: Stephan Schr?der > Priority: Minor > Original Estimate: 30 minutes > Remaining Estimate: 30 minutes > > The implementation of org.hibernate.Hibernate.createBlob( InputStream in ) looks like this > public static Blob createBlob(InputStream stream) throws IOException { > return new SerializableBlob( new BlobImpl( stream, stream.available() ) ); > } > The second parameter here is supposed to be the length of the inputstream. The problem is that stream.available() doesn't return the length of the inputstream. That's explicitly noted in the Java-API (http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#available): > "Note that while some implementations of InputStream will return the total number of bytes in the stream (on calling available() ), many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream." > This is the source of my problem, only the first available bytes are read out of the inputstream. While the workaround for me is to simply call org.hibernate.Hibernate.createBlob( InputStream in,int length ), the misuse of stream.available() in Hibernate.createBlob( InputStream in ) remains to be resolved. > Solution: the only way to get the length of an InputStream ist to read it completly, if you don't want to do that Hibernate.createBlob( InputStream i ) should be removed. > (By the way, why is length of type int? java.io.File.length() and java.sql.Blob.length() are of type long, so length should be of type long as well). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 14:31:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Mon, 24 Aug 2009 13:31:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4095) bug in org.hibernate.Hibernate.createBlob( InputStream in ) In-Reply-To: <1715095976.5041250663355310.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <232998542.7781251138675110.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gail Badner updated HHH-4095: ----------------------------- Priority: Major (was: Minor) > bug in org.hibernate.Hibernate.createBlob( InputStream in ) > ----------------------------------------------------------- > > Key: HHH-4095 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: (doesn't matter because ii's just a plain wrong usage of the InputStream.available-mehtode but anyway:) Hibernate. 3.3.2, Hsqldb1.8 > Reporter: Stephan Schr?der > Original Estimate: 30 minutes > Remaining Estimate: 30 minutes > > The implementation of org.hibernate.Hibernate.createBlob( InputStream in ) looks like this > public static Blob createBlob(InputStream stream) throws IOException { > return new SerializableBlob( new BlobImpl( stream, stream.available() ) ); > } > The second parameter here is supposed to be the length of the inputstream. The problem is that stream.available() doesn't return the length of the inputstream. That's explicitly noted in the Java-API (http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#available): > "Note that while some implementations of InputStream will return the total number of bytes in the stream (on calling available() ), many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream." > This is the source of my problem, only the first available bytes are read out of the inputstream. While the workaround for me is to simply call org.hibernate.Hibernate.createBlob( InputStream in,int length ), the misuse of stream.available() in Hibernate.createBlob( InputStream in ) remains to be resolved. > Solution: the only way to get the length of an InputStream ist to read it completly, if you don't want to do that Hibernate.createBlob( InputStream i ) should be removed. > (By the way, why is length of type int? java.io.File.length() and java.sql.Blob.length() are of type long, so length should be of type long as well). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 14:33:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Mon, 24 Aug 2009 13:33:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4095) bug in org.hibernate.Hibernate.createBlob( InputStream in ) In-Reply-To: <1715095976.5041250663355310.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <365623016.7801251138795029.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33845#action_33845 ] Gail Badner commented on HHH-4095: ---------------------------------- Can you reproduce this in a test case? If so, please attach it. > bug in org.hibernate.Hibernate.createBlob( InputStream in ) > ----------------------------------------------------------- > > Key: HHH-4095 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: (doesn't matter because ii's just a plain wrong usage of the InputStream.available-mehtode but anyway:) Hibernate. 3.3.2, Hsqldb1.8 > Reporter: Stephan Schr?der > Original Estimate: 30 minutes > Remaining Estimate: 30 minutes > > The implementation of org.hibernate.Hibernate.createBlob( InputStream in ) looks like this > public static Blob createBlob(InputStream stream) throws IOException { > return new SerializableBlob( new BlobImpl( stream, stream.available() ) ); > } > The second parameter here is supposed to be the length of the inputstream. The problem is that stream.available() doesn't return the length of the inputstream. That's explicitly noted in the Java-API (http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#available): > "Note that while some implementations of InputStream will return the total number of bytes in the stream (on calling available() ), many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream." > This is the source of my problem, only the first available bytes are read out of the inputstream. While the workaround for me is to simply call org.hibernate.Hibernate.createBlob( InputStream in,int length ), the misuse of stream.available() in Hibernate.createBlob( InputStream in ) remains to be resolved. > Solution: the only way to get the length of an InputStream ist to read it completly, if you don't want to do that Hibernate.createBlob( InputStream i ) should be removed. > (By the way, why is length of type int? java.io.File.length() and java.sql.Blob.length() are of type long, so length should be of type long as well). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 24 17:10:22 2009 From: noreply at atlassian.com (Ben Groeneveld (JIRA)) Date: Mon, 24 Aug 2009 16:10:22 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2412) Hibernate 3 cannot be compiled under JDK 6 In-Reply-To: <101313881.1170980140826.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1922316907.7871251148222846.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33846#action_33846 ] Ben Groeneveld commented on HHH-2412: ------------------------------------- Thanks Jim! We have verified that with a jt400 jdbc driver upgrade from version 5.x to 6.x our second issue, described above, has been resolved. We'll try and report back on the more involved first issue at a later date. > Hibernate 3 cannot be compiled under JDK 6 > ------------------------------------------ > > Key: HHH-2412 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412 > Project: Hibernate Core > Issue Type: Task > Components: core > Affects Versions: 3.2.1, 3.2.2 > Environment: windows xp, JDK 6 > Reporter: Ahmet A. Akin > Assignee: Steve Ebersole > Fix For: 3.6 > > Attachments: patch_HH2412_Blob_Interface_Types.txt, patch_HH2412_ResultSetWrapper.txt > > > Hibernate code cannot be compiled under JDK 6. Problems and possible solutions: > 1- org.hibernate.jdbc.ResultSetWrapper implements ResultSet. But in Java 6, there are big changes in Resultset interface, and maybe 20+ more methods needs to be implemented in the ResultSetWrapper class. i would suggest eliminating this wrapper class once and for all, because it is only used in one method (in ColumnNameCache, getIndexForColumnName method) and i dont think there is a justification for using that wrapper class. > 2- org.hibernate.lob.SerializableBlob needs to implement new Blob interface methods: > public void free() throws SQLException; > public InputStream getBinaryStream(long pos, long length) throws SQLException > But, if this class is publicly accesible or used by API's back compatibility issues needs to be checked. > 3- Same as number 2, org.hibernate.lob.BlobImpl class needs to implement new Blob methods. > 4- org.hibernate.lob.SerializableClob class needs to implent new Clob methods. > 5- org.hibernate.lob.ClobImpl , same as 4. > In fact, Java 6 has a lot of JDBC improvements, maybe a java6 special extra package can be created., but that is a whole different issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 03:58:15 2009 From: noreply at atlassian.com (ulf thoresen (JIRA)) Date: Tue, 25 Aug 2009 02:58:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4107) Many-to-one, one-to-many with lazy=true and combined primary key(@JoinColumns) leads to infinite look when doing session.load(.. or session.get(.. Message-ID: <1824554416.7941251187095919.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Many-to-one, one-to-many with lazy=true and combined primary key(@JoinColumns) leads to infinite look when doing session.load(.. or session.get(.. -------------------------------------------------------------------------------------------------------------------------------------------------- Key: HHH-4107 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4107 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.2.x Environment: Hibernate version 3.2.1.ga, Oracle 10.1.3, jdbc driver= 10.2.0.4 Reporter: ulf thoresen Priority: Critical I have one-to-many from Class1with fetch type lazy. In Class2 I have have a Embedded primary key with the many-to-one on the key. When I try to load og get Class1 I get a infinite loop that prints out a stack of selects. It all ends with a ava.lang.StackOverflowError. I will put in a example... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 09:53:16 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 08:53:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-185) Change package name in codebase from org.hibernate.validation to org.hibernate.validator In-Reply-To: <1015750663.8161248097032616.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <914232636.7971251208396332.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-185: --------------------------------- Fix Version/s: (was: 4.0.0.GA) 4.0.0.CR1 > Change package name in codebase from org.hibernate.validation to org.hibernate.validator > ---------------------------------------------------------------------------------------- > > Key: HV-185 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-185 > Project: Hibernate Validator > Issue Type: Improvement > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Need to think about this one. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 09:55:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 08:55:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-211) Class name refactoring Message-ID: <136847699.7991251208515010.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Class name refactoring ---------------------- Key: HV-211 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-211 Project: Hibernate Validator Issue Type: Task Components: engine Affects Versions: 4.0.0.Beta3 Reporter: Hardy Ferentschik Assignee: Hardy Ferentschik Fix For: 4.0.0.CR1 Before releasing CR1 we should rename: - HibernateValidatorProvider into HibernateValidator - HibernateValidatorConfiguration into ValidatorConfiguration -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 09:57:19 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 08:57:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-212) Group sequence resolution has to take sequence order of composing groups (via inheritance or other group sequence) into account Message-ID: <652943645.8011251208639811.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Group sequence resolution has to take sequence order of composing groups (via inheritance or other group sequence) into account ------------------------------------------------------------------------------------------------------------------------------- Key: HV-212 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-212 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta3 Reporter: Hardy Ferentschik Assignee: Hardy Ferentschik Fix For: 4.0.0.CR1 See assertion 3.4.2 c of tck audit file -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 10:41:18 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 09:41:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-211) Class name refactoring In-Reply-To: <136847699.7991251208515010.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <784621321.8031251211278444.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-211. ---------------------------------- Resolution: Fixed > Class name refactoring > ---------------------- > > Key: HV-211 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-211 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Affects Versions: 4.0.0.Beta3 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Before releasing CR1 we should rename: > - HibernateValidatorProvider into HibernateValidator > - HibernateValidatorConfiguration into ValidatorConfiguration -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 10:41:18 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 09:41:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-212) Group sequence resolution has to take sequence order of composing groups (via inheritance or other group sequence) into account In-Reply-To: <652943645.8011251208639811.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <202527538.8051251211278565.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-212. ---------------------------------- Resolution: Fixed > Group sequence resolution has to take sequence order of composing groups (via inheritance or other group sequence) into account > ------------------------------------------------------------------------------------------------------------------------------- > > Key: HV-212 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-212 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > See assertion 3.4.2 c of tck audit file -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 10:43:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 09:43:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-189) ResourceBundleMessageInterpolator should cache the interpolation results for step 1-3 of the interpolation algorithm In-Reply-To: <1667179798.9381248182412097.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <814474207.8071251211395023.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-189: --------------------------------- Assignee: Hardy Ferentschik Fix Version/s: (was: 4.0.0.GA) 4.0.0.CR1 > ResourceBundleMessageInterpolator should cache the interpolation results for step 1-3 of the interpolation algorithm > -------------------------------------------------------------------------------------------------------------------- > > Key: HV-189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-189 > Project: Hibernate Validator > Issue Type: Improvement > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Some parts of the interpolation process can be cached by the MessageInterpolator. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 11:29:16 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 10:29:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-208) Wrong Path in ConstraintViolation In-Reply-To: <1615353923.19461250069292062.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1836604088.8101251214156903.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-208: --------------------------------- Summary: Wrong Path in ConstraintViolation (was: Wrong Path in ConstrinViolations) > Wrong Path in ConstraintViolation > --------------------------------- > > Key: HV-208 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-208 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Environment: beta 3 snapshot from aug 11 > Reporter: Alexey Romanchuk > Assignee: Hardy Ferentschik > Priority: Critical > Fix For: 4.0.0.CR1 > > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > In Path we always have leading dot for every validate field. > class A > { > @NotNull > String b; > } > causes ".b" in Path when @NotNull fails -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 11:36:15 2009 From: noreply at atlassian.com (Tsering Shrestha (JIRA)) Date: Tue, 25 Aug 2009 10:36:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4078) EntityMetamodel#entityNameByInheritenceClassNameMap mapping from class or class names? In-Reply-To: <927586096.18911249933512946.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1643930355.8121251214575426.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33847#action_33847 ] Tsering Shrestha commented on HHH-4078: --------------------------------------- I didn't invest time in this but apparently somehow my application doesn't hit that code snippet anymore - I am not sure what changes led to that. Might be something related to "persistentClass.hasPojoRepresentation()" > EntityMetamodel#entityNameByInheritenceClassNameMap mapping from class or class names? > -------------------------------------------------------------------------------------- > > Key: HHH-4078 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4078 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.5.0.Beta-1 > Reporter: Tsering Shrestha > > In the constructor of EntityMetaModel (http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java revision 15258) > Line 314: > if ( persistentClass.hasPojoRepresentation() ) { > entityNameByInheritenceClassNameMap.put( persistentClass.getMappedClass(), persistentClass.getEntityName() ); > However at Line 578: > public String findEntityNameByEntityClass(Class inheritenceClass) { > return ( String ) entityNameByInheritenceClassNameMap.get( inheritenceClass.getName() ); > } > Why are we using java.lang.Class as the keys when we put new entries to the map but try to read with java.lang.String keys? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 12:08:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Tue, 25 Aug 2009 11:08:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-189) ResourceBundleMessageInterpolator should cache the interpolation results for step 1-3 of the interpolation algorithm In-Reply-To: <1667179798.9381248182412097.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1806478319.8141251216495030.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-189. ---------------------------------- Resolution: Fixed > ResourceBundleMessageInterpolator should cache the interpolation results for step 1-3 of the interpolation algorithm > -------------------------------------------------------------------------------------------------------------------- > > Key: HV-189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-189 > Project: Hibernate Validator > Issue Type: Improvement > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Some parts of the interpolation process can be cached by the MessageInterpolator. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 16:54:15 2009 From: noreply at atlassian.com (=?UTF-8?Q?Stephan_Schr=C3=B6der_=28JIRA=29?=) Date: Tue, 25 Aug 2009 15:54:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4095) bug in org.hibernate.Hibernate.createBlob( InputStream in ) In-Reply-To: <1715095976.5041250663355310.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <114559181.8161251233655125.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stephan Schr?der updated HHH-4095: ---------------------------------- Attachment: TestHibernateGetBlob.java JUnit4-Tests which shows that a Blob created via Hibernate.createBlob( InputStream in ) has not the length of the inputstream but the length of the first bytes available in the inputstream. This results in the wrong number of bytes being persisted. > bug in org.hibernate.Hibernate.createBlob( InputStream in ) > ----------------------------------------------------------- > > Key: HHH-4095 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4095 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.3.2 > Environment: (doesn't matter because ii's just a plain wrong usage of the InputStream.available-mehtode but anyway:) Hibernate. 3.3.2, Hsqldb1.8 > Reporter: Stephan Schr?der > Attachments: TestHibernateGetBlob.java > > Original Estimate: 30 minutes > Remaining Estimate: 30 minutes > > The implementation of org.hibernate.Hibernate.createBlob( InputStream in ) looks like this > public static Blob createBlob(InputStream stream) throws IOException { > return new SerializableBlob( new BlobImpl( stream, stream.available() ) ); > } > The second parameter here is supposed to be the length of the inputstream. The problem is that stream.available() doesn't return the length of the inputstream. That's explicitly noted in the Java-API (http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#available): > "Note that while some implementations of InputStream will return the total number of bytes in the stream (on calling available() ), many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream." > This is the source of my problem, only the first available bytes are read out of the inputstream. While the workaround for me is to simply call org.hibernate.Hibernate.createBlob( InputStream in,int length ), the misuse of stream.available() in Hibernate.createBlob( InputStream in ) remains to be resolved. > Solution: the only way to get the length of an InputStream ist to read it completly, if you don't want to do that Hibernate.createBlob( InputStream i ) should be removed. > (By the way, why is length of type int? java.io.File.length() and java.sql.Blob.length() are of type long, so length should be of type long as well). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Tue Aug 25 20:04:15 2009 From: noreply at atlassian.com (Gail Badner (JIRA)) Date: Tue, 25 Aug 2009 19:04:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2990) Bad usage of ClassLoader.loadClass() for Java6 in SerializationHelper$CustomObjectInputStream - deserialization bottleneck for arrays In-Reply-To: <96390187.1196770496045.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2003143352.8221251245055899.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33849#action_33849 ] Gail Badner commented on HHH-2990: ---------------------------------- https://jira.jboss.org/jira/browse/JBPAPP-906 https://jira.jboss.org/jira/browse/JBPAPP-2277 > Bad usage of ClassLoader.loadClass() for Java6 in SerializationHelper$CustomObjectInputStream - deserialization bottleneck for arrays > ------------------------------------------------------------------------------------------------------------------------------------- > > Key: HHH-2990 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2990 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.2.5 > Environment: Hibernate 3.2.5, Java 6 Sun (any), any platform (tested Linux x64, Mac x64 (J6dp1)) > Reporter: Tom Eicher > Assignee: Gail Badner > Fix For: 3.2.x, 3.3.x, 3.5 > > > Sun has "clarified" (others say modified) the API of "ClassLoader.loadClass()" and no longer allows this to be called for arrays, e.g. String[]. > ( see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500212 and duplicates ) > and states that this has always been very unstable to use/do in the first place. > So trying to load an array of something using this method results in ClassNotFoundException. > The correct thing to do is call Class.forName(className,false,myClassLoader); instead of myClassLoader.loadClass(className); > In SerializationHelper$CustomObjectInputStream.resolveClass() we do > ClassLoader loader = Thread.currentThread().getContextClassLoader(); > try { > resolvedClass = loader.loadClass(className); > log.trace("Class resolved through context class loader"); > } > catch(ClassNotFoundException e) { > log.trace("Asking super to resolve"); > resolvedClass = super.resolveClass(v); > } > which results in the deserialization process for a String[] always searching String[] in all the application's jars/wars/etc before really loading it. > The bad thing is, loadClass() is synchronized. > In our case, we have multiple threads loading database rows containing String[]s, which results in one Thread doing > INFO | jvm 1 | 2007/11/30 16:56:44 | java.lang.Thread.State: RUNNABLE > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.zip.ZipFile.getEntry(Native Method) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.zip.ZipFile.getEntry(ZipFile.java:149) > INFO | jvm 1 | 2007/11/30 16:56:44 | - locked <0x00002aaab4047c20> (a java.util.jar.JarFile) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.jar.JarFile.getEntry(JarFile.java:206) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.util.jar.JarFile.getJarEntry(JarFile.java:189) > INFO | jvm 1 | 2007/11/30 16:56:44 | at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:754) > INFO | jvm 1 | 2007/11/30 16:56:44 | at sun.misc.URLClassPath.getResource(URLClassPath.java:168) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.net.URLClassLoader$1.run(URLClassLoader.java:192) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.security.AccessController.doPrivileged(Native Method) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > INFO | jvm 1 | 2007/11/30 16:56:44 | - locked <0x00002aaab4025998> (a org.apache.catalina.loader.StandardClassLoader) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:299) > INFO | jvm 1 | 2007/11/30 16:56:44 | - locked <0x00002aaab4095a68> (a org.apache.catalina.loader.StandardClassLoader) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1346) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.hibernate.util.SerializationHelper$CustomObjectInputStream.resolveClass(SerializationHelper.java:263) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:210) > and all other threads doing nothing > INFO | jvm 1 | 2007/11/30 16:56:44 | java.lang.Thread.State: BLOCKED (on object monitor) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:295) > INFO | jvm 1 | 2007/11/30 16:56:44 | - waiting to lock <0x00002aaab4095a68> (a org.apache.catalina.loader.StandardClassLoader) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1346) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) > INFO | jvm 1 | 2007/11/30 16:56:44 | at org.hibernate.util.SerializationHelper$CustomObjectInputStream.resolveClass(SerializationHelper.java:263) > INFO | jvm 1 | 2007/11/30 16:56:44 | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575) > (rest of stack trace identical to above) > This can easily be worked around by setting the compatibility property > -Dsun.lang.ClassLoader.allowArraySyntax=true > however a) this workaround might not be around for long and b) most people will never find this bottleneck, therefore will not apply the workaround. > For our case, we got a 35% performance increase just be setting this property (and not a single loadClass() or ZipFile.getEntry() in any thread dump any more). > Cheers, Tom. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 04:24:18 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 03:24:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-185) Change package name in codebase from org.hibernate.validation to org.hibernate.validator In-Reply-To: <1015750663.8161248097032616.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1864564381.8261251275058641.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33850#action_33850 ] Hardy Ferentschik commented on HV-185: -------------------------------------- I did a little test to check whether a package renaming of the new hibernate code would conflict with any class from the legacy validator. This is not the case. Here is what I've done. For each code base I dumped all java file names into a text file. In case of the new code I also renamed 'validation' to 'validator': find hibernate-validator/src/main/java/ -name "*.java" | sed -e 's@/validation/@/validator/@g' | sort > hibernate-validator-classes.txt find hibernate-validator-legacy/src/main/java/ -name "*.java" | sort > hibernate-validator-legacy-classes.txt comm -1 -2 hibernate-validator-legacy-classes.txt hibernate-validator-classes.txt There were common classes, hence renaming would not cause any class conflicts. > Change package name in codebase from org.hibernate.validation to org.hibernate.validator > ---------------------------------------------------------------------------------------- > > Key: HV-185 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-185 > Project: Hibernate Validator > Issue Type: Improvement > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Need to think about this one. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 04:44:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 03:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-183) Composite constraints have to honour the payload parameter as well In-Reply-To: <303053843.2941247055795793.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1436341450.8281251276255119.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-183: --------------------------------- Fix Version/s: 4.0.0.CR1 > Composite constraints have to honour the payload parameter as well > ------------------------------------------------------------------ > > Key: HV-183 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-183 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta1 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > i tested the current payload impl. > it works for simple constraints - e.g.: > @NotNull(payload = Severity.Warn.class) > but it doesn't work for composite constraints - e.g.: > @NickName(payload = Severity.Warn.class) > with the following workaround it works: > @NotNull > @Size > //... > public @interface NickName { > @OverridesAttribute.List({ > @OverridesAttribute(constraint = NotNull.class, name = "payload"), > @OverridesAttribute(constraint = Size.class, name = "payload") > }) > Class[] payload() default {}; > //... > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 07:27:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 06:27:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-213) Should we mark ConstraintViolation as Serializable? Message-ID: <1385375344.8301251286035791.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Should we mark ConstraintViolation as Serializable? --------------------------------------------------- Key: HV-213 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-213 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta3 Reporter: Hardy Ferentschik Fix For: 4.0.0.GA https://forum.hibernate.org/posting.php?mode=reply&f=9&t=999211 The problem is that we cannot guarantee that ConstraintViolation really will be Serializable since it contains for example the root bean of the validation which might or might not be Serializable. The BV specification does not make any assertions in this regards. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 08:12:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 07:12:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-183) Composite constraints have to honour the payload parameter as well In-Reply-To: <303053843.2941247055795793.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <720982221.8321251288735575.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-183. ---------------------------------- Resolution: Fixed > Composite constraints have to honour the payload parameter as well > ------------------------------------------------------------------ > > Key: HV-183 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-183 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta1 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > i tested the current payload impl. > it works for simple constraints - e.g.: > @NotNull(payload = Severity.Warn.class) > but it doesn't work for composite constraints - e.g.: > @NickName(payload = Severity.Warn.class) > with the following workaround it works: > @NotNull > @Size > //... > public @interface NickName { > @OverridesAttribute.List({ > @OverridesAttribute(constraint = NotNull.class, name = "payload"), > @OverridesAttribute(constraint = Size.class, name = "payload") > }) > Class[] payload() default {}; > //... > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 08:26:16 2009 From: noreply at atlassian.com (Igor Drobiazko (JIRA)) Date: Wed, 26 Aug 2009 07:26:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-214) Constraints from interfaces and superclasses are not inherited when XML descriptors are used Message-ID: <531288381.8351251289576233.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Constraints from interfaces and superclasses are not inherited when XML descriptors are used -------------------------------------------------------------------------------------------- Key: HV-214 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-214 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta3 Reporter: Igor Drobiazko Attachments: test.zip When using XML descriptors the contraints from interfaces and superclasses are not inherited. Let's have a look at following example. public interface Person { String getFirstName(); String getMiddleName(); String getLastName(); } public class Customer implements Person { private String firstName; private String middleName; private String lastName; private String customerId; private String password; ... } com.acme The constraint @NotNull for the property firstName is not considered. A Customer without a firstName would pass the validation successfuly. Accoring to annotations it should be possible to define contraints for superclasses and interfaces which will be inherited. A testcase is attached. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 08:40:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 07:40:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-185) Change package name in codebase from org.hibernate.validation to org.hibernate.validator In-Reply-To: <1015750663.8161248097032616.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1919701696.8371251290415114.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-185. ---------------------------------- Resolution: Fixed > Change package name in codebase from org.hibernate.validation to org.hibernate.validator > ---------------------------------------------------------------------------------------- > > Key: HV-185 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-185 > Project: Hibernate Validator > Issue Type: Improvement > Components: engine > Affects Versions: 4.0.0.Beta2 > Reporter: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > > Need to think about this one. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 08:46:18 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 07:46:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-91) Make sure Validator is thread-safe in the RI In-Reply-To: <27307742.1225912684359.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <942397531.8391251290778272.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-91. --------------------------------- Resolution: Fixed Fix Version/s: 4.0.0.CR1 We took care of this already > Make sure Validator is thread-safe in the RI > ----------------------------------------------- > > Key: HV-91 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-91 > Project: Hibernate Validator > Issue Type: New Feature > Components: engine > Reporter: Emmanuel Bernard > Fix For: 4.0.0.CR1 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 10:23:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 09:23:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-214) Constraints from interfaces and superclasses are not inherited when XML descriptors are used In-Reply-To: <531288381.8351251289576233.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <809507366.8411251296595686.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-214: --------------------------------- Fix Version/s: 4.0.0.CR1 > Constraints from interfaces and superclasses are not inherited when XML descriptors are used > -------------------------------------------------------------------------------------------- > > Key: HV-214 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-214 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Reporter: Igor Drobiazko > Fix For: 4.0.0.CR1 > > Attachments: test.zip > > > When using XML descriptors the contraints from interfaces and superclasses are not inherited. Let's have a look at following example. > public interface Person { > String getFirstName(); > String getMiddleName(); > String getLastName(); > } > public class Customer implements Person { > private String firstName; > private String middleName; > private String lastName; > private String customerId; > private String password; > ... > } > xmlns="http://jboss.org/xml/ns/javax/validation/mapping" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation= > "http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"> > > com.acme > > > > > > > > > > > > > > The constraint @NotNull for the property firstName is not considered. A Customer without a firstName would pass the validation successfuly. > Accoring to annotations it should be possible to define contraints for superclasses and interfaces which will be inherited. > A testcase is attached. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 10:58:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 09:58:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Assigned: (HV-214) Constraints from interfaces and superclasses are not inherited when XML descriptors are used In-Reply-To: <531288381.8351251289576233.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <672634321.8441251298695866.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik reassigned HV-214: ------------------------------------ Assignee: Hardy Ferentschik > Constraints from interfaces and superclasses are not inherited when XML descriptors are used > -------------------------------------------------------------------------------------------- > > Key: HV-214 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-214 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Reporter: Igor Drobiazko > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > Attachments: test.zip > > > When using XML descriptors the contraints from interfaces and superclasses are not inherited. Let's have a look at following example. > public interface Person { > String getFirstName(); > String getMiddleName(); > String getLastName(); > } > public class Customer implements Person { > private String firstName; > private String middleName; > private String lastName; > private String customerId; > private String password; > ... > } > xmlns="http://jboss.org/xml/ns/javax/validation/mapping" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation= > "http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"> > > com.acme > > > > > > > > > > > > > > The constraint @NotNull for the property firstName is not considered. A Customer without a firstName would pass the validation successfuly. > Accoring to annotations it should be possible to define contraints for superclasses and interfaces which will be inherited. > A testcase is attached. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 10:58:16 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Wed, 26 Aug 2009 09:58:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-214) Constraints from interfaces and superclasses are not inherited when XML descriptors are used In-Reply-To: <531288381.8351251289576233.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1800970849.8471251298696031.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-214. ---------------------------------- Resolution: Fixed > Constraints from interfaces and superclasses are not inherited when XML descriptors are used > -------------------------------------------------------------------------------------------- > > Key: HV-214 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-214 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Reporter: Igor Drobiazko > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > Attachments: test.zip > > > When using XML descriptors the contraints from interfaces and superclasses are not inherited. Let's have a look at following example. > public interface Person { > String getFirstName(); > String getMiddleName(); > String getLastName(); > } > public class Customer implements Person { > private String firstName; > private String middleName; > private String lastName; > private String customerId; > private String password; > ... > } > xmlns="http://jboss.org/xml/ns/javax/validation/mapping" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation= > "http://jboss.org/xml/ns/javax/validation/mapping validation-mapping-1.0.xsd"> > > com.acme > > > > > > > > > > > > > > The constraint @NotNull for the property firstName is not considered. A Customer without a firstName would pass the validation successfuly. > Accoring to annotations it should be possible to define contraints for superclasses and interfaces which will be inherited. > A testcase is attached. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 11:14:15 2009 From: noreply at atlassian.com (Oleksandr Fedorenko (JIRA)) Date: Wed, 26 Aug 2009 10:14:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4108) Invalid result in native query Message-ID: <176999813.8511251299655227.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Invalid result in native query ------------------------------ Key: HHH-4108 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4108 Project: Hibernate Core Issue Type: Bug Affects Versions: 3.3.2 Environment: 3.3.2, MySQL 5.1 Reporter: Oleksandr Fedorenko Priority: Critical We have the native query executed with entity manager, example : Query query = entityManager.createNativeQuery(sqlString); List result = query.getResultList(); The returned result is an array of objects that has projection values. When table column has type CHAR(N) , the result value is always instance of java.lang.Character and here we have only first character of database field and the rest characters are lost. It is supposed to have result of java.lang.String class here. When the column is altered to VARCHAR(N), the result is java.lang.String. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 11:28:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Wed, 26 Aug 2009 10:28:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (BVAL-177) Payload of composed constraints are ignored, the main constraint payload is propagated Message-ID: <984290073.8531251300495187.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Payload of composed constraints are ignored, the main constraint payload is propagated -------------------------------------------------------------------------------------- Key: BVAL-177 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-177 Project: Bean Validation Issue Type: Bug Components: spec-general Affects Versions: 1.0 proposed final draft 2 Reporter: Emmanuel Bernard Priority: Minor Fix For: 1.0 final -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 11:42:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Wed, 26 Aug 2009 10:42:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (BVAL-177) Payload of composed constraints are ignored, the main constraint payload is propagated In-Reply-To: <984290073.8531251300495187.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <825450124.8551251301335091.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard resolved BVAL-177. ----------------------------------- Resolution: Fixed > Payload of composed constraints are ignored, the main constraint payload is propagated > -------------------------------------------------------------------------------------- > > Key: BVAL-177 > URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-177 > Project: Bean Validation > Issue Type: Bug > Components: spec-general > Affects Versions: 1.0 proposed final draft 2 > Reporter: Emmanuel Bernard > Priority: Minor > Fix For: 1.0 final > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 11:44:15 2009 From: noreply at atlassian.com (wolfjourn (JIRA)) Date: Wed, 26 Aug 2009 10:44:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-396) disableFullTextFilter(String name) in FullTextQueryImpl does not disable the filter. Message-ID: <992244554.8571251301455401.JavaMail.j2ee-opensource-projects@vps07.contegix.com> disableFullTextFilter(String name) in FullTextQueryImpl does not disable the filter. ------------------------------------------------------------------------------------ Key: HSEARCH-396 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-396 Project: Hibernate Search Issue Type: Bug Components: query Affects Versions: 3.1.1.GA Environment: Hibernate 3.3.2.GA Hibernate Annotations 3.4.0.GA RDBMS: MySQL, version: 5.0.70-log JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 Reporter: wolfjourn The disableFullTextFilter(String name) method in FullTextQueryImpl does not cause the filter to be disabled. This is due to incorrect logic in the buildFilters() method in the same class. For example, fullTextQuery = s.createFullTextQuery( query, Driver.class ); fullTextQuery.list().size(); /* Returns 10 */ fullTextQuery.enableFullTextFilter("security"); fullTextQuery.list().size(); /* Returns 5 */ fullTextQuery.disableFullTextFilter("security"); fullTextQuery.list().size(); /* Returns 5. Should return 10. */ Initially, buildFilters() constructs `filter' using the "security" filter from filterDefinitions. During the disableFullTextFilter("security") call, the filter is removed from `filterDefinitions'. However, `filter' remains intact. The subsequent call to buildFilters() returns immediately as `filterDefinitions' is now empty, leaving `filter' intact and thus not disabling the "security" filter. Furthermore, if a filter is disabled and replaced with another filter, the result will be a composition of both filters as towards the bottom of buildFilters(), any existing `filter' is chained onto the end of a new `chainedFilter'. This results in an empty result set if the sets returned by the filters are mutually exclusive. It looks like this issue was resolved with revision 16755. However, this is still worth documenting here for other 3.1.1.GA users that might run into the same issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 12:32:15 2009 From: noreply at atlassian.com (Adam Wozniak (JIRA)) Date: Wed, 26 Aug 2009 11:32:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3017) Query with an IN Clause object that holds an Enum is failing with ORA-01722: invalid number (Criteria) OR ORA-17041: Missing IN or OUT parameter at index (HQL) In-Reply-To: <98185131.1197602276353.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2002428664.8591251304335765.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33852#action_33852 ] Adam Wozniak commented on HHH-3017: ----------------------------------- I had the same ORA error (ORA-01722: invalid number) but (after investigation) I found an error in my code. I forgot about Enumerated annotation for getter with particular enum column. Now my getter looks like this: @Column(name="CH_STATUS", nullable=false) @Enumerated(EnumType.STRING) public ChStatusEnum getChStatus() { return chStatus; } Take care, Adam Wozniak > Query with an IN Clause object that holds an Enum is failing with ORA-01722: invalid number (Criteria) OR ORA-17041: Missing IN or OUT parameter at index (HQL) > --------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HHH-3017 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3017 > Project: Hibernate Core > Issue Type: Bug > Components: query-criteria > Affects Versions: 3.2.0.ga > Environment: Hibernate 3.2.0 (cr4) > Oracle > Annotations > Reporter: Li Ho > > I am trying to do a query with an IN clause. The object I am passing into the IN clause contains an Enum. I'm not 100% sure, but I think the Enum is causing the problem based on the resulting error message. > When I use the Criteria API, I get the following error: > ORA-01722: invalid number > When I use the equivalent HQL, I get: > ORA-17041: Missing IN or OUT parameter at index > Here is some code (using criteria) that produces the error > List accountKeys; // AccountKey contains some Strings and an Enum > ... > List results = session.createCriteria(MyObject.class). > add(Expression.in("key.account.key", accountKeys)). > list(); > The debug SQL looks right... and when I manually try it by replacing the ? params with valid values, it works! So, it seems like there's a problem with the passing of the query parameter values. > I am currently working around this issue by bypassing the object comparison. I extract the variables I want to compare and force it to do a direct String comparison on those elements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 14:45:16 2009 From: noreply at atlassian.com (=?UTF-8?Q?Arturo_Frapp=C3=A9_=28JIRA=29?=) Date: Wed, 26 Aug 2009 13:45:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-422) xml entity bindings for subclass entities Message-ID: <1235836526.8801251312316074.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33853#action_33853 ] Arturo Frapp? commented on HHH-422: ----------------------------------- I don't understand if my problems fits exaclty in this issue, I think that my issue is more similar than HHH-681. Here are my findings: I have a collection with an element which its xml-node-name is "medicion" . . . . . . My issue raises when loading an element of this collection, at getRow() method of OneToManyLoader.java, the first run the element loads, but at line 127 of PersistentElementHolder.java its node name is interchanged by those writen in the node=" " configuration attribute. Then when the second element is loaded, at the call instanceAlreadyLoaded() on OneToManyLoader::getRow() fails. I think that this issue could be solved if Dom4jInstantiator::isInstance works considering the interchange. Surely rewriting this: public Dom4jInstantiator(Component component) { this.nodeName = component.getNodeName(); isInstanceNodeNames.add( nodeName ); } to consider the ElementNodeName already seted by node=" " Since I'm not an expert of this piece of code I don't know if doing this will have a side effect on other parts of the code. > xml entity bindings for subclass entities > ----------------------------------------- > > Key: HHH-422 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-422 > Project: Hibernate Core > Issue Type: Improvement > Components: core > Affects Versions: 3.0.2 > Environment: Hibernate cvs head from main branch .(As of 4/28/05..So 3.0.2?), Oracle 8i. > Reporter: Jesse Kuhnert > Assignee: Steve Ebersole > Fix For: entity-modes > > Attachments: XMLSubclassTest.zip > > Original Estimate: 1 week > Remaining Estimate: 1 week > > I'm sure someone else is already in the process of agnonizing over how to handle the entity name resolution issues that are currently floating around in the codebase, but for the sake of not knowing who's doing what and what-not (heh), I thought I would share my couple quick notes learned from trying to make this work today. > I was having problems getting an import of xml data into hibernate with derived subclasses of one base class. (Not abstract, derived using the discriminator value column and table per subclass method). Was getting lots of errors trying to map my subclass nodes into the main xml document, even if I named the child nodes the same as the parent. The only eventual temporary solution I could find was by adding the subclass "node name" values into the two Map instances I could find that needed these references. [Mappings class and EntityPersister, ughh I've forgotten the other ones name now. ] > The one main culprit already had an obvious method comment with a TODO tag so I'm sure someone is already working on a much better longterm solution than mine.. The only thing I didn't complete was having the ability for the subclass instances to have their own node names. Ie if I had an instance of the base class mapped as a many-to-XX collection in someone's class, I had to specify a node name of "something" to get it to be recognized. I didn't get far enough in my day to get this part as well, but I think it would just require being able to reference the current child somehow. Some sort of XSLT expression like "name()" or "self" perhaps? > After that everything worked beautifully of course :) Will be very excited to see this feature come to full bloom, as I plan on using it to synchronize some data points with customer databases sometime this summer? (Am I being too hopeful? I'd love to help, but I'm sure there are plenty of good people doing things already..And I'm I'm fu#$!@ with my own deadlines anyways...) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 15:52:20 2009 From: noreply at atlassian.com (Ed Burns (JIRA)) Date: Wed, 26 Aug 2009 14:52:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-141) Use commons-annotations to apply the configuration specified in XML In-Reply-To: <790257783.1239791897284.JavaMail.j2ee_opensource.atlassian.com-projects@atlassian12.managed.contegix.com> Message-ID: <494526087.8821251316340644.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33854#action_33854 ] Ed Burns commented on HV-141: ----------------------------- target_glassfishv3 > Use commons-annotations to apply the configuration specified in XML > ------------------------------------------------------------------- > > Key: HV-141 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-141 > Project: Hibernate Validator > Issue Type: Task > Components: engine > Affects Versions: 4.0.0.Alpha3 > Reporter: Hardy Ferentschik > > See how it is done in Hsearch SearchFactoryImpl#getReflectionManager -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Wed Aug 26 16:33:15 2009 From: noreply at atlassian.com (Steve Ebersole (JIRA)) Date: Wed, 26 Aug 2009 15:33:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (EJB-461) Implement JPA 2.0 criteria apis (compiling) In-Reply-To: <1360518807.1591250522655180.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <682047531.8841251318795481.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Ebersole updated EJB-461: ------------------------------- Fix Version/s: 3.5 Component/s: EntityManager > Implement JPA 2.0 criteria apis (compiling) > ------------------------------------------- > > Key: EJB-461 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-461 > Project: Hibernate Entity Manager > Issue Type: Sub-task > Components: EntityManager > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 05:23:18 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 27 Aug 2009 04:23:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-215) Rename ConstraintPayload to Payload Message-ID: <780827947.8911251364998834.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Rename ConstraintPayload to Payload ----------------------------------- Key: HV-215 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-215 Project: Hibernate Validator Issue Type: Task Affects Versions: 4.0.0.Beta3 Reporter: Hardy Ferentschik Assignee: Hardy Ferentschik Fix For: 4.0.0.CR1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 05:23:19 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 27 Aug 2009 04:23:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-216) Add the payload parameter to the xml configuration Message-ID: <1705294785.8931251364999668.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Add the payload parameter to the xml configuration -------------------------------------------------- Key: HV-216 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-216 Project: Hibernate Validator Issue Type: Bug Components: engine Affects Versions: 4.0.0.Beta3 Reporter: Hardy Ferentschik Assignee: Hardy Ferentschik Fix For: 4.0.0.CR1 payload was not part of the initial xsd. Needs to be added there and of course parsed when the configuration is created. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 05:36:17 2009 From: noreply at atlassian.com (Marcin Kobylarz (JIRA)) Date: Thu, 27 Aug 2009 04:36:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2142) PersistentMap.remove() may return UNKNOWN object that can cause ClassCastException in client code In-Reply-To: <85157130.1160646024802.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1231348502.9041251365777761.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33855#action_33855 ] Marcin Kobylarz commented on HHH-2142: -------------------------------------- Hibernate 3.3.2 still suffers from this bug. Could authors patch this, since solution is already known? > PersistentMap.remove() may return UNKNOWN object that can cause ClassCastException in client code > ------------------------------------------------------------------------------------------------- > > Key: HHH-2142 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2142 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.0.cr5 > Reporter: Andrzej Miazga > > Here is some code in Hibernate 3.2.0cr5 that may cause this behaviour. I'm not sure if this is a bug but it surely affects the client code. > AbstractPersistentCollection: > protected Object readElementByIndex(Object index) { > if (!initialized) { > ... > return persister.getElementByIndex( entry.getLoadedKey(), index, session, owner ); > } > ... > return UNKNOWN; > } > PersistentMap (extends AbstractPersistentCollection): > public Object put(Object key, Object value) { > if ( isPutQueueEnabled() ) { > Object old = readElementByIndex( key ); > queueOperation( new Put( key, value, old ) ); > return old; > } > ... > So, there is a possibility to return UNKNOWN instance (MarkerObject) to the client code as the result of Map.put(). > In version 3.1.3 this worked fine, but the implementation was different: > public Object put(Object key, Object value) { > Object old = isPutQueueEnabled() ? > readElementByIndex(key) : UNKNOWN; > if ( old==UNKNOWN ) { > write(); > return map.put(key, value); > } > ... > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 05:48:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 27 Aug 2009 04:48:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-215) Rename ConstraintPayload to Payload In-Reply-To: <780827947.8911251364998834.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1861353541.9081251366495256.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-215. ---------------------------------- Resolution: Fixed > Rename ConstraintPayload to Payload > ----------------------------------- > > Key: HV-215 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-215 > Project: Hibernate Validator > Issue Type: Task > Affects Versions: 4.0.0.Beta3 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > Time Spent: 18 minutes > Remaining Estimate: 0 minutes > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 07:48:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Thu, 27 Aug 2009 06:48:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-216) Add the payload parameter to the xml configuration In-Reply-To: <1705294785.8931251364999668.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <284920303.9151251373695278.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-216. ---------------------------------- Resolution: Fixed > Add the payload parameter to the xml configuration > -------------------------------------------------- > > Key: HV-216 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-216 > Project: Hibernate Validator > Issue Type: Bug > Components: engine > Affects Versions: 4.0.0.Beta3 > Reporter: Hardy Ferentschik > Assignee: Hardy Ferentschik > Fix For: 4.0.0.CR1 > > Time Spent: 1 hour, 46 minutes > Remaining Estimate: 0 minutes > > payload was not part of the initial xsd. Needs to be added there and of course parsed when the configuration is created. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 08:20:15 2009 From: noreply at atlassian.com (ggsoft@gmx.net (JIRA)) Date: Thu, 27 Aug 2009 07:20:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4109) filter and join "with" do not work Message-ID: <545218131.9181251375615149.JavaMail.j2ee-opensource-projects@vps07.contegix.com> filter and join "with" do not work ---------------------------------- Key: HHH-4109 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109 Project: Hibernate Core Issue Type: Bug Components: query-hql Affects Versions: 3.2.6 Environment: Hibernate 3.2.6GA, MySql Reporter: ggsoft at gmx.net Priority: Blocker When using filters and joins with a with clause, Hibernate applies the parameters in wrong order. The filter sets only a soft delete flag. On the HQL select u, b. as buddyState from User as u left join u.buddiesForUserB as b with b.userByUserA.userid = :p_userAid where u.username = :p_username; the filter is applied to the with and to the where clause. Resulting in: ... buddiesfor1_ on user0_.userid=buddiesfor1_.userB and buddiesfor1_.deleted=0 and (buddiesfor1_.userA=0) where user0_.deleted=1 and user0_.username='myUsername' ... because the order is filter, param,filter, param But in Hibernates QueryLoader Class bindFilterParameterValues l.496 (511-516) it is assumed the filters come first. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 09:51:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 08:51:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (BVAL-178) Add payload to the XML schema Message-ID: <363126215.9201251381075399.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Add payload to the XML schema ----------------------------- Key: BVAL-178 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-178 Project: Bean Validation Issue Type: Bug Components: spec-general Affects Versions: 1.0 proposed final draft 2 Reporter: Emmanuel Bernard Priority: Minor Fix For: 1.0 final -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 09:53:18 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 08:53:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (BVAL-179) Rename ConstraintPayload to Payload Message-ID: <1938352117.9221251381198298.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Rename ConstraintPayload to Payload ----------------------------------- Key: BVAL-179 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-179 Project: Bean Validation Issue Type: Improvement Components: spec-general Affects Versions: 1.0 proposed final draft 2 Reporter: Emmanuel Bernard Priority: Minor Fix For: 1.0 final -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 09:53:20 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 08:53:20 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (BVAL-180) ConstraintDescriptor.getPayload() should return Set> not Set> Message-ID: <48830074.9241251381200229.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ConstraintDescriptor.getPayload() should return Set> not Set> ----------------------------------------------------------------------------------------------------- Key: BVAL-180 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-180 Project: Bean Validation Issue Type: Bug Components: spec-general Affects Versions: 1.0 proposed final draft 2 Reporter: Emmanuel Bernard Fix For: 1.0 final -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 09:55:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 08:55:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (BVAL-179) Rename ConstraintPayload to Payload In-Reply-To: <1938352117.9221251381198298.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1911437713.9261251381315234.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard resolved BVAL-179. ----------------------------------- Resolution: Fixed > Rename ConstraintPayload to Payload > ----------------------------------- > > Key: BVAL-179 > URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-179 > Project: Bean Validation > Issue Type: Improvement > Components: spec-general > Affects Versions: 1.0 proposed final draft 2 > Reporter: Emmanuel Bernard > Priority: Minor > Fix For: 1.0 final > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 09:55:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 08:55:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (BVAL-178) Add payload to the XML schema In-Reply-To: <363126215.9201251381075399.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <495867281.9281251381315703.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard resolved BVAL-178. ----------------------------------- Resolution: Fixed > Add payload to the XML schema > ----------------------------- > > Key: BVAL-178 > URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-178 > Project: Bean Validation > Issue Type: Bug > Components: spec-general > Affects Versions: 1.0 proposed final draft 2 > Reporter: Emmanuel Bernard > Priority: Minor > Fix For: 1.0 final > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 10:11:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 09:11:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Deleted: (BVAL-146) Test Message-ID: <543363549.9311251382275081.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard deleted BVAL-146: ---------------------------------- > Test > ---- > > Key: BVAL-146 > URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-146 > Project: Bean Validation > Issue Type: Bug > Environment: test > Reporter: rajeshkumar > Original Estimate: 1 hour > Remaining Estimate: 1 hour > > rtest -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 10:11:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 09:11:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (BVAL-180) ConstraintDescriptor.getPayload() should return Set> not Set> In-Reply-To: <48830074.9241251381200229.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <844134868.9331251382275228.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard resolved BVAL-180. ----------------------------------- Resolution: Fixed > ConstraintDescriptor.getPayload() should return Set> not Set> > ----------------------------------------------------------------------------------------------------- > > Key: BVAL-180 > URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-180 > Project: Bean Validation > Issue Type: Bug > Components: spec-general > Affects Versions: 1.0 proposed final draft 2 > Reporter: Emmanuel Bernard > Fix For: 1.0.CR5 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 10:37:15 2009 From: noreply at atlassian.com (Kai Hoerder (JIRA)) Date: Thu, 27 Aug 2009 09:37:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1803) Allow fetching with criteria when scrolling Message-ID: <1816047513.9411251383835500.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kai Hoerder updated HHH-1803: ----------------------------- Attachment: Diffs-applied-to-3.3.2.GA.zip Reports on the provided fix applied to the current Hibernate version (3.3.2.GA) > Allow fetching with criteria when scrolling > ------------------------------------------- > > Key: HHH-1803 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803 > Project: Hibernate Core > Issue Type: Improvement > Components: query-criteria > Affects Versions: 3.2.0.cr2 > Reporter: Maarten Winkels > Attachments: Child.java, criteria-scroll-fetch-collection.patch, CriteriaScrollFetchTest.java, Diffs-applied-to-3.3.2.GA.zip, Parent.java, ParentChild.hbm.xml > > > When querying by criteria, fetching is allowed, but when scrolling a criteria, the fetching corrupts the result. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 10:42:15 2009 From: noreply at atlassian.com (Albert Kurucz (JIRA)) Date: Thu, 27 Aug 2009 09:42:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (ANN-862) Having to use @ForceDiscriminator kind of breaks JPA compatibility Message-ID: <461687182.9431251384135135.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Having to use @ForceDiscriminator kind of breaks JPA compatibility ------------------------------------------------------------------ Key: ANN-862 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-862 Project: Hibernate Annotations Issue Type: Improvement Affects Versions: 3.4.0.GA, 3.5, JPA 2.0 Environment: JPA Reporter: Albert Kurucz According to http://opensource.atlassian.com/projects/hibernate/browse/ANN-36 @ForceDiscriminator was created as a quick workaround to a problem. Yes, it solves the problem, but it creates a new problem: the source code which previously had only JPA annotations, now need to be annotated by a Hibernate annotation, causing that the the source code is now unable to use just any JPA provider. Major portability issue! Everyone who likes Open Source, hates Lock-Ins! My proposal: change the default to a more sane force=true, so that @ForceDiscriminator will not be needed for general JPA projects. (And create a @DisableDiscriminator Hibernate annotation, for those who like to brake their code). If changing default behavior is risky, don't fix this on older versions, but lets change this from 3.5.0-Beta2. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 10:59:14 2009 From: noreply at atlassian.com (Albert Kurucz (JIRA)) Date: Thu, 27 Aug 2009 09:59:14 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-862) Having to use @ForceDiscriminator kind of breaks JPA compatibility In-Reply-To: <461687182.9431251384135135.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1451697.9451251385154975.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33857#action_33857 ] Albert Kurucz commented on ANN-862: ----------------------------------- http://www.gmarwaha.com/blog/2009/08/26/hibernate-why-should-i-force-discriminator/ > Having to use @ForceDiscriminator kind of breaks JPA compatibility > ------------------------------------------------------------------ > > Key: ANN-862 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-862 > Project: Hibernate Annotations > Issue Type: Improvement > Affects Versions: 3.4.0.GA, 3.5, JPA 2.0 > Environment: JPA > Reporter: Albert Kurucz > > According to > http://opensource.atlassian.com/projects/hibernate/browse/ANN-36 > @ForceDiscriminator was created as a quick workaround to a problem. > Yes, it solves the problem, but it creates a new problem: > the source code which previously had only JPA annotations, now need to be annotated by a Hibernate annotation, > causing that the the source code is now unable to use just any JPA provider. > Major portability issue! > Everyone who likes Open Source, hates Lock-Ins! > My proposal: change the default to a more sane force=true, so that @ForceDiscriminator will not be needed for general JPA projects. > (And create a @DisableDiscriminator Hibernate annotation, for those who like to brake their code). > If changing default behavior is risky, don't fix this on older versions, but lets change this from 3.5.0-Beta2. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 12:46:15 2009 From: noreply at atlassian.com (Shawn Clowater (JIRA)) Date: Thu, 27 Aug 2009 11:46:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4109) filter and join "with" do not work In-Reply-To: <545218131.9181251375615149.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <588852726.9481251391575688.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33858#action_33858 ] Shawn Clowater commented on HHH-4109: ------------------------------------- Have you tried 3.2.7 yet? There was alot of work done around the parsing of the filter parameters for http://opensource.atlassian.com/projects/hibernate/browse/HHH-530 > filter and join "with" do not work > ---------------------------------- > > Key: HHH-4109 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109 > Project: Hibernate Core > Issue Type: Bug > Components: query-hql > Affects Versions: 3.2.6 > Environment: Hibernate 3.2.6GA, MySql > Reporter: ggsoft at gmx.net > Priority: Blocker > > When using filters and joins with a with clause, Hibernate applies the parameters in wrong order. > > The filter sets only a soft delete flag. On the HQL > select u, b. as buddyState from User as u left join u.buddiesForUserB as b with b.userByUserA.userid = :p_userAid where u.username = :p_username; > the filter is applied to the with and to the where clause. Resulting in: > ... > buddiesfor1_ on user0_.userid=buddiesfor1_.userB and buddiesfor1_.deleted=0 and (buddiesfor1_.userA=0) where user0_.deleted=1 and user0_.username='myUsername' > ... > because the order is filter, param,filter, param > But in Hibernates QueryLoader Class bindFilterParameterValues l.496 (511-516) it is assumed the filters come first. > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:18:16 2009 From: noreply at atlassian.com (ggsoft@gmx.net (JIRA)) Date: Thu, 27 Aug 2009 12:18:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4109) filter and join "with" do not work In-Reply-To: <545218131.9181251375615149.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <997169659.9501251393496024.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33859#action_33859 ] ggsoft at gmx.net commented on HHH-4109: ------------------------------------- Tried it now. I can see all Params and Filters but the order of List parameterSpecs = queryTranslator.getCollectedParameterSpecifications(); (here the set param comes first) does not meet the statement where the filter comes first. > filter and join "with" do not work > ---------------------------------- > > Key: HHH-4109 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109 > Project: Hibernate Core > Issue Type: Bug > Components: query-hql > Affects Versions: 3.2.6 > Environment: Hibernate 3.2.6GA, MySql > Reporter: ggsoft at gmx.net > Priority: Blocker > > When using filters and joins with a with clause, Hibernate applies the parameters in wrong order. > > The filter sets only a soft delete flag. On the HQL > select u, b. as buddyState from User as u left join u.buddiesForUserB as b with b.userByUserA.userid = :p_userAid where u.username = :p_username; > the filter is applied to the with and to the where clause. Resulting in: > ... > buddiesfor1_ on user0_.userid=buddiesfor1_.userB and buddiesfor1_.deleted=0 and (buddiesfor1_.userA=0) where user0_.deleted=1 and user0_.username='myUsername' > ... > because the order is filter, param,filter, param > But in Hibernates QueryLoader Class bindFilterParameterValues l.496 (511-516) it is assumed the filters come first. > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:24:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 12:24:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-217) ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution Message-ID: <1122912486.9531251393855134.JavaMail.j2ee-opensource-projects@vps07.contegix.com> ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution ------------------------------------------------------------------------------------------------------------------ Key: HV-217 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-217 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:26:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 12:26:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-217) ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution In-Reply-To: <1122912486.9531251393855134.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <467778666.9561251393975123.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33860#action_33860 ] Emmanuel Bernard commented on HV-217: ------------------------------------- The spec does not mandate support for that. I am talking about Suburb.includedPostCodes and PostCodeList validators. This particluar example should move to Hibernate Validator. > ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-217 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-217 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Affects Versions: 4.0.0.CR1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:26:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 12:26:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-217) ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution In-Reply-To: <1122912486.9531251393855134.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1299592271.9591251393975244.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bernard updated HV-217: -------------------------------- Affects Version/s: 4.0.0.CR1 Component/s: tck > ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-217 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-217 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Affects Versions: 4.0.0.CR1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:29:15 2009 From: noreply at atlassian.com (Shawn Clowater (JIRA)) Date: Thu, 27 Aug 2009 12:29:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4109) filter and join "with" do not work In-Reply-To: <545218131.9181251375615149.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1148678230.9611251394155104.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33861#action_33861 ] Shawn Clowater commented on HHH-4109: ------------------------------------- I'll save you some turnaround, the first thing anyone is going to ask for is a test case illustrating the problem. You should be able to modify the existing filter test cases. The one thing that confuses me is that for the two deleted checks, one is 0 and the other is 1. Does the user id (0) get set as the value for the filter parm there? > filter and join "with" do not work > ---------------------------------- > > Key: HHH-4109 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109 > Project: Hibernate Core > Issue Type: Bug > Components: query-hql > Affects Versions: 3.2.6 > Environment: Hibernate 3.2.6GA, MySql > Reporter: ggsoft at gmx.net > Priority: Blocker > > When using filters and joins with a with clause, Hibernate applies the parameters in wrong order. > > The filter sets only a soft delete flag. On the HQL > select u, b. as buddyState from User as u left join u.buddiesForUserB as b with b.userByUserA.userid = :p_userAid where u.username = :p_username; > the filter is applied to the with and to the where clause. Resulting in: > ... > buddiesfor1_ on user0_.userid=buddiesfor1_.userB and buddiesfor1_.deleted=0 and (buddiesfor1_.userA=0) where user0_.deleted=1 and user0_.username='myUsername' > ... > because the order is filter, param,filter, param > But in Hibernates QueryLoader Class bindFilterParameterValues l.496 (511-516) it is assumed the filters come first. > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:48:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 12:48:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HV-218) Validator implementation resolution is based on the returned value (at runtime) instead of the returned type Message-ID: <195291834.9641251395295236.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Validator implementation resolution is based on the returned value (at runtime) instead of the returned type ------------------------------------------------------------------------------------------------------------ Key: HV-218 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-218 Project: Hibernate Validator Issue Type: Sub-task Reporter: Emmanuel Bernard Assignee: Hardy Ferentschik -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:52:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 12:52:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-218) Validator implementation resolution is based on the returned value (at runtime) instead of the returned type In-Reply-To: <195291834.9641251395295236.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <500697908.9671251395535136.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33862#action_33862 ] Emmanuel Bernard commented on HV-218: ------------------------------------- ValidatorResolutionTest#testAmbigiousValidatorResolution This test should not be ambiguous because Bar is the returned type of getBar() What would be ambiguous would be to get Bar implement Serializable and Baz and having validators for both Serializable and Baz (and not Bar). > Validator implementation resolution is based on the returned value (at runtime) instead of the returned type > ------------------------------------------------------------------------------------------------------------ > > Key: HV-218 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-218 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 13:52:15 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Thu, 27 Aug 2009 12:52:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-218) Validator implementation resolution is based on the returned value (at runtime) instead of the returned type In-Reply-To: <195291834.9641251395295236.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <479345113.9701251395535288.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33863#action_33863 ] Emmanuel Bernard commented on HV-218: ------------------------------------- I think the bug comes from ConstraintTree#findMatchingValidatorClass which takes the value to extract the expected type. > Validator implementation resolution is based on the returned value (at runtime) instead of the returned type > ------------------------------------------------------------------------------------------------------------ > > Key: HV-218 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-218 > Project: Hibernate Validator > Issue Type: Sub-task > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Thu Aug 27 17:34:17 2009 From: noreply at atlassian.com (=?UTF-8?Q?Arturo_Frapp=C3=A9_=28JIRA=29?=) Date: Thu, 27 Aug 2009 16:34:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J In-Reply-To: <77836459.1173475749647.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1664026815.9831251408857370.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33864#action_33864 ] Arturo Frapp? commented on ANN-572: ----------------------------------- ?What does javax.persistence.Embedded mean? I was wondering if Embedded annotation interfers with Node annotation in any sense. This line is found inside org.hibernate.cfg.AnnotationBinder::processElementAnnotations( .. ) { ... near 1544 line of code: //potential element property.isAnnotationPresent( Embedded.class ) ; ... I think that this line overrides the @Node(embedXML=true|false) What if the same line is rewritten: //potential element collectionBinder.setEmbedded( BinderHelper.isElementNodeEmbeddedXML( property ) || property.isAnnotationPresent( Embedded.class ) ); Considering that a @Node is also present and is predominant ? What if the prescence of @Embedded annotation is ignored, what will be the effect? > @Node(name=, embedXml=true|false) for DOM4J > ------------------------------------------- > > Key: ANN-572 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-572 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.5 > > Attachments: ANN-572-patch-by-afm.patch, hibernate-node-annotation.zip > > > If there are unit tests for each then that's all good. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 04:45:18 2009 From: noreply at atlassian.com (Maillefer Jean-David (JIRA)) Date: Fri, 28 Aug 2009 03:45:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4110) Dirty check fail for CharArrayType Message-ID: <797181092.9861251449118960.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Dirty check fail for CharArrayType ---------------------------------- Key: HHH-4110 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4110 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.3.2 Reporter: Maillefer Jean-David Entity fields of type char[] are mapped using class org.hibernate.typeAbstractCharArrayType. These fields are always marked dirty by the dirty check mechanism and thus are always updated to the database. The dirty check implementation uses inherited org.hibernate.type.NullableType#isEqual(Object, Object) which in turn call org.hibernate.util.EqualsHelper.equals(Object, Object) which does only a reference check for array, not a "deep" check similar to Arrays.equals(char[], char[]). I suggest overriding #isEqual(Object, Object) in AbstractCharArrayType with the following code (adapted from EqualsHelper) : public boolean isEqual(Object x, Object y) { return x==y || ( x instanceof char[] && y instanceof char[] && Arrays.equals((char[])x, (char[])y) ); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 07:10:18 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Fri, 28 Aug 2009 06:10:18 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J In-Reply-To: <77836459.1173475749647.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2131427530.9981251457818625.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33865#action_33865 ] Emmanuel Bernard commented on ANN-572: -------------------------------------- Ahh no CollectionBinder.setEmbedded (as in object embedded) is not related to Collection.setEmbedded (as in xml embedded). There should be treated differently. > @Node(name=, embedXml=true|false) for DOM4J > ------------------------------------------- > > Key: ANN-572 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-572 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.5 > > Attachments: ANN-572-patch-by-afm.patch, hibernate-node-annotation.zip > > > If there are unit tests for each then that's all good. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 07:10:19 2009 From: noreply at atlassian.com (Emmanuel Bernard (JIRA)) Date: Fri, 28 Aug 2009 06:10:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J In-Reply-To: <77836459.1173475749647.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <2058065412.10101251457819211.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33866#action_33866 ] Emmanuel Bernard commented on ANN-572: -------------------------------------- @Embedded is about the notion of component in Hibernate > @Node(name=, embedXml=true|false) for DOM4J > ------------------------------------------- > > Key: ANN-572 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-572 > Project: Hibernate Annotations > Issue Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.5 > > Attachments: ANN-572-patch-by-afm.patch, hibernate-node-annotation.zip > > > If there are unit tests for each then that's all good. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 09:27:15 2009 From: noreply at atlassian.com (Baptiste MATHUS (JIRA)) Date: Fri, 28 Aug 2009 08:27:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4111) Unable to hot-swap logger configuration for Hibernate types due to local cache Message-ID: <1253106446.10121251466035600.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Unable to hot-swap logger configuration for Hibernate types due to local cache ------------------------------------------------------------------------------- Key: HHH-4111 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4111 Project: Hibernate Core Issue Type: Improvement Components: core Affects Versions: 3.2.6 Environment: Hibernate 3.2.6.ga Reporter: Baptiste MATHUS Hi, Like a lot of people, I guess, we added in our app the possibility to be able to change logging (logback/log4j) configuration without having to restart the server. This works very fine, but we recently noticed that trying to activate the binding logs (via the org.hibernate.type=trace option) doesn't have any effect. After some investigation, we found out what's the cause of this problem. In NullableType, the "logger.isTraceEnabled()" value is cached in a static final boolean... So, when you start the server without any binding log and then trigger the NullableType class loading, you won't be able to see any binding log until server is restarted. It would be great if you could propose a clean solution for this use case (remove the cache?). For example, we currently are trying to debug a running production server. And we cannot see the values sent in the query we're interested in. Is the performance improvement really so significant as Gavin stated in the javadoc? Cannot we just not cache this value and trust the logging implementor for this performance aspect? As a reminder, here's the corresponding code excerpt: public abstract class NullableType extends AbstractType { /** * This is the old scheme where logging of parameter bindings and value extractions * was controlled by the trace level enablement on the 'org.hibernate.type' package... *

* Originally was cached such because of performance of looking up the logger each time * in order to check the trace-enablement. Driving this via a central Log-specific class * would alleviate that performance hit, and yet still allow more "normal" logging usage/config.. */ private static final boolean IS_VALUE_TRACING_ENABLED = LogFactory.getLog( StringHelper.qualifier( Type.class.getName() ) ).isTraceEnabled(); private transient Log log; private Log log() { if ( log == null ) { log = LogFactory.getLog( getClass() ); } return log; } Thanks a lot! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 09:49:15 2009 From: noreply at atlassian.com (Matt Sgarlata (JIRA)) Date: Fri, 28 Aug 2009 08:49:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3562) Support @OrderBy and @Sort annotations In-Reply-To: <2873777.1225360146744.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <686299043.10151251467355877.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33867#action_33867 ] Matt Sgarlata commented on HHH-3562: ------------------------------------ It really sucks to have an annotation defined but not work! > Support @OrderBy and @Sort annotations > -------------------------------------- > > Key: HHH-3562 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3562 > Project: Hibernate Core > Issue Type: New Feature > Components: envers > Reporter: Adam Warski > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 10:04:15 2009 From: noreply at atlassian.com (ggsoft@gmx.net (JIRA)) Date: Fri, 28 Aug 2009 09:04:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4109) filter and join "with" do not work In-Reply-To: <545218131.9181251375615149.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <546506800.10171251468255076.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ggsoft at gmx.net updated HHH-4109: -------------------------------- Attachment: HHH4109.zip Demonstrates the behaviour > filter and join "with" do not work > ---------------------------------- > > Key: HHH-4109 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109 > Project: Hibernate Core > Issue Type: Bug > Components: query-hql > Affects Versions: 3.2.6 > Environment: Hibernate 3.2.6GA, MySql > Reporter: ggsoft at gmx.net > Priority: Blocker > Attachments: HHH4109.zip > > > When using filters and joins with a with clause, Hibernate applies the parameters in wrong order. > > The filter sets only a soft delete flag. On the HQL > select u, b. as buddyState from User as u left join u.buddiesForUserB as b with b.userByUserA.userid = :p_userAid where u.username = :p_username; > the filter is applied to the with and to the where clause. Resulting in: > ... > buddiesfor1_ on user0_.userid=buddiesfor1_.userB and buddiesfor1_.deleted=0 and (buddiesfor1_.userA=0) where user0_.deleted=1 and user0_.username='myUsername' > ... > because the order is filter, param,filter, param > But in Hibernates QueryLoader Class bindFilterParameterValues l.496 (511-516) it is assumed the filters come first. > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 10:06:17 2009 From: noreply at atlassian.com (ggsoft@gmx.net (JIRA)) Date: Fri, 28 Aug 2009 09:06:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4109) filter and join "with" do not work In-Reply-To: <545218131.9181251375615149.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <989064144.10191251468377490.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33869#action_33869 ] ggsoft at gmx.net commented on HHH-4109: ------------------------------------- I have added a running example that demonstrates the behaviour. The value of the user id (1) gets set for the filter that should be false/0. The example is an eclipse maven project with hsqldb. > filter and join "with" do not work > ---------------------------------- > > Key: HHH-4109 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4109 > Project: Hibernate Core > Issue Type: Bug > Components: query-hql > Affects Versions: 3.2.6 > Environment: Hibernate 3.2.6GA, MySql > Reporter: ggsoft at gmx.net > Priority: Blocker > Attachments: HHH4109.zip > > > When using filters and joins with a with clause, Hibernate applies the parameters in wrong order. > > The filter sets only a soft delete flag. On the HQL > select u, b. as buddyState from User as u left join u.buddiesForUserB as b with b.userByUserA.userid = :p_userAid where u.username = :p_username; > the filter is applied to the with and to the where clause. Resulting in: > ... > buddiesfor1_ on user0_.userid=buddiesfor1_.userB and buddiesfor1_.deleted=0 and (buddiesfor1_.userA=0) where user0_.deleted=1 and user0_.username='myUsername' > ... > because the order is filter, param,filter, param > But in Hibernates QueryLoader Class bindFilterParameterValues l.496 (511-516) it is assumed the filters come first. > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Fri Aug 28 16:53:15 2009 From: noreply at atlassian.com (David Green (JIRA)) Date: Fri, 28 Aug 2009 15:53:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4112) HibernateProxy enhanced POJOs lose method annotations Message-ID: <1955187608.10241251492795069.JavaMail.j2ee-opensource-projects@vps07.contegix.com> HibernateProxy enhanced POJOs lose method annotations ----------------------------------------------------- Key: HHH-4112 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4112 Project: Hibernate Core Issue Type: Bug Components: core Affects Versions: 3.2.0.ga Reporter: David Green Using FetchType.LAZY on an association can result in POJO entities being enhanced via JavassistProxyFactory or CGLIBProxyFactory. The resulting class overrides all declared accessors and mutators (get/set methods) in the original POJO. Those overridden methods lose any annotations that were specified on the original POJO. The result is that unsuspecting code looking for annotations on POJO accessors won't find any annotations. For example, if I have an @Entity POJO called Resident, the following JUnit test will fail for both CGLIBProxyFactory and JavassistProxyFactory: {code:Java} public void testCGLibProxy() throws HibernateException, SecurityException, NoSuchMethodException { doTest(new CGLIBProxyFactory()); } public void testJavassistProxy() throws HibernateException, SecurityException, NoSuchMethodException { doTest(new JavassistProxyFactory()); } private void doTest(ProxyFactory proxyFactory) throws NoSuchMethodException { HashSet proxyInterfaces = new HashSet(); proxyInterfaces.add( HibernateProxy.class ); proxyFactory.postInstantiate("Resident", Resident.class, proxyInterfaces, Resident.class.getDeclaredMethod("getId"), Resident.class.getDeclaredMethod("setId",Long.class), null); HibernateProxy hibernateProxy = proxyFactory.getProxy(resident.getId(), session); assertTrue(hibernateProxy instanceof Resident); System.out.println("Hibernate proxy name: "+hibernateProxy.getClass().getName()); assertNotNull(Resident.class.getDeclaredMethod("getMaritalStatus").getAnnotation(Required.class)); assertNotNull(hibernateProxy.getClass().getDeclaredMethod("getMaritalStatus").getAnnotation(Required.class)); } {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Sat Aug 29 16:07:15 2009 From: noreply at atlassian.com (Mike Ressler (JIRA)) Date: Sat, 29 Aug 2009 15:07:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3332) Hibernate duplicate then child entity's on merge In-Reply-To: <96382955.1212684333109.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1486661936.10331251576435539.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33870#action_33870 ] Mike Ressler commented on HHH-3332: ----------------------------------- I ran into this using version 3.3.1. The workaround I'm using at the moment is to add the child to the beginning of the list. So the code in the example would be: Child c = new Child(); c.setFather(f); f.getChildList().add(0, c); This is working for me at the moment. I'm surprised this bug has been open for so long. > Hibernate duplicate then child entity's on merge > ------------------------------------------------ > > Key: HHH-3332 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3332 > Project: Hibernate Core > Issue Type: Bug > Affects Versions: 3.2.6 > Environment: JDK 1.6 > Oracle 9i > Hibernate 3.2.6 > Hibernate Annotations 3.3.1 > Hibernate EntityManager 3.3.2 > Standalone Running > Reporter: Rodrigo de Assump??o > Priority: Critical > Attachments: ExampleBug.zip > > > The method merge from EntityManager causes a duplication of child entity's. > class Father: > @OneToMany(mappedBy = "father", cascade={CascadeType.ALL}, fetch=FetchType.LAZY) > private List childList; > class Child: > @ManyToOne @JoinColumn(name = "ID_FATHER") > private Father father; > class BugTest > EntityManagerFactory emf = Persistence.createEntityManagerFactory("JpaTestHB"); > EntityManager em = emf.createEntityManager(); > > Father f = (Father) em.createQuery("SELECT f FROM Father f WHERE f.id = 1").getSingleResult(); > > Child c = new Child(); > c.setFather(f); > f.getChildList().add(c); > > em.getTransaction().begin(); > em.merge(f); > em.getTransaction().commit(); > The execution of BugTest Class causes tow insert's on table "child". > If you change the fetch mode to EAGER (into Father class) the problem not occurs. > I make the same test with Toplink, and it make a unique insert, normal. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 05:20:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 04:20:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-218) Validator implementation resolution is based on the returned value (at runtime) instead of the returned type In-Reply-To: <195291834.9641251395295236.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1773101458.10431251710415827.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-218: --------------------------------- Component/s: engine > Validator implementation resolution is based on the returned value (at runtime) instead of the returned type > ------------------------------------------------------------------------------------------------------------ > > Key: HV-218 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-218 > Project: Hibernate Validator > Issue Type: Sub-task > Components: engine > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 06:14:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 05:14:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-218) Validator implementation resolution is based on the returned value (at runtime) instead of the returned type In-Reply-To: <195291834.9641251395295236.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <409949761.10461251713655810.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-218: --------------------------------- Affects Version/s: 4.0.0.CR1 Fix Version/s: 4.0.0.GA > Validator implementation resolution is based on the returned value (at runtime) instead of the returned type > ------------------------------------------------------------------------------------------------------------ > > Key: HV-218 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-218 > Project: Hibernate Validator > Issue Type: Sub-task > Components: engine > Affects Versions: 4.0.0.CR1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.GA > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 09:17:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 08:17:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-218) Validator implementation resolution is based on the returned value (at runtime) instead of the returned type In-Reply-To: <195291834.9641251395295236.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1583983425.10521251724635530.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-218. ---------------------------------- Resolution: Fixed > Validator implementation resolution is based on the returned value (at runtime) instead of the returned type > ------------------------------------------------------------------------------------------------------------ > > Key: HV-218 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-218 > Project: Hibernate Validator > Issue Type: Sub-task > Components: engine > Affects Versions: 4.0.0.CR1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.GA > > Time Spent: 34 minutes > Remaining Estimate: 0 minutes > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 09:17:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 08:17:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HV-218) Validator implementation resolution is based on the returned value (at runtime) instead of the returned type In-Reply-To: <195291834.9641251395295236.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <426742043.10551251724635712.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33871#action_33871 ] Hardy Ferentschik commented on HV-218: -------------------------------------- Removed the runtime type evaluation in ConstraintTree and updated the test in the TCK. > Validator implementation resolution is based on the returned value (at runtime) instead of the returned type > ------------------------------------------------------------------------------------------------------------ > > Key: HV-218 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-218 > Project: Hibernate Validator > Issue Type: Sub-task > Components: engine > Affects Versions: 4.0.0.CR1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.GA > > Time Spent: 34 minutes > Remaining Estimate: 0 minutes > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 09:17:16 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 08:17:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-161) Hibernate Validator does not validate several groups in // during one navigation path In-Reply-To: <601413674.1241527397320.JavaMail.j2ee_opensource.atlassian.com-projects@atlassian12.managed.contegix.com> Message-ID: <685546076.10571251724636954.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-161: --------------------------------- Fix Version/s: (was: 4.0.0.GA) > Hibernate Validator does not validate several groups in // during one navigation path > ------------------------------------------------------------------------------------- > > Key: HV-161 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-161 > Project: Hibernate Validator > Issue Type: Improvement > Components: engine > Affects Versions: 4.0.0.Beta1 > Reporter: Emmanuel Bernard > Priority: Critical > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 09:17:17 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 08:17:17 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-94) Support dynamic default group sequence definition In-Reply-To: <32763334.1231793979645.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1089347466.10591251724637162.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-94: -------------------------------- Fix Version/s: (was: 4.0.0.GA) > Support dynamic default group sequence definition > ------------------------------------------------- > > Key: HV-94 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-94 > Project: Hibernate Validator > Issue Type: New Feature > Components: engine > Reporter: Emmanuel Bernard > > Will probably not be spec'ed in the 1.0 JSR but can be added as a RI feature. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 09:22:16 2009 From: noreply at atlassian.com (pintail (JIRA)) Date: Mon, 31 Aug 2009 08:22:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3239) MarkerObject should be serializable when using with swf In-Reply-To: <142501142.1208214033218.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <1407128981.10681251724936639.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33872#action_33872 ] pintail commented on HHH-3239: ------------------------------ I encountered the same problem having that exception in my logs. I placed a breakpoint when the NotSerializableException was thrown. I saw in my log another exception, which led me to this post: https://forum.hibernate.org/viewtopic.php?p=2407563 In one of the comments they mentioned to try to make the private default constructor to package protected. I also had a private default constructor. According to the documentation: http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#persistent-classes-pojo-constructor it is _recommended_ to make the default constructor at least package protected. It seems actually _needed_ instead of _recommende_. This solved the issue for me. > MarkerObject should be serializable when using with swf > ------------------------------------------------------- > > Key: HHH-3239 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3239 > Project: Hibernate Core > Issue Type: Bug > Components: core > Affects Versions: 3.2.6 > Environment: Hibernate 3.2.6 and Spring Webflow 2.0 > Reporter: Goran Blankendal > > You get a java.io.NotSerializableException: org.hibernate.util.MarkerObject > when using hibernate in a persistence context in SWF 2 > See http://forum.springframework.org/showthread.php?t=51738 and http://forum.hibernate.org/viewtopic.php?t=985226 > The MarkerObject should be serializable. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 09:39:19 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 08:39:19 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Updated: (HV-217) ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution In-Reply-To: <1122912486.9531251393855134.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <1793459254.10711251725959237.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik updated HV-217: --------------------------------- Fix Version/s: 4.0.0.GA > ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-217 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-217 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Affects Versions: 4.0.0.CR1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.GA > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 11:50:15 2009 From: noreply at atlassian.com (Hardy Ferentschik (JIRA)) Date: Mon, 31 Aug 2009 10:50:15 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Resolved: (HV-217) ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution In-Reply-To: <1122912486.9531251393855134.JavaMail.j2ee-opensource-projects@vps07.contegix.com> Message-ID: <917243284.10751251733815349.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/HV-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hardy Ferentschik resolved HV-217. ---------------------------------- Resolution: Fixed moved the postcode list test into Hibernate Validator > ValidatorResolutionTest#testResolutionOfMultipleSizeValidators uses generics in the constraintValidator resolution > ------------------------------------------------------------------------------------------------------------------ > > Key: HV-217 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-217 > Project: Hibernate Validator > Issue Type: Sub-task > Components: tck > Affects Versions: 4.0.0.CR1 > Reporter: Emmanuel Bernard > Assignee: Hardy Ferentschik > Fix For: 4.0.0.GA > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From noreply at atlassian.com Mon Aug 31 23:56:16 2009 From: noreply at atlassian.com (Martin Gercsak (JIRA)) Date: Mon, 31 Aug 2009 22:56:16 -0500 (CDT) Subject: [hibernate-issues] [Hibernate-JIRA] Commented: (ANN-793) @ManyToOne - @OneToMany doesn't work with @Inheritance(strategy= InheritanceType.JOINED) In-Reply-To: <12490505.1231498178830.JavaMail.j2ee@atlassian01.managed.contegix.com> Message-ID: <533310203.10861251777376553.JavaMail.j2ee-opensource-projects@vps07.contegix.com> [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33874#action_33874 ] Martin Gercsak commented on ANN-793: ------------------------------------ Same problem here. Once I use @Inheritance(strategy= InheritanceType.JOINED) on a class mapped to multiple tables I get "table not found" even if there is no derived class yet. If I remove @Inheritance the code works. > @ManyToOne - @OneToMany doesn't work with @Inheritance(strategy= InheritanceType.JOINED) > ---------------------------------------------------------------------------------------- > > Key: ANN-793 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-793 > Project: Hibernate Annotations > Issue Type: Bug > Affects Versions: 3.4.0.GA > Environment: Hibernate Core 3.3.1.GA > Hibernate Annotations 3.4.0 GA > Hibernate EntityManager 3.4.0 GA > Jboss 4.3 EAP, > DB2 9.5 > Reporter: Tomaz Cerar > > I am trying to create bidirectional association between two entities in which one can be Inherited and it fails with table not found: > 11:37:39,229 ERROR [AssertionFailure] [] an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) > org.hibernate.AssertionFailure: Table CRM.CRM_AKTIVNOST_DOGODKI not found > at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:480) > at org.hibernate.persister.entity.JoinedSubclassEntityPersister.(JoinedSubclassEntityPersister.java:259) > at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:87) > at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:261) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327) > at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669) > at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132) > at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246) > The code looks like this: > @Entity > @Table(name = "CRM_AKTIVNOST") > public class Aktivnost implements Serializable { > private List dogodki; > .... > .... > @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL,mappedBy = "aktivnost") > public List getDogodki() { > return dogodki; > } > public void setDogodki(List dogodki) { > this.dogodki = dogodki; > } > ... > ... > } > @Entity > @Table(name = "CRM_DOGODEK") > @Inheritance(strategy= InheritanceType.JOINED) > public class Dogodek implements Serializable { > ... > ... > private Aktivnost aktivnost; > .... > .... > @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) > @JoinTable(name = "CRM_AKTIVNOST_DOGODKI", joinColumns = {@JoinColumn(name = "DOGODEK_ID")}, inverseJoinColumns = {@JoinColumn(name = "AKTIVNOST_ID")}) > public Aktivnost getAktivnost() { > return aktivnost; > } > public void setAktivnost(Aktivnost aktivnost) { > this.aktivnost = aktivnost; > } > ... > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira