users@glassfish.java.net

Re: question on service-ref-name in application client descriptor file

From: Gigi Lee <gigi.lee_at_oracle.com>
Date: Thu, 22 Mar 2007 14:35:15 -0700

Hi Hong,

Thanks for all your prompt replies! I have finally found my problem without having to struggle with getting the right source code for the right binaries to debug.

I was reminded that I could use the console logging to find information. The console returned me a severe failure that I did not see in the server.log. It turns out that one of the classes referenced by the WSAppClient is missing.

After I manually patched the classes, the ear deploys fine. I do not understand why I would have succeeded in the command line at this point. Even my coworked tried it and had experienced the samething.

Gigi



Hong Zhang wrote:
> Hi, Gigi
>
>> I am using CTS SunDeploymentManager to deploy those ear files. The
>> SunDeploymentManager uses AppServerConnectionSource to do the
>> deployment. The only difference from the command line that I can tell
>> is that it uses the option "enable=false". I think the
>> SunDeploymentManager enables it afterwards.
>
> The deployment descriptor parsing (the stack trace) happens before the
> application is enabled/loaded in the container, so the enable=false
> thing should not matter.
> CTS SunDeploymentManager uses JSR88 to deploy. The deployment descriptor
> parsing logic is common to JSR88 deploy and admin cli deploy, so I am
> not sure what's the difference here. Do they take exactly the same
> input, I meant the same deployment plan and the ear?
>
>> I am having problem debugging. I put the debugging options in asadmin
>> script, but my ide gets disconnected immediately.
>
> It didn't help after you set the "suspend" to "y" in the debug option?
>
> - Hong
>
>>
>> Hong Zhang wrote:
>>
>>> Hi, Gigi
>>>
>>>> Strangely, the WSAppclient class has the correct
>>>> "service/wsw2jdlhttptest" string and I can deploy my ear files
>>>> successfully through asadmin
>>>>
>>>> asadmin deploy --user admin --deploymentplan
>>>> giglee-ts-deployment-plan15362.jar
>>>> vi_built_WSW2JDLHeaderTest_wsappclient_vehicle.ear
>>>
>>> So if asadmin deploy works, what did not work for you? The admin
>>> console deploy?
>>>
>>>> What could possibly be the difference?
>>>>
>>>> Any suggestions of how to attach a debugger? I tried adding
>>>> debugging flags in asadmin, but the debugger immediately got
>>>> disconnected.
>>>
>>> Try to set the suspend property to yes, so it would wait for the
>>> debugger to attach. Something like this:
>>>
>>> "-Xdebug
>>> -Xrunjdwp:transport=dt_socket,address=6789,server=y,suspend=*y*"
>>>
>>> - Hong
>>>
>>>> Appreciate for any help out there!
>>>>
>>>> Gigi
>>>>
>>>> Hong Zhang wrote:
>>>>
>>>>> Hi, Gigi
>>>>> From the stack trace, it seems there is a mismatch with the
>>>>> service-ref element defined in sun-application-client.xml with the
>>>>> element defined through application-client.xml or @WebServiceRef .
>>>>> If you define this service ref through @WebServiceRef
>>>>> annotation, the name attribute should match the service-ref-name in
>>>>> service-ref element in sun-application-client.xml:
>>>>> "service/wsw2jdlhttptest". Or if you define this through
>>>>> application-client.xml, service-ref-name of the service-ref element
>>>>> there should match the sun-appclient-client.xml one
>>>>> "service/wsw2jdlhttptest".
>>>>>
>>>>> - Hong
>>>>>
>>>>> Gigi Lee wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have been unable to deploy a webservice client application due
>>>>>> to the following error:
>>>>>>
>>>>>> com.sun.enterprise.deployment.backend.IASDeploymentException:
>>>>>> Error loading deployment descriptors for module
>>>>>> [v_WSW2JDLHttpTest_wsappclient_vehicle] -- This applica
>>>>>> tion client has no service refernce by the name
>>>>>> service/wsw2jdlhttptest
>>>>>> I have checked my service wsw2jdlhttptest and it is indeed
>>>>>> deployed fine. Also, I am able to deploy the client ear with the
>>>>>> same deployment plan jar from the command line. The stack trace
>>>>>> is shown below, can any one give me an idea what the sun Deployer
>>>>>> is looking for for server-ref-name? What is it trying to do when
>>>>>> it calls ApplicationClientDescriptor.getServiceReferenceByName()?
>>>>>>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Gigi
>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:362)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:327)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:332)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:182)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
>>>>>>>
>>>>>>> Caused by: java.lang.IllegalArgumentException: This application
>>>>>>> client has no service refernce by the name service/wsw2jdlhttptest
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.ApplicationClientDescriptor.getServiceReferenceByName(ApplicationClientDescriptor.java:329)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.node.runtime.ServiceRefNode.setElementValue(ServiceRefNode.java:110)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:408)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>>>>>>>
>>>>>>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:279)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.archivist.Archivist.readRuntimeDeploymentDescriptor(Archivist.java:514)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.archivist.ApplicationArchivist.readRuntimeDeploymentDescriptor(ApplicationArchivist.java:387)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:320)
>>>>>>>
>>>>>>> ... 11 more
>>>>>>> |#]
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>>>> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
>>>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>>> <mailto:users-help_at_glassfish.dev.java.net>
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>>> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
>>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>> <mailto:users-help_at_glassfish.dev.java.net>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>> <mailto:users-help_at_glassfish.dev.java.net>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>