|
Hi saritha!
Your code is really useful.I have no idea before reading your article.With your example i have created a java project in Myeclipse.
I have addded Hibernate capabilities to that.I have even added the mysql-connector.jar to my build path.But still am getting the following error.Can you please help me in this regard
Thanks,
Ganesh
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
aftr createQuery
Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:301)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162)
at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:410)
at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:281)
at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:935)
at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
at UserQueryHibernate.main(UserQueryHibernate.java:20)
Caused by: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: NO)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2001)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1907)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:818)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
... 8 more
I go this error when i ran
your UserQueryHiberante.java
and
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:301)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1079)
at UserInsertHibernate.main(UserInsertHibernate.java:17)
Caused by: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: NO)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2001)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1907)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:818)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
... 7 more
These are the errors i got when i ran UserInsertHibernate.java
and this is my hibernate.cfg.xml file
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="show_sql">true</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect
</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/quickstart
</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password"></property>
<!-- Mapping files -->
<mapping resource="/forum/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
please help me!
|
|
|
Today I found a wonderful website,the site contained:
wedding dresses
cheap wedding dresses
Junior Bridesmaid Dresses
Cheap Homecoming Dresses
Cheap Quinceanera Dresses
Inexpensive bridesmaid dresses
Wholesale wedding dress
Wholesale wedding dress
Discount wedding dresses
Cheap Maternity Wedding Dresses
A-Line Wedding Dresses
Cheap Couture Wedding Dresses
Cheap Beach Wedding Dresses
Cheap Casual Wedding Dresses
Cheap Simple Wedding Dresses
Cheap Modest Wedding Dresses
Cheap Special Occasion Dresses
Cheap Evening Dresses
Cheap Prom Dresses
Cheap Little Black Dresses
Cheap Plus Size Wedding Dresses
Pink Wedding Dresses
Cheap Wedding Party Dresses
Cheap Bridesmaid Dresses
Cheap Flower Girl Dresses
Cheap Mother of the Bride Dresses
victoria's secret,
cheap wedding dresses,wholesale wedding dress,Wedding dresses 2011,Plus Size Wedding Dress wholesale,Couture Wedding Dress wholesale,Formal Wedding Dress wholesale,Bridesmaid Dresses wholesale,Discount Bridesmaid Dress wholesale,Junior Bridesmaids Dresses wholesale,Maternity Bridesmaid Dress wholesale,Cocktail Dress wholesale,Prom Dress wholesale,Evening Dress wholesale,Sexy Evening Dress wholesale,Stardoll Dress wholesale,Quinceanera Dress wholesale,Mother of the Bride Dress,Flower Girl Dress,Wedding Accessories wholesale
|
|
|
|
|
 and Dankso has louis vuitton bags all.It's usually great to possess shoe very helpful for practically just about every occasion. usually away from gucci outlet types of shoe accessible from Dankso, you can use just that.The earliest two of "soccer shoe" Documented louis vuitton handbags within your earliest pair of "soccer shoe" arrived into gucci sunglasses world in 1526, obviously, all through all those louis vuitton handbags no person or female will possibly be specifically gucci outlet shoes to hold out soccer shoe, been in a location to go right down actually sold, but precisely owing to these shoe The lv handbags is not the standard people, although the British Tudor King Henry VIII the second, the king like weapons gucci shoes activities and hunting
|
|
|
|
|
A century ago, American farmers healthy breakfast and city-dwellers alike piled breakfast low calorie diet plan plates high with meat, potatoes, gravy, eggs, bread, and healthy breakfast ideas/strong> sometimes pastries. Not much has eggs breakfast recipe changed.A 21st century leisurely breakfast often healthy breakfast foods consists of sausage or bacon, eggs, fried potatoes, gravy, healthy breakfast cookie recipe and waffles or pancakes smothered healthy breakfast cereal choices in butter and syrup or topped with healthy breakfast recipes sweetened fruit compote low calorie breakfast recipes and whipped cream.This breakfast is high in saturated fat and low in vitamins and healthy breakfast diet for kids other important nutrients. People who engage average breakfast cereal choices in regular hard work similar to healthy breakfast choices our ancestors, like the Amish, might get away with diet breakfast recipes eating that diet, but the rest of healthy eating tips America is at healthy breakfast dishes for kids increased risk of obesity and chronic diseases, such as cancer and diabetes.Another typical breakfast hurriedly gobbled down healthy recipes for weight loss before children and adults rush out the door is breakfast recipes for kids a bowl of sugar-coated cereal. An alternate version is a pastry and a cup of Tips for Healthy Eating coffee. These foods are highly processed and Breakfast and Brunch Cookbook high in sugar. They fill the void and give you a healthy indian breakfast recipe quick flash of energy, but the effect is short lived. By healthy brekfast foods for girls mid-morning, you're tired wrap sandwich recipes and hungry. Not only are you Real Food for Healthy Kids consuming empty calories, but you're also increasing your risk of diabetes healthy breakfast menus kids and obesity.Eating regular meals — especially breakfast — every day is a good health habit. Breakfast kick-starts your metabolism, healthy snack foods kids provides fuel for your healthy snacks kids mind, and healthy breakfast fruits for kids cuts down on mid morning snacking. Most snack foods are breakfast and brunch cookbook morning high in calories, fat, sugar, easy breakfast casserole and salt, and low in nutrients. This is probably one reason why pictures of healthy food breakfast skippers tend to weigh more healthy food habits.
|
|
|
Discount Coach Purses Outlet 2011,Coach Purses andCoach Shoes latest style are in hot sale atCoach OutletStore Online. A Coach Outletstore is one way of getting a great deal on those high-quality purses.The leather of a Coach Purses is absolutely beautiful - really thick and soft. Every Coach purse, bag, or Coach Shoes I've ever seen has been amazing, with a buttery feel of leather but with a very thick kind of leather. It's not often that you see really thick leather on a purse, not to mention seeing thick leather be that soft. If only all purses and bags could have Coach's high quality! Coach Sunglasses are usually extremely expensive, though. What are you waiting for? Fast shopping.
|
|
|
|
|
Louis Vuitton Outlet where the fashion Louis Vuitton Bags and newly goods are in our Louis Vuitton Outlets Online to sale and you can have a low price in our store. Bags relieve among the world's most valuable brands, which rounded handles and trimmings in natural cowhide leather and soft surface will give you a comfortable feeling. All bags are makes of nature leather, which designed with popular style and retro look style. Variety of colors bags and many types for you to signed in our Louis Vuitton Stores website for you to buy. We have many fashion styles of Louis Vuitton Sunglasses in our Louis Vuitton Outlet Store with the high quality and reasonable price, and has in a variety of different styles, each style of sunglasses bring a different feel as well as represents for elegance, fashion and charm. Exquisite craftwork, advanced technology and famous designers ensure its high quality, comfort and durability.
|
|
|
10、<p>Discount Coach Outlet Store , large amount ofCoach Bags On Hot Sales!Owing limited quantity, if you want to buy them, please hurry up to take actions! Our first-class Coach Bags are popular with customers as they blend the[/url] practicability with fashionable appearance, lightweight and convenient to carry, are suitable for all age women. In addition, the Coach Purses are also the fashion single item you should not miss. Coach Purses have more compartments and pockets for you to put additional items like checkbook or even small note pad. Now in our Coach Store , you can get them at the most favorable prices. More New Arrivals Bags are for cheap sale in our Coach Outlet , if you want to know more about them, welcome to contact us at any time.
|
|
|
Coach Handbags which traditional satchel shape with slender handles, sophisticated belting and a classic lock detail. Richly tanned, buffed and foiled, the leather has a distinctive texture and a great hand in our Coach Online Store. Our elegant Poppy Coach Bags only a small fraction of products bearing the bags initials in the general population are authentic. New Coach which on matter colors or styles that must be customers favorite like. Coach Outlet where Coach Glasses offers 100% UV protection and provide unmatched quality, comfort and durability. Coach Sunglasses are an American classic, keeping the same exacting standards of craftsmanship since its founding. Coach Sunglasses are some of the most unique you'll find there. With fine Italian design, and quality materials and craftsmanship you'll be glad you went with Coach.
|
|
|
|
|
|
|
|