[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Not binding factory to JNDI, no JNDI name configured
Jihnd
do-not-reply at jboss.com
Thu Aug 23 15:08:56 EDT 2007
hello,
i cant seem to get my jndi name bound, i've read in various searches that i need to adjust a hibernate xml file, but my jboss (4.0.5) does not have a hibernate folder, i'm using ejb3 with annotations and oracle xe, win xp sp2
this is the message i'm getting, and my console says everything is bound, so i'm a little stumped!
anonymous wrote : 2007-08-23 17:51:42,453 DEBUG [org.hibernate.loader.entity.EntityLoader] Static select for entity com.AVman.domain.Audiorec: select audiorec0_.Audiorec_alias as Audiorec1_8_0_, audiorec0_.Barcode_audiorec as Barcode2_8_0_, audiorec0_.Serial_audiorec as Serial3_8_0_, audiorec0_.Media_audiorec as Media4_8_0_, audiorec0_.Formats_audiorec as Formats5_8_0_ from Audiorec audiorec0_ where audiorec0_.Audiorec_alias=? for update nowait
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.loader.entity.EntityLoader] Static select for action ACTION_MERGE on entity com.AVman.domain.Audiorec: select audiorec0_.Audiorec_alias as Audiorec1_8_0_, audiorec0_.Barcode_audiorec as Barcode2_8_0_, audiorec0_.Serial_audiorec as Serial3_8_0_, audiorec0_.Media_audiorec as Media4_8_0_, audiorec0_.Formats_audiorec as Formats5_8_0_ from Audiorec audiorec0_ where audiorec0_.Audiorec_alias=?
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.loader.entity.EntityLoader] Static select for action ACTION_REFRESH on entity com.AVman.domain.Audiorec: select audiorec0_.Audiorec_alias as Audiorec1_8_0_, audiorec0_.Barcode_audiorec as Barcode2_8_0_, audiorec0_.Serial_audiorec as Serial3_8_0_, audiorec0_.Media_audiorec as Media4_8_0_, audiorec0_.Formats_audiorec as Formats5_8_0_ from Audiorec audiorec0_ where audiorec0_.Audiorec_alias=?
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] registered: d28c5ac114937836011493a2eef50004 (unnamed)
| 2007-08-23 17:51:42,453 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.impl.SessionFactoryImpl] instantiated session factory
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Execute first pass mapping processing
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Process hbm files
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.cfg.AnnotationConfiguration] Process annotated classes
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.cfg.AnnotationConfiguration] processing manytoone fk mappings
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.cfg.Configuration] processing extends queue
| 2007-08-23 17:51:42,453 DEBUG [org.hibernate.cfg.Configuration] processing collection mappings
my files:
persistence.xml
<persistence>
| <persistence-unit name="AVmanBean">
| <jta-data-source>java:/OracleDS</jta-data-source>
| <jar-file>c:/AVman.jar</jar-file>
| <class>com.AVman.domain.Audiorec</class>
| <class>com.AVman.Audiorec.AVmanRemote</class>
| <class>com.AVman.Audiorec.AVmanBean</class>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| <property name="jboss.entity.manager.jndi.name" value="java:/AVmanBean"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/AVmanBeanFactory"/>
| </properties>
| </persistence-unit>
| </persistence>
&
anonymous wrote : package com.AVman.domain;
|
| import javax.persistence.*;
|
| @Entity
| @Table(name="Audiorec")
| public class Audiorec implements java.io.Serializable{
| private int Barcode_audiorec;
| private String Audiorec_alias;
| private String Serial_audiorec;
| private String Media_audiorec;
| private String Formats_audiorec;
|
| @Id
| @Column(name="Audiorec_alias")
| public String getAudiorec_alias( ) { return Audiorec_alias; }
| public void setAudiorec_alias(String alias) { this.Audiorec_alias = alias; }
|
| @Column(name="Barcode_audiorec")
| public int getBarcode_audiorec( ) { return Barcode_audiorec; }
| public void setBarcode_audiorec(int barcode) { this.Barcode_audiorec = barcode; }
|
| @Column(name="Serial_audiorec")
| public String getSerial_audiorec( ) { return Serial_audiorec; }
| public void setSerial_audiorec(String serial) { this.Serial_audiorec = serial; }
|
| @Column(name="Media_audiorec")
| public String getMedia_audiorec( ) { return Media_audiorec; }
| public void setMedia_audiorec(String media) { this.Media_audiorec = media; }
|
| @Column(name="Formats_audiorec")
| public String getFormats_audiorec( ) { return Formats_audiorec; }
| public void setFormats_audiorec(String formats) { this.Formats_audiorec = formats; }
|
| }
&
anonymous wrote :
| package com.AVman.Audiorec;
|
| import javax.ejb.Remote;
| import com.AVman.domain.Audiorec;
|
| @Remote
| public interface AVmanRemote {
|
| public void createAudiorec(Audiorec audiorec);
| public Audiorec findAudiorec(String Audiorec_alias);
| }
&
anonymous wrote :
| package com.AVman.Audiorec;
|
| import javax.ejb.Stateless;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import com.AVman.domain.Audiorec;
|
| @Stateless
| public class AVmanBean implements AVmanRemote{
| @PersistenceContext(unitName="AVmanBean")
| private EntityManager manager;
|
| public void createAudiorec(Audiorec audiorec) {
| manager.persist(audiorec);
| }
|
| public Audiorec findAudiorec(String alias) {
| return manager.find(Audiorec.class, alias);
| }
| }
|
very very much apppreciate any help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077492#4077492
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077492
More information about the jboss-user
mailing list