[Hibernate-JIRA] Created: (HHH-2019) Provide a way to unset properties, and/or provide a 'none' option for hbm2ddl.auto
by Dave E Martin (JIRA)
Provide a way to unset properties, and/or provide a 'none' option for hbm2ddl.auto
----------------------------------------------------------------------------------
Key: HHH-2019
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2019
Project: Hibernate3
Type: Improvement
Environment: hibernate / annotations / hibernate.properties
Reporter: Dave E Martin
Priority: Minor
It may occasionally be desirable to programmatically get rid of or override a property value, this is generally allowed for by the .setProperty method, however:
Once hbm2ddl.auto is set to something, there is no way to unset it, or set it to a value which would be equivalent to its being unset (or its undocumented). There is no remove or unset, or deleteProperty, and also setting it to null does not work.
Due to issues such as HHH-2018, it may be necessary to programmatically 'get rid of' hbm2ddl.auto even if the end user (or some other mechanism) has specified a value for it in an external hibernate.properties file (or other method of setting hibernate properties).
--
This message is 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
16 years, 10 months
[Hibernate-JIRA] Created: (HHH-2034) Potential ClassCastException in catch block in NullableType
by Galen Palmer (JIRA)
Potential ClassCastException in catch block in NullableType
-----------------------------------------------------------
Key: HHH-2034
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2034
Project: Hibernate3
Type: Improvement
Components: core
Versions: 3.1.3
Environment: Hibernate 3.1.3
Reporter: Galen Palmer
Priority: Minor
It is possible to throw an exception from within the catch block of NullableType.nullSafeSet() since the toString(value) method calls in many cases (e.g. StringType) simply result in a cast of return (String)value. This may mask the underlying problem for the users.
A proposed solution would be to replace the call in the catch blog of toString(value) with a reference to value. For example:
line 87:
log().info( "could not bind value '" + value + "' to parameter: " + index + "; " + re.getMessage() );
and line 91:
log().info( "could not bind value '" + value + "' to parameter: " + index + "; " + se.getMessage() );
This change would prevent the catch block from throwing the exception.
--
This message is 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
17 years, 1 month
[Hibernate-JIRA] Created: (ANN-436) @IndexColumn does not work with discriminator-inheritance on the target entity of the list
by ron piterman (JIRA)
@IndexColumn does not work with discriminator-inheritance on the target entity of the list
------------------------------------------------------------------------------------------
Key: ANN-436
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-436
Project: Hibernate Annotations
Type: Bug
Versions: 3.2.0.cr1
Reporter: ron piterman
When using inheritance on the target entity of a List, @IndexColumn annotation does not work. Hibernate does not populate the index column value on the target entites. As a result, the sort_order column is null.
@Entity
public class PropertyOwner {
@OneToMany
@IndexColumn(name="sort_order", mappedBy="owner",cascade=CascadeType.ALL)
private List<AbstractProperty> properties;
...
}
@Entity
@DiscriminatorColumn(name="property_type",discriminatorType=DiscriminatorType.STRING)
public abstract class AbstractProperty {
@ManyToOne
private PropertyOwner owner;
}
@Entity
@DiscriminatorValue("integer")
public class IntegerProperty extends AbstractProperty {
int integerValue;
...
}
@Entity
@DiscriminatorValue("string")
public class IntegerProperty extends AbstractProperty {
String stringValue
...
}
--
This message is 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
17 years, 2 months
[Hibernate-JIRA] Created: (HHH-1979) Unable to locate current JTA transaction
by Kuldeep Singh Virdi (JIRA)
Unable to locate current JTA transaction
----------------------------------------
Key: HHH-1979
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1979
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.1
Environment: Hibernat 3.1, My-SQL 5.0, JBOss
Reporter: Kuldeep Singh Virdi
Hi,
I have made a hibernate-service.xml file and deployed it under myApplication.har file
The xml file contents are
<?xml version="1.0"?>
<server>
<mbean code="org.hibernate.jmx.HibernateService"
name="jboss.jca:service=HibernateFactory,name=HibernateFactory">
<!-- Required services -->
<depends>jboss.jca:service=RARDeployer</depends>
<!-- Bind the Hibernate service to JNDI -->
<attribute name="JndiName">java:/hibernate/SessionFactory</attribute>
<!-- Datasource settings -->
<attribute name="Datasource">java:/jdbc/mysqlserverr</attribute>
<attribute name="Dialect">org.hibernate.dialect.MySQLDialect</attribute>
<!-- Transaction integration -->
<attribute name="TransactionStrategy">
org.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">
org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="FlushBeforeCompletionEnabled">true</attribute>
<attribute name="AutoCloseSessionEnabled">true</attribute>
<!-- Fetching options -->
<attribute name="MaximumFetchDepth">5</attribute>
<!-- Second-level caching -->
<attribute name="SecondLevelCacheEnabled">true</attribute>
<attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
<attribute name="QueryCacheEnabled">true</attribute>
<!-- Logging -->
<attribute name="ShowSqlEnabled">true</attribute>
</mbean>
</server>
Through my Stateless Session EJB i call a method
private Session getSession() {
if (sessionFactory == null)
sessionFactory = // by look up
}
return sessionFactory.getCurrentSession();
}
I get following excpetion
09:29:14,304 INFO [STDOUT] org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:604)
at com.daffodilwoods.framework.datasource.ResourceManager.currentSession(ResourceManager.java:234)
at com.daffodilwoods.framework.core.dataobject.server.DataObjectMetaDataLoader.getHibernateSession(DataObjectMetaD
at com.daffodilwoods.framework.core.dataobject.server.DataObjectMetaDataLoader.getDefaultColumns(DataObjectMetaDat
at com.daffodilwoods.framework.core.dataobject.server.DataObjectMetaDataLoader.getObject(DataObjectMetaDataLoader.
at com.daffodilwoods.framework.core.view.server.metadataloader.AbsTableMetaDataUtil.loadMetadata(AbsTableMetaDataU
at com.daffodilwoods.framework.table.server.TableMetaDataLoader.getObject(TableMetaDataLoader.java:87)
at com.daffodilwoods.framework.table.server.TableService.createView(TableService.java:32)
at com.daffodilwoods.framework.core.view.server.service.AbsViewService.init(AbsViewService.java:41)
at com.daffodilwoods.framework.core.view.server.service.AbsViewService.getViewMetaDataHandler(AbsViewService.java:
at com.daffodilwoods.framework.table.server.TableService.getData(TableService.java:56)
at com.daffodilwoods.framework.core.view.server.service.AbsViewService.getData(AbsViewService.java:68)
at com.daffodilwoods.framework.core.view.server.service.ViewService.getData(ViewService.java:71)
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 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:299)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:186)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
09:29:14,304 INFO [STDOUT] org.hibernate.HibernateException: Unable to locate current JTA transaction
Can u tell me wht can i do for it.
I think there is not support for providing currentSessionContext attribute in this xml file also
Please reply
--
This message is 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
17 years, 3 months