I am building an Maven&amp;Spring&amp;Hibernate&amp;JSF project on Eclipse.While compiling the program I have 


  StandardServiceRegistryBuilder cannot be resolved to a type
  The import org.hibernate.boot.cannot be resolved


errors.

Main class is as follows:

package com.test;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;

import com.hibernate.data.Person;

public class Main {
public static void main(String [] args){

    Configuration configuration = new Configuration();
    System.out.println("CFG and hbm files loaded successfully.");//just to test

    configuration.configure("hibernate.cfg.xml");

    SessionFactory factory = configuration.buildSessionFactory(new StandardServiceRegistryBuilder().configure().build());

    Session session = factory.openSession();

    Transaction tx = session.getTransaction();
    tx.begin();
    System.out.println("Transaction began");//just to test

    Person newPerson = new Person();
    newPerson.setFirstName("aa");
    newPerson.setLastName("bbb");
    newPerson.setGender("Male");
    newPerson.setAge(2);

    session.save(newPerson);
    session.flush();

    tx.commit();
    session.close();
    System.out.println("aaa");//just to test

}
}


pom.xml file is as follows:

&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;Spring-Hibernate-JSF-MySQL-Example&lt;/groupId&gt;
&lt;artifactId&gt;Spring-Hibernate-JSF-MySQL-Example&lt;/artifactId&gt;
&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
&lt;packaging&gt;war&lt;/packaging&gt;
&lt;properties&gt;
&lt;!-- Generic properties --&gt;
 &lt;java.version&gt;1.6&lt;/java.version&gt;
 &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
 &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
&lt;!-- Spring --&gt;
    &lt;spring-framework.version&gt;4.1.6.RELEASE&lt;/spring-framework.version&gt;
&lt;/properties&gt;
&lt;build&gt;
&lt;plugins&gt;
  &lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
    &lt;version&gt;3.1&lt;/version&gt;
    &lt;configuration&gt;
      &lt;source&gt;1.8&lt;/source&gt;
      &lt;target&gt;1.8&lt;/target&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
            &lt;archive&gt;
                &lt;manifest&gt;
                    &lt;mainClass&gt;com.test.Main&lt;/mainClass&gt;
                &lt;/manifest&gt;
            &lt;/archive&gt;
        &lt;/configuration&gt;
    &lt;/plugin&gt;
  &lt;plugin&gt;
    &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.4&lt;/version&gt;
    &lt;configuration&gt;
      &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  &lt;plugin&gt;
    &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
    &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
    &lt;configuration&gt;
         &lt;mainClass&gt;com.test.Main&lt;/mainClass&gt;
    &lt;/configuration&gt;
   &lt;/plugin&gt;
&lt;/plugins&gt;
&lt;/build&gt;
&lt;url&gt;http://maven.apache.org&lt;/url&gt;
&lt;repositories&gt;
    &lt;repository&gt;
        &lt;id&gt;prime-repo&lt;/id&gt;
        &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;
        &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;
        &lt;layout&gt;default&lt;/layout&gt;
    &lt;/repository&gt;
&lt;/repositories&gt;
&lt;dependencies&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
    &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
    &lt;version&gt;5.0&lt;/version&gt;
 &lt;/dependency&gt;
 &lt;dependency&gt;
    &lt;groupId&gt;org.primefaces.themes&lt;/groupId&gt;
    &lt;artifactId&gt;blitzer&lt;/artifactId&gt;
    &lt;version&gt;1.0.10&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;mysql&lt;/groupId&gt;
    &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
    &lt;version&gt;5.1.9&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
    &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
    &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
&lt;/dependency&gt;
 &lt;dependency&gt;
    &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
    &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
    &lt;version&gt;1.4&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.javassist&lt;/groupId&gt;
    &lt;artifactId&gt;javassist&lt;/artifactId&gt;
    &lt;version&gt;3.18.1-GA&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;commons-collections&lt;/groupId&gt;
    &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;
    &lt;version&gt;3.1&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;javax.transaction&lt;/groupId&gt;
    &lt;artifactId&gt;jta&lt;/artifactId&gt;
    &lt;version&gt;1.1&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
    &lt;version&gt;3.1&lt;/version&gt;
    &lt;type&gt;maven-plugin&lt;/type&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;log4j&lt;/groupId&gt;
    &lt;artifactId&gt;log4j&lt;/artifactId&gt;
    &lt;version&gt;1.2.12&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
    &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
    &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
    &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
    &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
    &lt;version&gt;2.2.10&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
    &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
    &lt;version&gt;2.2.10&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
    &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
    &lt;version&gt;3.6.8.Final&lt;/version&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;
&lt;/project&gt;



Question: Derivative of Continuous and Differentiable Piecewise function is indeterminate
Answer: You may define:

deriv[fun_, pp_] := Limit[D[fun[p], p], p -&gt; pp]
deriv[edens, p0]
(* 155.59 *)


In fact, this way you can also obtain a symbolic form for the derivative

Clear[k1, k2, eps1, eps2, p0, delP, kmax];
deriv[edens, p] // InputForm
(* Piecewise[{{k1, delP + p - p0 &lt;= 0},
              {kmax + ((-k1 + kmax)*(p - p0))/delP, delP + p - p0 &gt;= 0 &amp;&amp; p - p0 &lt;= 0}, 
              {kmax + ((k2 - kmax)*(p - p0))/delP, p - p0 &gt;= 0 &amp;&amp; delP - p + p0 &gt;= 0}, 
              {k2, delP - p + p0 &lt;= 0}}, 
               0] *)


To get a plot you could use:

Plot[deriv[edens, p] /. p -&gt; pp, {pp, p0 - 2*delP, p0 + 2*delP},  Exclusions -&gt; None]