[Hibernate-JIRA] Created: (HHH-5242) NamingHelper writes credential information to the log
by Yiming Du (JIRA)
NamingHelper writes credential information to the log
-----------------------------------------------------
Key: HHH-5242
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5242
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.6
Environment: This should be a general issue across all platform.
Reporter: Yiming Du
In certain situations, the class NamingHelper will write credential information to the log.
To be more specific, in the method getInitialContext() of the class org.hibernate.util.NamingHelper, there're following 2 lines
Hashtable hash = getJndiProperties(props);
log.info("JNDI InitialContext properties:" + hash);
This will result in the clear text of the credential information in the conditions that the credential properties are set and the log level is lower than INFO.
In our Websphere scenario, because Websphere is security enabled, we need to set the following properties
"hibernate.jndi.java.naming.security.principal"
"hibernate.jndi.java.naming.security.credentials"
in order to register the SessionFactory to the JNDI tree.
(Another thread https://forum.hibernate.org/viewtopic.php?f=1&t=931740&start=0 gives some description about this situation as well).
Although it's harmless to functionality, it undermines to some degree the overall security.
--
This message is 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-1134) subclass tag with discriminator in one to many mapping
by HG (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134?page=c... ]
HG commented on HHH-1134:
-------------------------
Thanks Gail, Its infact related to HH-4953
A better work around would be somthing like :
if (clazz.isInstance(result)) { return result; }
return null;
And not cathing the ClassCastException
In my opinion, It would be best to have cache per concrete class with discriminator value, and not a cache per class hierachy. This would help having CacheKeys characterized by their class names and not root class names, hence making this discriminator concept workable on second level cache.
This would ofcourse mean a lot more work while querying caches using a Super classes. But frankly, I dont know the real impact on performance it will cost.
> subclass tag with discriminator in one to many mapping
> ------------------------------------------------------
>
> Key: HHH-1134
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Environment: hibernate 3.0.5, Oracle
> Reporter: Dilip Ranjith
>
> Consider the following hbm.xml file
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping
> >
> <class
> name="DCDTO"
> table="ACCDC"
> dynamic-update="true"
> >
> <id
> name="ID"
> type="java.lang.String"
> >
> <column
> name="DCINFOID"
> />
> <generator class="sequence">
> <param name="sequence">DSEQ</param>
> <!--
> To add non XDoclet generator parameters, create a file named
> hibernate-generator-params-DebtorCreditorDTO.xml
> containing the additional parameters and place it in your merge dir.
> -->
> </generator>
> </id>
> <discriminator
> column="accountType"
> not-null="true"
> type="java.lang.String"
> force="true"
> insert="true"
> />
> <property
> name="creditMax"
> type="java.lang.Double"
> update="true"
> insert="true"
> column="creditMax"
> />
> <subclass
> name="CDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="C"
> >
> </.subclass>
> <subclass
> name="DDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="D"
> >
> </.subclass>
> </class>
> </hibernate-mapping>
> DCDTO is the super class while DDTO and CDTO are its child classes
> If in a mapped object say TDTO there are a set of CDTOs and a separate set of DDTOs
> when we get TDTO the where clause "where accountType='D' " is not there when the query for set of DDTOs are generated. so instead of a set of DDTOs i am getting a set of both DDTO's and CDTO's
--
This message is 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-5240) FetchProfile should also support LAZY
by Marc Schipperheyn (JIRA)
FetchProfile should also support LAZY
-------------------------------------
Key: HHH-5240
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5240
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.5.2
Reporter: Marc Schipperheyn
Currently initial support for FetchProfile.JOIN is available and SELECT and SUBSELECT are planned. I would like to make the case for including LAZY.
Basically JOIN, SELECT and SUBSELECT assume the default setting is lazy and depending on profile a different execution mode is selected.
The following example shows why you are sometimes forced to select EAGER and would benefit from resetting to LAZY in some cases. We have an entity User with a collection Roles (e.g. Admin, Editor etc).
Some users have multiple roles.
User is stored in the session and we frequently access the roles collection so we can't make it lazy.
User is also an eager attribute for Order of which there are many, so we need pagination. However, when we select orders, the eager relation with Roles leads to an expansion of the result set. Each Order row get #roles times the number of rows. Very undesirable and not so easy to fix.
The ability to set the Fetchprofile for orders to Lazy would be a solution here.
--
This message is 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-5238) On setting a String-Value for a integer entity-field in a criterion, produces a ClassCastException
by Hannes Havel (JIRA)
On setting a String-Value for a integer entity-field in a criterion, produces a ClassCastException
--------------------------------------------------------------------------------------------------
Key: HHH-5238
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5238
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.1
Reporter: Hannes Havel
12:06:40,864 INFO http-8080-2 IntegerType:158 - could not bind value '10' to parameter: 1; java.lang.String cannot be cast to java.lang.Integer
12:06:40,865 DEBUG http-8080-2 ServletServiceContainer:179 - core-exception in service-execution: null
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 com.daotec.remoting.server.ServiceMethod.invoke(ServiceMethod.java:85)
at com.daotec.remoting.server.ServletServiceContainer.doPost(ServletServiceContainer.java:168)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at org.hibernate.type.IntegerType.set(IntegerType.java:64)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:154)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1728)
at org.hibernate.loader.Loader.bindParameterValues(Loader.java:1699)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1589)
at org.hibernate.loader.Loader.doQuery(Loader.java:696)
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 org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:328)
at com.daotec.foundation.hibernate.GenericHibernateDAO.countAll(GenericHibernateDAO.java:147)
at com.daotec.remoting.utils.CoreGenericDAOService.list(CoreGenericDAOService.java:108)
... 20 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-5005) Column name not prefixed with table name alias
by Jeremy Hindmarsh (JIRA)
Column name not prefixed with table name alias
----------------------------------------------
Key: HHH-5005
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5005
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5 CR2, Oracle 10g
Reporter: Jeremy Hindmarsh
If a column name annotation contains a full stop, the column name is not prefixed with the table name alias.
Some of our database tables contain Oracle spatial data. One in particular has two columns for longitude and latitude,
GEOM.SDO_POINT.X and GEOM.SDO_POINT.Y
The problem is that the table alias is not added to the column name due to isIdentifier method in the Template class.
This method returns false because the column name contains full stops.
This means the renderWhereStringTemplate method doesn't prefix the column name with the table alias placeholder.
Fortunately for now I can use the following column definition, in order to get the table alias added.
@Column(name = "$PlaceHolder$.GEOM.SDO_POINT.X")
--
This message is 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