[JBoss JIRA] (WFLY-11891) Add tests that enable JPA entity class bytecode enhancement
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-11891?page=com.atlassian.jira.plugin... ]
Scott Marlow edited comment on WFLY-11891 at 3/28/19 9:33 AM:
--------------------------------------------------------------
[~tomekadamski] Thanks for volunteering to look at this, at this point, I think its best for the Hibernate team try to solve first ([~gbadner] has been working on it).
was (Author: smarlow):
[~tomekadamski] Thanks for volunteering to look at this, at this point, I think its best of the Hibernate team try to solve first ([~gbadner] has been working on it).
> Add tests that enable JPA entity class bytecode enhancement
> -----------------------------------------------------------
>
> Key: WFLY-11891
> URL: https://issues.jboss.org/browse/WFLY-11891
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 16.0.0.Final
> Reporter: Scott Marlow
> Assignee: Gail Badner
> Priority: Minor
> Attachments: bytebuddy.log, javassist.log
>
>
> Pick a few unit tests and add the following settings to enable [entity bytecode enhancement|http://docs.jboss.org/hibernate/orm/5.3/userguide/html_single...]:
> {code}
> <property name="hibernate.enhancer.enableDirtyTracking" value="true"/>
> <property name="hibernate.enhancer.enableLazyInitialization" value="true"/>
> <property name="hibernate.enhancer.enableAssociationManagement" value="true"/>
> {code}
> Steps to reproduce:
> * Build WildFly
> * cd testsuite/integration/basic
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.transaction.TransactionTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.hibernate.management.ManagementTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.entitylistener.EntityListenersTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.secondlevelcache.JPA2LCTestCase
> Note that the org.jboss.as.test.integration.jpa.transaction.TransactionTestCase test should pass since javassist is specified in the persistence.xml but that seems to be ignored (we still get the ByteBuddy failure).
> To workaround failures, prestart wildfly via: ./standalone.sh -Dhibernate.bytecode.provider=javassist and then run tests.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (WFLY-11891) Add tests that enable JPA entity class bytecode enhancement
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-11891?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-11891:
-------------------------------------
[~tomekadamski] Thanks for volunteering to look at this, at this point, I think its best of the Hibernate team try to solve first ([~gbadner] has been working on it).
> Add tests that enable JPA entity class bytecode enhancement
> -----------------------------------------------------------
>
> Key: WFLY-11891
> URL: https://issues.jboss.org/browse/WFLY-11891
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 16.0.0.Final
> Reporter: Scott Marlow
> Assignee: Gail Badner
> Priority: Minor
> Attachments: bytebuddy.log, javassist.log
>
>
> Pick a few unit tests and add the following settings to enable [entity bytecode enhancement|http://docs.jboss.org/hibernate/orm/5.3/userguide/html_single...]:
> {code}
> <property name="hibernate.enhancer.enableDirtyTracking" value="true"/>
> <property name="hibernate.enhancer.enableLazyInitialization" value="true"/>
> <property name="hibernate.enhancer.enableAssociationManagement" value="true"/>
> {code}
> Steps to reproduce:
> * Build WildFly
> * cd testsuite/integration/basic
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.transaction.TransactionTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.hibernate.management.ManagementTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.entitylistener.EntityListenersTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.secondlevelcache.JPA2LCTestCase
> Note that the org.jboss.as.test.integration.jpa.transaction.TransactionTestCase test should pass since javassist is specified in the persistence.xml but that seems to be ignored (we still get the ByteBuddy failure).
> To workaround failures, prestart wildfly via: ./standalone.sh -Dhibernate.bytecode.provider=javassist and then run tests.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (WFLY-11891) Add tests that enable JPA entity class bytecode enhancement
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-11891?page=com.atlassian.jira.plugin... ]
Scott Marlow reassigned WFLY-11891:
-----------------------------------
Assignee: Gail Badner (was: Tomasz Adamski)
> Add tests that enable JPA entity class bytecode enhancement
> -----------------------------------------------------------
>
> Key: WFLY-11891
> URL: https://issues.jboss.org/browse/WFLY-11891
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 16.0.0.Final
> Reporter: Scott Marlow
> Assignee: Gail Badner
> Priority: Minor
> Attachments: bytebuddy.log, javassist.log
>
>
> Pick a few unit tests and add the following settings to enable [entity bytecode enhancement|http://docs.jboss.org/hibernate/orm/5.3/userguide/html_single...]:
> {code}
> <property name="hibernate.enhancer.enableDirtyTracking" value="true"/>
> <property name="hibernate.enhancer.enableLazyInitialization" value="true"/>
> <property name="hibernate.enhancer.enableAssociationManagement" value="true"/>
> {code}
> Steps to reproduce:
> * Build WildFly
> * cd testsuite/integration/basic
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.transaction.TransactionTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.hibernate.management.ManagementTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.entitylistener.EntityListenersTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.secondlevelcache.JPA2LCTestCase
> Note that the org.jboss.as.test.integration.jpa.transaction.TransactionTestCase test should pass since javassist is specified in the persistence.xml but that seems to be ignored (we still get the ByteBuddy failure).
> To workaround failures, prestart wildfly via: ./standalone.sh -Dhibernate.bytecode.provider=javassist and then run tests.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months
[JBoss JIRA] (WFLY-11818) wildfly-16.0.0.Final: "From address" is no more used as default from in email
by Yeray Borges (Jira)
[ https://issues.jboss.org/browse/WFLY-11818?page=com.atlassian.jira.plugin... ]
Yeray Borges commented on WFLY-11818:
-------------------------------------
[~mayerw01]
You must use Message.setFrom(), without arguments. As per Java Mail specification, it retrieves the sender’s username from the local system and configure it for the message.
I've just used it with the Mail QS example and it worked fine in Wildfly, master branch, Wildfly 16.0.0.Final and Widlfy-15.0.0.Final.
I used Message.setFrom(), without arguments \[1\] after configuring the 'from' attribute \[2\], to avoid taking it from user.name environment variable. That means, your Test2 case
'message.setFrom(new InternetAddress());', from my point of view, is invalid. I'm not sure from where are you getting a NPE on your Test3 case, but, in my environment it worked fine with WF15 as well.
Maybe the description of 'from' attribute of mail-session is a bit misleading, but as per Java Mail specification, you have to call Message.setFrom() to retrieve the address configured in the mail subsystem.
I can only suggest to do a double check; could you verify your email server accepts the 'from' address you are using and verify you are calling Message.setFrom() in your code?
\[1\]
{code:java}
public void send() throws Exception {
Message message = new MimeMessage(mySession);
message.setFrom();
//This should not throw NPE
System.out.println(message.getFrom()[0].toString().equals("mytest(a)test.com"));
Address toAddress = new InternetAddress(to);
message.addRecipient(Message.RecipientType.TO, toAddress);
message.setSubject(subject);
message.setContent(body, "text/plain");
Transport.send(message);
}
{code}
\[2\]
{code}
/subsystem=mail/mail-session=MyOtherMail:write-attribute(name=from, value=mytest(a)test.com)
{code}
> wildfly-16.0.0.Final: "From address" is no more used as default from in email
> -----------------------------------------------------------------------------
>
> Key: WFLY-11818
> URL: https://issues.jboss.org/browse/WFLY-11818
> Project: WildFly
> Issue Type: Bug
> Components: Mail
> Affects Versions: 16.0.0.Final
> Environment: mvn -v
> Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
> Maven home: /apps/apache-maven-3.6.0
> Java version: 11.0.2, vendor: Oracle Corporation, runtime: /usr/java/jdk-11.0.2
> Default locale: de_DE, platform encoding: UTF-8
> OS name: "linux", version: "4.12.14-lp150.12.48-default", arch: "amd64", family: "unix"
> Reporter: Wolfgang Mayer
> Assignee: Yeray Borges
> Priority: Major
>
> As mentioned in the Help (description) of 'Mail Session' configuration:
> From: *From address that is used as default from, if not set when sending*
> Apparently this is not the case anymore in wildfly-16.0.0.Final.
> For example I made a test with quickstart-16.0/mail/.
> When omitting the line
> *message.setFrom(new InternetAddress(from));*
> Sending mail fails with:
> com.sun.mail.smtp.SMTPSendFailedException: 554-Transaction failed
> 554 Unauthorized sender address.
> I have the same issue when replacing the line above with
> message.setFrom(new InternetAddress());
> I am pretty sure that this is working in wildfly-15
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 9 months