Closed glassfishrobot closed 14 years ago
@glassfishrobot Commented 1xpert said: Created an attachment (id=3643) domain1.jar from v2.1 installation
@glassfishrobot Commented 1xpert said: Created an attachment (id=3644) v3's server.log
@glassfishrobot Commented 1xpert said: change synopsis
@glassfishrobot Commented bbissett said: Will hopefully get to this tomorrow. Can you tell me if this is a new test or a regression?
@glassfishrobot Commented 1xpert said: This is a new issue. Previously, I ran these webservices tests and it was hanging per issue 9734. Now, the hang part is fixed. I now try to run these application and could not get the app to run.
@glassfishrobot Commented bbissett said: Note, this test case fails for me even when I try to run it manually against the v2.1 server (but 'ant all' works when I run in the harness):
hostname% ../bin/appclient -client ./ws-taxcalAppClient.jar -name ws-taxcalClient -textauth -user
j2ee -password j2ee -xml ~/servers/gfv2.1/glassfish/domains/domain1/config/sun-acc.xml
http://localhost:8080/TaxCalWSServlet/statetaxservlet
http://localhost:8080/TaxCalWSServlet/fedtaxservlet
State tax from servlet based TaxCalService :24000.0
Value of key is: StateTaxPort
Fed tax from Servlet based TaxCalService :18000.0
Value of key is: FedTaxPort
Reporter exception occurred!
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at com.sun.ejte.ccl.reporter.SimpleReporterAdapter.printStatus(SimpleReporterAdapter.java:104)
at
com.sun.ejte.ccl.reporter.SimpleReporterAdapter.printSummary(SimpleReporterAdapter.java:168)
at com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalClient.main(TaxCalClient.java:47)
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.
But it is at least talking to the endpoint. With v3, I see the class not found error.
v2.1: hostname% jar tvf ws-taxcalAppClient.jar 3646 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/TaxCalServletService_SerializerRegistry.class 4860 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/StateTaxIF_getStateTax_RequestStruct_SOAPSerializer.clas s 4840 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/FedTaxIF_getFedTax_RequestStruct_SOAPSerializer.class 4610 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/FedTaxIF_getFedTax_ResponseStruct_SOAPSerializer.class 8551 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/FedTaxIF_Tie.class 8619 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/StateTaxIF_Tie.class 4630 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/StateTaxIF_getStateTax_ResponseStruct_SOAPSerializer.cl ass 7482 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/FedTaxIF_Stub.class 4894 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/StateTaxIF_getStateTax_RequestStruct_2_SOAPSeria lizer.class 4644 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/FedTaxIF_getFedTax_ResponseStruct_2_SOAPSeriali zer.class 7548 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/StateTaxIF_Stub.class 4874 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/FedTaxIF_getFedTax_RequestStruct_2_SOAPSerializ er.class 3724 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/TaxCalServletService_SerializerRegistry.class 4664 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/StateTaxIF_getStateTax_ResponseStruct_2_SOAPSer ializer.class 4347 Mon Nov 02 13:18:44 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/TaxCalServletService_Impl.class 9903 Mon Nov 02 13:18:44 EST 2009 ws-taxcal-client.jar 27376 Mon Nov 02 13:18:44 EST 2009 reporter.jar 449 Mon Nov 02 13:18:44 EST 2009 META-INF/application.xml 431 Mon Nov 02 13:18:44 EST 2009 META-INF/sun-application.xml
v3: hostname% jar tvf ws-taxcalAppClient.jar 167 Mon Nov 02 13:28:26 EST 2009 META-INF/MANIFEST.MF 1067 Mon Nov 02 13:28:26 EST 2009 org/glassfish/appclient/client/AppClientGroupFacade.class
However, I do see the hostname% jar tvf ws-taxcalAppClient/ws-taxcal-client.jar 250 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/FedTaxIF.class 677 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/FedTaxIF_getFedTax_RequestStruct.class 508 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/FedTaxIF_getFedTax_ResponseStruct.class 458 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/FedTaxIF_Impl.class 256 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/StateTaxIF.class 685 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/StateTaxIF_getStateTax_RequestStruct.class 516 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/StateTaxIF_getStateTax_ResponseStruct.class 466 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/StateTaxIF_Impl.class 4079 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/TaxCalClient.class 452 Mon Nov 02 13:24:24 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/TaxCalServletService.class 819 Mon Nov 02 13:24:24 EST 2009 META-INF/application-client.xml 417 Mon Nov 02 13:24:24 EST 2009 META-INF/sun-application-client.xml 2624 Mon Nov 02 13:24:24 EST 2009 META-INF/wsdl/TaxCalServletService.wsdl 4571 Mon Nov 02 13:24:24 EST 2009 TaxCalClientMapping.xml 172 Mon Nov 02 13:24:24 EST 2009 META-INF/MANIFEST.MF
I need to check what the expected behavior is, e.g., are the downloaded appclient bits supposed to be run in a different way?
@glassfishrobot Commented bbissett said: Is there a gfv3 version of this test?
@glassfishrobot Commented @tjquinno said: Adding a shorter (I hope) version of some comments in e-mail Bobby and I exchanged:
Clients downloaded from v3 look quite a bit different from v2:
1. GlassFish v2 created a single large generated JAR containing all JARs needed by the client, including the app client JAR, library JARs, etc. As part of launching a client the v2 ACC would expand this JAR into a temp directory. In v3 the downloaded bits are, basically, "pre-expanded" so that no expansion occurs during launch. As such several separate files are downloaded in v3.
2. But, despite #1, the downloaded JAR with which users work - the one that users would specify on the appclient command, is named the same and is downloaded into the same place as in v2. Its contents are much different but the externally-observed behavior of launching it with the appclient command should be the same as in v2.
(As for the failure you noticed even running against v2.x, I think this might result from a missing client argument on the command line. The reporter logic which runs after the test finishes is trying to do something with the args array, expecting something to be there, but it's empty. I could be wrong, but I think that's it and I don't think it's related to the underlying problem with the missing class.)
@glassfishrobot Commented 1xpert said: Bobby, You can ignore the following exception seen in v2.1 because it is missing the reporter.jar. I am guessing this jar was not included when we try to get client stubs e.g. asadmin get-client-stubs...
Reporter exception occurred!
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at
com.sun.ejte.ccl.reporter.SimpleReporterAdapter.printStatus(SimpleReporterAdapter.java:104)
at
com.sun.ejte.ccl.reporter.SimpleReporterAdapter.printSummary(SimpleReporterAdapter.java:168)
at
com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalClient.main(TaxCalClient.java:47)
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.
@glassfishrobot Commented bbissett said: Thanks, but I think the StringIndexOutOfBoundsException issue is actually coming from code inside reporter.jar – it's bundled inside ws-taxcalAppClient.jar.
I may end up needing a standalone test case for this without the sqe harness overhead. Will let you know.
@glassfishrobot Commented @tjquinno said: About the index out of bounds - yup, I agree that the reporter code is running. I think it's looking for a command line argument that's normally provided by the testing framework but I don't know what the value should be to make it work. It might just be a name or something.
@glassfishrobot Commented bbissett said: The actual line is: String ejte_home = rootpath.substring(0, rootpath.indexOf(ws_home));
'ws_home' is set to various things in that class. But that's an issue for another day.
@glassfishrobot Commented bbissett said: Even without involving upgrade, I can't get this application to work with v3. Deploying it directly and accessing it leads to class not found errors about the reporter.jar. Normally if an app doesn't run on v3, then it isn't a valid test case since the upgrade couldn't happen anyway.
Rather than close it as invalid, I'd like to find out what's wrong with the app or try one from scratch to make sure the upgrade works. Can you please find out who owns this test and if there's a v3 version of it so I can check the packaging in that one? I have too many questions about what's supposed to happen (for instance where reporter.jar is supposed to go) that have probably already been answered. Am dropping this to a P3 since the test currently isn't usable.
@glassfishrobot Commented bbissett said: I can reproduce now and am debugging. Will attach the ear file for ws-taxcalApp that doesn't rely on reporter.jar.
Notes:
1) The original test case can't work in v3 due to packaging issues with a reporter.jar used to collect/report test results. I've removed that code from the client and rebuilt the ear file. With this ear file I can deploy to either v2.1 or v3, download the app client code and run it successfully.
2a) Deploying to v2.1, in the generated folder I see everything under
2b) Deploying to v3, in the generated folder I see two dirs under
2c) I was wondering if the upgrade would keep the original structure, which could cause problems, but I see that the proper thing happens and the upgraded domain has the same tree structure as the straight v3 deployment. Good. So both domains have all the generated classes needed for the app client to download.
3a) Downloading from the straight v3 deployment, I see all the needed classes in the *clientClient.jar file.
3b) Downloading from the upgraded domain, the *clientClient.jar file only has org.glassfish.appclient.client.AppClientFacade in it and none of the test classes (the whole com.sun.s1peqe.etc structure is missing).
@glassfishrobot Commented @tjquinno said: Based on this from your latest edit:
3b) Downloading from the upgraded domain, the *clientClient.jar file only has org.glassfish.appclient.client.AppClientFacade in it and none of the test classes (the whole com.sun.s1peqe.etc structure is missing).
it would seem that, somehow, the correct files are not being added to that JAR during the upgrade-triggered redeployment. This could be due to the app client deployer failing to add classes that have been registered with the ClientArtifactsManager into the JAR. Or, it could be due to the required classes not being added to that manager in the first place. Your recent e-mail noted that the same classes are added to the ClientArtifactsManager in either case, so the more probable cause is something going wrong when the generated client JAR is populated.
@glassfishrobot Commented bbissett said: After not finding anything in the generated domain info I have, I realized I can reproduce the problem without involving upgrade. Not sure what category this should be.
If I start a new v3 server and deploy the test app (I'll attach it after submitting this comment) by copying it to the autodeploy dir, I can download the app client bits once and the proper classes are in the jar file:
hostname% jar tvf takeA/ws-taxcalAppClient/ws-taxcal-clientClient.jar| grep Impl 4347 Thu Nov 05 12:45:50 EST 2009 com/sun/s1peqe/webservices/servlet/taxcal/client/TaxCalServletService_Impl.class
However, if I restart the server and download the app client jars again (in a new dir), the whole com/* tree is missing from the jar file:
hostname% jar tvf ws-taxcalAppClient/ws-taxcal-clientClient.jar| grep Impl hostname% jar tvf ws-taxcalAppClient/ws-taxcal-clientClient.jar| grep com hostname% jar tvf ws-taxcalAppClient/ws-taxcal-clientClient.jar| grep org 18417 Thu Nov 05 12:48:52 EST 2009 org/glassfish/appclient/client/AppClientFacade.class
So I don't think this is related to upgrade, but is simply a symptom of something that happened because the server was restarted. I need to snapshot the domain during the 1st 'get-client-stubs' call and compare that to the domain after a shutdown.
BTW, the call to download the app client bits for the web app I'll attach is: asadmin get-client-stubs --appname ws-taxcalApp .
@glassfishrobot Commented bbissett said: Created an attachment (id=3779) Test application used to show the problem.
@glassfishrobot Commented bbissett said: Ok, I see now that during deployment, the client artifacts are added to ClientArtifactsManager, which is stored as transient app meta data in the deployment context. That explains why I don't see what I'm looking for in the domain files. During the redeployment that happens at restart, JaxRpcRICodegen isn't adding these files.
Am moving to web_services subcomponent will keep the bug unless Bhakti really wants it.
@glassfishrobot Commented bbissett said: Fixed in revision 34023. The original test won't run on v3 without repackaging reporter.jar so that it's available to the code (or remove it from the client like I did). But with this change the downloaded app client jars have the same classes in them after a server restart.
@glassfishrobot Commented File: domain1.jar Attached By: 1xpert
@glassfishrobot Commented File: server.log Attached By: 1xpert
@glassfishrobot Commented File: ws-taxcalApp.ear Attached By: bbissett
@glassfishrobot Commented Was assigned to bbissett
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-10612
@glassfishrobot Commented Reported by 1xpert
@glassfishrobot Commented Marked as fixed on Friday, November 6th 2009, 5:34:28 am
Sideybside upgrade from v2.1 to v3 on linux 5.0 and cli mode Using build v3 latest-glassfish.zip from http://glassfish.dev.java.net 10/22/09 promoted build
After upgrade to v3, could not run webservices application successfully. Got ClassNotFoundException
Steps to reproduce: 1) install v2.1, start domain
2) checkout quicklooks test
set variables: set CVSROOT to :pserver:@cvs.dev.java.net:/cvs
set APS_HOME to point to /appserv-tests
set S1AS_HOME to point to appserver or glassfish server
set JAVA_HOME to point to 1.6.0_14
set ANT_HOME to point to 1.6.5
set PATH to point to $ANT_HOME/bin:$JAVA_HOME/bin:$PATH
cvs login cvs co -r SJSAS91_FCS_BRANCH glassfish/appserv-tests
cd/appserv-tests/sqetests/webservices
execute 2 tests under this directory e.g. ant clean build setup deploy run (do not run "ant undeploy unsetup")
3) stop domain1
4) install v3
5) run "asupgrade" tool from/bin/asupgrade -c
After upgrade, run the test manually:
/usr/nga/v3/glassfishv3/glassfish/bin/asadmin get-client-stubs --appname ws-taxcalApp .
/usr/nga/v3/glassfishv3/glassfish/bin/appclient -cli ent ./ws-taxcalAppClient.jar -name ws-taxcalClient -textauth -user j2ee -passwor d j2ee -xml /usr/nga/v3/glassfishv3/glassfish/domains/domain1/config/sun-acc.xml http://localhost:8080/TaxCalWSServlet/statetaxservlet http://localhost:8080/Tax CalWSServlet/fedtaxservlet Oct 27, 2009 7:50:20 AM com.sun.enterprise.transaction.JavaEETransactionManagerS implified initDelegates INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelega te as the delegate Oct 27, 2009 7:50:21 AM org.glassfish.webservices.WebServiceReferenceManagerImpl resolveWSReference WARNING: java.lang.ClassNotFoundException: com.sun.s1peqe.webservices.servlet.taxcal.clie nt.TaxCalServletService_Impl at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.glassfish.appclient.client.acc.ACCClassLoader.findClass(ACCClassL oader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSRef erence(WebServiceReferenceManagerImpl.java:97) at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$WebS erviceRefProxy.create(ComponentEnvManagerImpl.java:972) at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(Glas sfishNamingManagerImpl.java:688) at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(Glas sfishNamingManagerImpl.java:657) at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.j ava:148) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.jav a:429) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalClient.main(Ta xCalClient.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClien tContainer.java:424) at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade .java:148) at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGro upFacade.java:64) javax.naming.NamingException: Lookup failed for 'java:comp/env/service/TaxCalSer vletService' in SerialContext targetHost=easqelx14.red.iplanet.com,targetPort=37 00 [Root exception is javax.naming.NamingException [Root exception is java.lang. ClassNotFoundException: com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalS ervletService_Impl]] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.jav a:443) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalClient.main(Ta xCalClient.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClien tContainer.java:424) at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade .java:148) at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGro upFacade.java:64) Caused by: javax.naming.NamingException [Root exception is java.lang.ClassNotFou ndException: com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalServletServi ce_Impl] at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSRef erence(WebServiceReferenceManagerImpl.java:235) at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$WebS erviceRefProxy.create(ComponentEnvManagerImpl.java:972) at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(Glas sfishNamingManagerImpl.java:688) at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(Glas sfishNamingManagerImpl.java:657) at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.j ava:148) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.jav a:429) ... 9 more Caused by: java.lang.ClassNotFoundException: com.sun.s1peqe.webservices.servlet. taxcal.client.TaxCalServletService_Impl at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.glassfish.appclient.client.acc.ACCClassLoader.findClass(ACCClassL oader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSRef erence(WebServiceReferenceManagerImpl.java:97) ... 14 more Generating report at /usr/nga/v3/workspace/v2/glassfish/appserv-tests/test_re sults.xml Reporter exception occurred! java.lang.NullPointerException at com.sun.ejte.ccl.reporter.Reporter.setTestSuite(Reporter.java:51) at com.sun.ejte.ccl.reporter.SimpleReporterAdapter.printStatus(SimpleRep orterAdapter.java:110) at com.sun.ejte.ccl.reporter.SimpleReporterAdapter.printSummary(SimpleRe porterAdapter.java:168) at com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalClient.main(Ta xCalClient.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClien tContainer.java:424) at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade .java:148) at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGro upFacade.java:64) in flushAll , creating new testSuiteHash [root@easqelx14 servletws]#
Manual run of ejbws after upgrade:
/usr/nga/v3/glassfishv3/glassfish/bin/asadmin get-client-stubs --appname ws-ejbtaxcalApp .
Environment
Operating System: All Platform: Sun
Affected Versions
[V3]