From: Migue P. <mr_...@ho...> - 2005-07-15 17:12:07
|
I'm using JBoss, but doesn't your datasource need to be named CoefficientDS? -----Original Message----- From: coe...@li... [mailto:coe...@li...] On Behalf Of Mike Spisak Sent: Friday, July 15, 2005 12:50 PM To: coe...@li... Subject: Re: [Coefficient-users] MySQL troubles ... Thanks for the reply... hhmmm, still getting that nasty "NullPointer" exception.. - I've upgraded to MySQL 4.1.12 standard.. - I'm using MySQL connector v3.0.17 - I updated my hibernate.properties file (given Hotmail's example) - like so: hibernate.connection.driver_class com.mysql.jdbc.Driver hibernate.connection.url jdbc:mysql://localhost/mydatabase hibernate.connection.username=root hibernate.connection.password=password hibernate.dialect net.sf.hibernate.dialect.MySQLDialect hibernate.connection.datasource java:/mydatabase hibernate.session_factory_name net.sf.hibernate.SessionFactory hibernate.transaction.factory_class net.sf.hibernate.transaction.JTATransactionFactory hibernate.connection.pool_size 0 #hibernate.show_sql true Now, just for giggles, I shutdown MySQL just to see if I'd get a different error and I continue to get this : java.lang.NullPointerException at net.sf.hibernate.util.HibernateUtil.getUniqueSession(HibernateUtil.java:179) at net.sf.hibernate.util.HibernateUtil.find(HibernateUtil.java:365) at za.org.coefficient.modules.configuration.Configuration.getConfiguration(Conf iguration.java:144) at za.org.coefficient.modules.configuration.Configuration.view(Configuration.ja va:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl java:25) at java.lang.reflect.Method.invoke(Method.java:324) <<I didn't post the whole stack trace.. but you get the idea..>> I'm thinking I have some kind of a "Hibernate" issue? anyone got ideas? much thanks! Mike Hotmail wrote: >Mike, > >I'm using MySQL 4.1.10a-Max version and Coefficient works find with it. > >I did notice that in order for Coefficient to work correctly, I had to >create the database "coefficient" manually. Once I did that coefficient >correctly created and populated the tables. > >Also, it took me a few tries to correctly configure the username and >password properties. Here is a copy of my file which does work. > >hibernate.connection.datasource java:/CoefficientDS >hibernate.connection.username=root >hibernate.connection.password=******* >hibernate.dialect net.sf.hibernate.dialect.MySQLDialect >hibernate.session_factory_name net.sf.hibernate.SessionFactory >hibernate.transaction.factory_class >net.sf.hibernate.transaction.JTATransactionFactory >hibernate.connection.pool_size 0 > > >Good luck. > > > >----- Original Message ----- >From: "Mike Spisak" <mi...@sp...> >To: <coe...@li...> >Sent: Thursday, July 14, 2005 5:39 PM >Subject: [Coefficient-users] MySQL troubles ... > > > > >>Hi All :: >> >>Coefficient seems like a VERY cool platform.. installation was going >>really well: >>- Tomcat 4.1.18 went in with no troubles... >>- MySQL 3.23 was a snap... (I included the org.gjt.mm.mysql.Driver) >>- I followed the installation procedure (hibernate.properties, >>server.xml, etc..) smooth.. >>- Deployed the war file.. nicey nice... >>- tried to hit the main URL and got.. *ouch* >>*There has been a system exception* >> >>java.lang.NullPointerException >>at >> >> >> >net.sf.hibernate.util.HibernateUtil.getUniqueSession(HibernateUtil.java:179 ) > > >>at net.sf.hibernate.util.HibernateUtil.find(HibernateUtil.java:365) >>at >> >> >> >za.org.coefficient.modules.configuration.Configuration.getConfiguration(Con f >iguration.java:144) > > >>at >> >> >> >za.org.coefficient.modules.configuration.Configuration.view(Configuration.j a >va:85) > > >>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>at >> >> >> >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9 >) > > >>at >> >> >> >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l >java:25) > > >>at java.lang.reflect.Method.invoke(Method.java:324) >>. . . . . . . >>Now I've never used Hibernate before.. so here's a snapshot of my >>properties file - not sure if the "dialect" line is right: >> hibernate.connection.driver_class org.gjt.mm.mysql.Driver >> hibernate.connection.url jdbc:mysql://localhost/my_db >> hibernate.connection.username root >> hibernate.connection.password ***** >> hibernate.dialect org.hibernate.dialect.MySQLDialect >> # I also tried net.sf.hibernate.dialect.MySQLDialect >> #hibernate.dialect net.sf.hibernate.dialect.PostgreSQLDialect >> hibernate.connection.pool_size 0 >> #hibernate.show_sql true >> >>hhmm, am I missing something? Do I need a newer version of mySQL? I've >>lurked the user group a little and saw other problems with mySQL, should >>I bail and get Postgre? Thanks in advance! >> >>Mike >> >>PS: system specs: >>- SuSE Linux 9.1 >>- J2SDK 1.4.2_06 >>- Tomcat 4.1.18 >>- MySQL 3.23 >>- etc... >> >> >> >>------------------------------------------------------- >>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >>from IBM. Find simple to follow Roadmaps, straightforward articles, >>informative Webcasts and more! Get everything you need to get up to >>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >>_______________________________________________ >>Coefficient-users mailing list >>Coe...@li... >>https://lists.sourceforge.net/lists/listinfo/coefficient-users >> >> >> > > > > ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Coefficient-users mailing list Coe...@li... https://lists.sourceforge.net/lists/listinfo/coefficient-users |