[Hibernate-JIRA] Created: (BVAL-10) Turn ValidatorParser into a MetadataProvider
by Emmanuel Bernard (JIRA)
Turn ValidatorParser into a MetadataProvider
--------------------------------------------
Key: BVAL-10
URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-10
Project: Bean Validation
Issue Type: New Feature
Components: ri-general
Reporter: Emmanuel Bernard
Assignee: Hardy Ferentschik
You should turn parser into something more like a MetadataProvider.
I removed the getValidators() method from parser and moved it to ValidatorImpl. The parser should not be aware of ValidatorImpl, nor Validator for that matter.
The MetadataProvider will be an interface anybody can implement. We will do the annotation version as well as the XML version (and probably some kind of XML overriding annotation version) but one can imagine a Script / Groovy DSLed version, a Programmatic API version and so on.
I imagine a MetadataProvider instance can be passed during the building phase to the ValidatorFactory. The same instance would then be shared for all Validators (kind of make sense, you can't parse XML for every single ValdiatorImpl instantiation).
That woul mean the parser ode needs ot be reworked to be immutable (at least work in concurrent calls)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[Hibernate-JIRA] Commented: (HHH-892) HQL parser does not resolve alias in ORDER BY clause
by Tomasz Bech (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-892?page=co... ]
Tomasz Bech commented on HHH-892:
---------------------------------
I hope Hibernate is going to be JPA 2.0 compliant (where ordering by alias in supported)
>From the JPA 2.0 spec:
The ORDER BY clause allows the objects or values that are returned by the query to be ordered.
The syntax of the ORDER BY clause is
orderby_clause ::= ORDER BY orderby_item {, orderby_item}*
orderby_item ::= { state_field_path_expression | result_variable } [ASC | DESC]
SELECT o.quantity, o.cost*1.08 AS taxedCost, a.zipcode
FROM Customer c JOIN c.orders o JOIN c.address a
WHERE a.state = 'CA' AND a.county = 'Santa Clara'
ORDER BY o.quantity, taxedCost, a.zipcode
> HQL parser does not resolve alias in ORDER BY clause
> -----------------------------------------------------
>
> Key: HHH-892
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-892
> Project: Hibernate Core
> Issue Type: Bug
> Components: query-hql
> Affects Versions: 3.0.5
> Environment: Hibernate 3.0.5, MySQL, Tomcat
> Reporter: Guido Laures
> Priority: Minor
>
> When using an alias for an ORDER BY clause this is not always correctly resolved. Example:
> SELECT SUM(A.x) AS mySum FROM MyClass AS A GROUP BY A.y ORDER BY mySum
> does not work because "mySum" is not resolved in the ORDER BY clause which results in an exception telling that mySum is an unknown column.
> Workaround (not to say "hack") is using:
> SELECT SUM(A.x) AS mySum FROM MyClass AS A GROUP BY A.y ORDER BY col_0_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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3745) Bean creation fail for attribute name e.g. "sEventId"
by Phillip Phyo (JIRA)
Bean creation fail for attribute name e.g. "sEventId"
-----------------------------------------------------
Key: HHH-3745
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3745
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.0 final
Environment: Hibernate 3.0 and MySQL 5.0
Reporter: Phillip Phyo
Priority: Minor
If the attribute is named as "sEventId", it's throw the following exception and compile okay if i change the Entity attribute to "eventId".
javax.servlet.ServletException: Servlet.init() for servlet context threw exception
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:776)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3363)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3586)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
----- Root Cause -----
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mhSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for sEventId in class com.betell.common.wos.entity.MHOnSalesEvent
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:81)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:888)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:776)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3363)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3586)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for sEventId in class com.betell.common.wos.entity.MHOnSalesEvent
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:306)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:299)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:191)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:67)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:147)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:457)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:261)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
... 34 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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3357) session.clear() takes too long
by Jay Erb (JIRA)
session.clear() takes too long
------------------------------
Key: HHH-3357
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3357
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.6, 3.2.5
Reporter: Jay Erb
Clearing a session that contains a large number of Proxies takes a very long time. The reason for this is that null is set on the LazyInitializer when clearing the StatefulPersistenceContext, whenever a new session is set on an AbstractLazyInitializer, a check is done to see if the AbstractLazyInitializer is still attached to its previous session (and correctly throws an exception if it is). This check performs a linear search through all Proxies in the PersistenceContext. Since we're setting the session to null, do we really need to do this expensive linear search?
I propose we not perform the linear search if the session being set on the AbstractLazyInitializer is null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[Hibernate-JIRA] Created: (HBX-1014) Could not load JPA Configuration
by Reto Urfer (JIRA)
Could not load JPA Configuration
--------------------------------
Key: HBX-1014
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1014
Project: Hibernate Tools
Issue Type: Bug
Components: consoleconfiguration
Affects Versions: 3.2.cr1
Environment: Hibernate 3.2.4, Hibernate Annotations 3.3.0, Hibernate EntityManager 3.3.1, Oracle 10g R2
Reporter: Reto Urfer
If the project name contains a <SPACE> character, the following exception occurs when you try to browse the console configuration:
org.hibernate.console.HibernateConsoleRuntimeException: Could not load JPA Configuration
at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:499)
at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:484)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:203)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:185)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:106)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:38)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:97)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:142)
at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:496)
... 10 more
Caused by: java.lang.reflect.InvocationTargetException
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.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:133)
... 11 more
Caused by: javax.persistence.PersistenceException: java.lang.IllegalArgumentException: Unable to visit JAR file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin. Cause: Illegal character in path at index 53: file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258)
... 16 more
Caused by: java.lang.IllegalArgumentException: Unable to visit JAR file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin. Cause: Illegal character in path at index 53: file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin
at org.hibernate.ejb.packaging.JarVisitor.getVisitor(JarVisitor.java:112)
at org.hibernate.ejb.Ejb3Configuration.getMainJarVisitor(Ejb3Configuration.java:266)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:239)
... 16 more
If the project is renamed so it does not contain any <SPACE> characters anymore it works fine.
This problem did not occur in Hibernate Tools 3.2 Beta11
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months