On Fri, Oct 19, 2018 at 7:26 AM James Bognar <jamesbognar@apache.org> wrote:
Doesn't the build automatically deploy snapshots?  I typically don't do it myself and just let Jenkins do it.

That depends on you have your build and CI/CD setup...

Look at https://repository.apache.org/service/local/repo_groups/snapshots-group/content/org/apache/juneau/juneau-microservice-server/7.2.1-SNAPSHOT/

and you will find 

https://repository.apache.org/service/local/repo_groups/snapshots-group/content/org/apache/juneau/juneau-microservice-server/7.2.1-SNAPSHOT/juneau-microservice-server-7.2.1-20181012.001138-19.jar

Gary

 

The problem you're seeing is that the @Path variable requires a name now.  I'll revert that change to allow you to use it without a name.

On Thu, Oct 18, 2018 at 8:19 PM Gary Gregory <garydgregory@gmail.com> wrote:
It is possible I did not build everything properly locally so it would be best for you to deploy a new SNAPSHOT. Regardless I am getting an error with @Path:

Servlet init error on class 'com.rs.seagull.httpmonitor.admin.AdminRootResources'
java.lang.RuntimeException: org.apache.juneau.rest.RestServletException: Problem occurred trying to serialize methods on class com.rs.seagull.httpmonitor.admin.AdminRootResources, methods=['shutdown,PUT,/shutdown','resume,PUT,/resume','reset,PUT,/reset','getStatus,GET,/status','storagePost,POST,/storage/{fileName}','storageDelete,DELETE,/storage/{fileName}','reconfigureProxy,POST,/reconfigure-proxy','getEnvironmentSystemProperty,GET,/environment/system-property/{key}']
at org.apache.juneau.rest.RestContextBuilder.build(RestContextBuilder.java:262)
at org.apache.juneau.rest.RestServlet.init(RestServlet.java:53)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:519)
at com.rs.seagull.httpmonitor.NHttpReverseProxy.installProxy(NHttpReverseProxy.java:1867)
at com.rs.seagull.httpmonitor.NHttpReverseProxy.installAdmin(NHttpReverseProxy.java:1823)
at com.rs.seagull.httpmonitor.NHttpReverseProxy.goLoop(NHttpReverseProxy.java:1533)
at com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1.lambda$0(NHttpReverseProxyTestRule.java:191)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.juneau.rest.RestServletException: Problem occurred trying to serialize methods on class com.rs.seagull.httpmonitor.admin.AdminRootResources, methods=['shutdown,PUT,/shutdown','resume,PUT,/resume','reset,PUT,/reset','getStatus,GET,/status','storagePost,POST,/storage/{fileName}','storageDelete,DELETE,/storage/{fileName}','reconfigureProxy,POST,/reconfigure-proxy','getEnvironmentSystemProperty,GET,/environment/system-property/{key}']
at org.apache.juneau.rest.RestContext.<init>(RestContext.java:3303)
at org.apache.juneau.rest.RestContextBuilder.build(RestContextBuilder.java:258)
... 8 more
Caused by: org.apache.juneau.rest.RestServletException: Exception occurred while initializing method 'com.rs.seagull.httpmonitor.admin.AdminRootResources.getEnvironmentSystemProperty'
at org.apache.juneau.rest.RestJavaMethod$Builder.<init>(RestJavaMethod.java:404)
at org.apache.juneau.rest.RestJavaMethod.<init>(RestJavaMethod.java:92)
at org.apache.juneau.rest.RestContext.<init>(RestContext.java:3236)
... 9 more
Caused by: @Path used without name or value on method 'com.rs.seagull.httpmonitor.admin.AdminRootResources.getEnvironmentSystemProperty(String)' parameter '0'.
at org.apache.juneau.rest.RestParamDefaults$PathObject.getName(RestParamDefaults.java:221)
at org.apache.juneau.rest.RestParamDefaults$PathObject.<init>(RestParamDefaults.java:199)
at org.apache.juneau.rest.RestContext.findParams(RestContext.java:4594)
at org.apache.juneau.rest.RestJavaMethod$Builder.<init>(RestJavaMethod.java:394)
... 11 more

Gary


On Thu, Oct 18, 2018 at 6:14 PM Gary Gregory <garydgregory@gmail.com> wrote:


On Thu, Oct 18, 2018 at 11:49 AM James Bognar <jamesbognar@apache.org> wrote:
Gary,

The older annotations should now be useable again.  Can you give it a try?

I am building locally since you did not seem to have pushed a new SNAPSHOT. This is tedious due to the random failures I get in running some tests. Stay tuned... or let me know if you push a new SNAPSHOT.

Gary
 

On Wed, Oct 17, 2018 at 12:42 PM Gary Gregory <garydgregory@gmail.com> wrote:
Ah, crud, the "recv failed" failure is back on my local build... it seems to be "random".

Gary

On Tue, Oct 16, 2018 at 2:15 PM Gary Gregory <garydgregory@gmail.com> wrote:
https://github.com/apache/juneau/pull/9: When I update from Apache HttpClient 4.5.4 to 4.5.6, the failure goes away and the build completes!

Gary

On Tue, Oct 16, 2018 at 2:03 PM Gary Gregory <garydgregory@gmail.com> wrote:
It always happen from Maven but NOT from Eclipse... weird!

Gary

On Tue, Oct 16, 2018 at 2:01 PM James Bognar <jamesbognar@apache.org> wrote:
Does it happen consistently?  I remember seeing this sort of issue back when we were using an older version of Apache HttpClient in Juneau 6.4.0 . Ever since we upgraded to the latest HttpClient, the problem appeared to go away.  It showed up as a "Broken Pipe" error but I recall also sometimes seeing this recv failed message as well.  I tried using Fiddler to debug the issue at the time to no avail.  The connection was simply getting lost somewhere between HttpClient and Jetty.

On Tue, Oct 16, 2018 at 3:42 PM Gary Gregory <garydgregory@gmail.com> wrote:
Hi All:

I created a PR: https://github.com/apache/juneau/pull/8

The next error I get is:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.juneau.examples.rest._TestSuite
Running class 'RestMicroservice' using config file 'examples.cfg'.
Server started on port 10000

List of available commands:
        exit -- Shut down service
        restart -- Restarts service
        help -- Commands help
        echo -- Echo command

> log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
WARNING:  RestClient garbage collected before it was finalized.
Creation stack traces can be displayed by setting the system property 'org.apache.juneau.rest.client.RestClient.trackLifecycle' to true.
Stopping server.
Server stopped.
[ERROR] Tests run: 31, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.43 s <<< FAILURE! - in org.apache.juneau.examples.rest._TestSuite
[ERROR] testProxyInterface(org.apache.juneau.examples.rest.AddressBookResourceTest)  Time elapsed: 0.048 s  <<< ERROR!
java.lang.RuntimeException: org.apache.juneau.rest.client.RestCallException: Software caused connection abort: recv failed
        at org.apache.juneau.examples.rest.AddressBookResourceTest.testProxyInterface(AddressBookResourceTest.java:299)
Caused by: org.apache.juneau.rest.client.RestCallException: Software caused connection abort: recv failed
        at org.apache.juneau.examples.rest.AddressBookResourceTest.testProxyInterface(AddressBookResourceTest.java:299)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
        at org.apache.juneau.examples.rest.AddressBookResourceTest.testProxyInterface(AddressBookResourceTest.java:299)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   AddressBookResourceTest.testProxyInterface:299 » Runtime org.apache.juneau.res...
[INFO]
[ERROR] Tests run: 31, Failures: 0, Errors: 1, Skipped: 0
[INFO]

Gary

On Tue, Oct 16, 2018 at 1:29 PM Gary Gregory <garydgregory@gmail.com> wrote:
[re-sending]
Oh, I see, your test fixtures use hardwired line-endings, obvious not portable. Instead you should do something like this: 
 
String EOL = System.getProperty("line.separator");

String r = ""
+ "@prefix jp:      <http://www.apache.org/juneaubp/> ." + EOL
+ "@prefix j:       <http://www.apache.org/juneau/> ." + EOL
+ EOL
+ "[]    j:value \"foo\" ." + EOL;

On Tue, Oct 16, 2018 at 1:29 PM Gary Gregory <garydgregory@gmail.com> wrote:
Oh, I see, your test fixtures use hardwired line-endings, obvious not portable. Instead you should do something like this:


On Tue, Oct 16, 2018 at 1:02 PM Gary Gregory <garydgregory@gmail.com> wrote:
Hi James and all:

For org.apache.juneau.marshall.N3Test.write1(), m.toString("foo") is:

 (java.lang.String) @prefix jp:      <http://www.apache.org/juneaubp/> .
@prefix j:       <http://www.apache.org/juneau/> .

[]    j:value "foo" .

Gary

On Tue, Oct 16, 2018 at 9:11 AM James Bognar <jamesbognar@apache.org> wrote:
Hi Gary,

It's hard to read the output.  Is the difference "]    j:value "foo" .]" vs "[]    j:value "foo" .]"?

I've had problems in the past writing unit tests for the RDF languages because the output is sometimes not consistent.  For example, triples are not guaranteed to be serialized in the same order each time, so I've had to use tricks such as sorting results before comparison.  Our code does not have control over how Jena serialized the RDF model.  

This is a basic sanity test.  I'm surprised it's causing an issue.  It is a new test in 7.2.0 though.  Could you tell me what the output is from the call to m.toString("foo")?  

I'm not an RDF expert, so maybe Peter Haumer can chime in?

On Mon, Oct 15, 2018 at 9:20 PM Gary Gregory <garydgregory@gmail.com> wrote:
On Mon, Oct 15, 2018 at 6:40 PM James Bognar <jamesbognar@gmail.com> wrote:
I’ll continue work on number 2.

Thank you James!

I tried to build Juneau git master locally with:

Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T12:33:14-06:00)
Maven home: C:\Java\apache-maven-3.5.4\bin\..
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_181\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

but I got:

[INFO] Running org.apache.juneau.xml.XmlTest
[INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s - in org.apache.juneau.xml.XmlTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   N3Test.toString1:45 expected:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

[]    j:value "foo" .]
> but was:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

]]    j:value "foo" .
>
[ERROR]   N3Test.write1:33 expected:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

[]    j:value "foo" .]
> but was:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

]]    j:value "foo" .
>
[ERROR]   N3Test.write2:40 expected:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

[]    j:value "foo" .]
> but was:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

]]    j:value "foo" .
>
[ERROR]   TurtleTest.toString1:45 expected:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

[]    j:value "foo" .]
> but was:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

]]    j:value "foo" .
>
[ERROR]   TurtleTest.write1:33 expected:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

[]    j:value "foo" .]
> but was:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

]]    j:value "foo" .
>
[ERROR]   TurtleTest.write2:40 expected:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

[]    j:value "foo" .]
> but was:<...che.org/juneaubp/> .[
@prefix j:       <http://www.apache.org/juneau/> .

]]    j:value "foo" .
>
[INFO]
[ERROR] Tests run: 18397, Failures: 6, Errors: 0, Skipped: 1
[INFO] 


Any ideas? This is not urgent.

Gary


On Mon, Oct 15, 2018 at 8:38 PM Gary Gregory <garydgregory@gmail.com> wrote:
Looking at sources, it seems to me the choices are:

1) Do nothing and break all existing apps; obviously not acceptable.
2) Update the whole code base so that both old and new annotation are handled. I see > 400 references to the Query annotation for example, so, yikes; granted some of those references are in Javadocs.
3) "Disown" 7.2.0 and move the annotations back to their original locations for 7.2.1. Not good either since that would break BC for 7.2.0 apps; see 1) above. Note that it does not matter how recently 7.2.0 was released.

It seems that the only sensible solution is 2)

Thoughts?

Gary

On Mon, Oct 15, 2018 at 5:50 PM Gary Gregory <garydgregory@gmail.com> wrote:
It looks like org.apache.juneau.rest.RestContext.findParams() does not take into account the deprecated annotations...

Gary

On Mon, Oct 15, 2018 at 4:54 PM Gary Gregory <garydgregory@gmail.com> wrote:
Hm... on startup, I get:

Running class 'RestMicroservice' using config file 'src\main\config\admin-microservice.cfg'.
2018-10-15 16:51:22,216 INFO  [com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1][] Logging initialized @4407ms to org.apache.logging.log4j.appserver.jetty.Log4j2Logger
Server started on port 1103
Servlet init error on class 'com.rs.seagull.httpmonitor.admin.AdminRootResources'
java.lang.RuntimeException: org.apache.juneau.rest.RestServletException: Problem occurred trying to serialize methods on class com.rs.seagull.httpmonitor.admin.AdminRootResources, methods=['shutdown,PUT,/shutdown','resume,PUT,/resume','reset,PUT,/reset','getStatus,GET,/status','getConfiguration,GET,/configuration','getInfo,GET,/info','reconfigure,POST,/reconfigure']
at org.apache.juneau.rest.RestContextBuilder.build(RestContextBuilder.java:262)
at org.apache.juneau.rest.RestServlet.init(RestServlet.java:53)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:519)
at com.rs.seagull.httpmonitor.NHttpReverseProxy.installProxy(NHttpReverseProxy.java:1867)
at com.rs.seagull.httpmonitor.NHttpReverseProxy.installAdmin(NHttpReverseProxy.java:1823)
at com.rs.seagull.httpmonitor.NHttpReverseProxy.goLoop(NHttpReverseProxy.java:1533)
at com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1.lambda$0(NHttpReverseProxyTestRule.java:191)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.juneau.rest.RestServletException: Problem occurred trying to serialize methods on class com.rs.seagull.httpmonitor.admin.AdminRootResources, methods=['shutdown,PUT,/shutdown','resume,PUT,/resume','reset,PUT,/reset','getStatus,GET,/status','getConfiguration,GET,/configuration','getInfo,GET,/info','reconfigure,POST,/reconfigure']
at org.apache.juneau.rest.RestContext.<init>(RestContext.java:3303)
at org.apache.juneau.rest.RestContextBuilder.build(RestContextBuilder.java:258)
... 8 more
Caused by: org.apache.juneau.rest.RestServletException: Invalid parameter specified for method 'com.rs.seagull.httpmonitor.admin.AdminRootResources.reconfigure(String,Reader)' at index position 0
at org.apache.juneau.rest.RestContext.findParams(RestContext.java:4613)
at org.apache.juneau.rest.RestJavaMethod$Builder.<init>(RestJavaMethod.java:394)
at org.apache.juneau.rest.RestJavaMethod.<init>(RestJavaMethod.java:92)
at org.apache.juneau.rest.RestContext.<init>(RestContext.java:3236)
... 9 more
2018-10-15 16:51:23,700 WARN  [com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1][o.e.j.s.h.C.ROOT] unavailable
java.lang.RuntimeException: org.apache.juneau.rest.RestServletException: Problem occurred trying to serialize methods on class com.rs.seagull.httpmonitor.admin.AdminRootResources, methods=['shutdown,PUT,/shutdown','resume,PUT,/resume','reset,PUT,/reset','getStatus,GET,/status','getConfiguration,GET,/configuration','getInfo,GET,/info','reconfigure,POST,/reconfigure']
at org.apache.juneau.rest.RestContextBuilder.build(RestContextBuilder.java:262) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
at org.apache.juneau.rest.RestServlet.init(RestServlet.java:53) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670) ~[jetty-servlet-9.4.12.v20180830.jar:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:519) ~[jetty-servlet-9.4.12.v20180830.jar:9.4.12.v20180830]
at com.rs.seagull.httpmonitor.NHttpReverseProxy.installProxy(NHttpReverseProxy.java:1867) ~[classes/:?]
at com.rs.seagull.httpmonitor.NHttpReverseProxy.installAdmin(NHttpReverseProxy.java:1823) ~[classes/:?]
at com.rs.seagull.httpmonitor.NHttpReverseProxy.goLoop(NHttpReverseProxy.java:1533) ~[classes/:?]
at com.rs.seagull.httpmonitor.test.NHttpReverseProxyTestRule$1.lambda$0(NHttpReverseProxyTestRule.java:191) ~[test-classes/:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: org.apache.juneau.rest.RestServletException: Problem occurred trying to serialize methods on class com.rs.seagull.httpmonitor.admin.AdminRootResources, methods=['shutdown,PUT,/shutdown','resume,PUT,/resume','reset,PUT,/reset','getStatus,GET,/status','getConfiguration,GET,/configuration','getInfo,GET,/info','reconfigure,POST,/reconfigure']
at org.apache.juneau.rest.RestContext.<init>(RestContext.java:3303) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
at org.apache.juneau.rest.RestContextBuilder.build(RestContextBuilder.java:258) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
... 8 more
Caused by: org.apache.juneau.rest.RestServletException: Invalid parameter specified for method 'com.rs.seagull.httpmonitor.admin.AdminRootResources.reconfigure(String,Reader)' at index position 0
at org.apache.juneau.rest.RestContext.findParams(RestContext.java:4613) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
at org.apache.juneau.rest.RestJavaMethod$Builder.<init>(RestJavaMethod.java:394) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
at org.apache.juneau.rest.RestJavaMethod.<init>(RestJavaMethod.java:92) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
at org.apache.juneau.rest.RestContext.<init>(RestContext.java:3236) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
at org.apache.juneau.rest.RestContextBuilder.build(RestContextBuilder.java:258) ~[juneau-rest-server-7.2.1-SNAPSHOT.jar:7.2.1-SNAPSHOT]
... 8 more

Thoughts?

Gary

On Mon, Oct 15, 2018 at 9:12 AM Gary Gregory <garydgregory@gmail.com> wrote:
Yep, it compiles, trying the runtime now...

Gary

On Mon, Oct 15, 2018 at 7:42 AM James Bognar <jamesbognar@apache.org> wrote:
Fixed.  You can try again.

On Sun, Oct 14, 2018 at 10:07 PM Gary Gregory <garydgregory@gmail.com> wrote:
Hi James:

Using 7.2.1-SNAPSHOT, I only have one (1) compiler error:

The import org.apache.juneau.xml.XmlSchemaDocSerializer cannot be resolved.

Gary

On Sun, Oct 14, 2018 at 1:38 PM Gary Gregory <garydgregory@gmail.com> wrote:
Thank you, I should be home to take a look tonight...

Gary

On Sat, Oct 13, 2018, 17:36 James Bognar <jamesbognar@apache.org> wrote:
Hi Gary.  Just delivered the changes.  You can try them out now.

On Fri, Oct 12, 2018 at 6:19 PM James Bognar <jamesbognar@apache.org> wrote:
I'm going to need a couple of days to make those changes.  I'll announce when they're ready.

On Fri, Oct 12, 2018 at 4:25 PM Gary Gregory <garydgregory@gmail.com> wrote:
On Thu, Oct 11, 2018 at 11:32 AM Gary Gregory <garydgregory@gmail.com> wrote:
On Thu, Oct 11, 2018 at 11:28 AM James Bognar <jamesbognar@apache.org> wrote:
Yes, I will try my best to try to add in backwards compatibility in 7.2.1.

Great and thank you, I can test a SNAPSHOT version when you give the go ahead.

May you please indicate a time-frame for which I should set aside some time for testing a SNAPSHOT?

Thank you,
Gary
 

Gary
 

On Thu, Oct 11, 2018 at 1:21 PM Gary Gregory <garydgregory@gmail.com> wrote:


On Thu, Oct 11, 2018 at 11:17 AM James Bognar <jamesbognar@apache.org> wrote:
Yea I can do that.

Hi James,

My goal, which I hope you share is:

- Update from 7.1.0 to 7.2.1 as a drop-in replacement (skipping 7.2.0 altogether.)
- Follow the @deprecated warnings and update my source code.
- Update to the next release, whenever that is, as a drop in replacement. Would that then be 8.0?

Is that how you see it?

Gary

On Thu, Oct 11, 2018 at 1:15 PM Gary Gregory <garydgregory@gmail.com> wrote:
On Thu, Oct 11, 2018 at 10:47 AM James Bognar <jamesbognar@apache.org> wrote:
Hi all,

In hindsight, Juneau 7.2.0 should have been released as Juneau 8 due to breaking changes.  Particularly, the server and client side annotations were merged into a single set of annotations.  I'm now getting negative feedback for that decision (rightly so).  

My plan to fix this is to revert the changes made in 7.2.0 and to re-release 7.1.1 as 7.2.1.  Then release Juneau 8 with the latest bug fixes included.  Given the significant changes made in 7.2.0, I do not believe it's possible to fix backwards compatibility (just unmerging those annotations would explode the code complexity).  

Thank you for that. But will there be @deprecated comments so that we can move to the new code?

Gary