[JBoss JIRA] (WFLY-10987) Performance issue in audit endpoints
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/WFLY-10987?page=com.atlassian.jira.plugin... ]
Jan Kalina moved WFCORE-4093 to WFLY-10987:
-------------------------------------------
Project: WildFly (was: WildFly Core)
Key: WFLY-10987 (was: WFCORE-4093)
Issue Type: Task (was: Bug)
Component/s: Documentation
Security
(was: Security)
Affects Version/s: 14.0.0.Final
(was: 4.0.0.Alpha2)
> Performance issue in audit endpoints
> ------------------------------------
>
> Key: WFLY-10987
> URL: https://issues.jboss.org/browse/WFLY-10987
> Project: WildFly
> Issue Type: Task
> Components: Documentation, Security
> Affects Versions: 14.0.0.Final
> Reporter: Jan Kalina
> Assignee: Jan Kalina
> Priority: Critical
>
> Synchronization in audit endpoint implementations leads to a great performance drop.
> We see the issue in {{FileAuditEndpoint.accept(EventPriority, String)}}, but similar code is also in the {{SyslogAuditEndpoint}}.
> Check the attached recording (FlightRecorder) in jmc (Java Mission Control).
> It can be seen in these tabs
> - Threads > Contention
> - Threads > Thread Dumps
> - Threads > Lock Instances
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (WFCORE-4093) Performance issue in audit endpoints
by Jan Kalina (JIRA)
Jan Kalina created WFCORE-4093:
----------------------------------
Summary: Performance issue in audit endpoints
Key: WFCORE-4093
URL: https://issues.jboss.org/browse/WFCORE-4093
Project: WildFly Core
Issue Type: Bug
Components: Security
Affects Versions: 4.0.0.Alpha2
Reporter: Jan Kalina
Assignee: Jan Kalina
Priority: Critical
Synchronization in audit endpoint implementations leads to a great performance drop.
We see the issue in {{FileAuditEndpoint.accept(EventPriority, String)}}, but similar code is also in the {{SyslogAuditEndpoint}}.
Check the attached recording (FlightRecorder) in jmc (Java Mission Control).
It can be seen in these tabs
- Threads > Contention
- Threads > Thread Dumps
- Threads > Lock Instances
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (ELY-1622) BC FIPS with CLI: SunX509 KeyManagerFactory not available
by Farah Juma (JIRA)
[ https://issues.jboss.org/browse/ELY-1622?page=com.atlassian.jira.plugin.s... ]
Farah Juma edited comment on ELY-1622 at 9/6/18 3:13 PM:
---------------------------------------------------------
[~mchoma] What steps did you use? I was just able to successfully use a {{security-property}} to set {{ssl.KeyManagerFactory.algorithm}} to {{"X509"}} without needing to update the {{java.security}} file. To test it, I removed the {{algorithm="X509"}} parameter from my {{key-manager}} configuration in the Elytron subsystem, verified that I got a {{"java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available"}}, then added in the {{security-property}} and verified that the {{KeyManager}} was successfully created. Note that the {{security-property}} won't affect the creation of the client {{SSLContext}} that's configured in the wildfly-config.xml file.
was (Author: fjuma):
[~mchoma] What steps did you use? I was just able to successfully use a {{security-property}} to set {{ssl.KeyManagerFactory.algorithm}} to {{"X509"}} without needing to update the {{java.security}} file. To test it, I removed the {{algorithm="X509"}} parameter from my {{key-manager}} configuration in the Elytron subsystem, verified that I got a {{"java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available"}}, then added in the {{security-property}} and verified that the {{KeyManager}} was successfully created.
> BC FIPS with CLI: SunX509 KeyManagerFactory not available
> ---------------------------------------------------------
>
> Key: ELY-1622
> URL: https://issues.jboss.org/browse/ELY-1622
> Project: WildFly Elytron
> Issue Type: Bug
> Components: SSL
> Affects Versions: 1.5.1.Final
> Reporter: Martin Choma
> Assignee: Farah Juma
> Priority: Blocker
> Fix For: 1.5.2.Final
>
> Attachments: cli-test-wildfly-config.xml, jboss-cli.log, truststore.bcfks
>
>
> I am trying to connect from jboss-cli.sh to EAP server. To reproduce the problem it is enough BC FIPS is used only on client side.
> {code:java|titlejboss-cli.log}
> 11:50:25,147 ERROR [org.jboss.as.cli.impl.CliLauncher] Error processing CLI: org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
> at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:330)
> at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:291)
> at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:45)
> at org.jboss.modules.Module.run(Module.java:352)
> at org.jboss.modules.Module.run(Module.java:320)
> at org.jboss.modules.Main.main(Main.java:593)
> Caused by: org.jboss.as.cli.CommandLineException: Failed to resolve host 'localhost'
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1256)
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1203)
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1198)
> at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:328)
> ... 5 more
> Caused by: java.io.IOException: Failed to obtain SSLContext
> at org.jboss.as.cli.impl.CLIModelControllerClient.<init>(CLIModelControllerClient.java:156)
> at org.jboss.as.cli.impl.ModelControllerClientFactory$2.getClient(ModelControllerClientFactory.java:85)
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1222)
> ... 8 more
> Caused by: java.security.KeyManagementException: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available
> at org.bouncycastle.jsse.provider.ProvSSLContextSpi.selectKeyManager(ProvSSLContextSpi.java:589)
> at org.bouncycastle.jsse.provider.ProvSSLContextSpi.engineInit(ProvSSLContextSpi.java:531)
> at javax.net.ssl.SSLContext.init(SSLContext.java:282)
> at org.wildfly.security.ssl.SSLContextBuilder.lambda$build$0(SSLContextBuilder.java:372)
> at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:53)
> at org.wildfly.security.auth.client.AuthenticationContextConfigurationClient.getSSLContext(AuthenticationContextConfigurationClient.java:221)
> at org.wildfly.security.auth.client.AuthenticationContextConfigurationClient.getSSLContext(AuthenticationContextConfigurationClient.java:208)
> at org.jboss.as.cli.impl.CLIModelControllerClient.<init>(CLIModelControllerClient.java:153)
> ... 10 more
> Caused by: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available
> at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
> at javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:137)
> at org.bouncycastle.jsse.provider.ProvSSLContextSpi.selectKeyManager(ProvSSLContextSpi.java:583)
> ... 17 more
> {code}
> When I use non-FIPS java with CLI I can make it work. It does occure also when connecting to default unsecured port 9990.
> When I use BCFKS truststore on server side, e.g. in 2-way http communication it works.
> I believe problem is I cant configure algorithm for keymanager on client side in wildfly-config.xml. (At least I don't see how could I do so).
> BC provider does not know SunX509 arlgorithm, rather X509, X.509 or PKIX could be used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (WFCORE-4092) ModifiableKeyStoreDecorator is public
by Brian Stansberry (JIRA)
Brian Stansberry created WFCORE-4092:
----------------------------------------
Summary: ModifiableKeyStoreDecorator is public
Key: WFCORE-4092
URL: https://issues.jboss.org/browse/WFCORE-4092
Project: WildFly Core
Issue Type: Bug
Components: Security
Reporter: Brian Stansberry
Assignee: Darran Lofthouse
I believe the intent is to not have any public classes or interfaces in the elytron maven module other than those excluded from export in the module.xml or ones expressly intended to be API to other subsystems or end users. I don't think ModifiableKeyStoreDecorator is either.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (ELY-1622) BC FIPS with CLI: SunX509 KeyManagerFactory not available
by Farah Juma (JIRA)
[ https://issues.jboss.org/browse/ELY-1622?page=com.atlassian.jira.plugin.s... ]
Farah Juma commented on ELY-1622:
---------------------------------
[~mchoma] What steps did you use? I was just able to successfully use a {{security-property}} to set {{ssl.KeyManagerFactory.algorithm}} to {{"X509"}} without needing to update the {{java.security}} file. To test it, I removed the {{algorithm="X509"}} parameter from my {{key-manager}} configuration in the Elytron subsystem, verified that I got a {{"java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available"}}, then added in the {{security-property}} and verified that the {{KeyManager}} was successfully created.
> BC FIPS with CLI: SunX509 KeyManagerFactory not available
> ---------------------------------------------------------
>
> Key: ELY-1622
> URL: https://issues.jboss.org/browse/ELY-1622
> Project: WildFly Elytron
> Issue Type: Bug
> Components: SSL
> Affects Versions: 1.5.1.Final
> Reporter: Martin Choma
> Assignee: Farah Juma
> Priority: Blocker
> Fix For: 1.5.2.Final
>
> Attachments: cli-test-wildfly-config.xml, jboss-cli.log, truststore.bcfks
>
>
> I am trying to connect from jboss-cli.sh to EAP server. To reproduce the problem it is enough BC FIPS is used only on client side.
> {code:java|titlejboss-cli.log}
> 11:50:25,147 ERROR [org.jboss.as.cli.impl.CliLauncher] Error processing CLI: org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
> at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:330)
> at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:291)
> at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:45)
> at org.jboss.modules.Module.run(Module.java:352)
> at org.jboss.modules.Module.run(Module.java:320)
> at org.jboss.modules.Main.main(Main.java:593)
> Caused by: org.jboss.as.cli.CommandLineException: Failed to resolve host 'localhost'
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1256)
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1203)
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1198)
> at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:328)
> ... 5 more
> Caused by: java.io.IOException: Failed to obtain SSLContext
> at org.jboss.as.cli.impl.CLIModelControllerClient.<init>(CLIModelControllerClient.java:156)
> at org.jboss.as.cli.impl.ModelControllerClientFactory$2.getClient(ModelControllerClientFactory.java:85)
> at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:1222)
> ... 8 more
> Caused by: java.security.KeyManagementException: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available
> at org.bouncycastle.jsse.provider.ProvSSLContextSpi.selectKeyManager(ProvSSLContextSpi.java:589)
> at org.bouncycastle.jsse.provider.ProvSSLContextSpi.engineInit(ProvSSLContextSpi.java:531)
> at javax.net.ssl.SSLContext.init(SSLContext.java:282)
> at org.wildfly.security.ssl.SSLContextBuilder.lambda$build$0(SSLContextBuilder.java:372)
> at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:53)
> at org.wildfly.security.auth.client.AuthenticationContextConfigurationClient.getSSLContext(AuthenticationContextConfigurationClient.java:221)
> at org.wildfly.security.auth.client.AuthenticationContextConfigurationClient.getSSLContext(AuthenticationContextConfigurationClient.java:208)
> at org.jboss.as.cli.impl.CLIModelControllerClient.<init>(CLIModelControllerClient.java:153)
> ... 10 more
> Caused by: java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available
> at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
> at javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:137)
> at org.bouncycastle.jsse.provider.ProvSSLContextSpi.selectKeyManager(ProvSSLContextSpi.java:583)
> ... 17 more
> {code}
> When I use non-FIPS java with CLI I can make it work. It does occure also when connecting to default unsecured port 9990.
> When I use BCFKS truststore on server side, e.g. in 2-way http communication it works.
> I believe problem is I cant configure algorithm for keymanager on client side in wildfly-config.xml. (At least I don't see how could I do so).
> BC provider does not know SunX509 arlgorithm, rather X509, X.509 or PKIX could be used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (WFLY-10981) Hibernate51CompatibilityTransformer is missing some transformations for VersionType
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10981?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-10981:
-------------------------------------
{quote}
> I'm yet sure of the best fix, I got the tests to pass with the following transformer changes [1]:
>
> 1. In application classes that implement/extend certain ORM classes, change method calls to SessionImplementor, to instead call SharedSessionContractImplementor methods. Previously, we only did this for calls to org.hibernate.* class methods.
The certain ORM classes that we made this change for, to handle synthetic bridge methods (plus other methods), are currently the following classes:
org/hibernate/usertype/UserType
org/hibernate/usertype/CompositeUserType
org/hibernate/usertype/UserCollectionType
org/hibernate/usertype/UserVersionType
org/hibernate/type/Type
org/hibernate/type/SingleColumnType
org/hibernate/type/AbstractStandardBasicType
org/hibernate/type/ProcedureParameterExtractionAware
org/hibernate/type/ProcedureParameterNamedBinder
org/hibernate/type/VersionType
org/hibernate/collection/spi/PersistentCollection
> 2. Update constructors for application classes that implement org.hibernate.collection.spi.PersistentCollection to use SharedSessionContractImplementor instead of SessionImplementor.
Note that we are only updating the constructors for PersistentCollection implementations, which means that synthetic bridge methods in the other (above) class implementations, will not be updated to use SharedSessionContractImplementor instead of SessionImplementor.
I'm thinking that we should update the constructors for the other above listed classes as well. I'll try making this change and will push again.
Scott
{quote}
> Hibernate51CompatibilityTransformer is missing some transformations for VersionType
> -----------------------------------------------------------------------------------
>
> Key: WFLY-10981
> URL: https://issues.jboss.org/browse/WFLY-10981
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 14.0.0.Final
> Reporter: Martin Simka
> Assignee: Scott Marlow
>
> There is probably missing transformation for synthetic "bridge methods" in {{org.hibernate.type.VersionType}}
> {noformat}
> Caused by: java.lang.NoSuchMethodError: org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(Lorg/hibernate/engine/spi/SessionImplementor;)Ljava/lang/Integer;
> at org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(IntegerType.java:26)
> at org.hibernate.engine.internal.Versioning.seed(Versioning.java:42)
> at org.hibernate.engine.internal.Versioning.seedVersion(Versioning.java:73)
> at org.hibernate.event.internal.AbstractSaveEventListener.substituteValuesIfNecessary(AbstractSaveEventListener.java:428)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:274)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:200)
> at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
> at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
> at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
> at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:709)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:701)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:696)
> at org.jboss.as.test.compat.jpa.hibernate.transformer.SFSBHibernateSessionFactory.createQueueOwner(SFSBHibernateSessionFactory.java:231)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:57)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:94)
> ... 191 more
> {noformat}
> I don't expect users to implement directly {{VersionType}} but {{UserVersionType}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (WFLY-10981) Hibernate51CompatibilityTransformer is missing some transformations for VersionType
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10981?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-10981:
-------------------------------------
{quote}
I'm yet sure of the best fix, I got the tests to pass with the following transformer changes [1]:
1. In application classes that implement/extend certain ORM classes, change method calls to SessionImplementor, to instead call SharedSessionContractImplementor methods. Previously, we only did this for calls to org.hibernate.* class methods.
2. Update constructors for application classes that implement org.hibernate.collection.spi.PersistentCollection to use SharedSessionContractImplementor instead of SessionImplementor.
I also tried checking specifically for "synthetic bridge" methods, instead of the liberal (1) change mentioned above but that wasn't enough (see attached alternative patch which didn't pass the tests).
To be clearer, with [1], all tests are passing, but we are changing more of the application code to use SharedSessionContractImplementor. If some other part of the application that didn't get transformed is still using SessionImplementor, the application would not work. I'm not sure how likely this would be to happen or to be a blocking issue for users. Feedback is welcome.
{quote}
> Hibernate51CompatibilityTransformer is missing some transformations for VersionType
> -----------------------------------------------------------------------------------
>
> Key: WFLY-10981
> URL: https://issues.jboss.org/browse/WFLY-10981
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 14.0.0.Final
> Reporter: Martin Simka
> Assignee: Scott Marlow
>
> There is probably missing transformation for synthetic "bridge methods" in {{org.hibernate.type.VersionType}}
> {noformat}
> Caused by: java.lang.NoSuchMethodError: org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(Lorg/hibernate/engine/spi/SessionImplementor;)Ljava/lang/Integer;
> at org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(IntegerType.java:26)
> at org.hibernate.engine.internal.Versioning.seed(Versioning.java:42)
> at org.hibernate.engine.internal.Versioning.seedVersion(Versioning.java:73)
> at org.hibernate.event.internal.AbstractSaveEventListener.substituteValuesIfNecessary(AbstractSaveEventListener.java:428)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:274)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:200)
> at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
> at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
> at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
> at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:709)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:701)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:696)
> at org.jboss.as.test.compat.jpa.hibernate.transformer.SFSBHibernateSessionFactory.createQueueOwner(SFSBHibernateSessionFactory.java:231)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:57)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:94)
> ... 191 more
> {noformat}
> I don't expect users to implement directly {{VersionType}} but {{UserVersionType}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (WFLY-10981) Hibernate51CompatibilityTransformer is missing some transformations for VersionType
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10981?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-10981:
-------------------------------------
{quote}
I tried removing the transformation of the VersionType#seed method and that leads to the following error (https://paste.fedoraproject.org/paste/v8XQrTed76dnwLKz-Xk0SQ), so it seems that we need the transformation:
"
java.lang.AbstractMethodError: Method org/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType.seed(Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)Ljava/lang/Object; is abstract
... 193 more
Caused by: java.lang.AbstractMethodError: Method org/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType.seed(Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)Ljava/lang/Object; is abstract
at org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(IntegerType.java)
"
Apparently, the synthetic bridge "seed" method is generated by the Java compiler, when it compiles the application code. This is explained by [1]:
The bug appears to be that the Hibernate transformer is not handling compiler generated "synthetic bridge" methods.
We will need a WFLY + JBEAP issue for this bug. I'll see if I can transform the application byte code from:
"
INVOKEVIRTUAL org/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType.seed (Lorg/hibernate/engine/spi/SessionImplementor;)Ljava/lang/Integer;
"
To instead do:
"
INVOKEVIRTUAL org/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType.seed (Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)Ljava/lang/Integer;
"
Scott
[1] https://docs.oracle.com/javase/tutorial/java/generics/bridgeMethods.html
{quote}
> Hibernate51CompatibilityTransformer is missing some transformations for VersionType
> -----------------------------------------------------------------------------------
>
> Key: WFLY-10981
> URL: https://issues.jboss.org/browse/WFLY-10981
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 14.0.0.Final
> Reporter: Martin Simka
> Assignee: Scott Marlow
>
> There is probably missing transformation for synthetic "bridge methods" in {{org.hibernate.type.VersionType}}
> {noformat}
> Caused by: java.lang.NoSuchMethodError: org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(Lorg/hibernate/engine/spi/SessionImplementor;)Ljava/lang/Integer;
> at org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(IntegerType.java:26)
> at org.hibernate.engine.internal.Versioning.seed(Versioning.java:42)
> at org.hibernate.engine.internal.Versioning.seedVersion(Versioning.java:73)
> at org.hibernate.event.internal.AbstractSaveEventListener.substituteValuesIfNecessary(AbstractSaveEventListener.java:428)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:274)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:200)
> at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
> at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
> at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
> at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:709)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:701)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:696)
> at org.jboss.as.test.compat.jpa.hibernate.transformer.SFSBHibernateSessionFactory.createQueueOwner(SFSBHibernateSessionFactory.java:231)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:57)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:94)
> ... 191 more
> {noformat}
> I don't expect users to implement directly {{VersionType}} but {{UserVersionType}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (WFLY-10981) Hibernate51CompatibilityTransformer is missing some transformations for VersionType
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10981?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-10981:
-------------------------------------
Below are some comments from private email discussion:
{quote}
>From looking at the transformer debug output for the application class transformation, I see:
// access flags 0x1
public seed(Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)Ljava/lang/Integer;
L0
LINENUMBER 69 L0
GETSTATIC org/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType.ZERO : Ljava/lang/Integer;
ARETURN
L1
LOCALVARIABLE this Lorg/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType; L0 L1 0
LOCALVARIABLE session Lorg/hibernate/engine/spi/SessionImplementor; L0 L1 1
MAXSTACK = 1
MAXLOCALS = 2
// access flags 0x1041
public synthetic bridge seed(Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)Ljava/lang/Object;
L0
LINENUMBER 26 L0
ALOAD 0
ALOAD 1
INVOKEVIRTUAL org/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType.seed (Lorg/hibernate/engine/spi/SessionImplementor;)Ljava/lang/Integer;
ARETURN
L1
LOCALVARIABLE this Lorg/jboss/as/test/compat/jpa/hibernate/transformer/IntegerType; L0 L1 0
MAXSTACK = 2
MAXLOCALS = 2
I think the compile error is on the bridge method, which still expects type SessionImplementor.
{quote}
> Hibernate51CompatibilityTransformer is missing some transformations for VersionType
> -----------------------------------------------------------------------------------
>
> Key: WFLY-10981
> URL: https://issues.jboss.org/browse/WFLY-10981
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 14.0.0.Final
> Reporter: Martin Simka
> Assignee: Scott Marlow
>
> There is probably missing transformation for synthetic "bridge methods" in {{org.hibernate.type.VersionType}}
> {noformat}
> Caused by: java.lang.NoSuchMethodError: org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(Lorg/hibernate/engine/spi/SessionImplementor;)Ljava/lang/Integer;
> at org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(IntegerType.java:26)
> at org.hibernate.engine.internal.Versioning.seed(Versioning.java:42)
> at org.hibernate.engine.internal.Versioning.seedVersion(Versioning.java:73)
> at org.hibernate.event.internal.AbstractSaveEventListener.substituteValuesIfNecessary(AbstractSaveEventListener.java:428)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:274)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:200)
> at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
> at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
> at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
> at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:709)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:701)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:696)
> at org.jboss.as.test.compat.jpa.hibernate.transformer.SFSBHibernateSessionFactory.createQueueOwner(SFSBHibernateSessionFactory.java:231)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:57)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:94)
> ... 191 more
> {noformat}
> I don't expect users to implement directly {{VersionType}} but {{UserVersionType}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months