Exception in thread "main" org.hibernate.exception.SQLGrammarException: ORA-00926: missing VALUES keyword
<pre><code>this is my main code:
package org.javab.hibernate;

import org.hibernate.Session; 
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.javab.Address;
import org.javab.Userdetails;

public class Hibernatetest {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        Userdetails user = new Userdetails();
        Address addr= new Address();
        addr.setCity("banglore");
        addr.setDoorno("10");
        addr.setStreet("street");
        user.setAddress(addr);


        Address addr1= new Address();
        addr1.setCity("manglore");
        addr1.setDoorno("145");
        addr1.setStreet("addr lane 1");

        user.setAddress(addr1);
        user.getCollectionofaddr().add(addr);
        user.getCollectionofaddr().add(addr1);
        user.setUserid(11);
        user.setUsername("ten");

        @SuppressWarnings("deprecation")
        SessionFactory sessionfactory =new Configuration().configure().buildSessionFactory();
        Session session =sessionfactory.openSession();

        session.beginTransaction(); 

        session.save(user);
        session.getTransaction().commit();

        session.close();
        session =sessionfactory.openSession();

        session.beginTransaction(); 
        user = (Userdetails) session.get(Userdetails.class,4);
        System.out.println("user name "+ user.getUsername());

    }
}


 this is model class:    
    this is model class:
    package org.javab;

    import javax.persistence.Embeddable;

    @Embeddable 
    public class Address {

        private String street;
        private String city;
        private String doorno;
        public String getStreet() {
            return street;
        }
        public void setStreet(String street) {
            this.street = street;
        }
        public String getCity() {
            return city;
        }
        public void setCity(String city) {
            this.city = city;
        }
        public String getDoorno() {
            return doorno;
        }
        public void setDoorno(String doorno) {
            this.doorno = doorno;
        }

    }
</code></pre>

<p>the another model class usedeails is
     this is my another model class:
    import java.util.HashSet;
    import java.util.Set;</p>

<pre><code>import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.JoinColumn;

@Entity
public class Userdetails {
    @Id
    private int userid;
    private String username;
    private Address address;
    @ElementCollection
    @JoinTable(name="COLLECTION-TABLE")/*, joinColumns=@JoinColumn(name="user_id"))*/
    private Set&lt;Address&gt; collectionofaddr = new HashSet();
    public Set&lt;Address&gt; getCollectionofaddr() {
        return collectionofaddr;
    }
    public void setCollectionofaddr(Set&lt;Address&gt; collectionofaddr) {
        this.collectionofaddr = collectionofaddr;
    }
    public Address getAddress() {
        return address;
    }
    public void setAddress(Address address) {
        this.address = address;
    }


    public int getUserid() {
        return userid;
    }
    public void setUserid(int userid) {
        this.userid = userid;
    }
    public String getUsername() {
        return "username from get"+username;

    }
    public void setUsername(String username) {
        this.username = username;
    }

}



hibernate.cfg.xml
&lt;!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt;
&lt;hibernate-configuration&gt;
 &lt;session-factory&gt;

    &lt;!-- Database connection settings --&gt;
    &lt;property name="connection.driver_class"&gt;oracle.jdbc.driver.OracleDriver&lt;/property&gt;

    &lt;property name="connection.url"&gt;jdbc:oracle:thin:@xxx.corp.XXXX.com:1600/xxxxx&lt;/property&gt;
    &lt;property name="connection.username"&gt;xxxx&lt;/property&gt;
    &lt;property name="connection.password"&gt;xxxxxxxxr&lt;/property&gt;

    &lt;!-- JDBC connection pool (use the built-in) --&gt;
    &lt;property name="connection.pool_size"&gt;1&lt;/property&gt;

    &lt;!-- SQL dialect --&gt;
    &lt;property name="dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;

    &lt;!-- Disable the second-level cache  --&gt;
    &lt;!-- &lt;property name="cache.provider_class"&gt;org.hibernate.cache.internal.NoCacheProvider&lt;/property&gt; --&gt;

    &lt;!-- Echo all executed SQL to stdout --&gt;
    &lt;property name="show_sql"&gt;true&lt;/property&gt;

    &lt;!-- Drop and re-create the database schema on startup --&gt;
    &lt;property name="hbm2ddl.auto"&gt;update&lt;/property&gt;

    &lt;!-- Name the annotated Entity --&gt;
    &lt;mapping class="org.javab.Userdetails"&gt;&lt;/mapping&gt;
&lt;/session-factory&gt;
&lt;/hibernate-configuration&gt;


pom.xml:
&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
  &lt;artifactId&gt;demo.hibernate&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;this is name&lt;/name&gt;
  &lt;description&gt;this is descriprion&lt;/description&gt;

&lt;url&gt;http://maven.apache.org&lt;/url&gt;
     &lt;dependencies&gt;

      &lt;dependency&gt;
            &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
            &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
            &lt;version&gt;4.0.1.Final&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
            &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
            &lt;version&gt;4.2.0.Final&lt;/version&gt;
        &lt;/dependency&gt;        
        &lt;dependency&gt;
            &lt;groupId&gt;org.hibernate.common&lt;/groupId&gt;
            &lt;artifactId&gt;hibernate-commons-annotations&lt;/artifactId&gt;
            &lt;version&gt;4.0.1.Final&lt;/version&gt;
            &lt;classifier&gt;tests&lt;/classifier&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
            &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
            &lt;version&gt;1.0.1.Final&lt;/version&gt;
        &lt;/dependency&gt; 
       &lt;dependency&gt;
            &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
            &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
            &lt;version&gt;4.0.1.Final&lt;/version&gt;
        &lt;/dependency&gt;       
        &lt;dependency&gt;
            &lt;groupId&gt;javax.validation&lt;/groupId&gt;
            &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
            &lt;version&gt;1.0.0.GA&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
            &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
            &lt;version&gt;1.6.4&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.jboss.logging&lt;/groupId&gt;
            &lt;artifactId&gt;jboss-logging&lt;/artifactId&gt;
            &lt;version&gt;3.1.0.CR2&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
            &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
            &lt;version&gt;1.6.4&lt;/version&gt;
        &lt;/dependency&gt;
          &lt;/dependencies&gt;


&lt;/project&gt;


fnally my error message:
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Hibernate: insert into Userdetails (city, doorno, street, username, userid) values (?, ?, ?, ?, ?)
Hibernate: insert into COLLECTION-TABLE (Userdetails_userid, city, doorno, street) values (?, ?, ?, ?)
Exception in thread "main" org.hibernate.exception.SQLGrammarException: ORA-00926: missing VALUES keyword

    at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:82)
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
    at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
    at com.sun.proxy.$Proxy11.executeUpdate(Unknown Source)
    at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56)
    at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1204)
    at org.hibernate.action.internal.CollectionRecreateAction.execute(CollectionRecreateAction.java:58)
    at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:272)
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:264)
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:190)
    at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326)
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1081)
    at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:315)
    at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
    at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
    at org.javab.hibernate.Hibernatetest.main(Hibernatetest.java:42)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00926: missing VALUES keyword

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
    ... 15 more
</code></pre>

<p>please help me solve this error..getting some missing value keywords.
Note:
the error appears only after addding </p>