Closed glassfishrobot closed 12 years ago
@glassfishrobot Commented msreekanth said: Not sure if this is related to this issue we had at 3.1 time frame. http://java.net/jira/browse/GLASSFISH-16044
@glassfishrobot Commented msreekanth said: On Normal command line terminal this works:
C:\ha\file_repository\appclient>appclient -client RequestAndApplicationScopeEJBM
DBClient.jar -targetserver bigapp-x2250-3.us.oracle.com:23700
Feb 07, 2012 2:16:46 AM org.hibernate.validator.util.Version
{imqDestinationName=cdi_hello_mdb_InQueue, imqDestinatio nDescription=A Description for the Destination Object} at time 1328609819179 Sent message 0 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties(): {imqDestinationName=cdi_hello_mdb_InQueue, imqDestinatio nDescription=A Description for the Destination Object}
at time 1328609819195 Sending message 1 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties():
{imqDestinationName=cdi_hello_mdb_InQueue, imqDestinatio nDescription=A Description for the Destination Object} at time 1328609819210 Sent message 1 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties(): {imqDestinationName=cdi_hello_mdb_InQueue, imqDestinatio nDescription=A Description for the Destination Object}
at time 1328609819210 remote bean:test.ejb.session._HelloSless_Wrapper@9043235f remote invoke : PASS Waiting for queue message Received message : mdb() invoked Received message : PASS
C:\ha\file_repository\appclient>
@glassfishrobot Commented sonymanuel said: The last execution on Windows was on build 14. Then this test was failing due to issue http://java.net/jira/browse/GLASSFISH-18155. Once that issue was fixed we are hitting this one.
@glassfishrobot Commented @tjquinno said: I do not think it matters, but for completeness what version of Windows does this happen with?
I think I will have access to a Windows XP Pro system to try to duplicate the problem and investigate.
@glassfishrobot Commented junesm said: Added to 3.1.2 Release Notes:
Description
When you try to run an application client on Windows with cygwin, the application client is appending extra characters to the arguments. For example, for a simple parameter 3, it is sending $'3\r'.
Workaround
None.
@glassfishrobot Commented @tjquinno said: I was able to reproduce the problem and I see the cause. I made a small change in my workspace and it seems to repair the defect.
@glassfishrobot Commented @tjquinno said: Possible addition to the release note:
Depending on how your app client handles command-line arguments, you might be able to work around this problem without changing your app client by adding an extra command-line argument. For example, instead of
appclient -jar mydir/MyClient.jar 3
you could use
appclient -jar mydir/MyClient.jar 3 extra
This will add the trailing \r to the "extra" argument, protecting the earlier ones. Note that this will not work if your app client handles all the arguments on the line in some way.
Another workaround is to modify your app client to use String.trim on the arguments - at least the last one - which will remove any trailing \r character.
@glassfishrobot Commented @tjquinno said: Fix checked into the trunk (for 4.0).
Project: glassfish Repository: svn Revision: 52503 Author: tjquinn Date: 2012-02-08 16:20:51 UTC Link:
Fix for 18332.
CLIBootstrap prepares a java command line for launching the ACC which includes the command-line arguments to be passed to the app client. Due to differences in command-line parsing on the various platforms, this error was visible only on Windows systems using cygwin, but the code used System.out.println to convey the java command to use back to the command shell. On Windows under cygwin the final command-line argument had a trailing \r character which was then passed into the client.
This change uses System.out.print (instead of println) to suppress the trailing \r on the last argument.
Tests: QL, manual tests on Windows, Windows with cygwin, Mac OS X
52503
trunk/main/appserver/appclient/client/acc/src/main/java/org/glassfish/appclient/client/CLIBootstrap.java
@glassfishrobot Commented junesm said: Thanks for the Release Note update, Tim! I added your workaround info almost verbatim:
Workaround
Depending on how your application client handles command-line arguments, you might be able to work around this problem without changing your application client by adding an extra command-line argument. For example, instead of entering this command:
appclient -jar mydir/MyClient.jar 3
You could enter this command:
appclient -jar mydir/MyClient.jar 3 extra
This adds the trailing \r to the last argument, extra, protecting the previous ones. Note that this does not work if your application client handles all the arguments on the line in some way.
Another workaround is to modify your application client to use String.trim on the arguments, or at least the last one, which removes any trailing \r character.
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-18332
@glassfishrobot Commented Reported by msreekanth
@glassfishrobot Commented Marked as fixed on Wednesday, February 8th 2012, 8:23:23 am
When trying to run an appclient on windows with cygwin, appclient is appending extra characters to the arguments.For example for a simple parameter "3", it is sending "$'3\r'"
Here is the appclient output run on ubuntu and windows with cygwin with debug option:
Linux:
{imqDestinationName=cdi_hello_mdb_InQueue, imqDestinationDescription=A Description for the Destination Object} at time 1328620123577 Sent message 0 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties(): {imqDestinationName=cdi_hello_mdb_InQueue, imqDestinationDescription=A Description for the Destination Object}
at time 1328620124276 Sending message 1 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties():
{imqDestinationName=cdi_hello_mdb_InQueue, imqDestinationDescription=A Description for the Destination Object} at time 1328620124276 Sent message 1 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties(): {imqDestinationName=cdi_hello_mdb_InQueue, imqDestinationDescription=A Description for the Destination Object}
at time 1328620124509 Sending message 2 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties():
{imqDestinationName=cdi_hello_mdb_InQueue, imqDestinationDescription=A Description for the Destination Object} at time 1328620124509 Sent message 2 to Oracle GlassFish(tm) Server MQ Destination getName(): cdi_hello_mdb_InQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties(): {imqDestinationName=cdi_hello_mdb_InQueue, imqDestinationDescription=A Description for the Destination Object}
at time 1328620124742 remote bean:test.ejb.session._HelloSless_Wrapper@9043235f remote invoke : PASS Waiting for queue message Received message : mdb() invoked Received message : PASS
Windows
++ dirname C:/ha/new/glassfish3/glassfish/bin/appclient
uname
" in ++ uname ++ cygpath --windows C:/ha/new/glassfish3/glassfish/bin/..Environment
Cygwin,Windows,Gf 3.1.2 B20
Affected Versions
[3.1.2_dev]