You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Guilherme R. (JIRA) <no...@at...> - 2006-05-12 19:01:10
|
Issue choosing accessor method ------------------------------ Key: HHH-1747 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1747 Project: Hibernate3 Type: Bug Components: core Versions: 3.1.3 Environment: Hibernate 3.1.3, Postgresql 8.0 (but bug should be database-independent). Reporter: Guilherme Rios Priority: Minor Suppose you have a Hibernate-managed POJO that has an interface like... ---------- public void setFlag(Integer flag); public Integer getFlag(); public Boolean isFlag(); ---------- The idea here is, for whatever reason, one chooses to persist a field as an Integer, but sometimes it will be more convenient for the application to retrieve it as a Boolean (say true if its stored value != 0, false otherwise). Hibernate should use setFlag and getFlag for data persistency and retrieval, but isFlag is for app use alone; Hibernate does not and should not worry about it. Hibernate's behaviour is undefined in this case, when getFlag() and isFlag() both exist: the BasicPropertyAccessor will call Class.getDeclaredMethods() and choose the one of the above that comes first (http://cvs.sourceforge.net/viewcvs.py/hibernate/Hibernate3/src/org/hibernate/property/BasicPropertyAccessor.java?rev=1.8&view=markup): private static Method getterMethod(Class theClass, String propertyName) { Method[] methods = theClass.getDeclaredMethods(); for (int i=0; i<methods.length; i++) { // only carry on if the method has no parameters if ( methods[i].getParameterTypes().length==0 ) { String methodName = methods[i].getName(); // try "get" if ( methodName.startsWith("get") ) { String testStdMethod = Introspector.decapitalize( methodName.substring(3) ); String testOldMethod = methodName.substring(3); if ( testStdMethod.equals(propertyName) || testOldMethod.equals(propertyName) ) { return methods[i]; } } // if not "get" then try "is" /*boolean isBoolean = methods[i].getReturnType().equals(Boolean.class) || methods[i].getReturnType().equals(boolean.class);*/ if ( methodName.startsWith("is") ) { String testStdMethod = Introspector.decapitalize( methodName.substring(2) ); String testOldMethod = methodName.substring(2); if ( testStdMethod.equals(propertyName) || testOldMethod.equals(propertyName) ) { return methods[i]; } } } } return null; } API-Documentation for getDeclaredMethods() says "The elements in the array returned are not sorted and are not in any particular order", so you don't actually know which accessor will be chosen: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#getDeclaredMethods() http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getDeclaredMethods() Some priority should be defined for this situation, for example choosing get() over is(). If possible, Hibernate should choose which one to use based on type as defined in the associated .hbm 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: Igor A T. (JIRA) <no...@at...> - 2006-05-12 18:11:15
|
NullPointerException at IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:195 ------------------------------------------------------------------------------------------ Key: HHH-1746 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1746 Project: Hibernate3 Type: Bug Components: query-hql Versions: 3.2.0 cr1 Reporter: Igor A Tarasov java.lang.NullPointerException at org.hibernate.hql.ast.tree.IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:195) at org.hibernate.hql.ast.tree.IdentNode.resolve(IdentNode.java:85) at org.hibernate.hql.ast.tree.DotNode.resolveFirstChild(DotNode.java:139) at org.hibernate.hql.ast.HqlSqlWalker.lookupProperty(HqlSqlWalker.java:469) at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4316) at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1211) at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4032) at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3518) at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1758) at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1683) at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776) at org.hibernate.hql.antlr.HqlSqlBaseWalker.updateStatement(HqlSqlBaseWalker.java:358) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:237) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:227) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:159) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:110) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1586) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:77) at org.dicr.isp.mbean.DataManager.deleteGroup(DataManager.java:121) at org.apache.jsp.admin.data.group_del_jsp._jspService(group_del_jsp.java:67) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) ... 17 more 194: Type componentType = getNakedPropertyType(fromElement); 195: if (!componentType.isComponentType()) { 196: throw new QueryException("Property '" + getOriginalText() + "' is not a component. Use an alias to reference associations or collections."); 197: } This occur if EJB3-QL query contains this errors: update GroupDO set GroupDO._deleted = now() where GroupDO._id = ?1 and GroupDO._deleted is NULL Correct query work fine: update GroupDO set _deleted = now() where _id = ?1 and _deleted 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-12 16:29:16
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-660?page=all ] Max Rydahl Andersen closed HBX-660: ----------------------------------- Resolution: Fixed ...and now our plugins utilize it ;) > HQL codeassist *inside* java code > --------------------------------- > > Key: HBX-660 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-660 > Project: Hibernate Tools > Type: New Feature > Versions: 3.1.beta5 > Reporter: Max Rydahl Andersen > Fix For: 3.2beta6 > > > eclipse 3.2 allows 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: Max R. A. (JIRA) <no...@at...> - 2006-05-12 16:24:12
|
HQL codeassist *inside* java code --------------------------------- Key: HBX-660 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-660 Project: Hibernate Tools Type: New Feature Versions: 3.1.beta5 Reporter: Max Rydahl Andersen Fix For: 3.2beta6 eclipse 3.2 allows 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: Max R. A. (JIRA) <no...@at...> - 2006-05-12 14:55:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-659?page=all ] Max Rydahl Andersen reopened HBX-659: ------------------------------------- > quick assist for copying java code to Criteria Editor > ----------------------------------------------------- > > Key: HBX-659 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-659 > Project: Hibernate Tools > Type: New Feature > Versions: 3.1.beta5 > Reporter: Max Rydahl Andersen > Fix For: 3.2beta6 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-12 14:55:12
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-659?page=all ] Max Rydahl Andersen closed HBX-659: ----------------------------------- Resolution: Fixed > quick assist for copying java code to Criteria Editor and string literals to HQL Editor > --------------------------------------------------------------------------------------- > > Key: HBX-659 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-659 > Project: Hibernate Tools > Type: New Feature > Versions: 3.1.beta5 > Reporter: Max Rydahl Andersen > Fix For: 3.2beta6 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-12 14:55:12
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-659?page=all ] Max Rydahl Andersen updated HBX-659: ------------------------------------ Summary: quick assist for copying java code to Criteria Editor and string literals to HQL Editor (was: quick assist for copying java code to Criteria Editor) > quick assist for copying java code to Criteria Editor and string literals to HQL Editor > --------------------------------------------------------------------------------------- > > Key: HBX-659 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-659 > Project: Hibernate Tools > Type: New Feature > Versions: 3.1.beta5 > Reporter: Max Rydahl Andersen > Fix For: 3.2beta6 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-12 14:51:12
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1745?page=comments#action_23093 ] Max Rydahl Andersen commented on HHH-1745: ------------------------------------------ Any chance you could create a matching test case for it ? Look for org/hibernate/test/sql which contains db-specific test cases for this. Much appreciated! > Returning resultset from PostgreSQL stored procedure > ---------------------------------------------------- > > Key: HHH-1745 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1745 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.2.0 cr1 > Environment: 3.2 cr1 (2006.03.27), PostgreSQL 8.1 > Reporter: Ravi Hegde > Attachments: patch.txt > > > Returning resultset from PostgreSQL stored procedure throws an exception because of incomplete PostgreSQL dialect implementation. Problem has been fixed and tested. I have attached the patch file with this issue. Would appreciate if the patch is included at the earliest. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Paul C. (JIRA) <no...@at...> - 2006-05-12 14:44:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-342?page=comments#action_23092 ] Paul Cantrell commented on ANN-342: ----------------------------------- It isn't mentioned on the annotations home page (http://www.hibernate.org/247.html). The page states the requirement as 3.2.0cr1, which by general convention means "3.2cr1 or newer" unless explicitly stated otherwise. Five minutes to add "will not work with 3.2cr2" the annotations home page right now would save other downloaders hours of headache in the time before you release. The readme.txt bundled with the annotations incorrectly states: "THIS RELEASE OF HIBERNATE ANNOTATIONS REQUIRES HIBERNATE 3.2.0.CR2 AND DOES NOT WORK WITH HIBERNATE 3.1.x OR ANY OLDER VERSION OF HIBERNATE" > Encountering NoSuchMethod error: NamingStrategy.foreignKeyColumnName(String,String):String > ------------------------------------------------------------------------------------------ > > Key: ANN-342 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-342 > Project: Hibernate Annotations > Type: Bug > Environment: Hibernate 3.2.0.cr2, Hibernate Annotations 3.1.0.Beta10, PostgreSQL 8.0, OS X 1.4.6, JDK 1.5.0_06 > Reporter: Paul Cantrell > > > I am encountering a NoSuchMethodError when Hibernate attempts to process my configuration. This suggests that my annotations and core jars are out of sync, but I do seem to have the latest versions of both. > And indeed, when I try to build hibernate-annotations, I get compile errors suggesting that the annotations were built against some code other than what I have checked out, probably 3.2cr1. > Looks like the published build of annotations is just out of sync with the latest core release...? > java.lang.NoSuchMethodError: org.hibernate.cfg.NamingStrategy.foreignKeyColumnName(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; > at org.hibernate.cfg.Ejb3JoinColumn.linkValueUsingDefaultColumnNaming(Ejb3JoinColumn.java:266) > at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:198) > at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:45) > at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:261) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205) > at net.innig.framework.persistence.hibernate.HibernateHelper.getSessionFactory(HibernateHelper.java:47) > .... > odysseus (hibernate-annotations-3.1.0.Beta10)$ ant jar > Searching for build.xml ... > Buildfile: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml > Could not load definitions from resource clovertasks. It could not be found. > init > Build Hibernate Annotations-3.1.0.Beta10 (2006-05-11 07:13:14) > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/testclasses > Copying 1 file to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Copying 2 files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build > compile > Compiling 174 source files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:258 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:266 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:412 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:420 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,<nulltype>,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/annotations/TableBinder.java:92 > collectionTableName(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > mappings.getNamingStrategy() > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/EJB3NamingStrategy.java:12 > org.hibernate.cfg.EJB3NamingStrategy is not abstract and does not override abstract method foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy > public class EJB3NamingStrategy implements NamingStrategy { > ^ > Note: Some input files use unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > 6 errors > BUILD FAILED > /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml:40: Compile failed; see the compiler error output for details. > Total time: 10 seconds -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ravi H. (JIRA) <no...@at...> - 2006-05-12 14:28:24
|
Returning resultset from PostgreSQL stored procedure ---------------------------------------------------- Key: HHH-1745 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1745 Project: Hibernate3 Type: Patch Components: core Versions: 3.2.0 cr1 Environment: 3.2 cr1 (2006.03.27), PostgreSQL 8.1 Reporter: Ravi Hegde Attachments: patch.txt Returning resultset from PostgreSQL stored procedure throws an exception because of incomplete PostgreSQL dialect implementation. Problem has been fixed and tested. I have attached the patch file with this issue. Would appreciate if the patch is included at the earliest. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-12 13:50:20
|
quick assist for copying java code to Criteria Editor ----------------------------------------------------- Key: HBX-659 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-659 Project: Hibernate Tools Type: New Feature Versions: 3.1.beta5 Reporter: Max Rydahl Andersen Fix For: 3.2beta6 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-12 13:50:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-659?page=all ] Max Rydahl Andersen closed HBX-659: ----------------------------------- Resolution: Fixed > quick assist for copying java code to Criteria Editor > ----------------------------------------------------- > > Key: HBX-659 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-659 > Project: Hibernate Tools > Type: New Feature > Versions: 3.1.beta5 > Reporter: Max Rydahl Andersen > Fix For: 3.2beta6 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-12 12:44:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-342?page=all ] Emmanuel Bernard resolved ANN-342: ---------------------------------- Resolution: Won't Fix this is stated in the documentation if I recall. Anyway, I'll release this week-end > Encountering NoSuchMethod error: NamingStrategy.foreignKeyColumnName(String,String):String > ------------------------------------------------------------------------------------------ > > Key: ANN-342 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-342 > Project: Hibernate Annotations > Type: Bug > Environment: Hibernate 3.2.0.cr2, Hibernate Annotations 3.1.0.Beta10, PostgreSQL 8.0, OS X 1.4.6, JDK 1.5.0_06 > Reporter: Paul Cantrell > > > I am encountering a NoSuchMethodError when Hibernate attempts to process my configuration. This suggests that my annotations and core jars are out of sync, but I do seem to have the latest versions of both. > And indeed, when I try to build hibernate-annotations, I get compile errors suggesting that the annotations were built against some code other than what I have checked out, probably 3.2cr1. > Looks like the published build of annotations is just out of sync with the latest core release...? > java.lang.NoSuchMethodError: org.hibernate.cfg.NamingStrategy.foreignKeyColumnName(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; > at org.hibernate.cfg.Ejb3JoinColumn.linkValueUsingDefaultColumnNaming(Ejb3JoinColumn.java:266) > at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:198) > at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:45) > at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:261) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205) > at net.innig.framework.persistence.hibernate.HibernateHelper.getSessionFactory(HibernateHelper.java:47) > .... > odysseus (hibernate-annotations-3.1.0.Beta10)$ ant jar > Searching for build.xml ... > Buildfile: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml > Could not load definitions from resource clovertasks. It could not be found. > init > Build Hibernate Annotations-3.1.0.Beta10 (2006-05-11 07:13:14) > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/testclasses > Copying 1 file to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Copying 2 files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build > compile > Compiling 174 source files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:258 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:266 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:412 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:420 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,<nulltype>,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/annotations/TableBinder.java:92 > collectionTableName(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > mappings.getNamingStrategy() > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/EJB3NamingStrategy.java:12 > org.hibernate.cfg.EJB3NamingStrategy is not abstract and does not override abstract method foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy > public class EJB3NamingStrategy implements NamingStrategy { > ^ > Note: Some input files use unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > 6 errors > BUILD FAILED > /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml:40: Compile failed; see the compiler error output for details. > Total time: 10 seconds -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-12 12:42:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-179?page=all ] Emmanuel Bernard resolved EJB-179: ---------------------------------- Resolution: Rejected > NoSuchMethodError during Ejb3Configuration > ------------------------------------------ > > Key: EJB-179 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-179 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.1.0.Beta8 > Environment: Hibernate 3.2 cr2, Hibernate Annotations 3.1.0.Beta10b, Hibernate EntityManager 3.1.0.Beta8b, MySQL 5.0 > Reporter: prabhu raman > > > Using the latest published versions of Hibernate (3.2 cr2), Hib Annotations (3.1.0 Beta 10), Hib EntityManager (3.1.0 Beta 8) > and a > (1) simple Annotated Entity Bean > (2) hibernate.properties file as present in the distribution > (3) junit extending TestCase exactly as it appears in EntityManager distribution > I get the following NoSuchMethod at runtime. Heres the complete output trace. > 23:41:08,681 INFO Version:15 - Hibernate EntityManager 3.1.0.Beta8b > 23:41:08,711 INFO Version:15 - Hibernate Annotations 3.1.0.Beta10b > 23:41:08,731 INFO Environment:499 - Hibernate 3.2 cr2 > 23:41:08,741 INFO Environment:517 - loaded properties from resource hibernate.properties: {hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.proxool.pool_alias=pool1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.default_batch_fetch_size=8, hibernate.hbm2ddl.auto=create-drop, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=1, hibernate.connection.pool_size=1, hibernate.connection.username=guhaAdmin, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, javax.persistence.provider=org.hibernate.ejb.HibernatePersistence, javax.persistence.transactionType=RESOURCE_LOCAL, hibernate.order_updates=true, hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect, hibernate.connection.url=jdbc:mysql://localhost:3306/guha} > 23:41:08,751 INFO Environment:548 - using java.io streams to persist binary types > 23:41:08,751 INFO Environment:666 - Bytecode provider name : cglib > 23:41:08,771 INFO Environment:583 - using JDK 1.4 java.sql.Timestamp handling > 23:41:09,122 INFO AnnotationBinder:336 - Binding entity from annotated class: com.guha.entity.beans.SecurityValue > 23:41:09,182 INFO EntityBinder:324 - Bind entity com.guha.entity.beans.SecurityValue on table SecurityValue > 23:41:09,462 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!) > 23:41:09,472 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1 > 23:41:09,472 INFO DriverManagerConnectionProvider:45 - autocommit mode: true > 23:41:09,482 INFO DriverManagerConnectionProvider:80 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/guha > 23:41:09,482 INFO DriverManagerConnectionProvider:86 - connection properties: {user=guhaAdmin, password=****, autocommit=true, release_mode=auto} > 23:41:09,813 INFO SettingsFactory:78 - RDBMS: MySQL, version: 5.0.18-nt > 23:41:09,813 INFO SettingsFactory:79 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ ) > 23:41:09,843 INFO Dialect:128 - Using dialect: org.hibernate.dialect.MySQLInnoDBDialect > 23:41:09,853 INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory > 23:41:09,863 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) > 23:41:09,863 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled > 23:41:09,863 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled > 23:41:09,863 INFO SettingsFactory:137 - JDBC batch size: 15 > 23:41:09,863 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled > 23:41:09,873 INFO SettingsFactory:145 - Scrollable result sets: enabled > 23:41:09,873 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): enabled > 23:41:09,873 INFO SettingsFactory:161 - Connection release mode: auto > 23:41:09,873 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1 > 23:41:09,873 INFO SettingsFactory:188 - Default batch fetch size: 8 > 23:41:09,883 INFO SettingsFactory:192 - Generate SQL with comments: disabled > 23:41:09,883 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled > 23:41:09,883 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory > 23:41:09,883 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory > 23:41:09,883 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0} > 23:41:09,893 INFO SettingsFactory:210 - Second-level cache: enabled > 23:41:09,893 INFO SettingsFactory:214 - Query cache: disabled > 23:41:09,893 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider > 23:41:09,893 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled > 23:41:09,893 INFO SettingsFactory:234 - Cache region prefix: hibernate.test > 23:41:09,903 INFO SettingsFactory:238 - Structured second-level cache entries: disabled > 23:41:09,913 INFO SettingsFactory:265 - Statistics: disabled > 23:41:09,923 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled > 23:41:09,923 INFO SettingsFactory:284 - Default entity-mode: pojo > 23:41:09,973 INFO SessionFactoryImpl:159 - building session factory > 23:41:10,504 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured > 23:41:10,514 INFO SchemaExport:152 - Running hbm2ddl schema export > 23:41:10,514 DEBUG SchemaExport:168 - import file not found: /import.sql > 23:41:10,514 INFO SchemaExport:177 - exporting generated schema to database > 23:41:10,514 DEBUG SchemaExport:301 - drop table if exists SecurityValue > 23:41:10,614 DEBUG SchemaExport:301 - create table SecurityValue (id bigint not null auto_increment, secureValue varchar(255), primary key (id)) type=InnoDB > 23:41:10,774 INFO SchemaExport:194 - schema export complete > java.lang.NoSuchMethodError: org.hibernate.ejb.EntityManagerFactoryImpl.<init>(Lorg/hibernate/SessionFactory;Ljavax/persistence/spi/PersistenceUnitTransactionType;Z)V > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:522) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:650) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:518) > at org.hibernate.ejb.test.TestCase.setUp(TestCase.java:37) > at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) > Process finished with exit code -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: Max R. A. (JIRA) <no...@at...> - 2006-05-12 10:52:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-646?page=all ] Max Rydahl Andersen closed HBX-646: ----------------------------------- Fix Version: 3.2beta6 Resolution: Fixed done. > Criteria Editor > --------------- > > Key: HBX-646 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-646 > Project: Hibernate Tools > Type: New Feature > Components: eclipse > Versions: 3.1beta4 > Reporter: Max Rydahl Andersen > Fix For: 3.2beta6 > > > we should have a Criteria Editor with code completion/query execution/sql preview -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: prabhu r. (JIRA) <no...@at...> - 2006-05-12 07:20:11
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-179?page=comments#action_23089 ] prabhu raman commented on EJB-179: ---------------------------------- I am retracting this issue. It was my bad - there was a competing hibernate-ejb-persistence.jar in the classpath. > NoSuchMethodError during Ejb3Configuration > ------------------------------------------ > > Key: EJB-179 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-179 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.1.0.Beta8 > Environment: Hibernate 3.2 cr2, Hibernate Annotations 3.1.0.Beta10b, Hibernate EntityManager 3.1.0.Beta8b, MySQL 5.0 > Reporter: prabhu raman > > > Using the latest published versions of Hibernate (3.2 cr2), Hib Annotations (3.1.0 Beta 10), Hib EntityManager (3.1.0 Beta 8) > and a > (1) simple Annotated Entity Bean > (2) hibernate.properties file as present in the distribution > (3) junit extending TestCase exactly as it appears in EntityManager distribution > I get the following NoSuchMethod at runtime. Heres the complete output trace. > 23:41:08,681 INFO Version:15 - Hibernate EntityManager 3.1.0.Beta8b > 23:41:08,711 INFO Version:15 - Hibernate Annotations 3.1.0.Beta10b > 23:41:08,731 INFO Environment:499 - Hibernate 3.2 cr2 > 23:41:08,741 INFO Environment:517 - loaded properties from resource hibernate.properties: {hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.proxool.pool_alias=pool1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.default_batch_fetch_size=8, hibernate.hbm2ddl.auto=create-drop, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=1, hibernate.connection.pool_size=1, hibernate.connection.username=guhaAdmin, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, javax.persistence.provider=org.hibernate.ejb.HibernatePersistence, javax.persistence.transactionType=RESOURCE_LOCAL, hibernate.order_updates=true, hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect, hibernate.connection.url=jdbc:mysql://localhost:3306/guha} > 23:41:08,751 INFO Environment:548 - using java.io streams to persist binary types > 23:41:08,751 INFO Environment:666 - Bytecode provider name : cglib > 23:41:08,771 INFO Environment:583 - using JDK 1.4 java.sql.Timestamp handling > 23:41:09,122 INFO AnnotationBinder:336 - Binding entity from annotated class: com.guha.entity.beans.SecurityValue > 23:41:09,182 INFO EntityBinder:324 - Bind entity com.guha.entity.beans.SecurityValue on table SecurityValue > 23:41:09,462 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!) > 23:41:09,472 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1 > 23:41:09,472 INFO DriverManagerConnectionProvider:45 - autocommit mode: true > 23:41:09,482 INFO DriverManagerConnectionProvider:80 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/guha > 23:41:09,482 INFO DriverManagerConnectionProvider:86 - connection properties: {user=guhaAdmin, password=****, autocommit=true, release_mode=auto} > 23:41:09,813 INFO SettingsFactory:78 - RDBMS: MySQL, version: 5.0.18-nt > 23:41:09,813 INFO SettingsFactory:79 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ ) > 23:41:09,843 INFO Dialect:128 - Using dialect: org.hibernate.dialect.MySQLInnoDBDialect > 23:41:09,853 INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory > 23:41:09,863 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) > 23:41:09,863 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled > 23:41:09,863 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled > 23:41:09,863 INFO SettingsFactory:137 - JDBC batch size: 15 > 23:41:09,863 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled > 23:41:09,873 INFO SettingsFactory:145 - Scrollable result sets: enabled > 23:41:09,873 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): enabled > 23:41:09,873 INFO SettingsFactory:161 - Connection release mode: auto > 23:41:09,873 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1 > 23:41:09,873 INFO SettingsFactory:188 - Default batch fetch size: 8 > 23:41:09,883 INFO SettingsFactory:192 - Generate SQL with comments: disabled > 23:41:09,883 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled > 23:41:09,883 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory > 23:41:09,883 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory > 23:41:09,883 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0} > 23:41:09,893 INFO SettingsFactory:210 - Second-level cache: enabled > 23:41:09,893 INFO SettingsFactory:214 - Query cache: disabled > 23:41:09,893 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider > 23:41:09,893 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled > 23:41:09,893 INFO SettingsFactory:234 - Cache region prefix: hibernate.test > 23:41:09,903 INFO SettingsFactory:238 - Structured second-level cache entries: disabled > 23:41:09,913 INFO SettingsFactory:265 - Statistics: disabled > 23:41:09,923 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled > 23:41:09,923 INFO SettingsFactory:284 - Default entity-mode: pojo > 23:41:09,973 INFO SessionFactoryImpl:159 - building session factory > 23:41:10,504 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured > 23:41:10,514 INFO SchemaExport:152 - Running hbm2ddl schema export > 23:41:10,514 DEBUG SchemaExport:168 - import file not found: /import.sql > 23:41:10,514 INFO SchemaExport:177 - exporting generated schema to database > 23:41:10,514 DEBUG SchemaExport:301 - drop table if exists SecurityValue > 23:41:10,614 DEBUG SchemaExport:301 - create table SecurityValue (id bigint not null auto_increment, secureValue varchar(255), primary key (id)) type=InnoDB > 23:41:10,774 INFO SchemaExport:194 - schema export complete > java.lang.NoSuchMethodError: org.hibernate.ejb.EntityManagerFactoryImpl.<init>(Lorg/hibernate/SessionFactory;Ljavax/persistence/spi/PersistenceUnitTransactionType;Z)V > at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:522) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:650) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:518) > at org.hibernate.ejb.test.TestCase.setUp(TestCase.java:37) > at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) > Process finished with exit code -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: Christian B. (JIRA) <no...@at...> - 2006-05-12 07:20:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1741?page=all ] Christian Bauer updated HHH-1741: --------------------------------- Fix Version: 3.2.0 > Bug in reference documentation > ------------------------------ > > Key: HHH-1741 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1741 > Project: Hibernate3 > Type: Bug > Components: documentation > Versions: 3.2.0.cr2 > Reporter: Luca Masini > Assignee: Christian Bauer > Priority: Trivial > Fix For: 3.2.0 > > Original Estimate: 1 minute > Remaining: 1 minute > > From paragraph 1.4.1: > "1.4.1. Writing the basic servlet > Create a new class in your source directory, in the events package: > package events; > // Imports > public class EventManagerServlet extends HttpServlet { > private final SimpleDateFormat dateFormatter = > new SimpleDateFormat("dd.MM.yyyy"); > // Servlet code > } > The dateFormatter is a tool we'll need later to convert Date objects from and to strings. It makes sense to only > have one formatter as a member of the servlet." > but if you read the JDK 1.4 and later Javadocs there is a note at the bottom of the description of the SimpleDateFormat class: > "Synchronization > Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally. " > This mean that the example is buggy and will not work if two thread use the same servlet at the same time. Please correct it putting the dateFormatter instantiation into the doGet method. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-05-12 07:18:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1741?page=all ] Christian Bauer resolved HHH-1741: ---------------------------------- Resolution: Fixed Thanks > Bug in reference documentation > ------------------------------ > > Key: HHH-1741 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1741 > Project: Hibernate3 > Type: Bug > Components: documentation > Versions: 3.2.0.cr2 > Reporter: Luca Masini > Assignee: Christian Bauer > Priority: Trivial > > Original Estimate: 1 minute > Remaining: 1 minute > > From paragraph 1.4.1: > "1.4.1. Writing the basic servlet > Create a new class in your source directory, in the events package: > package events; > // Imports > public class EventManagerServlet extends HttpServlet { > private final SimpleDateFormat dateFormatter = > new SimpleDateFormat("dd.MM.yyyy"); > // Servlet code > } > The dateFormatter is a tool we'll need later to convert Date objects from and to strings. It makes sense to only > have one formatter as a member of the servlet." > but if you read the JDK 1.4 and later Javadocs there is a note at the bottom of the description of the SimpleDateFormat class: > "Synchronization > Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally. " > This mean that the example is buggy and will not work if two thread use the same servlet at the same time. Please correct it putting the dateFormatter instantiation into the doGet method. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: prabhu r. (JIRA) <no...@at...> - 2006-05-12 04:50:12
|
NoSuchMethodError during Ejb3Configuration ------------------------------------------ Key: EJB-179 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-179 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.1.0.Beta8 Environment: Hibernate 3.2 cr2, Hibernate Annotations 3.1.0.Beta10b, Hibernate EntityManager 3.1.0.Beta8b, MySQL 5.0 Reporter: prabhu raman Using the latest published versions of Hibernate (3.2 cr2), Hib Annotations (3.1.0 Beta 10), Hib EntityManager (3.1.0 Beta 8) and a (1) simple Annotated Entity Bean (2) hibernate.properties file as present in the distribution (3) junit extending TestCase exactly as it appears in EntityManager distribution I get the following NoSuchMethod at runtime. Heres the complete output trace. 23:41:08,681 INFO Version:15 - Hibernate EntityManager 3.1.0.Beta8b 23:41:08,711 INFO Version:15 - Hibernate Annotations 3.1.0.Beta10b 23:41:08,731 INFO Environment:499 - Hibernate 3.2 cr2 23:41:08,741 INFO Environment:517 - loaded properties from resource hibernate.properties: {hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.proxool.pool_alias=pool1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.default_batch_fetch_size=8, hibernate.hbm2ddl.auto=create-drop, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=1, hibernate.connection.pool_size=1, hibernate.connection.username=guhaAdmin, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, javax.persistence.provider=org.hibernate.ejb.HibernatePersistence, javax.persistence.transactionType=RESOURCE_LOCAL, hibernate.order_updates=true, hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect, hibernate.connection.url=jdbc:mysql://localhost:3306/guha} 23:41:08,751 INFO Environment:548 - using java.io streams to persist binary types 23:41:08,751 INFO Environment:666 - Bytecode provider name : cglib 23:41:08,771 INFO Environment:583 - using JDK 1.4 java.sql.Timestamp handling 23:41:09,122 INFO AnnotationBinder:336 - Binding entity from annotated class: com.guha.entity.beans.SecurityValue 23:41:09,182 INFO EntityBinder:324 - Bind entity com.guha.entity.beans.SecurityValue on table SecurityValue 23:41:09,462 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!) 23:41:09,472 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1 23:41:09,472 INFO DriverManagerConnectionProvider:45 - autocommit mode: true 23:41:09,482 INFO DriverManagerConnectionProvider:80 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/guha 23:41:09,482 INFO DriverManagerConnectionProvider:86 - connection properties: {user=guhaAdmin, password=****, autocommit=true, release_mode=auto} 23:41:09,813 INFO SettingsFactory:78 - RDBMS: MySQL, version: 5.0.18-nt 23:41:09,813 INFO SettingsFactory:79 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ ) 23:41:09,843 INFO Dialect:128 - Using dialect: org.hibernate.dialect.MySQLInnoDBDialect 23:41:09,853 INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory 23:41:09,863 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) 23:41:09,863 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled 23:41:09,863 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled 23:41:09,863 INFO SettingsFactory:137 - JDBC batch size: 15 23:41:09,863 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled 23:41:09,873 INFO SettingsFactory:145 - Scrollable result sets: enabled 23:41:09,873 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): enabled 23:41:09,873 INFO SettingsFactory:161 - Connection release mode: auto 23:41:09,873 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1 23:41:09,873 INFO SettingsFactory:188 - Default batch fetch size: 8 23:41:09,883 INFO SettingsFactory:192 - Generate SQL with comments: disabled 23:41:09,883 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled 23:41:09,883 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 23:41:09,883 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory 23:41:09,883 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0} 23:41:09,893 INFO SettingsFactory:210 - Second-level cache: enabled 23:41:09,893 INFO SettingsFactory:214 - Query cache: disabled 23:41:09,893 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider 23:41:09,893 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled 23:41:09,893 INFO SettingsFactory:234 - Cache region prefix: hibernate.test 23:41:09,903 INFO SettingsFactory:238 - Structured second-level cache entries: disabled 23:41:09,913 INFO SettingsFactory:265 - Statistics: disabled 23:41:09,923 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled 23:41:09,923 INFO SettingsFactory:284 - Default entity-mode: pojo 23:41:09,973 INFO SessionFactoryImpl:159 - building session factory 23:41:10,504 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured 23:41:10,514 INFO SchemaExport:152 - Running hbm2ddl schema export 23:41:10,514 DEBUG SchemaExport:168 - import file not found: /import.sql 23:41:10,514 INFO SchemaExport:177 - exporting generated schema to database 23:41:10,514 DEBUG SchemaExport:301 - drop table if exists SecurityValue 23:41:10,614 DEBUG SchemaExport:301 - create table SecurityValue (id bigint not null auto_increment, secureValue varchar(255), primary key (id)) type=InnoDB 23:41:10,774 INFO SchemaExport:194 - schema export complete java.lang.NoSuchMethodError: org.hibernate.ejb.EntityManagerFactoryImpl.<init>(Lorg/hibernate/SessionFactory;Ljavax/persistence/spi/PersistenceUnitTransactionType;Z)V at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:522) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:650) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:518) at org.hibernate.ejb.test.TestCase.setUp(TestCase.java:37) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) Process finished with exit code -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: Paul C. (JIRA) <no...@at...> - 2006-05-12 00:37:11
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-342?page=comments#action_23087 ] Paul Cantrell commented on ANN-342: ----------------------------------- Confirmed: downgrading to 3.2rc1 fixes the problem. This presumably means that the problem should be resolved with the latest release of annotations. In the meantime, the annotations page should state clearly that 3.1beta10 is incompatible with 3.2rc2, and will work *only* with 3.2rc1. > Encountering NoSuchMethod error: NamingStrategy.foreignKeyColumnName(String,String):String > ------------------------------------------------------------------------------------------ > > Key: ANN-342 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-342 > Project: Hibernate Annotations > Type: Bug > Environment: Hibernate 3.2.0.cr2, Hibernate Annotations 3.1.0.Beta10, PostgreSQL 8.0, OS X 1.4.6, JDK 1.5.0_06 > Reporter: Paul Cantrell > > > I am encountering a NoSuchMethodError when Hibernate attempts to process my configuration. This suggests that my annotations and core jars are out of sync, but I do seem to have the latest versions of both. > And indeed, when I try to build hibernate-annotations, I get compile errors suggesting that the annotations were built against some code other than what I have checked out, probably 3.2cr1. > Looks like the published build of annotations is just out of sync with the latest core release...? > java.lang.NoSuchMethodError: org.hibernate.cfg.NamingStrategy.foreignKeyColumnName(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; > at org.hibernate.cfg.Ejb3JoinColumn.linkValueUsingDefaultColumnNaming(Ejb3JoinColumn.java:266) > at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:198) > at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:45) > at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:261) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205) > at net.innig.framework.persistence.hibernate.HibernateHelper.getSessionFactory(HibernateHelper.java:47) > .... > odysseus (hibernate-annotations-3.1.0.Beta10)$ ant jar > Searching for build.xml ... > Buildfile: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml > Could not load definitions from resource clovertasks. It could not be found. > init > Build Hibernate Annotations-3.1.0.Beta10 (2006-05-11 07:13:14) > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/testclasses > Copying 1 file to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Copying 2 files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build > compile > Compiling 174 source files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:258 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:266 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:412 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:420 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,<nulltype>,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/annotations/TableBinder.java:92 > collectionTableName(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > mappings.getNamingStrategy() > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/EJB3NamingStrategy.java:12 > org.hibernate.cfg.EJB3NamingStrategy is not abstract and does not override abstract method foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy > public class EJB3NamingStrategy implements NamingStrategy { > ^ > Note: Some input files use unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > 6 errors > BUILD FAILED > /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml:40: Compile failed; see the compiler error output for details. > Total time: 10 seconds -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Grant Q. (JIRA) <no...@at...> - 2006-05-12 00:35:16
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-46?page=comments#action_23086 ] Grant Quimby commented on EJB-46: --------------------------------- Hi, This is also a problem with with my current project. And is also located at http://jira.jboss.com/jira/browse/EJBTHREE-553 Anybody know of any fixes or workarounds. Thanks Grant > Property Validation should happen after PrePersist/PreUpdate > ------------------------------------------------------------ > > Key: EJB-46 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-46 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.1beta2, 3.1beta1 > Environment: MySQL4, Sun JRE5, WinXP > Reporter: Johan Steiner > > > Hi, > the description is from http://forum.hibernate.org/viewtopic.php?t=944964 but I'm experiencing the exact same issue. > ********************* > Hibernate does property validation such as not null checking before it does the EJB3 callback to prepersist/preupdate. I'm not sure if there's a good reason for this, but I think it would be particularly convenient if this behavior was reversed. IMHO it seems to better fit the semantics of the PRE callbacks, and it would allow callbacks to make modifications to the objects before they are persisted or updated -- modifications that might in turn effect the property validation Hibernate is doing. > The "audit" example in the entity manager documentation does make changes to the object. What if these changes had effected the property validation done before the callback occurred? What if the object was in an invalid state before the callback, but a valid state after the callback? The latter case is what I think would be conveniently handled if hibernate did its property validation after prepersist/preupdate. > Just two cents worth, obviously there are workarounds. This EJB3 stuff is looking great. > Ryan > P.S. This might also allow those of us who assign our own IDs to objects to do so automatically within a callback. > ********************* > In my case I'm working with an entity like: > public class MyEntity > { > @Basic(temporalType = TemporalType.TIMESTAMP) > @Column(name = "$createdOn", insertable = true, updatable = false, nullable = false) > private Date firstPersistedOn = null; > @Basic(temporalType = TemporalType.TIMESTAMP) > @Column(name = "$modifiedOn", insertable = true, updatable = false, nullable = true) > private Date lastPersistedOn = null; > @PrePersist > public void onPrePersist() > { > firstPersistedOn = new Date(); > } > @PreUpdate > public void onPreUpdate() > { > lastPersistedOn = new Date(); > } > } > Hibernate throws: > org.hibernate.PropertyValueException: not-null property references a null or transient value: MyEntity.firstPersistedOn > at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72) > at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:262) > at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:164) > at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114) > at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:167) > at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:113) > at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:60) > at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:540) > at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:139) > Regards, > Johan -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Paul C. (JIRA) <no...@at...> - 2006-05-12 00:19:15
|
Encountering NoSuchMethod error: NamingStrategy.foreignKeyColumnName(String,String):String ------------------------------------------------------------------------------------------ Key: ANN-342 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-342 Project: Hibernate Annotations Type: Bug Environment: Hibernate 3.2.0.cr2, Hibernate Annotations 3.1.0.Beta10, PostgreSQL 8.0, OS X 1.4.6, JDK 1.5.0_06 Reporter: Paul Cantrell I am encountering a NoSuchMethodError when Hibernate attempts to process my configuration. This suggests that my annotations and core jars are out of sync, but I do seem to have the latest versions of both. And indeed, when I try to build hibernate-annotations, I get compile errors suggesting that the annotations were built against some code other than what I have checked out, probably 3.2cr1. Looks like the published build of annotations is just out of sync with the latest core release...? java.lang.NoSuchMethodError: org.hibernate.cfg.NamingStrategy.foreignKeyColumnName(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; at org.hibernate.cfg.Ejb3JoinColumn.linkValueUsingDefaultColumnNaming(Ejb3JoinColumn.java:266) at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:198) at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:45) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:261) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205) at net.innig.framework.persistence.hibernate.HibernateHelper.getSessionFactory(HibernateHelper.java:47) .... odysseus (hibernate-annotations-3.1.0.Beta10)$ ant jar Searching for build.xml ... Buildfile: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml Could not load definitions from resource clovertasks. It could not be found. init Build Hibernate Annotations-3.1.0.Beta10 (2006-05-11 07:13:14) Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/testclasses Copying 1 file to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes Copying 2 files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build compile Compiling 174 source files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:258 foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) columnName = getMappings().getNamingStrategy().foreignKeyColumnName( ^ /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:266 foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) columnName = getMappings().getNamingStrategy().foreignKeyColumnName( ^ /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:412 foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) columnName = getMappings().getNamingStrategy().foreignKeyColumnName( ^ /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:420 foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,<nulltype>,java.lang.String) columnName = getMappings().getNamingStrategy().foreignKeyColumnName( ^ /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/annotations/TableBinder.java:92 collectionTableName(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) mappings.getNamingStrategy() ^ /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/EJB3NamingStrategy.java:12 org.hibernate.cfg.EJB3NamingStrategy is not abstract and does not override abstract method foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy public class EJB3NamingStrategy implements NamingStrategy { ^ Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 6 errors BUILD FAILED /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml:40: Compile failed; see the compiler error output for details. Total time: 10 seconds -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Alexandrino L. (JIRA) <no...@at...> - 2006-05-11 19:13:10
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-178?page=comments#action_23085 ] Alexandrino Lucas commented on EJB-178: --------------------------------------- org.hibernate.ejb.packaging.ExplodedJarVisitor.doProcessElements seems to have the same problem. > JarVisitor.getVisitor does not treat correctly paths with spaces > ---------------------------------------------------------------- > > Key: EJB-178 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-178 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.1.0.Beta8 > Environment: Windows XP Professional; Tomcat 5.5.17. > Reporter: Alexandrino Lucas > > Original Estimate: 15 minutes > Remaining: 15 minutes > > I'm using Hibernate Entity Manager with a WAR deployed on Tomcat 5.5.17, and I'm getting the following error: > 11/05/2006 16:12:43 org.hibernate.ejb.packaging.FileZippedJarVisitor doProcessElements > WARNING: Unable to find file (ignored): file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/[REST OMITTED] > java.util.zip.ZipException: Access is denied > at java.util.zip.ZipFile.open(Native Method) > at java.util.zip.ZipFile.<init>(Unknown Source) > at java.util.jar.JarFile.<init>(Unknown Source) > at java.util.jar.JarFile.<init>(Unknown Source) > at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:34) > at org.hibernate.ejb.packaging.JarVisitor.getMatchingEntries(JarVisitor.java:208) > at org.hibernate.ejb.Ejb3Configuration.addMetadataFromVisitor(Ejb3Configuration.java:201) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:183) > at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) > [MORE...] > Two strange things: 1) the directory exists; 2) Hibernate is treating the path as being part of a JAR file. I found the cause of the problem when analysing org.hibernate.ejb.packaging.JarVisitor.getVisitor(URL, Filter[]): > File file = new File( jarUrl.getFile() ); > if ( file.isDirectory() ) { > return new ExplodedJarVisitor( jarUrl, filters ); > } > else { > return new FileZippedJarVisitor( jarUrl, filters ); > } > As my path has some spaces, jarUrl.getFile() returns "/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/[REST OMITTED]", which is not a directory, because of the "%20"'s. The specification of the java.net.URL class says: "The URL class does not itself encode or decode any URL components according to the escaping mechanism defined in RFC2396. It is the responsibility of the caller to encode any fields, which need to be escaped prior to calling URL, and also to decode any escaped fields, that are returned from URL." > Although I did not have the time to build the project with it, I think that jarUrl.toURI().getPath() would solve the problem. Here is a snippet to prove it: > import java.io.File; > import java.net.URL; > public class Main > { > public static void main( > String[] args ) > throws Exception > { > URL url = new URL( > "file:///C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps" ); > System.out.println( "url.getFile()" ); > System.out.println( url.getFile() ); > System.out.println( new File( url.getFile() ).isDirectory() ); > System.out.println(); > System.out.println(); > System.out.println(); > System.out.println( "url.toURI().getPath()" ); > System.out.println( url.toURI().getPath() ); > System.out.println( new File( url.toURI().getPath() ).isDirectory() ); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Alexandrino L. (JIRA) <no...@at...> - 2006-05-11 19:09:12
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-178?page=comments#action_23084 ] Alexandrino Lucas commented on EJB-178: --------------------------------------- I forgot to say that I'm using Sun's JRE 1.5.0_06. > JarVisitor.getVisitor does not treat correctly paths with spaces > ---------------------------------------------------------------- > > Key: EJB-178 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-178 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.1.0.Beta8 > Environment: Windows XP Professional; Tomcat 5.5.17. > Reporter: Alexandrino Lucas > > Original Estimate: 15 minutes > Remaining: 15 minutes > > I'm using Hibernate Entity Manager with a WAR deployed on Tomcat 5.5.17, and I'm getting the following error: > 11/05/2006 16:12:43 org.hibernate.ejb.packaging.FileZippedJarVisitor doProcessElements > WARNING: Unable to find file (ignored): file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/[REST OMITTED] > java.util.zip.ZipException: Access is denied > at java.util.zip.ZipFile.open(Native Method) > at java.util.zip.ZipFile.<init>(Unknown Source) > at java.util.jar.JarFile.<init>(Unknown Source) > at java.util.jar.JarFile.<init>(Unknown Source) > at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:34) > at org.hibernate.ejb.packaging.JarVisitor.getMatchingEntries(JarVisitor.java:208) > at org.hibernate.ejb.Ejb3Configuration.addMetadataFromVisitor(Ejb3Configuration.java:201) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:183) > at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) > [MORE...] > Two strange things: 1) the directory exists; 2) Hibernate is treating the path as being part of a JAR file. I found the cause of the problem when analysing org.hibernate.ejb.packaging.JarVisitor.getVisitor(URL, Filter[]): > File file = new File( jarUrl.getFile() ); > if ( file.isDirectory() ) { > return new ExplodedJarVisitor( jarUrl, filters ); > } > else { > return new FileZippedJarVisitor( jarUrl, filters ); > } > As my path has some spaces, jarUrl.getFile() returns "/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/[REST OMITTED]", which is not a directory, because of the "%20"'s. The specification of the java.net.URL class says: "The URL class does not itself encode or decode any URL components according to the escaping mechanism defined in RFC2396. It is the responsibility of the caller to encode any fields, which need to be escaped prior to calling URL, and also to decode any escaped fields, that are returned from URL." > Although I did not have the time to build the project with it, I think that jarUrl.toURI().getPath() would solve the problem. Here is a snippet to prove it: > import java.io.File; > import java.net.URL; > public class Main > { > public static void main( > String[] args ) > throws Exception > { > URL url = new URL( > "file:///C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps" ); > System.out.println( "url.getFile()" ); > System.out.println( url.getFile() ); > System.out.println( new File( url.getFile() ).isDirectory() ); > System.out.println(); > System.out.println(); > System.out.println(); > System.out.println( "url.toURI().getPath()" ); > System.out.println( url.toURI().getPath() ); > System.out.println( new File( url.toURI().getPath() ).isDirectory() ); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-11 18:41:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-178?page=all ] Emmanuel Bernard resolved EJB-178: ---------------------------------- Resolution: Duplicate > JarVisitor.getVisitor does not treat correctly paths with spaces > ---------------------------------------------------------------- > > Key: EJB-178 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-178 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.1.0.Beta8 > Environment: Windows XP Professional; Tomcat 5.5.17. > Reporter: Alexandrino Lucas > > Original Estimate: 15 minutes > Remaining: 15 minutes > > I'm using Hibernate Entity Manager with a WAR deployed on Tomcat 5.5.17, and I'm getting the following error: > 11/05/2006 16:12:43 org.hibernate.ejb.packaging.FileZippedJarVisitor doProcessElements > WARNING: Unable to find file (ignored): file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/[REST OMITTED] > java.util.zip.ZipException: Access is denied > at java.util.zip.ZipFile.open(Native Method) > at java.util.zip.ZipFile.<init>(Unknown Source) > at java.util.jar.JarFile.<init>(Unknown Source) > at java.util.jar.JarFile.<init>(Unknown Source) > at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:34) > at org.hibernate.ejb.packaging.JarVisitor.getMatchingEntries(JarVisitor.java:208) > at org.hibernate.ejb.Ejb3Configuration.addMetadataFromVisitor(Ejb3Configuration.java:201) > at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:183) > at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114) > at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) > [MORE...] > Two strange things: 1) the directory exists; 2) Hibernate is treating the path as being part of a JAR file. I found the cause of the problem when analysing org.hibernate.ejb.packaging.JarVisitor.getVisitor(URL, Filter[]): > File file = new File( jarUrl.getFile() ); > if ( file.isDirectory() ) { > return new ExplodedJarVisitor( jarUrl, filters ); > } > else { > return new FileZippedJarVisitor( jarUrl, filters ); > } > As my path has some spaces, jarUrl.getFile() returns "/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/[REST OMITTED]", which is not a directory, because of the "%20"'s. The specification of the java.net.URL class says: "The URL class does not itself encode or decode any URL components according to the escaping mechanism defined in RFC2396. It is the responsibility of the caller to encode any fields, which need to be escaped prior to calling URL, and also to decode any escaped fields, that are returned from URL." > Although I did not have the time to build the project with it, I think that jarUrl.toURI().getPath() would solve the problem. Here is a snippet to prove it: > import java.io.File; > import java.net.URL; > public class Main > { > public static void main( > String[] args ) > throws Exception > { > URL url = new URL( > "file:///C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps" ); > System.out.println( "url.getFile()" ); > System.out.println( url.getFile() ); > System.out.println( new File( url.getFile() ).isDirectory() ); > System.out.println(); > System.out.println(); > System.out.println(); > System.out.println( "url.toURI().getPath()" ); > System.out.println( url.toURI().getPath() ); > System.out.println( new File( url.toURI().getPath() ).isDirectory() ); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |