[JBoss JIRA] (ISPN-5900) Cleanup uberjar packaging (ideal solution)
by Sebastian Łaskawiec (JIRA)
[ https://issues.jboss.org/browse/ISPN-5900?page=com.atlassian.jira.plugin.... ]
Sebastian Łaskawiec updated ISPN-5900:
--------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/4249
> Cleanup uberjar packaging (ideal solution)
> ------------------------------------------
>
> Key: ISPN-5900
> URL: https://issues.jboss.org/browse/ISPN-5900
> Project: Infinispan
> Issue Type: Feature Request
> Components: Build process
> Reporter: Sebastian Łaskawiec
> Assignee: Sebastian Łaskawiec
> Priority: Critical
> Labels: jdg7
>
> ISPN-5838 provides a backwards compatible solution whereas an ideal solution involves also changing packages (which will fix Weld/OSGi errors) into:
> * org.infinispan.cdi.common
> * org.infinispan.cdi.remote
> * org.infinispan.cdi.embedded
> Client side changes:
> * When client uses standard {{infinispan-cdi-remote}} or {{infinispan-cdi-embedded}} jars in his deployment, no further changes are needed (everything is being wired on CDI services level)
> * However when someone uses CDI integration and JBoss Modules dependencies (e.g. in {{MANIFEST.MF}} or {{deployment-structure.xml}} and embedded mode, he will need to change the dependency to {{org.infinispan.cdi.embedded}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (ISPN-5900) Cleanup uberjar packaging (ideal solution)
by Sebastian Łaskawiec (JIRA)
[ https://issues.jboss.org/browse/ISPN-5900?page=com.atlassian.jira.plugin.... ]
Sebastian Łaskawiec updated ISPN-5900:
--------------------------------------
Status: Open (was: New)
> Cleanup uberjar packaging (ideal solution)
> ------------------------------------------
>
> Key: ISPN-5900
> URL: https://issues.jboss.org/browse/ISPN-5900
> Project: Infinispan
> Issue Type: Feature Request
> Components: Build process
> Reporter: Sebastian Łaskawiec
> Assignee: Sebastian Łaskawiec
> Priority: Critical
> Labels: jdg7
>
> ISPN-5838 provides a backwards compatible solution whereas an ideal solution involves also changing packages (which will fix Weld/OSGi errors) into:
> * org.infinispan.cdi.common
> * org.infinispan.cdi.remote
> * org.infinispan.cdi.embedded
> Client side changes:
> * When client uses standard {{infinispan-cdi-remote}} or {{infinispan-cdi-embedded}} jars in his deployment, no further changes are needed (everything is being wired on CDI services level)
> * However when someone uses CDI integration and JBoss Modules dependencies (e.g. in {{MANIFEST.MF}} or {{deployment-structure.xml}} and embedded mode, he will need to change the dependency to {{org.infinispan.cdi.embedded}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (ISPN-5900) Cleanup uberjar packaging (ideal solution)
by Sebastian Łaskawiec (JIRA)
[ https://issues.jboss.org/browse/ISPN-5900?page=com.atlassian.jira.plugin.... ]
Sebastian Łaskawiec updated ISPN-5900:
--------------------------------------
Description:
ISPN-5838 provides a backwards compatible solution whereas an ideal solution involves also changing packages (which will fix Weld/OSGi errors) into:
* org.infinispan.cdi.common
* org.infinispan.cdi.remote
* org.infinispan.cdi.embedded
Client side changes:
* When client uses standard {{infinispan-cdi-remote}} or {{infinispan-cdi-embedded}} jars in his deployment, no further changes are needed (everything is being wired on CDI services level)
* However when someone uses CDI integration and JBoss Modules dependencies (e.g. in {{MANIFEST.MF}} or {{deployment-structure.xml}} and embedded mode, he will need to change the dependency to {{org.infinispan.cdi.embedded}}
was:
ISPN-5838 provides a backwards compatible solution whereas an ideal solution involves also changing packages (which will fix Weld/OSGi errors) into:
* org.infinispan.cdi.common
* org.infinispan.cdi.remote
* org.infinispan.cdi.embedded
> Cleanup uberjar packaging (ideal solution)
> ------------------------------------------
>
> Key: ISPN-5900
> URL: https://issues.jboss.org/browse/ISPN-5900
> Project: Infinispan
> Issue Type: Feature Request
> Components: Build process
> Reporter: Sebastian Łaskawiec
> Assignee: Sebastian Łaskawiec
> Priority: Critical
> Labels: jdg7
>
> ISPN-5838 provides a backwards compatible solution whereas an ideal solution involves also changing packages (which will fix Weld/OSGi errors) into:
> * org.infinispan.cdi.common
> * org.infinispan.cdi.remote
> * org.infinispan.cdi.embedded
> Client side changes:
> * When client uses standard {{infinispan-cdi-remote}} or {{infinispan-cdi-embedded}} jars in his deployment, no further changes are needed (everything is being wired on CDI services level)
> * However when someone uses CDI integration and JBoss Modules dependencies (e.g. in {{MANIFEST.MF}} or {{deployment-structure.xml}} and embedded mode, he will need to change the dependency to {{org.infinispan.cdi.embedded}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (ISPN-6513) Inconsistencies in Maven pom files
by Martin Gencur (JIRA)
Martin Gencur created ISPN-6513:
-----------------------------------
Summary: Inconsistencies in Maven pom files
Key: ISPN-6513
URL: https://issues.jboss.org/browse/ISPN-6513
Project: Infinispan
Issue Type: Task
Affects Versions: 9.0.0.Alpha1
Reporter: Martin Gencur
Assignee: Martin Gencur
Priority: Minor
Attachments: wolf_validator_results.txt
The output of Wolf validator is attached. It reveals some bad practices and flaws in Maven pom files within the project. Let's address the most important ones.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (ISPN-6408) ClassCastException while executed javascript returns Integer to js-client
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-6408?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-6408:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> ClassCastException while executed javascript returns Integer to js-client
> -------------------------------------------------------------------------
>
> Key: ISPN-6408
> URL: https://issues.jboss.org/browse/ISPN-6408
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Reporter: Anna Manukyan
> Assignee: Galder Zamarreño
> Fix For: 9.0.0.Alpha2, 9.0.0.Final
>
>
> In case if the javascript returns number, the execution of it over js-client, returns the following error:
> {code}
> Message:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> Stacktrace:
> undefined
> The code is:
> // mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cache.size()
> The verifying test is:
> it('can execute a script remotely to get node address from cacheManager', function(done) {
> Promise.all([client, readFile('spec/utils/test-cacheManager.js')])
> .then(function(vals) {
> var c = vals[0];
> return c.addScript('test-cacheManager.js', vals[1].toString())
> .then(function() { return c; } );
> })
> .then(t.assert(t.exec('test-cacheManager.js'),
> t.toBe(0)))
> .catch(failed(done)).finally(done);
> });
> {code}
> There is no exception on server side. Also please find below the log of the node.js execution:
> {code}
> [2016-03-18 18:10:53.848] [DEBUG] connection - Connecting to 127.0.0.1:11222
> [2016-03-18 18:10:53.849] [DEBUG] connection - Connected to 127.0.0.1:11222
> [2016-03-18 18:10:53.849] [DEBUG] client - Invoke ping(msgId=186)
> [2016-03-18 18:10:53.849] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.849] [TRACE] transport - Write buffer(msgId=186) to 127.0.0.1:11222
> [2016-03-18 18:10:53.852] [TRACE] decoder - Read header(msgId=186): opCode=24, status=6, hasNewTopology=0
> [2016-03-18 18:10:53.852] [TRACE] decoder - Call decode for request(msgId=186)
> [2016-03-18 18:10:53.852] [TRACE] connection - After decoding request(msgId=186), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.852] [TRACE] connection - Complete success for request(msgId=186) with undefined
> [2016-03-18 18:10:53.852] [DEBUG] client - Invoke put(msgId=187,key=>test-cacheManager.js,value=>S// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cache.size(),opts=undefined)
> [2016-03-18 18:10:53.853] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.853] [TRACE] transport - Write buffer(msgId=187) to 127.0.0.1:11222
> [2016-03-18 18:10:53.854] [TRACE] decoder - Read header(msgId=187): opCode=2, status=6, hasNewTopology=0
> [2016-03-18 18:10:53.854] [TRACE] decoder - Call decode for request(msgId=187)
> [2016-03-18 18:10:53.854] [TRACE] connection - After decoding request(msgId=187), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.854] [TRACE] connection - Complete success for request(msgId=187) with undefined
> [2016-03-18 18:10:53.854] [DEBUG] client - Invoke execute(msgId=188,scriptName=test-cacheManager.js,params=undefined)
> [2016-03-18 18:10:53.855] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.855] [TRACE] transport - Write buffer(msgId=188) to 127.0.0.1:11222
> [2016-03-18 18:10:53.855] [DEBUG] connection - Disconnected from 127.0.0.1:11222
> [2016-03-18 18:10:53.858] [TRACE] decoder - Read header(msgId=188): opCode=80, status=133, hasNewTopology=0
> [2016-03-18 18:10:53.858] [ERROR] decoder - Error decoding body of request(msgId=188): java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> [2016-03-18 18:10:53.859] [TRACE] connection - After decoding request(msgId=188), buffer size is 75, and offset 75
> [2016-03-18 18:10:53.859] [TRACE] connection - Complete failure for request(msgId=188) with java.lang.ClassCastException: java.lang.Integer cannot be cast to [B
> [2016-03-18 18:10:53.869] [DEBUG] client - Invoke clear(msgId=189)
> [2016-03-18 18:10:53.869] [TRACE] encoder - Encode operation with topology id 0
> [2016-03-18 18:10:53.869] [TRACE] transport - Write buffer(msgId=189) to 127.0.0.1:11222
> [2016-03-18 18:10:53.869] [TRACE] decoder - Read header(msgId=189): opCode=20, status=0, hasNewTopology=0
> [2016-03-18 18:10:53.869] [TRACE] decoder - Call decode for request(msgId=189)
> [2016-03-18 18:10:53.869] [TRACE] connection - After decoding request(msgId=189), buffer size is 6, and offset 6
> [2016-03-18 18:10:53.869] [TRACE] connection - Complete success for request(msgId=189) with undefined
> [2016-03-18 18:10:53.878] [DEBUG] connection - Disconnected from 127.0.0.1:11222
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (ISPN-6411) Marshalled value is returned while executing javascript and returning value from cache over HotRod client
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-6411?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-6411:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Marshalled value is returned while executing javascript and returning value from cache over HotRod client
> ---------------------------------------------------------------------------------------------------------
>
> Key: ISPN-6411
> URL: https://issues.jboss.org/browse/ISPN-6411
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Affects Versions: 8.2.1.Final
> Reporter: Anna Manukyan
> Assignee: Galder Zamarreño
> Fix For: 9.0.0.Alpha2, 9.0.0.Final
>
>
> When trying to execute a script over hotrod-client, which puts some data to the cache and returns it, the test fails with the following exception:
> {code}
> java.lang.ClassCastException: [B cannot be cast to java.lang.String
> at org.infinispan.client.hotrod.ExecTest.testRemoteScriptRemoteExecution(ExecTest.java:122)
> ...
> {code}
> The test code and javascript code are:
> {code}
> @Test
> public void testRemoteScriptRemoteExecution() throws IOException {
> String cacheName = "testRemoteScriptRemoteExecution_REPL_SYNC";
> ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true);
> builder.dataContainer().keyEquivalence(new AnyServerEquivalence()).valueEquivalence(new AnyServerEquivalence()).compatibility().enable().marshaller(new GenericJBossMarshaller());
> defineInAll(cacheName, builder);
> try (InputStream is = this.getClass().getResourceAsStream("/test1.js")) {
> String script = TestingUtil.loadFileAsString(is);
> clients.get(0).getCache(SCRIPT_CACHE).put("testRemoteScriptRemoteExecution.js", script);
> }
> Map<String, String> params = new HashMap<>();
> String result = clients.get(0).getCache(cacheName).execute("testRemoteScriptRemoteExecution.js", params); //<- The exception is thrown here while casting to String
> assertEquals("hoptimus prime", result);
> assertEquals("hoptimus prime", clients.get(0).getCache(cacheName).get("a"));
> }
> //test1.js
> // mode=local,language=javascript
> cache.put("a", "hoptimus prime");
> cache.get("a");
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (ISPN-6261) CLI fails on secured caches
by Sebastian Łaskawiec (JIRA)
[ https://issues.jboss.org/browse/ISPN-6261?page=com.atlassian.jira.plugin.... ]
Sebastian Łaskawiec reassigned ISPN-6261:
-----------------------------------------
Assignee: Vojtech Juranek (was: Sebastian Łaskawiec)
> CLI fails on secured caches
> ---------------------------
>
> Key: ISPN-6261
> URL: https://issues.jboss.org/browse/ISPN-6261
> Project: Infinispan
> Issue Type: Bug
> Components: CLI, Security
> Reporter: Vojtech Juranek
> Assignee: Vojtech Juranek
>
> When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
> {noformat}
> 00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "datagrid-infinispan"),
> ("cache-container" => "local")
> ]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
> at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
> at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
> at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
> at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
> at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
> {noformat}
> *Steps to reproduce:*
> * create mgmt user using {{add-user.sh}} script (e.g. user {{user}}) and assign him role {{admin}} in {{standalone/configuration/mgmt-groups.properties}}
> * create secure cache {{testcache}} with following configuration in {{standalone.xml}} (security enabled and admin user has admin rights):
> {noformat}
> <cache-container name="local" default-cache="testcache">
> <security>
> <authorization>
> <identity-role-mapper/>
> <role name="admin" permissions="ADMIN" />
> </authorization>
> </security>
> <local-cache name="testcache" start="EAGER" batching="false">
> <security>
> <authorization roles="admin" enabled="true"/>
> </security>
> <transaction mode="NONE"/>
> </local-cache>
> </cache-container>
> {noformat}
> * start ISPN server in standalone mode
> * start ISPN console in GUI mode ({{ispn-cli.sh --gui --user=user --password=pass}}) and navigate to {{subsystem=datagrid-infinispan -> cache-container=local}}
> * once clicked on {{cache-container=local}} no cache should appear there (while there should be {{testcache}}) and exception above should appear in ISPN server log
> Alternatively, you can run CLI without GUI and run
> {noformat}
> cd subsystem=datagrid-infinispan/cache-container=local
> ls
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (ISPN-6261) CLI fails on secured caches
by Sebastian Łaskawiec (JIRA)
[ https://issues.jboss.org/browse/ISPN-6261?page=com.atlassian.jira.plugin.... ]
Sebastian Łaskawiec reassigned ISPN-6261:
-----------------------------------------
Assignee: Sebastian Łaskawiec (was: Vojtech Juranek)
> CLI fails on secured caches
> ---------------------------
>
> Key: ISPN-6261
> URL: https://issues.jboss.org/browse/ISPN-6261
> Project: Infinispan
> Issue Type: Bug
> Components: CLI, Security
> Reporter: Vojtech Juranek
> Assignee: Sebastian Łaskawiec
>
> When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
> {noformat}
> 00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "datagrid-infinispan"),
> ("cache-container" => "local")
> ]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
> at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
> at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
> at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
> at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
> at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
> {noformat}
> *Steps to reproduce:*
> * create mgmt user using {{add-user.sh}} script (e.g. user {{user}}) and assign him role {{admin}} in {{standalone/configuration/mgmt-groups.properties}}
> * create secure cache {{testcache}} with following configuration in {{standalone.xml}} (security enabled and admin user has admin rights):
> {noformat}
> <cache-container name="local" default-cache="testcache">
> <security>
> <authorization>
> <identity-role-mapper/>
> <role name="admin" permissions="ADMIN" />
> </authorization>
> </security>
> <local-cache name="testcache" start="EAGER" batching="false">
> <security>
> <authorization roles="admin" enabled="true"/>
> </security>
> <transaction mode="NONE"/>
> </local-cache>
> </cache-container>
> {noformat}
> * start ISPN server in standalone mode
> * start ISPN console in GUI mode ({{ispn-cli.sh --gui --user=user --password=pass}}) and navigate to {{subsystem=datagrid-infinispan -> cache-container=local}}
> * once clicked on {{cache-container=local}} no cache should appear there (while there should be {{testcache}}) and exception above should appear in ISPN server log
> Alternatively, you can run CLI without GUI and run
> {noformat}
> cd subsystem=datagrid-infinispan/cache-container=local
> ls
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months