-->
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: HHH000206: hibernate.properties not found
PostPosted: Wed Mar 07, 2012 3:25 pm 
Newbie

Joined: Wed Mar 07, 2012 2:25 pm
Posts: 1
i have a folder named jpa on windows xp desktop which contain two java files folder lib that has hibernate 4 required jars and the last is folder META-INF that contain persistence.xml
when i run the code i doesnt show me data table
java -cp .;./lib* mainjpa
Code:
mars 08, 2012 12:19:20 AM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
mars 08, 2012 12:19:20 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.0.Final}
mars 08, 2012 12:19:20 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
mars 08, 2012 12:19:20 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
mars 08, 2012 12:19:24 AM org.hibernate.service.jdbc.connections.internal.Driver
ManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production us
e!)
mars 08, 2012 12:19:24 AM org.hibernate.service.jdbc.connections.internal.Driver
ManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
mars 08, 2012 12:19:24 AM org.hibernate.service.jdbc.connections.internal.Driver
ManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: true
mars 08, 2012 12:19:24 AM org.hibernate.service.jdbc.connections.internal.Driver
ManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://local
host:3306/base]
mars 08, 2012 12:19:24 AM org.hibernate.service.jdbc.connections.internal.Driver
ManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=root, password=****, autocommit=tr
ue, release_mode=auto}
mars 08, 2012 12:19:26 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
mars 08, 2012 12:19:26 AM org.hibernate.engine.transaction.internal.TransactionF
actoryInitiator initiateService
INFO: HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal
.jdbc.JdbcTransactionFactory
mars 08, 2012 12:19:26 AM org.hibernate.hql.internal.ast.ASTQueryTranslatorFacto
ry <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
mars 08, 2012 12:19:28 AM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000227: Running hbm2ddl schema export
mars 08, 2012 12:19:29 AM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete


mainjpa.java
Code:
import javax.persistence.*;
import java.util.*;
import java.util.Iterator;

public class mainjpa {

public static void main(String arg[]){
EntityManagerFactory emf=Persistence.createEntityManagerFactory("test");
EntityManager em=emf.createEntityManager();
try{
EntityTransaction entr=em.getTransaction();
entr.begin();
Query query=em.createQuery("SELECT t FROM testent t");
List stList=query.getResultList();
Iterator stIterator=stList.iterator();

while(stIterator.hasNext()){
testent t=(testent)stIterator.next();
System.out.println(t.getId()+" "+t.getT()+" "+t.getTt());
}
entr.commit();
}
catch(Exception e){
System.out.println(e.getMessage());
}
finally{
em.close();
}

}
}


Top
 Profile  
 
 Post subject: Re: HHH000206: hibernate.properties not found
PostPosted: Mon Mar 12, 2012 5:10 am 
Newbie

Joined: Mon Mar 12, 2012 5:01 am
Posts: 3
I did not mean "composite id" though.





------------------------------------------------------------------------------------------
Trumpet Wedding Dresses|New Style Wedding Dresses|Wedding Dresses with Sleeves|New Style Flower Girl Dresses


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.