[Hibernate] hibernateext/console
Hi, I was getting tired of just keeping a separate module for the console core just so the build process were stupid and even minor changes could be hour long work Thus hibernateext/console is now empty and moved into org.hibernate.eclipse to be with its friends (needs to be in the same jar classloader as the core to fake DriverManager to load unknown drivers) Note, this does not mean this code is nor will be dependent on eclipse, it just means its way easier to actually do stuff ;) /max --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] JUnit Struts Hibernate Error
Here is it, i´m trying to test an action, but the error seem to come from Hibernate.I´m using Eclipse IDE. testLoadPage(test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction)servletunit.struts.ExceptionDuringTestError: An uncaught exception was thrown during actionExecute() at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:305) at test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(TestFamiliaDNCAction.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)Root Cause:javax.servlet.ServletException: Exception building SessionFactory: null at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:290) at test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(TestFamiliaDNCAction.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)Root Cause:java.lang.RuntimeException: Exception building SessionFactory: null at com.bm.infra.persistence.hibernate.SessionManager.currentSession(SessionManager.java:34) at com.bm.infra.persistence.hibernate.HibernatePersistenceManager.find(HibernatePersistenceManager.java:185) at com.bm.infra.persistence.hibernate.HibernatePersistenceManager.find(HibernatePersistenceManager.java:175) at com.ccne.dao.FamiliaDNCDAO.findByCodigo(FamiliaDNCDAO.java:41) at com.ccne.bs.CadastroFamiliaDNC.findByCodigo(CadastroFamiliaDNC.java:34) at com.bm.pcs.corporativo.actions.FamiliaDNCAction.excluir(FamiliaDNCAction.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194) at com.bm.infra.web.action.BasicAction.execute(BasicAction.java:142) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:290) at test.com.bm.pcs.corporativo.actions.TestFamiliaDNCAction.testLoadPage(TestFamiliaDNCAction.java:46) <--- all i have here is the actionPerform(); on line 46 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMeth
[Hibernate] Default values for collection of elements
I've finally implemented the most awaited features of annotations ever ( even before JDK 5 came out ;-) ): collection of primitive and core type. I'm wondering the appropriate defaults though: @Entity public class MyClass { @Id getId() {...} @OneToMany public Set getElements() {...} create a MyClass_elements table having a MyClass_id column (default for EJB3) and an 'elt' column 'elt' is the default for HBM, but 'elements' might be a better one. Any opinion, better defaults? --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Default values for collection of elements
Hurray! ;) I'm +1 to have annotation-hbm features to be as similar to hibernate specific features. So "elt" sounds find by me. /max I've finally implemented the most awaited features of annotations ever ( even before JDK 5 came out ;-) ): collection of primitive and core type. I'm wondering the appropriate defaults though: @Entity public class MyClass { @Id getId() {...} @OneToMany public Set getElements() {...} create a MyClass_elements table having a MyClass_id column (default for EJB3) and an 'elt' column 'elt' is the default for HBM, but 'elements' might be a better one. Any opinion, better defaults? --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Default values for collection of elements
"elt" is horrible :) Who fucking came up with that ridiculous default anyway? What an idiot. ... Oh, that's right -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Max Rydahl Andersen Sent: Tuesday, 23 August 2005 4:46 PM To: Emmanuel Bernard; hibernate-devel@lists.sourceforge.net Subject: Re: [Hibernate] Default values for collection of elements Hurray! ;) I'm +1 to have annotation-hbm features to be as similar to hibernate specific features. So "elt" sounds find by me. /max > I've finally implemented the most awaited features of annotations ever > ( even before JDK 5 came out ;-) ): collection of primitive and core type. > > I'm wondering the appropriate defaults though: > > @Entity > public class MyClass { > @Id getId() {...} > @OneToMany > public Set getElements() {...} > > create a MyClass_elements table > having a MyClass_id column (default for EJB3) and an 'elt' column > > 'elt' is the default for HBM, but 'elements' might be a better one. > > Any opinion, better defaults? > > > > --- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices Agile & Plan-Driven Development * Managing Projects & Teams > * Testing & QA Security * Process Improvement & Measurement * > http://www.sqe.com/bsce5sf > ___ > hibernate-devel mailing list > hibernate-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Default values for collection of elements
Max, some defaults are already different from hbm and we have more info I guess. I had that in mind, but the rule has to be pretty primitive: remove an extra s if in small letter and if the property size is more than 1 add an exception for children, bijoux, choux, genoux, cayoux, ... It should work for most English words, the majority of French ones (Max knows we have "some" interesting exceptions), but for other languages... Gavin King wrote: Can you de-pluralize the name of the association? I guess that is too hard... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel Bernard Sent: Tuesday, 23 August 2005 4:39 PM To: hibernate-devel@lists.sourceforge.net Subject: [Hibernate] Default values for collection of elements I've finally implemented the most awaited features of annotations ever ( even before JDK 5 came out ;-) ): collection of primitive and core type. I'm wondering the appropriate defaults though: @Entity public class MyClass { @Id getId() {...} @OneToMany public Set getElements() {...} create a MyClass_elements table having a MyClass_id column (default for EJB3) and an 'elt' column 'elt' is the default for HBM, but 'elements' might be a better one. Any opinion, better defaults? --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Default values for collection of elements
Then use "element" or "value" and be done with it ;) Or how about eltval? /max Max, some defaults are already different from hbm and we have more info I guess. I had that in mind, but the rule has to be pretty primitive: remove an extra s if in small letter and if the property size is more than 1 add an exception for children, bijoux, choux, genoux, cayoux, ... It should work for most English words, the majority of French ones (Max knows we have "some" interesting exceptions), but for other languages... Gavin King wrote: Can you de-pluralize the name of the association? I guess that is too hard... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel Bernard Sent: Tuesday, 23 August 2005 4:39 PM To: hibernate-devel@lists.sourceforge.net Subject: [Hibernate] Default values for collection of elements I've finally implemented the most awaited features of annotations ever ( even before JDK 5 came out ;-) ): collection of primitive and core type. I'm wondering the appropriate defaults though: @Entity public class MyClass { @Id getId() {...} @OneToMany public Set getElements() {...} create a MyClass_elements table having a MyClass_id column (default for EJB3) and an 'elt' column 'elt' is the default for HBM, but 'elements' might be a better one. Any opinion, better defaults? --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Default values for collection of elements
Can you de-pluralize the name of the association? I guess that is too hard... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel Bernard Sent: Tuesday, 23 August 2005 4:39 PM To: hibernate-devel@lists.sourceforge.net Subject: [Hibernate] Default values for collection of elements I've finally implemented the most awaited features of annotations ever ( even before JDK 5 came out ;-) ): collection of primitive and core type. I'm wondering the appropriate defaults though: @Entity public class MyClass { @Id getId() {...} @OneToMany public Set getElements() {...} create a MyClass_elements table having a MyClass_id column (default for EJB3) and an 'elt' column 'elt' is the default for HBM, but 'elements' might be a better one. Any opinion, better defaults? --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel