Re: [PROBLEM] Java 9 ClassLoader and trying to load module java.se.se

2017-05-06 Thread Romain Manni-Bucau
Hi Tibor,

(If it helps) I guess detecting you run on java 9 you can add some
--add-opens on the CLI as a workaround. Otherwise a double compilation can
be needed or just provide a jar with these classes in the classloader which
will override the JVM ones - this is how it should work for the deprecated
jaxb typically for instance.


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-05-06 9:24 GMT+02:00 Tibor Digana :

> Hi,
>
> @Robert I created branch [1] and added Java 9 method call
> *findClass(module,
> cls)* to our *ClassLoader*, see the diff [2] and there is my playground for
> my debugging purposes.
>
> After debugging this code does not load *javax.xml.ws.Holder*.
> This method is protected and if you call *setAccessible(true) *the JVM
> throws exception because this method cannot be called in *java.lang* or
> *java.base* module.
>
> I guess this class loader must be compiled in java 9 and the protected
> method extended and then maybe the module *"java.se.ee  >"*
> would be loaded.
>
> Do you have any idea to solve this problem and load *javax.xml.ws.Holder*
> properly?
>
> [1]
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.
> git;a=shortlog;h=refs/heads/SUREFIRE-1265_2
>
> [2]
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.
> git;a=commitdiff;h=bce51369e3563ed95c91346cd89c80bac7716c10
>
> Cheers
> Tibor
>


[PROBLEM] Java 9 ClassLoader and trying to load module java.se.se

2017-05-06 Thread Tibor Digana
Hi,

@Robert I created branch [1] and added Java 9 method call *findClass(module,
cls)* to our *ClassLoader*, see the diff [2] and there is my playground for
my debugging purposes.

After debugging this code does not load *javax.xml.ws.Holder*.
This method is protected and if you call *setAccessible(true) *the JVM
throws exception because this method cannot be called in *java.lang* or
*java.base* module.

I guess this class loader must be compiled in java 9 and the protected
method extended and then maybe the module *"java.se.ee "*
would be loaded.

Do you have any idea to solve this problem and load *javax.xml.ws.Holder*
properly?

[1]
https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=shortlog;h=refs/heads/SUREFIRE-1265_2

[2]
https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=commitdiff;h=bce51369e3563ed95c91346cd89c80bac7716c10

Cheers
Tibor


[GitHub] maven-surefire issue #114: Parallel runner should not drop away runners that...

2017-05-06 Thread Fuud
Github user Fuud commented on the issue:

https://github.com/apache/maven-surefire/pull/114
  
I am not sure that I understand your question. But I can try to answer :)

1) JUnit has @RunWith annotaion that consumes Class
2) This Runner should implement method getDescription. But it is not 
prohibited to report via getDescription less children than will be ran.
3) There is only one releable method to get all children: run Runner and 
listen to RunNotifier.
4) JUnit's default JUnitCore does not skip runners that reports no 
children. Surefire does. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: [PROBLEM] Java 9 ClassLoader and trying to load module java.se.se

2017-05-06 Thread Robert Scholte
I guess we need to dive into MethodHandles.Lookup[1] or reconsider  
MultiRelease JAR


[1]  
http://download.java.net/java/jigsaw/docs/api/java/lang/invoke/MethodHandles.Lookup.html


On Sat, 06 May 2017 09:24:51 +0200, Tibor Digana   
wrote:



Hi,

@Robert I created branch [1] and added Java 9 method call  
*findClass(module,
cls)* to our *ClassLoader*, see the diff [2] and there is my playground  
for

my debugging purposes.

After debugging this code does not load *javax.xml.ws.Holder*.
This method is protected and if you call *setAccessible(true) *the JVM
throws exception because this method cannot be called in *java.lang* or
*java.base* module.

I guess this class loader must be compiled in java 9 and the protected
method extended and then maybe the module *"java.se.ee  
"*

would be loaded.

Do you have any idea to solve this problem and load *javax.xml.ws.Holder*
properly?

[1]
https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=shortlog;h=refs/heads/SUREFIRE-1265_2

[2]
https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=commitdiff;h=bce51369e3563ed95c91346cd89c80bac7716c10

Cheers
Tibor


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: [GitHub] maven-surefire issue #114: Parallel runner should not drop away runners that...

2017-05-06 Thread Tibor Digana
IIUC some runners or Runnable children are added as leafs by your framework
as at the runtime.
I cannot guarantee that these addons would run in parallel.
Is that true that at least some runners still have some children since the
beginning when parallel computer (PC) has recognized them?

On Sat, May 6, 2017 at 4:39 PM, Fuud  wrote:

> Github user Fuud commented on the issue:
>
> https://github.com/apache/maven-surefire/pull/114
>
> I am not sure that I understand your question. But I can try to answer
> :)
>
> 1) JUnit has @RunWith annotaion that consumes Class
> 2) This Runner should implement method getDescription. But it is not
> prohibited to report via getDescription less children than will be ran.
> 3) There is only one releable method to get all children: run Runner
> and listen to RunNotifier.
> 4) JUnit's default JUnitCore does not skip runners that reports no
> children. Surefire does.
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


-- 
Cheers
Tibor