Skip to main content

appclient doesn't work

26 replies [Last post]
kurtdz
Offline
Joined: 2010-01-14

HI all:
why the appclient in my host doesn't work when i type following command :
"appclient -client bookstore-client-1.0.jar"

and the returned message is "'Input' is not recognized as an internal or external command, operable program or batch file."

My java -version is "java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)"

and i am using jdk 1.6.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Luca Morettoni

On 01/29/10 01:09 AM, glassfish@javadesktop.org wrote:

> This seems to be a change introduced in Java 6u18. Our quality team
> and compatibility test team are also now seeing this. I've also
> reproduced this on a Windows system with 6u18 installed.
>
> As I mentioned earlier in this thread, I added a workaround to
> GlassFish several days ago. I have also opened a GlassFish issue
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=11494 for this
> because I suspect we will want to include that workaround in the
> proposed next update release to GlassFish 3.0.

Thanks Tim, do you know when the 3.0.1 version could be available into
pkg repository? And in witch repository too... :)

--
Luca Morettoni | OpenSolaris SCA #OS0344
Web/BLOG: http://www.morettoni.net/ | http://twitter.com/morettoni
jugUmbria founder: https://jugUmbria.dev.java.net/
ITLOSUG leader: http://hub.opensolaris.org/bin/view/User+Group+itl-osug/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Snjezana Sevo-Zenzerovic

Luca Morettoni wrote:
> On 01/29/10 01:09 AM, glassfish@javadesktop.org wrote:
>
>> This seems to be a change introduced in Java 6u18. Our quality team
>> and compatibility test team are also now seeing this. I've also
>> reproduced this on a Windows system with 6u18 installed.
>>
>> As I mentioned earlier in this thread, I added a workaround to
>> GlassFish several days ago. I have also opened a GlassFish issue
>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=11494 for this
>> because I suspect we will want to include that workaround in the
>> proposed next update release to GlassFish 3.0.
>
>
>
>
> Thanks Tim, do you know when the 3.0.1 version could be available into
> pkg repository? And in witch repository too... :)
>
The issue note says that the workaround made it into the 3.0.1 branch on
02/04. We are promoting 3.0.1 branch build later today, so look for
packages with the version 3.0.1,0-4 in the dev.glassfish.org repository.
Note that you will need to use the procedure described in this thread to
see the update since we are not updating stable.glassfish.org repository
just yet so this will not be automatically handled as image update:

http://forums.java.net/jive/thread.jspa?messageID=382872

Thanks,

Snjezana

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

sroeper
Offline
Joined: 2010-01-04

Hi Tim, I get the same message if I try to access my app-client by JavaWeb Start from a Windows Server 2003, Java 1.6.0_18-b07 JRE as client. Locally on my Mac the problem does not occur.
I have not tested the nightly build until now. I used the Community version GlassFish v3 (build 74.2). The Server and the JRE on the client is a fresh install.
I think this is a serious problem, is there already an open bug report for it?

Stefan Roeper http://www.roeperweise.com

sroeper
Offline
Joined: 2010-01-04

No luck with the nigthly builds from Jan 18 and Jan 28.
The new Error on both machines is now Error in downloading file xxClient.jar. This must be a generated file because my apps name is xx-client-app

I was excited about JavaEE 6 and so on Glassfish v3, really great work! But the development of JavaWeb Start Applications is really a pain and frustrating. Glassfish v2 already had bad support for app clients but v3.... ;-(

tjquinn
Offline
Joined: 2005-03-30

This seems to be a change introduced in Java 6u18. Our quality team and compatibility test team are also now seeing this. I've also reproduced this on a Windows system with 6u18 installed.

As I mentioned earlier in this thread, I added a workaround to GlassFish several days ago. I have also opened a GlassFish issue https://glassfish.dev.java.net/issues/show_bug.cgi?id=11494 for this because I suspect we will want to include that workaround in the proposed next update release to GlassFish 3.0.

- Tim

tjquinn
Offline
Joined: 2005-03-30

The same workaround has been approved for the planned upcoming update release of GlassFish v3 and I've just checked it into that code base.

tjquinn
Offline
Joined: 2005-03-30

Hi, Eduard.

When I build and run the tutorial code using the fcs build for GlassFish v3, I see no errors. I am running on Mac OS with Java 1.6.0_17.

Do you, by chance, still have the version of the EAR that exposed this problem? If so, could you please either attach that file to this topic or e-mail it to me? That would help us see if there is something different in how you and I packaged the EAR, or whether some difference in our environments leads to this, or if something else is the cause.

Thanks.

- Tim

sinedanat
Offline
Joined: 2009-02-28

Hi, Tim!

I have previously mentioned that this problem occur when I use with jdk 6 update 8 (1.6.0_18) + Glassfish v3 Enterprise.
I tried on two different OSs and PCs - Windowx XP SP2 and Windowx XP SP3.
I tried several examples from different books, Java EE samples and Java EE tutorials.

I again reproduced this error - see screenshots.
1. Java SE 6 update 18 (1.6.0_18)
2. Java EE 6
3. Netabeans 6.8

For example, sample project from Java EE Tutorial - cart (ejb):
http://docs.sun.com/app/docs/doc/820-7627/bnbod?a=view

After attempting to run this sample:

Initial deploying cart to C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\ejb\cart\dist\gfdeploy\cart
Completed initial distribution of cart
post-run-deploy:
run-deploy:
Warning: Could not find file C:\glassfishv3\glassfish\domains\domain1\generated\xml\cart\cartClient.jar to copy.
Copying 1 file to C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\ejb\cart\dist
Copying 4 files to C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\ejb\cart\dist\cartClient
java.lang.NullPointerException
at org.glassfish.appclient.client.acc.ACCLogger$1.run(ACCLogger.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.glassfish.appclient.client.acc.ACCLogger.reviseLogger(ACCLogger.java:146)
at org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:93)
at org.glassfish.appclient.client.acc.ACCLogger.(ACCLogger.java:80)
at org.glassfish.appclient.client.AppClientFacade.createBuilder(AppClientFacade.java:360)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:247)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)
......

Java Result: 1
run-cart-app-client:

Only after installing GlassFish v3.1 nightly (glassfish-v3_1-b01-01_18_2010.zip from http://download.java.net/glassfish/v3.1/nightly/) I could successfully run this example and others too...

aszomor
Offline
Joined: 2009-08-06

HI,

I downloaded the latest-glassfish.zip and tried it, it was OK!
Now everything are working on all platform that we use (Linux and Windows).

Thanks a lot Tim!
Attila.

aszomor
Offline
Joined: 2009-08-06

Hi,

Thanks Tim, I will upgrade my GFv3 to v3.1 and I will to try it again.

Attila.

aszomor
Offline
Joined: 2009-08-06

Hi All,

We got the same error on Windows, but everything OK on my Ubuntu Linux.
I tried to run it with NetBeans and I saw an interesting PATH on generated/xml place.
The pathes not equals where GF deploy it and where NB find it.

Already exists a solution for this problem?

Attila.

ENVIRONMENT:
------------------------
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)
GlassFish v3 (build 74.2)

APPCLI DEPLOYED REAL PATH:
-------------------------------------------------
G:\Java\
sges-v3\
glassfish\
domains\
domain1\
generated\
xml\
ctMedikaSwingAppClient\
ctMedikaSwingClient_jar\
ctMedikaSwingAppClientClient.jar

NetBeans 6.8 OUTPUT:
----------------------------------
Warning: Could not find file
G:\Java\
sges-v3\
glassfish\
domains\
domain1\
generated\
xml\
ctMedikaSwingAppClient\
ctMedikaSwingAppClientClient.jar
to copy.
java.lang.NullPointerException
at org.glassfish.appclient.client.acc.ACCLogger$1.run(ACCLogger.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.glassfish.appclient.client.acc.ACCLogger.reviseLogger(ACCLogger.java:146)
at org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:93)
at org.glassfish.appclient.client.acc.ACCLogger.(ACCLogger.java:80)
at org.glassfish.appclient.client.AppClientFacade.createBuilder(AppClientFacade.java:360)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:247)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Java Result: 1
run-ctMedikaSwingClient:

tjquinn
Offline
Joined: 2005-03-30

You are likely to see the NullPointerException running a GlassFish 3.0 build. Current builds of 3.0.1 and 3.1 should not have this problem.

The NPE occurs because of a change made in Java SE in 1.6.0_18. (We added a workaround to GlassFish to avoid the problem.) The underlying change in Java SE involves certain things be garbage collected more aggressively in 1.6.0_18 as compared to earlier releases. In theory there would be no difference among different operating systems, but in the past I have seem some differences as to when GC kicks in from one OS to another.

The bottom line is this: If you use Java SE 1.6.0_18 or later and a current GlassFish build of 3.0.1 or 3.1 you should not see this NPE problem.

- Tim

hoffman462
Offline
Joined: 2008-07-24

Sorry to resurrect this issue -
I'm in a situation where the JDK that we are using is about to be upgraded to u21 from u16.

On one of our machines, I've seen this issue already with GF V3. Sadly, we aren't able to upgrade glassfish from 3.0.0 to anything else at the immediate moment (though, I suppose we will be forced to in this case --- if all doesn't go as planned).

Is there any other work around using 6 u21 and 3.0.0 ?

Thanks for any suggestions / help,

tjquinn
Offline
Joined: 2005-03-30

Hi.

I know of no workaround for that combination of Java SE and GlassFish.

Do you have technical issues with moving from GlassFish 3.0 to something later, such as 3.0.1 where this problem is already worked around?

- Tim

kurtdz
Offline
Joined: 2010-01-14

HI All,

after using glassfish the newest nightly build , appclient works fine now,
i checked my logging.properties under jdk, and it includes following text:

############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.xyz.foo.level = SEVERE

vacant78
Offline
Joined: 2010-02-12

I installed glassfish-v3_1-b01-12_18_2009 and the cart project didn't work for me. (Same error as sinedanat)
My environment:
2. JDK6 update 18
2. Java EE 6
3. Netabeans 6.8

But after installing a previous version of JDK (update 10) all returned to normal.

Waiting for the GlassFish update so I can install latest JDK.

johancowe
Offline
Joined: 2010-03-26

For me the cart example in te EE6 volume1 tutorial doesn't work for me either. Same specs as the others I suppose. The error I get is

Warning: Could not find file C:\glassfishv3\glassfish\domains\domain1\generated\xml\cart\cartClient.jar to copy.
Copying 1 file to C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\ejb\cart\dist
Copying 4 files to C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\ejb\cart\dist\cartClient
java.lang.NullPointerException

When the checking the file structure, I have seen that the mentioned jar can be found on a deeper location:

C:\glassfishv3\glassfish\domains\domain1\generated\xml\cart\cart-app-client_jar\cartClient.jar

but not on the (higher location) he is now looking.

Is there something wrong in the distributed example (a build config file) ?

Thanks for any feedback.

tjquinn
Offline
Joined: 2005-03-30

What exact build of GlassFish are you using?

Also, what exact version of Java do you have?

I see the warning during the build when I use GlassFish 3.0. I see no warning when deploying to GlassFish 3.0.1 (the March 24 build) or to a very recent build of GlassFish 3.1.

You see the NullPointerException because you are probably using Java SE 1.6.0_18 or later and an older build of GlassFish 3.0 or 3.0.1. There was a change in Java SE 1.6.0_18 and we made changes in GlassFish to adjust for that. The GlassFish change should be in the most recent builds of 3.0.1 and 3.1 but is not in the released version of GlassFish 3.0.

So please try a recent 3.0.1 or 3.1 build and see if that works better.

- Tim

tjquinn
Offline
Joined: 2005-03-30

What release of GlassFish are you using?

What operating system are you using?

Please:

1. Make a copy of ${installDir}/bin/appclient (or appclient.bat if you are on a Windows system) as appclientx (or appclientx.bat for Windows) in the same directory.

2. Edit appclientx (or appclientx to remove the # character from the line near the beginning of the file that says "# set -x" (for non-Windows). For a Windows system remove the line that says "@echo off" from appclientx.bat.

3. Try to launch your client again using appclientx instead of appclient.

Post the results here if you don't see what the problem is yourself.

- Tim

kurtdz
Offline
Joined: 2010-01-14

Thanks Tim!,

My host is Windows XP Professional Version 2002, Service Pack2
and application server is Sun GlassFish Enterprise Server v3 (build 74.2)

i turned on the echo and found that errors are "There is no script engine for file extension ".js".", so i download and install Windows Script 5.7 for Windows XP,

and java can be invoked , but it throws null pointer exception.

java -Dcom.sun.aas.installRoot="C:\Apps\glassfishv3\glassfish\bin\.." -Djava.security.policy="C:\Apps\glassfi
shv3\glassfish\bin\..\lib\appclient\client.policy" -Djava.system.class.loader=org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader -
Djava.security.auth.login.config="C:\Apps\glassfishv3\glassfish\bin\..\lib\appclient\appclientlogin.conf" -Djava.endorsed.dirs="C:\Apps\glas
sfishv3\glassfish\bin\..\lib\endorsed;C:\Apps\glassfishv3\glassfish\bin\..\modules\endorsed";null -javaagent:"C:\Apps\glassfishv3\glassfish\
bin\..\modules\gf-client.jar"=mode=acscript,arg=-configxml,arg="C:\Apps\glassfishv3\glassfish\bin\..\domains\domain1\config\sun-acc.xml",cli
ent=jar=bookstore-client-1.0.jar -jar bookstore-client-1.0.jar

java.lang.NullPointerException
at org.glassfish.appclient.client.acc.ACCLogger$1.run(ACCLogger.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.glassfish.appclient.client.acc.ACCLogger.reviseLogger(ACCLogger.java:146)
at org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:93)
at org.glassfish.appclient.client.acc.ACCLogger.(ACCLogger.java:80)
at org.glassfish.appclient.client.AppClientFacade.createBuilder(AppClientFacade.java:360)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:247)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)

Message was edited by: kurtdz

tjquinn
Offline
Joined: 2005-03-30

Strange.

The NullPointerException comes from logic that is setting the logging level for all loggers known to the Java LogManager. The logic gets the enumeration of logger names from LogManager and then retrieves each, one by one, using the name. Somehow the LogManager has reported a logger name which corresponds to a null logger.

I don't think we've seen anything like this before. Is there a possibility that your logging.properties file for your Java installation contains something that might cause this?

I've made some changes to this logic so it will report all logger names for which the LogManager returns null. The changes should be available in tonight's nightly build. Even if you don't want to use the nightly build routinely using the nightly build once would let you find out which logger names have null loggers associated with them.

- Tim

sinedanat
Offline
Joined: 2009-02-28

Dear Tim!

A have the same problem with jdk 6 update 8 + Glassfish v3 and v3.1 nightly (intalling all updates)...

I tried several examples from different books, Java EE samples and Java EE tutorials and get the same error:
java.lang.NullPointerException
at org.glassfish.appclient.client.acc.ACCLogger$1.run(ACCLogger.java:149)
at java.security.AccessController.doPrivileged(Native Method)
...

tjquinn
Offline
Joined: 2005-03-30

If you are seeing the same error at the same line in the code then I don't see how you can be using the latest nightly build of v3.1. The logic I added to detect and report null loggers displaced the line of code where this NPE would be occurring. Line 149 in the updated code no longer matches up with the methods in your latest stack trace.

Can you please double-check that you are using the latest nightly build? It's important that when you use the appclient command that the script you run is the one from the 3.1 directory, not the 3.0 directory.

- Tim

sinedanat
Offline
Joined: 2009-02-28

Sorry, Tim!

But really see this error ...
I checked again and this problem didn't occur.

D:\1>asadmin deploy cart-ejb.jar
Authentication failed with password from login store: C:\Documents and Settings\Eduard\.asadminpass
Application deployed successfully with name cart-ejb.

Command deploy executed successfully.

D:\1>appclient -client cart-app-client.jar
ACC012: In modifying known loggers, the LogManager reported the logger name com.sun.xml.bind.v2.ContextFactory which does not have a corresponding logger; continuing
ng logger; continuing
19.01.2010 19:12:03 com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
Retrieving book title from cart: Infinite Jest
Retrieving book title from cart: Bel Canto
Retrieving book title from cart: Kafka on the Shore
Removing "Gravity's Rainbow" from cart.
Caught a BookException: "Gravity's Rainbow" not in cart.

It's OK now.
I've used jdk 6 update 8 + v3.1 nightly (glassfish-v3_1-b01-01_18_2010.zip) and sample project from Java EE Tutorial - cart (ejb).
http://docs.sun.com/app/docs/doc/820-7627/bnbod?a=view

Thanks a lot!
Eduard.

tjquinn
Offline
Joined: 2005-03-30

Hi, Eduard.

It's not clear why that one logger is causing a problem, but it's good to hear your client is working now.

- Tim

tujinius
Offline
Joined: 2003-07-13

Hi all:

I got the same error in my production system. After I check the above reply , I realize , it has been fixed in Dev Daily Build. But can I use a daily build in my production env?

I use j2ee since 2000. and I don't know why till ejb3.1 spec, an ejb client still so immature solution for developers. In GF3, all these demo program shows how to use the appclient script to run the ejb client code.

Let's take a look how to it works.

When you release you code to your customer, do you want to release the glassfish/bin/appclient ? plus the ./../moduels/gf_client.jar ? plus the sun-acc.xml? plus even an logging bug? maybe plus the whole Glassfish3 directory, right? god know need which file in there.

you know why Java su.ck? cause so many idiot java programmer in this world and get high salaries.
you know why Sun bankrupt? cause Sun hired all these idiot java programmers.

God bless us. Don't ruin our JAVA.

glassfish/bin/appclient -client TTASClient.jar -targetserver 192.168.40.11:3700 -xml sun-acc.xml
java.lang.NullPointerException
at org.glassfish.appclient.client.acc.ACCLogger$1.run(ACCLogger.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.glassfish.appclient.client.acc.ACCLogger.reviseLogger(ACCLogger.java:146)
at org.glassfish.appclient.client.acc.ACCLogger.init(ACCLogger.java:93)
at org.glassfish.appclient.client.acc.ACCLogger.(ACCLogger.java:80)
at org.glassfish.appclient.client.AppClientFacade.createBuilder(AppClientFacade.java:360)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:247)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)