Org.hibernate.MappingException: broken column mapping

I have 2 tables I'm trying to do a left outer join.
Code:
"FROM Family AS f INNER JOIN f.personVersion AS pv
LEFT OUTER JOIN pv.personDetails"
I see this as a one-to-one relationship between the foreign key in Person_Details and the Primary Key in Person_Version
PERSON_VERSION
KEY TYPE COLUMN NAME REF TABLE REF COLUMN
PK_PERSON_VERSION Primary PERSON_VERSION_ID
FK1_PRSN_VRSN Foreign EVENT_ID EVENT EVENT_ID
PERSON_DETAILS
KEY TYPE COLUMN NAME REF TABLE REF COLUMN
PK_PERSON_DETAILS Primary PERSON_ID, PERSON_VERSION_ID
FK1_PERSON_DTLS Foreign PERSON_VERSION_ID PERSON_VERSION PERSON_VERSION_ID
My Person_Version class :
Code:
@Entity public class PersonVersion extends BaseEntity {       private static final long serialVersionUID = 1L;       private PersonDetails  personDetails; ...... }
My ORM.xml:
Code:
<entity class="com.PersonVersion">         <table name="person_version" />         <sequence-generator name="SEQ" sequence-name="SQ_person_version" allocation-size="1"/>         <attribute-override name="id">             <column name="person_version_id" column-definition="NUMBER(38)"/>         </attribute-override>         <attributes>             <basic name="eventId">                 <column name="event_id" column-definition="NUMBER(38)" />             </basic>                         <one-to-one fetch="EAGER" name="personDetails" optional="true">                 <join-column name="person_version_id" insertable="false" updatable="false"/>                 <cascade>                     <cascade-refresh/>                 </cascade>             </one-to-one>         </attributes>     </entity>
When I start my server I get the following error:
Reason: javax.persistence.PersistenceException: org.hibernate.MappingException: broken column mapping
for: personDetails.id of: com.PersonVersion
Has anyone run into this issue?

SHIBA wrote:
Hi All,
I have two tables Emp and Dept with primary key of Dept table is Foregn key of Emp table
I had created hibernate mapping file ,hibernate configuration file and POJO clasess using Reverse Engineering.
i'm using spring framework for this.
when i try to access dept information on page.
it throws an exception as follows
Initialization of bean failed; nested exception is org.hibernate.MappingException: entity class not found : Emp
My guess is that your hibernate.cfg.xml does not contain an .hbm.xml for both Dept and Emp.
%

Similar Messages

  • Org.hibernate.MappingException: invalid configuration  in hibernate

    hi,
    i am new to hibernate.
    while i am executing small program, below error occur.
    what can i do to solve this problem, plz help me.
    Error Code
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Exception occur:invalid configuration
    org.hibernate.MappingException: invalid configuration+
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1493)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
    at FirstExample.main(FirstExample.java:12)
    Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.dom4j.io.SAXReader.read(SAXReader.java:465)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1490)
    ... 3 more
    Exception in thread "main" java.lang.NullPointerException
    at FirstExample.main(FirstExample.java:26)

    Thank u .
    I did all configuration properly by some guideline.
    But i got new error in my program.
    please reply me.
    This is my program
    *{color:#3366ff}Test.java{color}*
    import org.hibernate.HibernateException;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;
    import event.Sample;
    public class Test {
    public static void main(String a[])throws HibernateException
    Session session=null;
    try
    SessionFactory sessionFactory=new Configuration().configure().buildSessionFactory();
    session=sessionFactory.openSession();
    System.out.println("Insert record ");
    Sample s=new Sample();
    s.setId(3);
    s.setName("Sundar");
    session.save(s);
    System.out.println("Sucessfully Saved");
    }catch(Exception e)
    System.out.println("Exception occur:"+e.getMessage());
    e.printStackTrace();
    }finally
    session.flush();
    session.close();
    *{color:#3366ff}Java Bean Sample.java{color}*
    package event;
    public class Sample {
    private int id;
    private String name;
    public int getId() {
    return id;
    public void setId(int id) {
    this.id = id;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    *{color:#3366ff}{color:#ff0000}hibernate.cfg.xml file{color}*
    *<?xml version="1.0" encoding="utf-8"?>*
    *<!DOCTYPE hibernate-configuration PUBLIC*
    *"-//Hibernate/Hibernate Configuration DTD 3.0//EN"*
    *"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">*
    *<hibernate-configuration>*
    * <session-factory>*
    * <!-- local connection properties -->*
    * <property name="hibernate.connection.url">*
    * jdbc:mysql://localhost:3306/test*
    * </property>*
    * <property name="hibernate.connection.driver_class">*
    * com.mysql.jdbc.Driver*
    * </property>*
    * <property name="hibernate.connection.username">root</property>*
    * <property name="hibernate.connection.password">server</property>*
    * <!-- property name="hibernate.connection.pool_size"></property -->*
    * <!-- dialect for MySQL -->*
    * <property name="dialect">*
    * org.hibernate.dialect.MySQLDialect*
    * </property>*
    * <property name="hibernate.show_sql">false</property>*
    * <property name="hibernate.transaction.factory_class">*
    * org.hibernate.transaction.JDBCTransactionFactory*
    * </property>*
    * <mapping resource="event/Sample.hbm.xml" />*
    * </session-factory>*
    *</hibernate-configuration>*
    *{color:#ff0000}{color:#000000}Sample.hbm.xml file{color}*
    *<?xml version="1.0" encoding="utf-8"?>*
    *<!DOCTYPE hibernate-mapping PUBLIC*
    * "-//Hibernate/Hibernate Mapping DTD//EN"*
    * "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >*
    *<hibernate-mapping package="event">*
    * <class name="Sample" table="sample" >*
    * <meta attribute="sync-DAO">true</meta>*
    * <property name="Id" column="id" type="integer" not-null="false" length="11" />*
    * <property name="Name" column="name" type="string" not-null="false" length="50" />*
    * </class>*
    *</hibernate-mapping>*
    *{color}{color}*
    *{color:#3366ff}
    This is my error.{color}*
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Exception occur:Could not parse mapping document from resource event/Sample.hbm.xml
    org.hibernate.InvalidMappingException: Could not parse mapping document from resource event/Sample.hbm.xml
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:575)
    at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1593)
    at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1561)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
    at Test.main(Test.java:15)
    Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:508)
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:572)
    ... 7 more
    Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.dom4j.io.SAXReader.read(SAXReader.java:465)
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:505)
    ... 8 more
    Exception in thread "main" java.lang.NullPointerException
    at Test.main(Test.java:29)

  • Hibernate Error while deploying : java.lang.NoClassDefFoundError: org/hibernate/MappingException.

    Hi,
    We are migrating to weblogic server. While deploying the EAR in Production WebLogic server I am getting the following - "Class Not found Exception" .  I have local version of weblogic server which is coupled with eclipse is not giving me any error when I deploy the same EAR, but only production weblogic server is giving error. In the production environment we are using clusters. and we have staging environment also.
    It would be great if someone let me know how to get rid of this error. Thanks in advance
    Environment:
    Java - 1.6
    Hibernate - 3
    Spring - 2
    Web Logic - 10.3.5
    WebLogic-Application.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.2/weblogic-application.xsd">
        <!--weblogic-version:10.3.5-->
        <wls:application-param>
            <wls:param-name>webapp.encoding.default</wls:param-name>
            <wls:param-value>UTF-8</wls:param-value>
        </wls:application-param>
        <wls:prefer-application-packages>
            <wls:package-name>antlr.*</wls:package-name>
        </wls:prefer-application-packages>
    </wls:weblogic-application>
    Stack trace from the server:
    <<WLS Kernel>> <> <0000K1E1LgQ5e_5_rPt1iY1HwEvb000009> <1375698508586> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/jboss-spring.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/jboss-spring.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException
    ####<05.08.2013 12:28 Uhr MESZ> <Error> <Deployer> <FE0APP216> <WLS_FORMS> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000K1E1LgQ5e_5_rPt1iY1HwEvb000009> <1375698508601> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1375698508071' for task '6'. Error is: 'weblogic.application.ModuleException: '
    weblogic.application.ModuleException:
           at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
           at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
           at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
           at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
           at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
           at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
           at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
           at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
           at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
           at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
           at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
           at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
           at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
           at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
           at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140)
           at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
           at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
           at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
           at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
           at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: java.lang.NoClassDefFoundError: org/hibernate/MappingException
           at java.lang.Class.getDeclaredConstructors0(Native Method)
           at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
           at java.lang.Class.getConstructor0(Class.java:2699)
           at java.lang.Class.getDeclaredConstructor(Class.java:1985)
           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
           at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
           at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
           at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
           at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
           at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
           at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1872)
           at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153)
           at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
           at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
           at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
           at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
           at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
           at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
           at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
           at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
           at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
           at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
           at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
           at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
           at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
           at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
           at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140)
           at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
           at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
           at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
           at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
           at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Hello,
    I recommend not the xmlpull jar file, but the xpp3-*.jar file found with your Enterprise installation.  It's in the "external" subfolder where you got your other Enterprise jar files.
    You'll have to remove the xmlpull jar, since they'd version conflict.
    Sincerely,
    Ted Ueda

  • Org.hibernate.hql.ast.QuerySyntaxException ...  is not mapped

    Hi,
    I wanted to perform a query like this: Query q = entityManager.createQuery ("select userName from manageUsers where username=123");
    I'm guessing "manageUsers " isn't mapped but i don't know where to map this.
    Thanks

    Banke wrote:
    First are you using JPA with hibernate as the provider or are you using hibernate directly?
    I guess the first, you can map this either by annotations on your entity bean or you can specify them in the xml file orm.xml.Thanks for your reply, i've fixed this but now i want to test a delete query but i keep getting:
    23:45:36,203 ERROR [STDERR] java.lang.IllegalStateException: org.hibernate.hql.QueryExecutionRequestException: Not supported for DML operations [delete from project.ws.manageUsers mu where name = 123]
    I've tried searching with google but the results were not what i hoped for. I'm guessing my query is wrong but im not sure how to change the query so that i can delete something from my db , what does the error message means "DML operations" ?
    code: Query q = entityManager.createQuery("delete from manageUsers mu where name = 123");
    Thanks

  • Hibernate - Spring - problem with mapping (many-to-many)

    Hello,
    I want to map the following situation. I have a table called EDUCATION and a table called SCHOOLS. Between those tables I have an associative table called EDUCATION_SCHOOLS. The (usefull) fields:
    EDUCATION:
    id (long) - PK
    name (varchar)
    versionNr (long)
    SCHOOLS:
    id (long) - PK
    name (varchar)
    versionNr (long)
    EDUCATION_SCHOOLS:
    id (long) - PK
    education_id (long) (FK to EDUCATION.id)
    school_id (long) (FK to SCHOOLS.id)
    name (varchar)
    versionNr (long)
    Their is a Unique Constraint between EDUCATION_SCHOOLS.education_id and EDUCATION_SCHOOLS.school_id.
    What I want to be able to do:
    EDUCATION: select, update, insert
    SCHOOLS: select, update, insert
    EDUCATION_SCHOOLS: select, update (only the non-FK fields), insert
    I never want to delete anything in those tables. (and it's never ever going to be an option either)
    Hibernate version:
    Hibernate-Version: 3.0.5
    Mapping documents:
    Education:
    <hibernate-mapping>
         <class name="##.Education" table="EDUCATION">
              <id name="id" column="ID" type="java.lang.Long">
                   <generator class="sequence">
                        <param name="sequence">EDUCATION_SEQ</param>
                   </generator>
              </id>
              <version name="versionNr" column="VERSIONNR" type="long"/>
              <property name="name" column="NAME" type="string" />
            <set name="SCHOOLS" table="EDUCATION_SCHOOLS">
                <key column="EDUCATION_ID" />
                <many-to-many class="##.Schools" column="SCHOOL_ID" lazy="false" />
            </set>
    </hibernate-mapping>
    Schools:
    <hibernate-mapping>
         <class name="##.Schools" table="SCHOOLS">
              <id name="id" column="ID" type="java.lang.Long">
                   <generator class="sequence">
                        <param name="sequence">SCHOOLS_SEQ</param>
                   </generator>
              </id>
              <version name="versionNr" column="VERSIONNR" type="long"/>
              <property name="name" column="NAAM_NAME" type="string" />
            <set name="educations" table="EDUCATION_SCHOOLS" inverse="true" cascade="none">
                <key column="SCHOOL_ID" />
                <many-to-many class="##.Schools" column="SCHOOL_ID" lazy="proxy"/>
            </set>
    </hibernate-mapping>
    Education_schools:
    <hibernate-mapping>
    <class name="##.EducationSchools" table="EDUCATION_SCHOOLS">
               <id name="id" column="ID" type="java.lang.Long" unsaved-value="0">
                   <generator class="sequence">
                        <param name="sequence">SEQ_EDUCATION_SCHOOLS</param>
                   </generator>
              </id>
              <version name="versionNr" column="VERSIONNR" type="long" />
              <many-to-one name="education" class="##.Education" cascade="none" lazy="proxy"
                           column="EDUCATION_ID" not-null="true"/>
            <many-to-one name="schools" class="##.Schools" cascade="none" lazy="proxy"
                        column="SCHOOL_ID" not-null="true"/>  
    </hibernate-mapping>   
    Name and version of the database you are using:
    Oracle XE 10g
    I am able to:
    EDUCATION: select, insert, update
    SCHOOLS: select, insert, update
    EDUCATION_SCHOOLS: select
    Problems:
    EDUCATION_SCHOOLS: when I try to insert, I sometimes get unique constraint violations. (when I should get them, thus I'm trying to insert something that already exists .. but how do I stop Hibernate from Inserting?)
    EDUCATION_SCHOOLS: when I try to update, sometimes it works, but often I get:
    23:03:55,484 [http-8081-1] ERROR be.vlaanderen.lne.vea.epb.ui.struts.EpbExceptionHandler - org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [##.EducationSchools] with identifier [null]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [##.EducationSchools#<null>]
    ex.getMessage() Object of class [##.EducationSchools] with identifier [null]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [##.EducationSchools#<null>]
    org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [##.EducationSchools] with identifier [null]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [##.EducationSchools#<null>]
    Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):As you can see from the stacktrace I use Spring for the transactionManager: org.springframework.orm.hibernate3.HibernateTransactionManager in which I use e sessionFactory: org.springframework.orm.hibernate3.LocalSessionFactoryBean
    In my DAO, I try to save with the regular this.getHibernateTemplate().saveOrUpdate that has always worked for me.
    Another problem I have:
    when i update "name" in EDUCATION, the records with that ID are delete from EDUCATION_SCHOOLS ...
    As I am experiencing 3 different problems, I'm pretty sure something is wrong in the mapping files .. however I fail to find out what .. Any input would be greatly appreciated.
    (I translated some class/table-names, that's what the ## cause)
    Edited by: Bart_Blommaerts on Jul 29, 2008 11:53 PM

    Thank you for your input.
    When I try what you suggest, I still get the same error:
    16:39:30,406 [http-8081-1] ERROR ###.EpbExceptionHandler - org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [###.EducationSchools] with identifier [2]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [###.EducationSchools#2]
    ex.getMessage() Object of class [###.EducationSchools] with identifier [2]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [###.EducationSchools#2]
    org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [###.EducationSchools] with identifier [2]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [###.EducationSchools#2]
    Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [###.EducationSchools#2]If you had to map the database tables, I'm trying to map, how would you do it?

  • Org.hibernate.ObjectNotFoundException: No row with the given

    am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    in my store mapping i have the following:
    <composite-id>
    <key-property name="store_id" column="store_id" type="integer" />
    <key-property name="storeLocId" column="storeLocId" type="string"/>
    </composite-id>
    I am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.dao.Store#com.dao.Store@121cc66]
    org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
    org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128)
    org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161)
    org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
    org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:889)
    org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:857)
    org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
    org.hibernate.type.EntityType.resolve(EntityType.java:303)
    org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
    org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
    org.hibernate.loader.Loader.doQuery(Loader.java:717)
    org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    org.hibernate.loader.Loader.doList(Loader.java:2150)
    org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    org.hibernate.loader.Loader.list(Loader.java:2024)
    org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
    org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
    org.hibernate.impl.CriteriaImpl$Subcriteria.list(CriteriaImpl.java:143)

    am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    in my store mapping i have the following:
    <composite-id>
    <key-property name="store_id" column="store_id" type="integer" />
    <key-property name="storeLocId" column="storeLocId" type="string"/>
    </composite-id>
    I am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.dao.Store#com.dao.Store@121cc66]
    org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
    org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128)
    org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161)
    org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
    org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:889)
    org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:857)
    org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
    org.hibernate.type.EntityType.resolve(EntityType.java:303)
    org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
    org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
    org.hibernate.loader.Loader.doQuery(Loader.java:717)
    org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    org.hibernate.loader.Loader.doList(Loader.java:2150)
    org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    org.hibernate.loader.Loader.list(Loader.java:2024)
    org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
    org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
    org.hibernate.impl.CriteriaImpl$Subcriteria.list(CriteriaImpl.java:143)

  • Org.hibernate.ObjectNotFoundException: No row with the given identifier exi

    I am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    in my store mapping i have the following:
    <composite-id>
    <key-property name="store_id" column="store_id" type="integer" />
    <key-property name="storeLocId" column="storeLocId" type="string"/>
    </composite-id>
    I am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.dao.Store#com.dao.Store@121cc66]
    org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
    org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128)
    org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161)
    org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
    org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:889)
    org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:857)
    org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
    org.hibernate.type.EntityType.resolve(EntityType.java:303)
    org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
    org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
    org.hibernate.loader.Loader.doQuery(Loader.java:717)
    org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    org.hibernate.loader.Loader.doList(Loader.java:2150)
    org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    org.hibernate.loader.Loader.list(Loader.java:2024)
    org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
    org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
    org.hibernate.impl.CriteriaImpl$Subcriteria.list(CriteriaImpl.java:143)

    I am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    in my store mapping i have the following:
    <composite-id>
    <key-property name="store_id" column="store_id" type="integer" />
    <key-property name="storeLocId" column="storeLocId" type="string"/>
    </composite-id>
    I am creating this join from one table to another
    with the followin query:
    select sale.storeName
    from sale sale, storelocation sc
    where sale.store_id = sc.store_id
    and sale.storeLocId = sc.storeLocId
    <many-to-one name="sale" class="com.dao.hibernate.sale" not-null="true">
    <column name="store_id" />
    <column name="storeLocId" />
    </many-to-one>
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.dao.Store#com.dao.Store@121cc66]
    org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
    org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128)
    org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161)
    org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
    org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:889)
    org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:857)
    org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
    org.hibernate.type.EntityType.resolve(EntityType.java:303)
    org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
    org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
    org.hibernate.loader.Loader.doQuery(Loader.java:717)
    org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    org.hibernate.loader.Loader.doList(Loader.java:2150)
    org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    org.hibernate.loader.Loader.list(Loader.java:2024)
    org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
    org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
    org.hibernate.impl.CriteriaImpl$Subcriteria.list(CriteriaImpl.java:143)

  • Org.hibernate.PropertyNotFoundException: Could not find a getter for id in

    [skumar@aithdell3 events]$ java EventManager
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment <clinit>
    INFO: Hibernate 3.2.3
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment <clinit>
    INFO: hibernate.properties not found
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment buildBytecodeProvider
    INFO: Bytecode provider name : cglib
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment <clinit>
    INFO: using JDK 1.4 java.sql.Timestamp handling
    May 15, 2008 8:39:42 PM org.hibernate.cfg.Configuration configure
    INFO: configuring from resource: /hibernate.cfg.xml
    May 15, 2008 8:39:42 PM org.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: Configuration resource: /hibernate.cfg.xml
    May 15, 2008 8:39:42 PM org.hibernate.cfg.Configuration addResource
    INFO: Reading mappings from resource : Event.hbm.xml
    May 15, 2008 8:39:43 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
    INFO: Mapping class: Event -> EVENTS
    May 15, 2008 8:39:43 PM org.hibernate.cfg.Configuration doConfigure
    INFO: Configured SessionFactory: null
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: Using Hibernate built-in connection pool (not for production use!)
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: Hibernate connection pool size: 1
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: autocommit mode: false
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:sql://localhost
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: connection properties: {user=sa, password=****}
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: RDBMS: HSQL Database Engine, version: 1.8.0
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC driver: HSQL Database Engine Driver, version: 1.8.0
    May 15, 2008 8:39:44 PM org.hibernate.dialect.Dialect <init>
    INFO: Using dialect: org.hibernate.dialect.HSQLDialect
    May 15, 2008 8:39:44 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
    INFO: Using default transaction strategy (direct JDBC transactions)
    May 15, 2008 8:39:44 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
    INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Automatic flush during beforeCompletion(): disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Automatic session close at end of transaction: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC batch size: 15
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC batch updates for versioned data: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Scrollable result sets: enabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC3 getGeneratedKeys(): disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Connection release mode: auto
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Default batch fetch size: 1
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Generate SQL with comments: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Order SQL updates by primary key: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
    INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    May 15, 2008 8:39:44 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
    INFO: Using ASTQueryTranslatorFactory
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Query language substitutions: {}
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JPA-QL strict compliance: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Second-level cache: enabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Query cache: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory createCacheProvider
    INFO: Cache provider: org.hibernate.cache.NoCacheProvider
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Optimize cache for minimal puts: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Structured second-level cache entries: disabled
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Echoing all SQL to stdout
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Statistics: disabled
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Deleted entity synthetic identifier rollback: disabled
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Default entity-mode: pojo
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Named query checking : enabled
    May 15, 2008 8:39:45 PM org.hibernate.impl.SessionFactoryImpl <init>
    INFO: building session factory
    Intial session factory creation failed org.hibernate.PropertyNotFoundException: Could not find a getter for id in class Event
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at HibernateUtil.<clinit>(HibernateUtil.java:18)
    at EventManager.main(EventManager.java:11)
    Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for id in class Event
    at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
    at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
    at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:168)
    at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
    at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:123)
    at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
    at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
    at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
    at HibernateUtil.<clinit>(HibernateUtil.java:14)
    How can i fix this exception
    Please help me.
    Thanks in advance

    [skumar@aithdell3 events]$ java EventManager
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment <clinit>
    INFO: Hibernate 3.2.3
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment <clinit>
    INFO: hibernate.properties not found
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment buildBytecodeProvider
    INFO: Bytecode provider name : cglib
    May 15, 2008 8:39:41 PM org.hibernate.cfg.Environment <clinit>
    INFO: using JDK 1.4 java.sql.Timestamp handling
    May 15, 2008 8:39:42 PM org.hibernate.cfg.Configuration configure
    INFO: configuring from resource: /hibernate.cfg.xml
    May 15, 2008 8:39:42 PM org.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: Configuration resource: /hibernate.cfg.xml
    May 15, 2008 8:39:42 PM org.hibernate.cfg.Configuration addResource
    INFO: Reading mappings from resource : Event.hbm.xml
    May 15, 2008 8:39:43 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
    INFO: Mapping class: Event -> EVENTS
    May 15, 2008 8:39:43 PM org.hibernate.cfg.Configuration doConfigure
    INFO: Configured SessionFactory: null
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: Using Hibernate built-in connection pool (not for production use!)
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: Hibernate connection pool size: 1
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: autocommit mode: false
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:sql://localhost
    May 15, 2008 8:39:43 PM org.hibernate.connection.DriverManagerConnectionProvider configure
    INFO: connection properties: {user=sa, password=****}
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: RDBMS: HSQL Database Engine, version: 1.8.0
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC driver: HSQL Database Engine Driver, version: 1.8.0
    May 15, 2008 8:39:44 PM org.hibernate.dialect.Dialect <init>
    INFO: Using dialect: org.hibernate.dialect.HSQLDialect
    May 15, 2008 8:39:44 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
    INFO: Using default transaction strategy (direct JDBC transactions)
    May 15, 2008 8:39:44 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
    INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Automatic flush during beforeCompletion(): disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Automatic session close at end of transaction: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC batch size: 15
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC batch updates for versioned data: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Scrollable result sets: enabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JDBC3 getGeneratedKeys(): disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Connection release mode: auto
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Default batch fetch size: 1
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Generate SQL with comments: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Order SQL updates by primary key: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
    INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    May 15, 2008 8:39:44 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
    INFO: Using ASTQueryTranslatorFactory
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Query language substitutions: {}
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: JPA-QL strict compliance: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Second-level cache: enabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Query cache: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory createCacheProvider
    INFO: Cache provider: org.hibernate.cache.NoCacheProvider
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Optimize cache for minimal puts: disabled
    May 15, 2008 8:39:44 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Structured second-level cache entries: disabled
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Echoing all SQL to stdout
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Statistics: disabled
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Deleted entity synthetic identifier rollback: disabled
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Default entity-mode: pojo
    May 15, 2008 8:39:45 PM org.hibernate.cfg.SettingsFactory buildSettings
    INFO: Named query checking : enabled
    May 15, 2008 8:39:45 PM org.hibernate.impl.SessionFactoryImpl <init>
    INFO: building session factory
    Intial session factory creation failed org.hibernate.PropertyNotFoundException: Could not find a getter for id in class Event
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at HibernateUtil.<clinit>(HibernateUtil.java:18)
    at EventManager.main(EventManager.java:11)
    Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for id in class Event
    at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
    at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
    at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:168)
    at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
    at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:123)
    at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
    at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
    at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
    at HibernateUtil.<clinit>(HibernateUtil.java:14)
    How can i fix this exception
    Please help me.
    Thanks in advance

  • Some '???' appeared in the LOV Column Mapping window ...only

    Hi,
    I installed the Forms6i with the patch 12 on Windows XP platform. The installation language is Greek. The only problem i have faced up with the installation is the appearance of some question marks in LOV Column Mapping window ... instead of the Greek translation of the phrases:
    Column Names ,
    Return Item ,
    Display Width ,
    Column Title
    Is there a specific Windows font that should be installed ....or something else...????
    Thanks,,,,
    Sim

    You have to do it from the source code. Click on source, you will find "<xsl:if test="">".
    Define your condition in test="/tns:input1=/tns:input2" or check if you source string contains "abcd", i.e. xsl:if test="contain(/tns:source_column1,'abcd')"
    hope this will help

  • OBIEE 10g repository - Business model - logical table to physical table, column mapping is empty

    Hi, I am really new to OBIEE 10g.
    I already set up a SQL Server 2005 database in Physical and import a view vw_Dim_retail_branch.
    The view has 3 columns: branch_id, branch_code, branch_desc.
    Now I want to set up the Business model to map this physical table (view).
    I created a new Business model
    Added new logical table Dim_retail_branch
    In the sources, added the vw_Dim_retail_branch as source table.
    But in the Logical table source window,  column mapping tab, it's blank. I thought it should be able to identify all the columns from vw_Dim_retail_branch, but not. The show mapped columns is ticked.
    What should I do here? Manually type each column?

    HI,
    Just you can drag and drop the columns from physical layer to BMM layer.
    Select the 3 columns and drag and drop it to the created logical column in BMM layer.
    for more reference : http:\\mkashu.blogspot.com
    Regards,
    VG

  • Java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets

    Hi All,
    I am using Oracle 11g and I am trying to delete some records from database using some GUI. In that case I am getting following error:
    java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets are not enabled. When I restart the application's service, this error is going away and deletion is working fine.
    Other related jars that I am using is as follow:
    ojdbc5.jar
    hibernate-3.0.5.jar
    I am attaching the stack trace as well:
    <log4j:event logger="org.hibernate.AssertionFailure" timestamp="1263964931355" sequenceNumber="24" level="ERROR" thread="SocketListener0-2">
    <log4j:message><![CDATA[an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)]]></log4j:message>
    <log4j:throwable><![CDATA[org.hibernate.AssertionFailure: scrollable result sets are not enabled
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:334)
    at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162)
    at org.hibernate.loader.Loader.scroll(Loader.java:1634)
    at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443)
    at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291)
    at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960)
    at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62)
    at com.sample.persistence.WorklistItemDAO.purge(WorklistItemDAO.java:145)
    at com.sample.server.worklistmanager.WorklistManager.purge(WorklistManager.java:695)
    at com.sample.server.webservices.CCGPIWorklistHandler.purge(CCGPIWorklistHandler.java:329)
    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:585)
    at org.apache.xmlrpc.Invoker.execute(Invoker.java:130)
    at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
    at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:114)
    at com.sample.server.webservices.XmlRpcServlet.service(XmlRpcServlet.java:63)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:666)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    ]]></log4j:throwable>
    </log4j:event>
    Thanks
    Shiv

    Hi All,
    anybody got a chance to look into it?
    --Shiv                                                                                                                                                                                                       

  • Warning in WD ABAP Table - Master Column Mapping deprecated

    Hi ,
    I am getting a warning 'Master Column Mapping deprecated' in a WD ABAP component while activating it .
    Can anybody suggest what I have to do to solve this issue .
    Best Regards
    Sid

    Hi,
    Could you please tell me how to take Row Arrangement in Master Column?
    Cheers
    Harkesh Dang

  • Column-map in weblogic-cmp-rdbms-jar.xml

    Hi,
    How to specify column-map for the following database tables:
    Table1: id,col2,col3. Primary key - id.
    Table2: m_id,description,col4,col5. Primay key - (m_id,col4).
    The relationship I specified is table1-has-many-table2. This is a 1 to m relation
    and
    Table1.id = Table2.m_id.
    I specified the following column-map
    <column-map>
    <foreign-key-column>m_id</foreign-key-column>
    <key-column>id</key-column>
    </column-map>
    But the server is throwing an exception that all the columns in table2 should
    me mapped.
    But in this case, I can join the tables with just id only. What should I specify
    for col4 map?.
    I can just reverse the mapping, but I am trying to test the boundaries of weblogic
    server.
    Is this case handled in weblogic server implementation?.
    I am testing relationship-role-map for ejb2.0 on weblogic server8.1 beta version.
    Thanks,
    Sathish

    Hello Sathish,
    Glad to help! Have a wonderful week.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Sathish Kandacharam" <[email protected]> wrote:
    >
    Hi Ryan,
    Thanks alot. That example helped alot.
    Thanks,
    Sathish
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Sathish,
    Please refer to the sample code that comes packaged with BEA WebLogic
    Server for
    examples of how the weblogic-cmp-rdbms-jar.xml file should look forall
    of the
    various relationships. In particular, look at the Bands example.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Sathish Kandacharam" <[email protected]> wrote:
    Hi,
    How to specify column-map for the following database tables:
    Table1: id,col2,col3. Primary key - id.
    Table2: m_id,description,col4,col5. Primay key - (m_id,col4).
    The relationship I specified is table1-has-many-table2. This is
    a
    1 to m relation
    and
    Table1.id = Table2.m_id.
    I specified the following column-map
    <column-map>
    <foreign-key-column>m_id</foreign-key-column>
    <key-column>id</key-column>
    </column-map>
    But the server is throwing an exception that all the columns intable2
    should
    me mapped.
    But in this case, I can join the tables with just id only. Whatshould
    I specify
    for col4 map?.
    I can just reverse the mapping, but I am trying to test the boundaries
    of weblogic
    server.
    Is this case handled in weblogic server implementation?.
    I am testing relationship-role-map for ejb2.0 on weblogic server8.1
    beta version.
    Thanks,
    Sathish

  • Org.hibernate.exception.GenericJDBCException: could not execute query

    while executing sql statements with hibernate oracle this type of errors
    org.hibernate.exception.GenericJDBCException: could not execute query
    ava.sql.SQLException: ORA-01001: cursore non valido can any one suggest
    a solution for this.
    Thanks

    This is likely due to a commit/rollback being executed after the statement has been executed but befofre the result set has been processed by the application. In TimesTen, unlike Oracle, commit/rollback closes all open cursors on the connection. This could be a case of using the wrong Hibernate dialect. Are you using a TimesTen dialect in Hibernate?
    Chris

  • Exception in JPA (NoClassDefFoundError: org/hibernate/AnnotationException)

    Hi,
    I´m having a serious problem when using JPA. I´m using Weblogic Server 10 and developing in Weblogic Workshop Studio. When I start the WLS in Workshop, all works fine, but when I use the "publish" over my WLS Server in Workshop because I change any class in the project (and I need to republish the project to send the changed class to WLS), the following error is reported when I try to use the JPA:
    Caused by: javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.NoClassDefFoundError: org/hibernate/AnnotationException
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:353)
    at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
    at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265)
    at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:884)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186)
    Why the AnnotationException class is no more found after a publish in a started Weblogic Server ?
    Thanks in advance,
    Sergio Stateri Jr.
    [email protected]

    Sergio,
    there are at least three implementation for JPA available: OpenJPA, TopLink, and Hibernate. The first two are or can easily installed in WLS. If you intend to use Hibernate as the persistence provider you should ensure that all libraries are in the class path of your application.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • How do I save a pdf as an html file without losing formatting?

    How do I save a pdf as an html file without losing formatting?  My coworker is able to do this on her Adobe 9 by saving to html css 4.0 - I have Adobe 11 and have not been able to save as an html at all without loosing formatting.

  • Simple authentication and authorization with a servlet and a filter

    Could somebody point me to code example that do simple authentication/authorization using one servlet and one filter? (without Spring, Struts, JSF or any framework) I’m having a lot of problems with that, apparently, easy task. These are the rules: -

  • Stock overview report and query

    Dear all I am devoloping report bsed on fields are      Unrestricted quantity, Quality Inspection Qty, Blocked Qty, Return Qty. the same report is developed from ECC based on The MARD and MBEW tables. now in BW 0ic_c03 is the cube but i am not able t

  • OWB Target Schema Tables

    OWB installs some tables under the target schema (including, for example, WB_RT_PARAMETERS, WB_RT_PLATFORM_PROPERTIES). These tables are in the same schema as all of our application target tables. Our DBAs want to know: (1) Is there some way to have

  • Assignment of sales organization to purchasing organization

    Hi experts, I saw one diagram that shows a sales organization can be assigned to purchasing organization. Can you please tell me how to assign this? Here's the statement from a book. In SAP Retail, a sales organization can be assigned to a purchasing