Bug 189732 - appclient debugging is broken in nb691
appclient debugging is broken in nb691
Status: RESOLVED FIXED
Product: javaee
Classification: Unclassified
Component: Debugger
6.x
PC Windows 7 x64
: P3 (vote)
: 7.0
Assigned To: Martin Entlicher
issues@javaee
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-21 01:09 UTC by emiddio
Modified: 2010-08-23 00:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emiddio 2010-08-21 01:09:17 UTC
trying to debug appclient project to gfv301;

get following error:


init:
EJBModule3.init:
EJBModule3.deps-jar:
EJBModule3.compile:
EJBModule3.library-inclusion-in-archive:
EJBModule3.dist:
deps-jar:
compile:
library-inclusion-in-archive:
Building jar: C:\Sun\JavaProjects\nb691\ApplicationClient3\dist\ApplicationClient3.jar
dist:
pre-run-deploy:
Redeploying C:\Sun\JavaProjects\nb691\ApplicationClient3\dist\ApplicationClient3.jar
post-run-deploy:
run-deploy:
Copying 1 file to C:\Sun\JavaProjects\nb691\ApplicationClient3\dist
debug-tool:
org.glassfish.appclient.client.acc.UserError: ACC007: The app client directory C:\Sun\JavaProjects\nb691\ApplicationClient3 does not contain a manifest; the app client container cannot process it.  Embedded programs should pass URIs with scheme "jar:" for JAR files and scheme "file:" for directories.
Java Result: 1
C:\Sun\JavaProjects\nb691\ApplicationClient3\nbproject\build-impl.xml:792: The following error occurred while executing this line:
C:\Sun\JavaProjects\nb691\ApplicationClient3\nbproject\build-impl.xml:430: 
org.netbeans.api.debugger.jpda.DebuggerStartException: Connection refused: connect
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.waitRunning(JPDADebuggerImpl.java:374)
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.waitRunning(JPDADebuggerImpl.java:356)
        at org.netbeans.api.debugger.jpda.JPDADebugger.attach(JPDADebugger.java:295)
        at org.netbeans.modules.debugger.jpda.ant.JPDAConnect$1.run(JPDAConnect.java:226)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:204)
        at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)
        at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:72)
        at org.netbeans.api.debugger.jpda.AttachingDICookie.getVirtualMachine(AttachingDICookie.java:223)
        at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.doStartDebugger(StartActionProvider.java:184)
        at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.access$200(StartActionProvider.java:80)
        at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$1.run(StartActionProvider.java:161)
        ... 2 more
BUILD FAILED (total time: 5 seconds)
Comment 1 emiddio 2010-08-21 01:39:34 UTC
nb691 appclient debugging broken with gfv211 also; see error below:

note: netbeans is attached to the gfv211 debuggger after the program completes
and never stopped at any breakpoints;

have to manually deattach from debugger:


init:
EJBModule2.init:
EJBModule2.deps-jar:
EJBModule2.wscompile-init:
EJBModule2.NewWebService2_wscompile:
command line: wscompile "C:\Program Files\Java\jdk1.6.0_20\jre\bin\java.exe" -classpath "C:\Program Files\Java\jdk1.6.0_20\lib\tools.jar;C:\Sun\gfv211\lib\endorsed\webservices-api.jar;C:\Sun\gfv211\lib\j2ee.jar;C:\Sun\gfv211\lib\appserv-ws.jar;C:\Sun\gfv211\lib\webservices-tools.jar;C:\Sun\gfv211\lib\webservices-rt.jar;C:\Sun\JavaProjects\nb691\EJBModule2\build\classes" com.sun.xml.rpc.tools.wscompile.Main -d C:\Sun\JavaProjects\nb691\EJBModule2\build\generated\jax-rpc-binaries -define -features:documentliteral,strict,useonewayoperations -keep -mapping C:\Sun\JavaProjects\nb691\EJBModule2\build\classes\META-INF\NewWebService2-mapping.xml -nd C:\Sun\JavaProjects\nb691\EJBModule2\build\classes\META-INF\wsdl -s C:\Sun\JavaProjects\nb691\EJBModule2\build\generated-sources\jax-rpc -verbose -Xprintstacktrace C:\Sun\JavaProjects\nb691\EJBModule2\src\java\com\geb\NewWebService2-config.xml
[creating model: NewWebService2]
[creating service: NewWebService2]
[creating port: com.geb.NewWebService2SEI]
[creating operation: operation]
EJBModule2.compile:
EJBModule2.library-inclusion-in-archive:
Building jar: C:\Sun\JavaProjects\nb691\EJBModule2\dist\EJBModule2.jar
EJBModule2.dist:
deps-jar:
wscompile-init:
NewWebService2-client-wscompile:
web-service-client-generate:
compile:
library-inclusion-in-archive:
Copying 1 file to C:\Sun\JavaProjects\nb691\ApplicationClient2\build\jar\META-INF\lib
Building jar: C:\Sun\JavaProjects\nb691\ApplicationClient2\dist\ApplicationClient2.jar
dist:
pre-run-deploy:
Redeploying C:\Sun\JavaProjects\nb691\ApplicationClient2\dist\ApplicationClient2.jar
Start registering the project's server resources
Finished registering server resources
While redeploying, trying to stop the application in target server  completed successfully
While redeploying, trying to remove reference for application in target server  completed successfully
deployment started : 0%
deployment finished : 100%
Deploying application in domain completed successfully
Trying to create reference for application in target server  completed successfully
Trying to start application in target server  completed successfully
Deployment of application ApplicationClient2  completed successfully
All operations completed successfully
Enable of ApplicationClient2 in target server completed successfully
Enable of application in all targets  completed successfully
All operations completed successfully
post-run-deploy:
run-deploy:
Copying 1 file to C:\Sun\JavaProjects\nb691\ApplicationClient2\dist
debug-tool:
Non-existing path "C:\Sun\gfv211\lib\dom.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\xalan.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\xercesImpl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\jaxrpc-impl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\saaj-impl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\jaxr-impl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\relaxngDatatype.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\xsdlib.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\fscontext.jar" provided.
Have no file for C:\Sun\gfv211\lib\dom.jar
Have no file for C:\Sun\gfv211\lib\xalan.jar
Have no file for C:\Sun\gfv211\lib\xercesImpl.jar
Have no file for C:\Sun\gfv211\lib\jaxrpc-impl.jar
Have no file for C:\Sun\gfv211\lib\saaj-impl.jar
Have no file for C:\Sun\gfv211\lib\jaxr-impl.jar
Have no file for C:\Sun\gfv211\lib\relaxngDatatype.jar
Have no file for C:\Sun\gfv211\lib\xsdlib.jar
Have no file for C:\Sun\gfv211\lib\fscontext.jar
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
Java Result: 1
Attached JPDA debugger to localhost:9009
debug-jar:
debug:
BUILD SUCCESSFUL (total time: 7 seconds)
Comment 2 Martin Entlicher 2010-08-22 09:17:43 UTC
In the first case the debugger can not connect, because the application seems to exit:
org.glassfish.appclient.client.acc.UserError: ACC007: The app client directory
C:\Sun\JavaProjects\nb691\ApplicationClient3 does not contain a manifest; the
app client container cannot process it.  Embedded programs should pass URIs
with scheme "jar:" for JAR files and scheme "file:" for directories.
Java Result: 1

Therefore we get ConnectException: Connection refused: connect
This can not be fixed in debugger.

In the second case there is a lot of errors:
Have no file for C:\Sun\gfv211\lib\dom.jar
Have no file for C:\Sun\gfv211\lib\xalan.jar
Have no file for C:\Sun\gfv211\lib\xercesImpl.jar
Have no file for C:\Sun\gfv211\lib\jaxrpc-impl.jar
Have no file for C:\Sun\gfv211\lib\saaj-impl.jar
Have no file for C:\Sun\gfv211\lib\jaxr-impl.jar
Have no file for C:\Sun\gfv211\lib\relaxngDatatype.jar
Have no file for C:\Sun\gfv211\lib\xsdlib.jar
Have no file for C:\Sun\gfv211\lib\fscontext.jar

The application can not be started, because the socket address is in use: 
transport error 202: bind failed: Address already in use

Please restart the GlassFish server, some stale process is likely holding the socket.
Comment 3 emiddio 2010-08-22 18:49:46 UTC
ok -- i will investigate 2nd case more; but 1st case you say is not a debugger issue; but things dont work -- so where should i file a bug ?

thanks
Comment 4 emiddio 2010-08-22 20:00:15 UTC
ok -- focusing in this post is only on the gfv211 problems;

the --
The application can not be started, because the socket address is in use: 
transport error 202: bind failed: Address already in use

was caused because i had configured gfv211 to automatically start in debug
mode.

after correcting i can now debug the application.

HOWEVER -- please note -- i built these 6 apps -- 3 ejb, 3 appclients
specifically for the purpose of testing simple nb691/gfv211 j2ee 1.4 features
and debugging.

EJBModule2 is a j2ee1.4 jax-rpc web-svc, and EJB stateless session bean --
both have single methods --that simple returns the string passed in.

EJBModule3 is Stateless session bean only (j2ee1.4) with same method kind.

EJBModule 4 is only j2ee1.4 jax-rpc web svc with same method kind;

the appclients 2,3 4 --match the EJB's --2,3,4;

all 3 EJB, and 3 AppClients run successfully without any errors when not
being debugged. they also do not get the "have no file for..." messages.

the other errors :
Have no file for C:\Sun\gfv211\lib\dom.jar
Have no file for C:\Sun\gfv211\lib\xalan.jar
Have no file for C:\Sun\gfv211\lib\xercesImpl.jar
Have no file for C:\Sun\gfv211\lib\jaxrpc-impl.jar
Have no file for C:\Sun\gfv211\lib\saaj-impl.jar
Have no file for C:\Sun\gfv211\lib\jaxr-impl.jar
Have no file for C:\Sun\gfv211\lib\relaxngDatatype.jar
Have no file for C:\Sun\gfv211\lib\xsdlib.jar
Have no file for C:\Sun\gfv211\lib\fscontext.jar

--come from the nbproject/private/private.properties file(s) -- nb691 put them into the file -- of the AppClient projects;

i dont understand why they are there -- since not needed for runtime -- since
the code works; and the jars do not exist in gfv211 either.

HOWEVER -- now i can debug all 3 appclients -- but only the SessionBean method
only project -- will run correctly while debugging.

The 2 projects that use jax-rpc will not run while debugging -- they get the error to be posted at end of this message.

here is the error log: i will next investigate more the gfv301 issues;
thanks;

init:
deps-jar:
wscompile-init:
NewWebService4-client-wscompile:
web-service-client-generate:
compile:
library-inclusion-in-archive:
Building jar: C:\Sun\JavaProjects\nb691\ApplicationClient4\dist\ApplicationClient4.jar
dist:
pre-run-deploy:
Distributing C:\Sun\JavaProjects\nb691\ApplicationClient4\dist\ApplicationClient4.jar to [localhost:4848_server]
Start registering the project's server resources
Finished registering server resources
deployment started : 0%
deployment finished : 100%
Deploying application in domain completed successfully
Trying to create reference for application in target server  completed successfully
Trying to start application in target server  completed successfully
Deployment of application ApplicationClient4  completed successfully
Enable of ApplicationClient4 in target server completed successfully
Enable of application in all targets  completed successfully
All operations completed successfully
post-run-deploy:
run-deploy:
Copying 1 file to C:\Sun\JavaProjects\nb691\ApplicationClient4\dist
debug-tool:
Non-existing path "C:\Sun\gfv211\lib\dom.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\xalan.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\xercesImpl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\jaxrpc-impl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\saaj-impl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\jaxr-impl.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\relaxngDatatype.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\xsdlib.jar" provided.
Non-existing path "C:\Sun\gfv211\lib\fscontext.jar" provided.
Have no file for C:\Sun\gfv211\lib\dom.jar
Have no file for C:\Sun\gfv211\lib\xalan.jar
Have no file for C:\Sun\gfv211\lib\xercesImpl.jar
Have no file for C:\Sun\gfv211\lib\jaxrpc-impl.jar
Have no file for C:\Sun\gfv211\lib\saaj-impl.jar
Have no file for C:\Sun\gfv211\lib\jaxr-impl.jar
Have no file for C:\Sun\gfv211\lib\relaxngDatatype.jar
Have no file for C:\Sun\gfv211\lib\xsdlib.jar
Have no file for C:\Sun\gfv211\lib\fscontext.jar
Listening for transport dt_socket at address: 9009
Attached JPDA debugger to localhost:9009
Aug 22, 2010 12:40:58 PM com.sun.enterprise.naming.NamingManagerImpl getClientServiceObject
WARNING: 
javax.xml.ws.WebServiceException: null is not a valid service
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:186)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174)
        at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
        at javax.xml.ws.Service.<init>(Service.java:56)
        at javax.xml.ws.Service.create(Service.java:680)
        at com.sun.enterprise.naming.NamingManagerImpl.getClientServiceObject(NamingManagerImpl.java:1216)
        at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:1033)
        at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at applicationclient4.Main.getNewWebService4(Main.java:32)
        at applicationclient4.Main.getNewWebService4SEIPort(Main.java:42)
        at applicationclient4.Main.main(Main.java:19)
        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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Aug 22, 2010 12:40:58 PM applicationclient4.Main getNewWebService4
SEVERE: null
javax.naming.NamingException [Root exception is javax.xml.ws.WebServiceException: null is not a valid service]
        at com.sun.enterprise.naming.NamingManagerImpl.getClientServiceObject(NamingManagerImpl.java:1291)
        at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:1033)
        at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at applicationclient4.Main.getNewWebService4(Main.java:32)
        at applicationclient4.Main.getNewWebService4SEIPort(Main.java:42)
        at applicationclient4.Main.main(Main.java:19)
        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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: javax.xml.ws.WebServiceException: null is not a valid service
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:186)
        at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174)
        at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
        at javax.xml.ws.Service.<init>(Service.java:56)
        at javax.xml.ws.Service.create(Service.java:680)
        at com.sun.enterprise.naming.NamingManagerImpl.getClientServiceObject(NamingManagerImpl.java:1216)
        ... 15 more
Aug 22, 2010 12:40:58 PM applicationclient4.Main main
SEVERE: null
java.lang.NullPointerException
        at applicationclient4.Main.getNewWebService4SEIPort(Main.java:42)
        at applicationclient4.Main.main(Main.java:19)
        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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
debug-jar:
debug:
BUILD SUCCESSFUL (total time: 21 seconds)
Comment 5 emiddio 2010-08-22 20:20:40 UTC
regarding nb691 and gfv301; just created new nb691 appclient;


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package applicationclient5;

/**
 *
 * @author emiddio
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String s = "test";
        System.out.println(s);
    }
}


this code will run;

this code will not debug with gfv301 using nb691;

its either a netbeans 691 or gfv301 bug -- perhaps is not YOUR bug,

so help me to determine where to post the bug report if you are not involved.

thanks
gary

error log below:

init:
deps-jar:
Created dir: C:\Sun\JavaProjects\nb691\ApplicationClient5\build\jar
Copying 3 files to C:\Sun\JavaProjects\nb691\ApplicationClient5\build\jar\META-INF
Created dir: C:\Sun\JavaProjects\nb691\ApplicationClient5\build\empty
Compiling 1 source file to C:\Sun\JavaProjects\nb691\ApplicationClient5\build\jar
compile:
library-inclusion-in-archive:
Created dir: C:\Sun\JavaProjects\nb691\ApplicationClient5\dist
Building jar: C:\Sun\JavaProjects\nb691\ApplicationClient5\dist\ApplicationClient5.jar
dist:
pre-run-deploy:
Redeploying C:\Sun\JavaProjects\nb691\ApplicationClient5\dist\ApplicationClient5.jar
post-run-deploy:
run-deploy:
Copying 1 file to C:\Sun\JavaProjects\nb691\ApplicationClient5\dist
debug-tool:
Attached JPDA debugger to localhost:55364
org.glassfish.appclient.client.acc.UserError: ACC007: The app client directory C:\Sun\JavaProjects\nb691\ApplicationClient5 does not contain a manifest; the app client container cannot process it.  Embedded programs should pass URIs with scheme "jar:" for JAR files and scheme "file:" for directories.
Java Result: 1
debug-jar:
debug:
BUILD SUCCESSFUL (total time: 5 seconds)
Comment 6 emiddio 2010-08-22 20:54:00 UTC
just created 2 more appclients that simple do a System.out.println("test");

one is EE5, other is EE6; both run;

neither will debug;

NOTE -- when trying to debug -- netbeans asks if  server running in debug mode;

i answer NO;

debugging gets an error -- where jpda attaching is refused;
Comment 7 David Konecny 2010-08-23 00:12:53 UTC
There were problems which I resolved for 6.10. I would appreciate if you could grab 6.10 Milestone 1 build (or a recent dev build) and verify that everything works as expected or reopened this issue so that I can fix it for final release of 6.10. Thanks.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo