[JBoss JIRA] (WFCORE-3867) Space char always last char of read system property on Windows
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3867?page=com.atlassian.jira.plugi... ]
David Lloyd commented on WFCORE-3867:
-------------------------------------
The real issue is where the value is coming from. System properties are well defined to be exact values, so if we read a system property inside the server and that system property ends in a whitespace or some other odd character, we *must* assume that this is intentional.
If we're processing arguments and variables from our Windows scripts wrongly and causing unintended interpretation of values, then it's the scripts that need correcting. We need to establish the provenance of the values which are coming in incorrectly and trace that history exactly before proposing a fix.
> Space char always last char of read system property on Windows
> --------------------------------------------------------------
>
> Key: WFCORE-3867
> URL: https://issues.jboss.org/browse/WFCORE-3867
> Project: WildFly Core
> Issue Type: Bug
> Components: Server
> Affects Versions: 5.0.0.Beta4
> Reporter: R Searls
> Assignee: R Searls
> Priority: Minor
>
> On Windows each system property read has a space char as the last char of string.
> This causes failures when the property represents a directory name. Calling
> tmp.toPath().toRealPath() in this situation.
> ServerEnvironment line, 434 Path resolved = tmp.toPath().toRealPath();
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-10339) Broadcast/discovery-group resources have ambiguous requirement specs
by Paul Ferraro (JIRA)
[ https://issues.jboss.org/browse/WFLY-10339?page=com.atlassian.jira.plugin... ]
Paul Ferraro commented on WFLY-10339:
-------------------------------------
[~eduda] I do not intend to require a migration operation. This change should be entirely achievable using normal resource/operation transformations and operation translations.
[~jmesnil] I'll plan to address this for WF14.
{quote}Could I suggest that we keep the <broadcast|discovery>-group for the JGroups implementation (which is the default we use)?{quote}
I would actually recommend against that. Use new path names for both resources makes it easy to distinguish between a legacy CLI command and one intended for the current version of the model - especially since the resource in question heavily relies on non-required attributes. This way we can replace the add/remove operation handling with an implementation that redirects/translates the operation to the correct path address. WDYT?
> Broadcast/discovery-group resources have ambiguous requirement specs
> --------------------------------------------------------------------
>
> Key: WFLY-10339
> URL: https://issues.jboss.org/browse/WFLY-10339
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 12.0.0.Final
> Reporter: Paul Ferraro
> Assignee: Jeff Mesnil
>
> Currently, the broadcast/discovery-group resources have messy requirement specs, as the capabilities that they require are dependent whether or not the jgroups-cluster attribute is defined.
> I suggest splitting these resources into 2:
> {code}/subsystem=messaging-activemq/server=*/jgroups-broadcast-group=*{code}
> {code}/subsystem=messaging-activemq/server=*/jgroups-discovery-group=*{code}
> which requires clustering capabilities
> and
> {code}/subsystem=messaging-activemq/server=*/socket-broadcast-group=*{code}
> {code}/subsystem=messaging-activemq/server=*/socket-discovery-group=*{code}
> which requires a socket-binding capability.
> This results in clearer requirement specs - which helps simplify the introspection of this subsystem for provisioning purposes.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFCORE-3867) Space char always last char of read system property on Windows
by R Searls (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3867?page=com.atlassian.jira.plugi... ]
R Searls commented on WFCORE-3867:
----------------------------------
This is not the script providing a text string with a space char at the end. I have confirmed that in the script in which I had this issue. I believe this is a "doc2unix" end of line issue.
{code:java}
In DOS/Windows text files a line break, also known as newline, is a combination of two characters: a
Carriage Return (CR) followed by a Line Feed (LF). In Unix text files a line break is a single character:
the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was single Carriage Return (CR)
character. Nowadays Mac OS uses Unix style (LF) line breaks.
{code}
I confirmed (when running on Windows) that every system var that was being read in had this space char at the end. Windows just happens to allow paths with spaces in them. An env var of JBOSS_HOME="C:\user\me\wfly-13" and server appending "module" to it generated a path "C:\user\me\wfly-13 \module" which is valid on windows. Only when the env path itself, "C:\user\me\wfly-13 ", was being process does the call to Path.toPath().*toRealPath()* fail with an invalid path exception.
> Space char always last char of read system property on Windows
> --------------------------------------------------------------
>
> Key: WFCORE-3867
> URL: https://issues.jboss.org/browse/WFCORE-3867
> Project: WildFly Core
> Issue Type: Bug
> Components: Server
> Affects Versions: 5.0.0.Beta4
> Reporter: R Searls
> Assignee: R Searls
> Priority: Minor
>
> On Windows each system property read has a space char as the last char of string.
> This causes failures when the property represents a directory name. Calling
> tmp.toPath().toRealPath() in this situation.
> ServerEnvironment line, 434 Path resolved = tmp.toPath().toRealPath();
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-10425) With Hibernate ORM 5.3, protect against NPE in WildFlyCustomRegionFactoryInitiator for non-container-managed JPA deployment
by Scott Marlow (JIRA)
Scott Marlow created WFLY-10425:
-----------------------------------
Summary: With Hibernate ORM 5.3, protect against NPE in WildFlyCustomRegionFactoryInitiator for non-container-managed JPA deployment
Key: WFLY-10425
URL: https://issues.jboss.org/browse/WFLY-10425
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 13.0.0.Beta1
Reporter: Scott Marlow
Assignee: Scott Marlow
WildFlyCustomRegionFactoryInitiator needs to test for jpa_shared_code_mode being null.
{code}
at org.jboss.as.jpa.hibernate5.service.WildFlyCustomRegionFactoryInitiator.resolveRegionFactory(WildFlyCustomRegionFactoryInitiator.java:44)
at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:47)
at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:32)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
- locked <0x4fcc> (a org.hibernate.boot.registry.internal.StandardServiceRegistryImpl)
at org.hibernate.boot.internal.MetadataBuilderImpl$MetadataBuildingOptionsImpl.<init>(MetadataBuilderImpl.java:688)
at org.hibernate.boot.internal.MetadataBuilderImpl.<init>(MetadataBuilderImpl.java:123)
at org.hibernate.boot.MetadataSources.getMetadataBuilder(MetadataSources.java:136)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:213)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:169)
at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:76)
at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:179)
at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:127)
at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:69)
at org.hibernate.jpa.HibernatePersistenceProvider.generateSchema(HibernatePersistenceProvider.java:164)
at javax.persistence.Persistence.generateSchema(Persistence.java:114)
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFCORE-3867) Space char always last char of read system property on Windows
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3867?page=com.atlassian.jira.plugi... ]
Brian Stansberry edited comment on WFCORE-3867 at 5/22/18 12:57 PM:
--------------------------------------------------------------------
OK, but we should be cautious about changing passed in values. If our scripts are producing extra whitespace in sysprop values they should stop doing that, since it's questionably appropriate to globally trim every system property in the server code. For some cases trimming in the ServerEnvironment/HostControllerEnvironment may be ok as a second line of defense (e.g. we know the property represents a path).
was (Author: brian.stansberry):
OK, but we should be cautious about changing passed in values. If our scripts are producing extra whitespace in sysprop values they should stop doing that, since it's questionably appropriate to globally trim every system property in the server code. For some cases trimming may be ok as a second line of defense (e.g. we know the property represents a path).
> Space char always last char of read system property on Windows
> --------------------------------------------------------------
>
> Key: WFCORE-3867
> URL: https://issues.jboss.org/browse/WFCORE-3867
> Project: WildFly Core
> Issue Type: Bug
> Components: Server
> Affects Versions: 5.0.0.Beta4
> Reporter: R Searls
> Assignee: R Searls
> Priority: Minor
>
> On Windows each system property read has a space char as the last char of string.
> This causes failures when the property represents a directory name. Calling
> tmp.toPath().toRealPath() in this situation.
> ServerEnvironment line, 434 Path resolved = tmp.toPath().toRealPath();
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFCORE-3867) Space char always last char of read system property on Windows
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3867?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFCORE-3867:
------------------------------------------
OK, but we should be cautious about changing passed in values. If our scripts are producing extra whitespace in sysprop values they should stop doing that, since it's questionably appropriate to globally trim every system property in the server code. For some cases trimming may be ok as a second line of defense (e.g. we know the property represents a path).
> Space char always last char of read system property on Windows
> --------------------------------------------------------------
>
> Key: WFCORE-3867
> URL: https://issues.jboss.org/browse/WFCORE-3867
> Project: WildFly Core
> Issue Type: Bug
> Components: Server
> Affects Versions: 5.0.0.Beta4
> Reporter: R Searls
> Assignee: R Searls
> Priority: Minor
>
> On Windows each system property read has a space char as the last char of string.
> This causes failures when the property represents a directory name. Calling
> tmp.toPath().toRealPath() in this situation.
> ServerEnvironment line, 434 Path resolved = tmp.toPath().toRealPath();
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-10336) MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.
by Jan Blizňák (JIRA)
[ https://issues.jboss.org/browse/WFLY-10336?page=com.atlassian.jira.plugin... ]
Jan Blizňák commented on WFLY-10336:
------------------------------------
OK, got the troublemaker - org.jboss.as.test.integration.ws.authentication.policy.AuthenticationPolicyContextTestCase introduced in https://github.com/wildfly/wildfly/pull/10829, without this one the others will pass (expect the WSTrustTestCase as noted above).
Simplified reproduce steps:
wildfly/testsuite/integration/ws\] $ mvn clean integration-test -Dtest=AuthenticationPolicyContextTestCase,EJBSignTestCase
CC: [~dcihak]
> MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-10336
> URL: https://issues.jboss.org/browse/WFLY-10336
> Project: WildFly
> Issue Type: Bug
> Components: Test Suite, Web Services
> Environment: {noformat}
> Java(TM) SE Runtime Environment (build 8.0.5.11 - pxa6480sr5fp11-20180326_01(SR5 FP11))
> IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64 Compressed References 20180309_380776 (JIT enabled, AOT enabled)
> OpenJ9 - 49fcaf39
> OMR - 5cbbadf
> IBM - 4453dac)
> JCL - 20180319_01 based on Oracle jdk8u161-b12
> {noformat}
> Reporter: Petr Kremensky
> Assignee: Jan Blizňák
>
> There are test failures running the WildFly Test Suite: Integration - WS on IBM jdk.
> {noformat}
> wildfly/testsuite/integration/ws] $ mvn clean install
> ...
> [INFO]
> [INFO] Results:
> [INFO]
> [ERROR] Errors:
> [ERROR] EJBSignTestCase.signedRequest:86 » SOAPFault MustUnderstand headers: [{http://...
> [ERROR] SignTestCase.signedRequest:88 » SOAPFault MustUnderstand headers: [{http://doc...
> [ERROR] EJBSignEncryptMultipleClientsTestCase.encryptedAndSignedRequestFromAlice:90 » SOAPFault
> [ERROR] EJBSignEncryptMultipleClientsTestCase.encryptedAndSignedRequestFromJohn:102 » SOAPFault
> [ERROR] EJBSignEncryptTestCase.encryptedAndSignedRequest:88 » SOAPFault MustUnderstand...
> [ERROR] SignEncryptMultipleClientsTestCase.encryptedAndSignedRequestFromAlice:91 » SOAPFault
> [ERROR] SignEncryptMultipleClientsTestCase.encryptedAndSignedRequestFromJohn:103 » SOAPFault
> [ERROR] SignEncryptTestCase.encryptedAndSignedRequest:90 » SOAPFault MustUnderstand he...
> [ERROR] WSTrustTestCase.test:318 » SOAPFault MustUnderstand headers: [{http://docs.oas...
> [ERROR] WSTrustTestCase.testActAs:441 » SOAPFault MustUnderstand headers: [{http://doc...
> [ERROR] WSTrustTestCase.testBearer:541 » SOAPFault MustUnderstand headers: [{http://do...
> [ERROR] WSTrustTestCase.testHolderOfKey:491 » SOAPFault MustUnderstand headers: [{http...
> [ERROR] WSTrustTestCase.testNoClientCallback:383 » SOAPFault MustUnderstand headers: [...
> [ERROR] WSTrustTestCase.testNoSignatureUsername:414 » SOAPFault MustUnderstand headers...
> [ERROR] WSTrustTestCase.testOnBehalfOf:468 » SOAPFault MustUnderstand headers: [{http:...
> [ERROR] WSTrustTestCase.testPicketLink:518 » SOAPFault MustUnderstand headers: [{http:...
> [ERROR] WSTrustTestCase.testUsingEPR:350 » SOAPFault MustUnderstand headers: [{http://...
> [INFO]
> [ERROR] Tests run: 119, Failures: 0, Errors: 17, Skipped: 0
> {noformat}
> *Caused by*
> {noformat}
> Caused by: org.apache.cxf.binding.soap.SoapFault: MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.
> at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:87)
> at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:53)
> at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:42)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112)
> at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:70)
> at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:35)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:827)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1695)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1572)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1373)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:673)
> at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:442)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
> ... 129 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFCORE-3867) Space char always last char of read system property on Windows
by R Searls (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3867?page=com.atlassian.jira.plugi... ]
R Searls commented on WFCORE-3867:
----------------------------------
Possibly, but the failing code is in the server module and not a script. A script is setting the sys var that are being processed by the server module code.
> Space char always last char of read system property on Windows
> --------------------------------------------------------------
>
> Key: WFCORE-3867
> URL: https://issues.jboss.org/browse/WFCORE-3867
> Project: WildFly Core
> Issue Type: Bug
> Components: Server
> Affects Versions: 5.0.0.Beta4
> Reporter: R Searls
> Assignee: R Searls
> Priority: Minor
>
> On Windows each system property read has a space char as the last char of string.
> This causes failures when the property represents a directory name. Calling
> tmp.toPath().toRealPath() in this situation.
> ServerEnvironment line, 434 Path resolved = tmp.toPath().toRealPath();
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month