Все технические форумы на одном сайте Удобный поиск информации с популярных форумов в одном месте
Вопрос: Настройка кэша второго уровня. Hibernate

Пытаюсь настроить кэш второго уровня хибернейта.

hibernate.properties
hibernate.cache.use_second_level_cache true
hibernate.cache.region.factory_class org.hibernate.cache.ehcache.EhCacheRegionFactory


Тестируемая сущность
@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class SampleEntity implements Serializable {

EhCache.xml
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="ehcache.xsd" 
	updateCheck="true"
	monitoring="autodetect" 
	dynamicConfig="true">

	<diskStore path="java.io.tmpdir" />
	<defaultCache
		eternal="true" 
		diskSpoolBufferSizeMB="20"
		timeToIdleSeconds="300" timeToLiveSeconds="600"
		memoryStoreEvictionPolicy="LFU" 
		transactionalMode="off">
	</defaultCache>
</ehcache>


Лог при старте проекта
11:02:23,778 [TRACE][host-startStop-1][nate.internal.SessionFactoryImpl] - Building shared cache region for entity data [SampleEntity]
11:02:23,805 [DEBUG][host-startStop-1][ net.sf.ehcache.Cache] - Initialised cache: SampleEntity
11:02:23,805 [DEBUG][host-startStop-1][cache.config.ConfigurationHelper] - CacheDecoratorFactory not configured for defaultCache. Skipping for 'SampleEntity'.
11:02:23,805 [DEBUG][host-startStop-1][che.AbstractEhcacheRegionFactory] - started EHCache region: SampleEntity


Но при каждом вызове sampleRepository.findAll() получаю в лог
Лог
11:09:32,508 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Resolving associations for [SampleEntity#0]
11:09:32,508 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Adding entity to second-level cache: [SampleEntity#0]
11:09:32,541 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Done materializing entity [SampleEntity#0]
11:09:32,542 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Resolving associations for [SampleEntity#1]
11:09:32,542 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Adding entity to second-level cache: [SampleEntity#1]
11:09:32,543 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Done materializing entity [SampleEntity#1]
11:09:32,544 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Resolving associations for [SampleEntity#2]
11:09:32,544 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Adding entity to second-level cache: [SampleEntity#2]
11:09:32,545 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Done materializing entity [SampleEntity#2]
11:09:32,545 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Resolving associations for [SampleEntity#3]
11:09:32,546 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Adding entity to second-level cache: [SampleEntity#3]
11:09:32,546 [DEBUG][ate.engine.internal.TwoPhaseLoad] - Done materializing entity [SampleEntity#3]


Правильно ли я понимаю, что при каждом вызове данные по новой записываются в кэш, и по факту кэширование у меня не работает?
Ответ:
Blazkowicz
Repository.findAll для JPA работает через Query. Поэтому я предлагаю попробовать эту опцию.

Да, совет мне помог, включил кеширование запросов и добавил в интерфейс репозитория аннотацию

@QueryHints(value = {@QueryHint(name = "org.hibernate.cacheable", value = "true"),
			@QueryHint(name="org.hibernate.cacheRegion",value="Queries")})
	public List<SampleEntity> findAll();


Из прочитанного понял что кэширование запросов менее гибкое, нежели кэширование второго уровня, хоть в моей ситуации с неизменными данными особой разницы, полагаю, не будет.

Еще вопрос, конфигурацию регионов кэша он берет из того же EhCache?
Вопрос: Hibernate связи между таблицами

Есть два класса

public class User {
 
	private Integer id;
 	private String name;
 	private Set<Order> orders=new  HashSet<Order>();
	
 	public Set<Order> getOrders() {
 		return orders;
 	}

	 public void setOrders(Set<Order> orders) {
	 this.orders = orders;
	 }
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public User() {
		
	}
	public User(Integer id, String name) {
		
		this.id = id;
		this.name = name;
	}
}




public class Order  {
	 
	private Integer id;
	private Integer id_user;
	private String item;

	public Order() {
	}
		
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getId_user() {
		return id_user;
	}
	public void setId_user(Integer id_user) {
		this.id_user = id_user;
	}
	public String getItem() {
		return item;
	}
	public void setItem(String item) {
		this.item = item;
	}
	 	
}


два маппинга xml

<hibernate-mapping>
    <class name="com.mycompany.User" table="USERS">
        <id name="id" type="java.lang.Integer">
            <column name="ID" />
            <generator class="identity" />
        </id>
        <property name="name" type="java.lang.String">
            <column name="NAME" length="20" />
        </property>
       <set name="orders" table="ORDERS" inverse="true" lazy="true" fetch="select">
            <key>
                <column name="ID" not-null="true" />
            </key>
            <one-to-many class="com.mycompany.Order" />
        </set>
    </class>
</hibernate-mapping>





<hibernate-mapping>
    <class name="com.mycompany.Order" table="ORDERS">
        <id name="id" type="java.lang.Integer">
            <column name="ID" />
            <generator class="identity" />
        </id>
       
        <property name="id_user" type="java.lang.Integer">
            <column name="ID_USER" />
        </property>
       
        <property name="item" type="java.lang.String">
            <column name="ITEM" />
        </property>
       
    </class>
</hibernate-mapping>


Работаю в Hibernate

Как создать связь один ко многим между таблицами.(У одного usera может быть несколько Orders)

Как я понял в классе user мы делаем атрибут private Set<Order> orders;
А в классе Orders как?

и что мы делаем в xml файлах?

Помогите, только учусь еще.
Спасибо!
Ответ: ivanra,

Точно. Совсем забыл упомянуть аннотации. Про них в мануале тоже жирно отписано
https://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html
Вопрос: Spring hibernate add entity dynamically

есть бутовое приложение, есть набор entity, hibernate с ними работает, все ок.
Далее, допустим, нам приносят джарку, в которой описана еще одна ентити. Мы эту джарку загружаем.
Теперь надо каким-то образом научить hibernate с ней работать. Как?
Ответ: мне интересно, если даже получится, то что с ними дальше будете делать?
Вопрос: Re: JBoss + Spring + JPA + Hibernate хранение документов в PostgreSQL

Хотел попробовать хранить не формализованные документы в базе в поле bytea, сохранил для пробы картинку в базу
В сущности написал:
    @Lob
    @Column(name = "datab")
    private byte[] datab = new byte[0];
    public byte[] getDatab() {
        return datab;
    }
    public void setDatab(byte[] datab) {
        this.datab = datab;
    }

При выполнении Rest запроса выходит ошибка:
Caused by: org.postgresql.util.PSQLException: Bad value for type long : \xffd8ffe11ffe4578696600004d4d002a00000080006011200030000000100010000011a00050000000100000056011b0005000000010000005e
.........................................................................................................................................................................................
2800a28a2800a28a2800a28a2800a28a2800a28a2803ffd9
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toLong(AbstractJdbc2ResultSet.java:2992)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getLong(AbstractJdbc2ResultSet.java:2164)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBlob(AbstractJdbc2ResultSet.java:379)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBlob(AbstractJdbc2ResultSet.java:367)
at org.jboss.jca.adapters.jdbc.WrappedResultSet.getBlob(WrappedResultSet.java:573)
at org.hibernate.type.descriptor.sql.BlobTypeDescriptor$1.doExtract(BlobTypeDescriptor.java:65) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:263) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:338) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2969) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1696) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1628) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.getRow(Loader.java:1515) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:726) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.processResultSet(Loader.java:953) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:921) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.loader.Loader.doList(Loader.java:2554) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
... 90 more



Как правильно описать сущность?
Ответ: Обновлю за автора топика. Пока на данный момент IMHO:

1. Читать документацию PostgreSQL.

PostgreSQL тип bytea != Oracle типу BLOB ! Он, скорее, равен Oracle типу RAW (только лимит 1 Gb вместо 4000 байт)

2. Полноценные BLOB'ы в PostgreSQL делаются через одно место, откуда обычно растут ноги. Читать раздел доки

PostgreSQL 9.4.0 Documentation
IV. Client Interfaces
Chapter 32. Large Objects

3. Соответственно, более корректное объявления типа bytea в хибернейте это

@Type(type = "org.hibernate.type.BinaryType")

возможно нужно как-то по другому, но вроде такое съело.

p.s. Как вчера посмотрел поближе на код, документацию, сайт проекта.... понял, что нужно срочно нажраться. Т.к. "вера в человечество" ( C ) Остап-Сулейман-Берта-Мария-Бендер-бей потеряна окончательно (((
Вопрос: Hibernate, Наследование. Что делать с промежуточным классом?

1) public abstract class A
2) public class B extends A
3) public class C extends B

Хочу две таблицы 1) A 2) B+C

Так можно?

Т.е.
@Entity
@Table(name="A")
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
public abstract class A

А как тогда описать вторую таблицу? Особого смысла ведь в таблице B нету. Тогда как быть?

А смысл в создании класса B ЕСТЬ! И не будим спорить об этом :)

Hibernate ведь не может ограничиваться простенькими примерчиками в сети на тему наследования?
Ответ: Написал кучу классов...

запустил standalone тест простенький:

автор
Caused by: java.lang.ClassCastException: org.hibernate.mapping.JoinedSubclass cannot be cast to org.hibernate.mapping.RootClass
at org.hibernate.cfg.annotations.PropertyBinder.bind(PropertyBinder.java:213)
at org.hibernate.cfg.annotations.PropertyBinder.makePropertyValueAndBind(PropertyBinder.java:204)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:2214)
at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:906)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:733)
at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:245)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:222)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:848)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:876)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
... 4 more


Как найти, каким классом оно не довольно?
Вопрос: mssql + hibernate: не вставляются записи в "чужую" базу

При вставке записи выдается такая ошибка:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: -1; expected: 1

обратите внимание: actual row count: -1;. Гугль на ошибку выдает 0 результатов, про яндекс лучше промолчим.

SQL лог
    insert 
    into
        Somedb.dbo.StateTaxMark
        (credit_id, cause_no, relation, App_id) 
    values
        (?, ?, ?, ?)

Таблица с varchar ключом App_id, задается вручную.
Тот же код в оракле идет на ура.
Возможно, как-то связано с тем, что база данных не совпадает с той, что задана в строке подключения, поэтому в аннотациях указано
@Entity
@Table(catalog="Somedb",schema="dbo")
public class StateTaxMark {...
Ответ: Blazkowicz,
0 результатов при поиске по полной строке ошибки
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: -1; expected: 1

Но действительно, более широкий поиск позволяет найти решение. Вот что нашел:
Ошибка связана с MSSQL-оптимизатором соединения SET NOCOUNT ON;. Насколько я понял, если он включен, то на все CRUD-запросы возвращается -1. Можно:
- перед выполнение запроса отключить оптимизацию SET NOCOUNT OFF;
- или в хибернейтовском конфиге включить принудительный подсчет строк, задав ненулевое значение hibernate.jdbc.batch_size, что я и сделал
<property name="hibernate.jdbc.batch_size">30</property>

Этого оказалось достаточно
Вопрос: Hibernate и Session

Создаю userCourse.
и хочу обновить , записав туда course и user.

userCourse= userCourseService.create(userCourse,user,course,state);
		 userCourse.setCourse(course);
		 userCourse.setUser(user);
		 userCourseService.update(userCourse );



 public UserCourse create(UserCourse userCourse,User user,Course course,String state) {
		 
		Session session = sessionFactory.getCurrentSession();
		session.beginTransaction();
		userCourse.setState(state);
		Integer id = (Integer) session.save(userCourse);
		userCourse.setId(id);
        session.getTransaction().commit();
		 
		return userCourse;
	}; 



public UserCourse update(UserCourse userCourse ) {
		 
		Session session = sessionFactory.getCurrentSession();
		session.beginTransaction();
		session.merge(userCourse);
		session.getTransaction().commit();
		 
		return userCourse;
	};



@Entity
@Table(name="USER_COURSE")
public class UserCourse  implements Serializable{
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	@Column(name="ID")
	private int id;
	 
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_USER", nullable = true)
	private User user;
	 
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_COURSE", nullable = true)
	private Course course;
	@Column(name="state")
	private String state;
	@Column(name="grade")
	private int grade;



Получаю ошибку org.hibernate.LazyInitializationException: could not initialize proxy - no Session
Ответ: [quot goldenhawk]Хочу написать такой метод. объекты user course есть , запись в базе данных тоже есть

	    UserCourse userCourse = (UserCourse)   session.createQuery("from UserCourse u where u.user="+user+" , u.course="+course).list().get(0);


Выводит
org.hibernate.QueryException: unexpected char: '@'

Ну вот каждый месяц пишут о недопустимости конкатенации при создании SQL.
Каждый месяц пишут про PreparedStatement и параметры.
Так нет же, появляется очередной любитель наступить на грабли...

А про LazyInitializationException- это огромная тема.
Это одна из проблем hibernate, которая будет портить кровь всё время, пока ты его используешь.
Вопрос: Entity

Есть entity user

Сделал наследника от него
@Entity
public class UserEx extends User {
    private Date minDate;
    private Date maxDate;

    public Date getMinDate() {
        return minDate;
    }

    public void setMinDate(Date minDate) {
        this.minDate = minDate;
    }

    public Date getMaxDate() {
        return maxDate;
    }

    public void setMaxDate(Date maxDate) {
        this.maxDate = maxDate;
    }
}


В самой таблице User полей нет maxDate и minDate
UserEx pjxe использовать для join

В итоге сейчас валятся все CriteriaBuilder
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00904: "MINDATE": недопустимый идентификатор


Хотя там используется Entity User в логах же идет обращение с колонками MaxDate и MinDate? почему они добавились?
Ответ:
-=Koba=-
Вот именно так и реализовано....
Про то, чтоб развернуть отдельный сервер для 3-4 отчетов, ну это по-моему слишком


Вот.
А передавать классы в отчет как-бы не надо.
Только простые типы.
А уже в самом отчете соответствующие запросы.
Вопрос: Не отображаются данные JSF, Hibernate, PostgreSQL

Добрый день!

Делаю туториал, данные никак не могу отобразить на экране.
Помогите, плиз!

index.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="./template.xhtml">
        <ui:define name="body">
            <!--<h:form styleClass="jsfcrud_list_form">
            </h:form>-->

            <h:form>
                <h:commandLink action="#{nskvController.previous}" value="Previous #{nskvController.pageSize}" rendered="#{nskvController.hasPreviousPage}"/> 
                <h:commandLink action="#{nskvController.next}" value="Next #{nskvController.pageSize}" rendered="#{nskvController.hasNextPage}"/> 
                <h:dataTable value="#{nskvController.nskvTitles}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Nskv"/>
                        </f:facet>
                        <h:outputText value="#{item.nskv}"/>
                    </h:column>
                </h:dataTable>
            </h:form>

        </ui:define>
    </ui:composition>
</html>


NskvController.java
+
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package corelationrental;

import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;

/**
 *
 * @author vvf6426
 */
@Named(value = "nskvController")
@SessionScoped
public class NskvController implements Serializable {

    int startId;
    int endId;
    DataModel nskvTitles;
    NskvHelper helper;
    private int recordCount = 1000;
    private int pageSize = 10;
    private Nskv current;
    private int selectedItemIndex;

    public NskvController() {
        helper = new NskvHelper();
        startId = 1;
        endId = 10;
    }
    
    public NskvController(int startId, int endId) {
        helper = new NskvHelper();
        this.startId = startId;
        this.endId = endId;
    }

    public Nskv getSelected() {
        if (current == null) {
            current = new Nskv();
            selectedItemIndex = -1;
        }
        return current;
    }

    public DataModel getNskvTitles() {
        if (nskvTitles == null) {
            nskvTitles = new ListDataModel(helper.getNskvTitles(startId, endId));
        }
        return nskvTitles;
    }

    void recreateModel() {
        nskvTitles = null;
    }
    
    public boolean isHasNextPage() {
        if (endId + pageSize <= recordCount) {
            return true;
        }
        return false;
    }

    public boolean isHasPreviousPage() {
        if (startId-pageSize > 0) {
            return true;
        }
        return false;
    }

    public String next() {
        startId = endId+1;
        endId = endId + pageSize;
        recreateModel();
        return "index";
    }

    public String previous() {
        startId = startId - pageSize;
        endId = endId - pageSize;
        recreateModel();
        return "index";
    }

    public int getPageSize() {
        return pageSize;
    }


}



NskvHelper.java
+
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package corelationrental;

import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;

/**
 *
 * @author vvf6426
 */
public class NskvHelper {

    Session session = null;

    public NskvHelper() {
        this.session = HibernateUtil.getSessionFactory().getCurrentSession();
    }

    public List getNskvTitles(int startID, int endID) {
        List<Nskv> filmList = null;
        try {
            org.hibernate.Transaction tx = session.beginTransaction();
            Query q = session.createQuery("from Nskv as n where n.id between '" + startID + "' and '" + endID + "'");
            filmList = (List<Nskv>) q.list();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return filmList;
    }

    public Nskv getNskvByID(int nskvId) {

        Nskv nskv = null;

        try {
            org.hibernate.Transaction tx = session.beginTransaction();
            Query q = session.createQuery("from Nskv as nskv where nskv.id=" + nskvId);
            nskv = (Nskv) q.uniqueResult();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return nskv;
    }

}


HibernateUtil.java
+
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package corelationrental;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.SessionFactory;

/**
 * Hibernate Utility class with a convenient method to get Session Factory
 * object.
 *
 * @author vvf6426
 */
public class HibernateUtil {

    private static final SessionFactory sessionFactory;
    
    static {
        try {
            // Create the SessionFactory from standard (hibernate.cfg.xml) 
            // config file.
            sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
        } catch (Throwable ex) {
            // Log the exception. 
            System.err.println("Initial SessionFactory creation failed." + ex);
            throw new ExceptionInInitializerError(ex);
        }
    }
    
    public static SessionFactory getSessionFactory() {
        return sessionFactory;
    }
}


Nskv.hbm.xml
+
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<!-- Generated 29.05.2015 14:32:38 by Hibernate Tools 4.3.1 -->
<hibernate-mapping>
    <class name="corelationrental.Nskv" table="nskv" schema="portal" optimistic-lock="version">
        <id name="id" type="int">
            <column name="id" />
            <generator class="assigned" />
        </id>
        <property name="nskv" type="string">
            <column name="nskv" length="10" />
        </property>
        <property name="x" type="java.lang.Integer">
            <column name="x" />
        </property>
        <property name="y" type="java.lang.Integer">
            <column name="y" />
        </property>
    </class>
</hibernate-mapping>



Nskv.java
+
package corelationrental;
// Generated 29.05.2015 14:32:38 by Hibernate Tools 4.3.1



/**
 * Nskv generated by hbm2java
 */
public class Nskv  implements java.io.Serializable {


     private int id;
     private String nskv;
     private Integer x;
     private Integer y;

    public Nskv() {
    }

	
    public Nskv(int id) {
        this.id = id;
    }
    public Nskv(int id, String nskv, Integer x, Integer y) {
       this.id = id;
       this.nskv = nskv;
       this.x = x;
       this.y = y;
    }
   
    public int getId() {
        return this.id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    public String getNskv() {
        return this.nskv;
    }
    
    public void setNskv(String nskv) {
        this.nskv = nskv;
    }
    public Integer getX() {
        return this.x;
    }
    
    public void setX(Integer x) {
        this.x = x;
    }
    public Integer getY() {
        return this.y;
    }
    
    public void setY(Integer y) {
        this.y = y;
    }




}



ОШИБКА!!!
+
09:35:22,140 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-9) JBAS017535: Unregistered web context: /corelation
09:35:22,140 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) JBAS010418: Stopped Driver service with driver-name = corelation-1.0-SNAPSHOT.war_org.postgresql.Driver_9_4
09:35:22,150 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016009: Stopping weld service for deployment corelation-1.0-SNAPSHOT.war
09:35:22,220 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment corelation-1.0-SNAPSHOT.war (runtime-name: corelation-1.0-SNAPSHOT.war) in 76ms
09:35:22,230 INFO  [org.jboss.as.server] (management-handler-thread - 25) JBAS018558: Undeployed "corelation-1.0-SNAPSHOT.war" (runtime-name: "corelation-1.0-SNAPSHOT.war")
09:35:23,890 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015018: Deployment corelation-1.0-SNAPSHOT.war was previously deployed by this scanner but has been removed from the server deployment list by another management tool. Marker file C:\Program Files\wildfly-8.2.0.Final\standalone\deployments\corelation-1.0-SNAPSHOT.war.undeployed is being added to record this fact.
09:35:23,900 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "corelation-1.0-SNAPSHOT.war" (runtime-name: "corelation-1.0-SNAPSHOT.war")
09:35:29,310 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016002: Processing weld deployment corelation-1.0-SNAPSHOT.war
09:35:29,340 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.4)
09:35:29,340 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016005: Starting Services for CDI deployment: corelation-1.0-SNAPSHOT.war
09:35:29,350 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010417: Started Driver service with driver-name = corelation-1.0-SNAPSHOT.war_org.postgresql.Driver_9_4
09:35:29,350 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment corelation-1.0-SNAPSHOT.war
09:35:29,480 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-14) Initializing Mojarra 2.2.8-jbossorg-1 20140822-1131 for context '/corelation'
09:35:29,970 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-14) JBAS017534: Registered web context: /corelation
09:35:29,990 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "corelation-1.0-SNAPSHOT.war" (runtime-name : "corelation-1.0-SNAPSHOT.war")
09:35:38,196 WARN  [org.jboss.modules] (default task-8) Failed to define class org.hibernate.cfg.ExtendedMappings in Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/hibernate/cfg/ExtendedMappings (Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader)
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
	at corelationrental.HibernateUtil.<clinit>(HibernateUtil.java:25) [classes:]
	at corelationrental.NskvHelper.<init>(NskvHelper.java:21) [classes:]
	at corelationrental.NskvController.<init>(NskvController.java:32) [classes:]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_45]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_45]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_45]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_45]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:113) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.invokeAroundConstructCallbacks(ConstructorInjectionPoint.java:87) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:74) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.AbstractInstantiator.newInstance(AbstractInstantiator.java:28) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.BasicInjectionTarget.produce(BasicInjectionTarget.java:116) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:194) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:149) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.util.bean.IsolatedForwardingBean.create(IsolatedForwardingBean.java:44) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:76) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:107) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:90) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.as.jsf.injection.weld.ForwardingELResolver.getValue(ForwardingELResolver.java:46) [wildfly-jsf-injection-8.2.0.Final.jar:8.2.0.Final]
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.3.Final.jar:1.0.3.Final]
	at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.parser.AstValue.getBase(AstValue.java:151) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.parser.AstValue.getValue(AstValue.java:200) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-3.0.1-b05.jar:]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/Mappings
	at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_45]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_45]
	at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules.jar:1.3.3.Final]
	... 81 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Mappings from [Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
	... 85 more

09:35:38,416 ERROR [stderr] (default task-8) Initial SessionFactory creation failed.java.lang.LinkageError: Failed to link org/hibernate/cfg/ExtendedMappings (Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader)

09:35:38,466 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-8) Error Rendering View[/index.xhtml]: javax.enterprise.inject.CreationException
	at sun.reflect.GeneratedConstructorAccessor29.newInstance(Unknown Source) [:1.8.0_45]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_45]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_45]
	at java.lang.Class.newInstance(Class.java:442) [rt.jar:1.8.0_45]
	at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_45]
	at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:90) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:121) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.invokeAroundConstructCallbacks(ConstructorInjectionPoint.java:87) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:74) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.AbstractInstantiator.newInstance(AbstractInstantiator.java:28) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.BasicInjectionTarget.produce(BasicInjectionTarget.java:116) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:194) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:149) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.util.bean.IsolatedForwardingBean.create(IsolatedForwardingBean.java:44) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:76) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:107) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:90) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.as.jsf.injection.weld.ForwardingELResolver.getValue(ForwardingELResolver.java:46) [wildfly-jsf-injection-8.2.0.Final.jar:8.2.0.Final]
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.3.Final.jar:1.0.3.Final]
	at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.parser.AstValue.getBase(AstValue.java:151) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.parser.AstValue.getValue(AstValue.java:200) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-3.0.1-b05.jar:]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: java.lang.ExceptionInInitializerError
	at corelationrental.HibernateUtil.<clinit>(HibernateUtil.java:29) [classes:]
	at corelationrental.NskvHelper.<init>(NskvHelper.java:21) [classes:]
	at corelationrental.NskvController.<init>(NskvController.java:32) [classes:]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_45]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_45]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_45]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_45]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:113) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	... 65 more
Caused by: java.lang.LinkageError: Failed to link org/hibernate/cfg/ExtendedMappings (Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader)
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
	at corelationrental.HibernateUtil.<clinit>(HibernateUtil.java:25) [classes:]
	... 72 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/Mappings
	at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_45]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_45]
	at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules.jar:1.3.3.Final]
	... 81 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Mappings from [Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
	... 85 more

09:35:38,586 FATAL [javax.enterprise.resource.webcontainer.jsf.context] (default task-8) JSF1073: javax.enterprise.inject.CreationException caught during processing of RENDER_RESPONSE 6 : UIComponent-ClientId=, Message=null
09:35:38,586 FATAL [javax.enterprise.resource.webcontainer.jsf.context] (default task-8) No associated message: javax.enterprise.inject.CreationException
	at sun.reflect.GeneratedConstructorAccessor29.newInstance(Unknown Source) [:1.8.0_45]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_45]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_45]
	at java.lang.Class.newInstance(Class.java:442) [rt.jar:1.8.0_45]
	at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_45]
	at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:90) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:121) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.invokeAroundConstructCallbacks(ConstructorInjectionPoint.java:87) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:74) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.AbstractInstantiator.newInstance(AbstractInstantiator.java:28) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.BasicInjectionTarget.produce(BasicInjectionTarget.java:116) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:194) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:149) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.util.bean.IsolatedForwardingBean.create(IsolatedForwardingBean.java:44) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:76) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:107) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:90) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.as.jsf.injection.weld.ForwardingELResolver.getValue(ForwardingELResolver.java:46) [wildfly-jsf-injection-8.2.0.Final.jar:8.2.0.Final]
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.3.Final.jar:1.0.3.Final]
	at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.parser.AstValue.getBase(AstValue.java:151) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.parser.AstValue.getValue(AstValue.java:200) [javax.el-3.0.1-b05.jar:]
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-3.0.1-b05.jar:]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1850) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) [jsf-impl-2.2.8-jbossorg-1.jar:]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: java.lang.ExceptionInInitializerError
	at corelationrental.HibernateUtil.<clinit>(HibernateUtil.java:29) [classes:]
	at corelationrental.NskvHelper.<init>(NskvHelper.java:21) [classes:]
	at corelationrental.NskvController.<init>(NskvController.java:32) [classes:]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_45]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_45]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_45]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_45]
	at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:113) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
	... 65 more
Caused by: java.lang.LinkageError: Failed to link org/hibernate/cfg/ExtendedMappings (Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader)
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
	at corelationrental.HibernateUtil.<clinit>(HibernateUtil.java:25) [classes:]
	... 72 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/Mappings
	at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_45]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_45]
	at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules.jar:1.3.3.Final]
	... 81 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Mappings from [Module "deployment.corelation-1.0-SNAPSHOT.war:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
	... 85 more
Ответ: ivanra,

Доброе утро!

В логике все поменял раз 10 вчера, не помогло.

Ошибка
+
NetBeans: Deploying on Сервер приложений WildFly
    profile mode: false
    debug mode: false
    force redeploy: true
Отмена развертывания...
Начальное развертывание corr1 на C:\Program Files\wildfly-8.2.0.Final\standalone\deployments\corr1-1.1.war
Завершено начальное распространение corr1
Развертывание C:\Program Files\wildfly-8.2.0.Final\standalone\deployments\corr1-1.1.war
"{\"JBAS014671: Failed services\" => {\"jboss.deployment.unit.\\\"corr1-1.1.war\\\".INSTALL\" => \"org.jboss.msc.service.StartException in service jboss.deployment.unit.\\\"corr1-1.1.war\\\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \\\"corr1-1.1.war\\\"
    Caused by: java.lang.IllegalArgumentException: JBAS011053: Incompatible conflicting binding at java:/PostGreDS source: lookup (java:comp/DefaultDataSource)\"}}"
cd C:\Users\vvf6426\Documents\NetBeansProjects\corr1; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_45" cmd /c "\"\"C:\\Program Files\\NetBeans 8.0.2\\java\\maven\\bin\\mvn.bat\" -Dnetbeans.deploy=true -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.0.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 package\""
Scanning for projects...
                                                                        
------------------------------------------------------------------------
Building corr1 1.1
------------------------------------------------------------------------
The POM for unknown.binary:org-apache-commons-logging:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:cglib-2.2:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-aop-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-aspects-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-beans-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-build-src-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-context-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-context-support-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-core-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-expression-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-framework-bom-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-instrument-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-instrument-tomcat-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-jdbc-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-jms-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-messaging-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-orm-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-oxm-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-test-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-tx-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-web-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-webmvc-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-webmvc-portlet-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:spring-websocket-4.0.1.RELEASE:jar:SNAPSHOT is missing, no dependency information available
The POM for unknown.binary:hibernate-jpamodelgen-4.3.1.Final:jar:SNAPSHOT is missing, no dependency information available

--- maven-dependency-plugin:2.6:copy (default) @ corr1 ---

--- maven-resources-plugin:2.5:resources (default-resources) @ corr1 ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 1 resource

--- maven-compiler-plugin:3.1:compile (default-compile) @ corr1 ---
Nothing to compile - all classes are up to date

--- maven-resources-plugin:2.5:testResources (default-testResources) @ corr1 ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\Users\vvf6426\Documents\NetBeansProjects\corr1\src\test\resources

--- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ corr1 ---
No sources to compile

--- maven-surefire-plugin:2.10:test (default-test) @ corr1 ---
Surefire report directory: C:\Users\vvf6426\Documents\NetBeansProjects\corr1\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0


--- maven-war-plugin:2.3:war (default-war) @ corr1 ---
Packaging webapp
Assembling webapp [corr1] in [C:\Users\vvf6426\Documents\NetBeansProjects\corr1\target\corr1-1.1]
Processing war project
Copying webapp resources [C:\Users\vvf6426\Documents\NetBeansProjects\corr1\src\main\webapp]
Webapp assembled in [125 msecs]
Building war: C:\Users\vvf6426\Documents\NetBeansProjects\corr1\target\corr1-1.1.war
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 3.747s
Finished at: Tue Jun 02 08:35:41 MSK 2015
Final Memory: 14M/224M
------------------------------------------------------------------------
NetBeans: Deploying on Сервер приложений WildFly
    profile mode: false
    debug mode: false
    force redeploy: true
Отмена развертывания...
Начальное развертывание corr1 на C:\Program Files\wildfly-8.2.0.Final\standalone\deployments\corr1-1.1.war
Завершено начальное распространение corr1
Развертывание C:\Program Files\wildfly-8.2.0.Final\standalone\deployments\corr1-1.1.war
"{\"JBAS014671: Failed services\" => {\"jboss.deployment.unit.\\\"corr1-1.1.war\\\".INSTALL\" => \"org.jboss.msc.service.StartException in service jboss.deployment.unit.\\\"corr1-1.1.war\\\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \\\"corr1-1.1.war\\\"
    Caused by: java.lang.IllegalArgumentException: JBAS011053: Incompatible conflicting binding at java:/PostGreDS source: lookup (java:comp/DefaultDataSource)\"}}"


Гугул подсказал, что вот здесь есть
Но в моем проекте нет папки lib по такому пути. Как сделать то что там написано?

Спасибо большое!
Вопрос: Hibernate unresolved insertions

При попытке обновить сущность (довольно сложную, основную для приложения, листинги прилагать нету смысла) выбрасывает исключение
Цитата
java.lang.IllegalStateException: There are delayed insert actions before operation as cascade level 0.
    at org.hibernate.internal.SessionImpl.checkNoUnresolvedActionsBeforeOperation(SessionImpl.java:648) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
    at org.hibernate.internal.SessionImpl.fireUpdate(SessionImpl.java:733) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
    at org.hibernate.internal.SessionImpl.update(SessionImpl.java:727) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
    at org.hibernate.internal.SessionImpl.update(SessionImpl.java:722) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
..............


Я не совсем понимаю, куда копать и от чего такое может  случиться. Если сохраняется новая сущность, все в порядке. Тут же часть данных меняется на новые (которых нету в БД) и обьект обновляется. Что можно посоветовать? 

Это сообщение отредактировал(а) lamao - 8.10.2014, 13:10
Ответ:
При попытке обновить сущность (довольно сложную, основную для приложения, листинги прилагать нету смысла) выбрасывает исключение
Цитата
java.lang.IllegalStateException: There are delayed insert actions before operation as cascade level 0.
    at org.hibernate.internal.SessionImpl.checkNoUnresolvedActionsBeforeOperation(SessionImpl.java:648) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
    at org.hibernate.internal.SessionImpl.fireUpdate(SessionImpl.java:733) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
    at org.hibernate.internal.SessionImpl.update(SessionImpl.java:727) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
    at org.hibernate.internal.SessionImpl.update(SessionImpl.java:722) ~[hibernate-core-4.3.1.Final.jar:4.3.1.Final]
..............


Я не совсем понимаю, куда копать и от чего такое может  случиться. Если сохраняется новая сущность, все в порядке. Тут же часть данных меняется на новые (которых нету в БД) и обьект обновляется. Что можно посоветовать? 

Это сообщение отредактировал(а) lamao - 8.10.2014, 13:10