[JBoss JIRA] (DROOLS-2588) Kie maven plugin does not build kiebase on windows
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2588?page=com.atlassian.jira.plugi... ]
Mario Fusco resolved DROOLS-2588.
---------------------------------
Resolution: Done
Fixed by https://issues.jboss.org/browse/DROOLS-2339
> Kie maven plugin does not build kiebase on windows
> --------------------------------------------------
>
> Key: DROOLS-2588
> URL: https://issues.jboss.org/browse/DROOLS-2588
> Project: Drools
> Issue Type: Bug
> Components: tools
> Affects Versions: 7.7.0.Final
> Environment: Windows 10
> Reporter: Viacheslav Krot
> Assignee: Mario Fusco
> Attachments: net_tst.zip
>
>
> Hi,
> In drools 7.7.0.Final maven plugin suddenly stopped building kie base and thus verifying DRL files during packaging. It does not find the resources at all, during build I see warning:
> {noformat}
> [WARNING] No files found for KieBase defaultKieBase
> {noformat}
> I attach a simple project with error in DRL, it should not be built, but with 7.7.0.Final on Windows the build is successful. Though same project fails on macos or linux (as expected). And even 7.6.0 on Windows produces error
> {noformat}
> [ERROR] Unable to build KieBaseModel:defaultKieBase
> Unable to resolve ObjectType 'List2' : [Rule name='all_import']
> {noformat}
> Only windows is affected, builds on linux and macos work as expected - they fail (because there is an error in DRL file), only windows with 7.7.0 plugin pass because it does not see the resources.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 4 months
[JBoss JIRA] (WFLY-10513) Getting JTA Datasource (Wildfly 13)
by David Tierens (JIRA)
[ https://issues.jboss.org/browse/WFLY-10513?page=com.atlassian.jira.plugin... ]
David Tierens updated WFLY-10513:
---------------------------------
Description:
In Wildfly 12 it ,was possible to get the DataSource via :
{code:java}
@ApplicationScoped
public class ExamplePersistenceContextConfiguration {
@PersistenceContext(unitName = "examplePersistenceUnit")
@Produces
private EntityManager entityManager;
@Produces
public DataSource getDataSource() {
EntityManagerFactory entityManagerFactory = entityManager.getEntityManagerFactory();
Map<String, Object> properties = entityManagerFactory.getProperties();
return (DataSource) properties.get("javax.persistence.jtaDataSource");
}
@Produces
public SessionFactory getSessionFactory() {
Session session = entityManager.unwrap(Session.class);
return session.getSessionFactory();
}
}
{code}
Currently it's returning null in Wildfly 13, however :
{code:java}
(DataSource) properties.get("hibernate.connection.datasource");
{code}
does work (instead of :
{code:java}
(DataSource) properties.get("javax.persistence.jtaDataSource")
{code}
Persistence.XML :
{code:xml}
// Some comments here
public String getFoo()
{
return foo;
}
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<!-- HBM files in this module will be loaded automatically -->
<persistence-unit name="examplePersistenceUnit" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>jdbc/ExampleXADataSource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.order_inserts" value="true"/>
<property name="hibernate.jdbc.wrap_result_sets" value="true"/>
<property name="hibernate.integration.envers.enabled" value="false"/>
</properties>
</persistence-unit>
</persistence>
{code}
Is there any way to get it via the properties.get("javax.persistence.jtaDataSource") and not via Hibernate ?
Thanks in advance,
David
was:
In Wildfly 12 it ,was possible to get the DataSource via :
{code:java}
@ApplicationScoped
public class ExamplePersistenceContextConfiguration {
@PersistenceContext(unitName = "examplePersistenceUnit")
@Produces
private EntityManager entityManager;
@Produces
public DataSource getDataSource() {
EntityManagerFactory entityManagerFactory = entityManager.getEntityManagerFactory();
Map<String, Object> properties = entityManagerFactory.getProperties();
return (DataSource) properties.get("javax.persistence.jtaDataSource");
}
@Produces
public SessionFactory getSessionFactory() {
Session session = entityManager.unwrap(Session.class);
return session.getSessionFactory();
}
}
{code}
Currently it's returning null in Wildfly 13, however :
(DataSource) properties.get("hibernate.connection.datasource");
does work (instead of (DataSource) properties.get("javax.persistence.jtaDataSource")
Persistence.XML :
{code:xml}
// Some comments here
public String getFoo()
{
return foo;
}
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<!-- HBM files in this module will be loaded automatically -->
<persistence-unit name="examplePersistenceUnit" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>jdbc/ExampleXADataSource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.order_inserts" value="true"/>
<property name="hibernate.jdbc.wrap_result_sets" value="true"/>
<property name="hibernate.integration.envers.enabled" value="false"/>
</properties>
</persistence-unit>
</persistence>
{code}
Is there any way to get it via the properties.get("javax.persistence.jtaDataSource") and not via Hibernate ?
Thanks in advance,
David
> Getting JTA Datasource (Wildfly 13)
> -----------------------------------
>
> Key: WFLY-10513
> URL: https://issues.jboss.org/browse/WFLY-10513
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, JPA / Hibernate
> Affects Versions: 13.0.0.Final
> Reporter: David Tierens
> Assignee: Martin Kouba
> Priority: Minor
>
> In Wildfly 12 it ,was possible to get the DataSource via :
>
> {code:java}
> @ApplicationScoped
> public class ExamplePersistenceContextConfiguration {
>
> @PersistenceContext(unitName = "examplePersistenceUnit")
> @Produces
> private EntityManager entityManager;
>
> @Produces
> public DataSource getDataSource() {
> EntityManagerFactory entityManagerFactory = entityManager.getEntityManagerFactory();
> Map<String, Object> properties = entityManagerFactory.getProperties();
> return (DataSource) properties.get("javax.persistence.jtaDataSource");
> }
>
> @Produces
> public SessionFactory getSessionFactory() {
> Session session = entityManager.unwrap(Session.class);
> return session.getSessionFactory();
> }
> }
> {code}
>
> Currently it's returning null in Wildfly 13, however :
> {code:java}
> (DataSource) properties.get("hibernate.connection.datasource");
> {code}
> does work (instead of :
> {code:java}
> (DataSource) properties.get("javax.persistence.jtaDataSource")
> {code}
>
> Persistence.XML :
> {code:xml}
> // Some comments here
> public String getFoo()
> {
> return foo;
> }
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
> http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
> version="2.1">
> <!-- HBM files in this module will be loaded automatically -->
> <persistence-unit name="examplePersistenceUnit" transaction-type="JTA">
> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
> <jta-data-source>jdbc/ExampleXADataSource</jta-data-source>
> <properties>
> <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
> <property name="hibernate.show_sql" value="true"/>
> <property name="hibernate.order_inserts" value="true"/>
> <property name="hibernate.jdbc.wrap_result_sets" value="true"/>
> <property name="hibernate.integration.envers.enabled" value="false"/>
> </properties>
> </persistence-unit>
> </persistence>
> {code}
>
> Is there any way to get it via the properties.get("javax.persistence.jtaDataSource") and not via Hibernate ?
>
> Thanks in advance,
> David
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 4 months
[JBoss JIRA] (WFLY-10513) Getting JTA Datasource (Wildfly 13)
by David Tierens (JIRA)
David Tierens created WFLY-10513:
------------------------------------
Summary: Getting JTA Datasource (Wildfly 13)
Key: WFLY-10513
URL: https://issues.jboss.org/browse/WFLY-10513
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, JPA / Hibernate
Affects Versions: 13.0.0.Final
Reporter: David Tierens
Assignee: Martin Kouba
Priority: Minor
In Wildfly 12 it ,was possible to get the DataSource via :
{code:java}
@ApplicationScoped
public class ExamplePersistenceContextConfiguration {
@PersistenceContext(unitName = "examplePersistenceUnit")
@Produces
private EntityManager entityManager;
@Produces
public DataSource getDataSource() {
EntityManagerFactory entityManagerFactory = entityManager.getEntityManagerFactory();
Map<String, Object> properties = entityManagerFactory.getProperties();
return (DataSource) properties.get("javax.persistence.jtaDataSource");
}
@Produces
public SessionFactory getSessionFactory() {
Session session = entityManager.unwrap(Session.class);
return session.getSessionFactory();
}
}
{code}
Currently it's returning null in Wildfly 13, however :
(DataSource) properties.get("hibernate.connection.datasource");
does work (instead of (DataSource) properties.get("javax.persistence.jtaDataSource")
Persistence.XML :
{code:xml}
// Some comments here
public String getFoo()
{
return foo;
}
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<!-- HBM files in this module will be loaded automatically -->
<persistence-unit name="examplePersistenceUnit" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>jdbc/ExampleXADataSource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.order_inserts" value="true"/>
<property name="hibernate.jdbc.wrap_result_sets" value="true"/>
<property name="hibernate.integration.envers.enabled" value="false"/>
</properties>
</persistence-unit>
</persistence>
{code}
Is there any way to get it via the properties.get("javax.persistence.jtaDataSource") and not via Hibernate ?
Thanks in advance,
David
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 4 months