-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: problem in helloworld project in Hibernate
PostPosted: Wed Nov 18, 2009 5:25 pm 
Newbie

Joined: Wed Nov 18, 2009 5:19 pm
Posts: 5
I am getting exception when running the project exception is

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" java.lang.ExceptionInInitializerError
at persistence.HibernateUtil.<clinit>(Unknown Source)
at hello.HelloWorld.main(Unknown Source)
Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found
at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1405)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1427)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1414)
... 2 more
but the hibernate.cfg.xml file is the at right place

and one more exception the when i am opening the Hibernate perspective in eclipse the exception is given below please help me out i have struck here from 3 days .
UNHANDLED EVENT LOOP EXCEPTION
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalAccessError: tried to access method org.eclipse.jface.viewers.ColumnViewer.isBusy()Z from class org.hibernate.eclipse.console.viewers.xpl.MTreeViewer)
at org.eclipse.swt.SWT.error(SWT.java:3563)
at org.eclipse.swt.SWT.error(SWT.java:3481)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: java.lang.IllegalAccessError: tried to access method org.eclipse.jface.viewers.ColumnViewer.isBusy()Z from class org.hibernate.eclipse.console.viewers.xpl.MTreeViewer
at org.hibernate.eclipse.console.viewers.xpl.MTreeViewer.add(MTreeViewer.java:69)
at org.eclipse.ui.progress.DeferredTreeContentManager$3.runInUIThread(DeferredTreeContentManager.java:308)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
... 22 more

THANKS IN ADVANCE


Top
 Profile  
 
 Post subject: Re: problem in helloworld project in Hibernate
PostPosted: Thu Nov 19, 2009 5:27 pm 
Newbie

Joined: Wed Nov 18, 2009 5:19 pm
Posts: 5
First of all very very Thanks for ur reply
Sir my Eclipse Release Version is 3.3.1.1 & plugin is HibernateTools-3.2.4.GA-R200905070146-H18, OS : Windows Vista Home Basic 32 bit.
I solved that problem of Hibernate.cfg.xml file by passing as parameter to Configuration.configure (), But the when ever i am opening the Hibernate Perspective i am getting the same execption..

Sir now my Project is getting execption as

Buildfile: D:\SUMIT\workspace\helloworld\build.xml
clean:
[delete] Deleting directory D:\SUMIT\workspace\helloworld\bin
[mkdir] Created dir: D:\SUMIT\workspace\helloworld\bin
compile:
[javac] Compiling 3 source files to D:\SUMIT\workspace\helloworld\bin
copymetafiles:
[copy] Copying 4 files to D:\SUMIT\workspace\helloworld\bin
run:
[java] Nov 19, 2009 8:48:12 PM org.hibernate.cfg.Environment <clinit>
[java] INFO: Hibernate 3.2.5
[java] Nov 19, 2009 8:48:12 PM org.hibernate.cfg.Environment <clinit>
[java] INFO: hibernate.properties not found
[java] Nov 19, 2009 8:48:12 PM org.hibernate.cfg.Environment buildBytecodeProvider
[java] INFO: Bytecode provider name : cglib
[java] Nov 19, 2009 8:48:12 PM org.hibernate.cfg.Environment <clinit>
[java] INFO: using JDK 1.4 java.sql.Timestamp handling
[java] Nov 19, 2009 8:48:12 PM org.hibernate.cfg.Configuration configure
[java] INFO: configuring from file: hibernate.cfg.xml
[java] Nov 19, 2009 8:48:12 PM org.hibernate.cfg.Configuration addResource
[java] INFO: Reading mappings from resource : hello/Message.hbm.xml
[java] Nov 19, 2009 8:48:13 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[java] INFO: Mapping class: hello.Message -> MESSAGES
[java] Nov 19, 2009 8:48:13 PM org.hibernate.cfg.Configuration doConfigure
[java] INFO: Configured SessionFactory: null
[java] Nov 19, 2009 8:48:13 PM org.hibernate.connection.C3P0ConnectionProvider configure
[java] INFO: C3P0 using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost
[java] Nov 19, 2009 8:48:13 PM org.hibernate.connection.C3P0ConnectionProvider configure
[java] INFO: Connection properties: {user=sa, password=****}
[java] Nov 19, 2009 8:48:13 PM org.hibernate.connection.C3P0ConnectionProvider configure
[java] INFO: autocommit mode: false
[java] Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(Unknown Source)
[java] at java.security.SecureClassLoader.defineClass(Unknown Source)
[java] at java.net.URLClassLoader.defineClass(Unknown Source)
[java] at java.net.URLClassLoader.access$100(Unknown Source)
[java] at java.net.URLClassLoader$1.run(Unknown Source)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClassInternal(Unknown Source)
[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Unknown Source)
[java] at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:92)
[java] at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
[java] at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
[java] at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
[java] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
[java] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
[java] at persistence.HibernateUtil.<clinit>(Unknown Source)
[java] at hello.HelloWorld.main(Unknown Source)
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 2 seconds

Can u Please Help me out Thanks In Advance.....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.