axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lahiru Sandakith (JIRA)" <>
Subject [jira] Commented: (AXIS2-2263) Cannot run generated Java client code (Eclipse). Get exception in: org.apache.axis2.description.ClientUtils.inferInTransport(
Date Thu, 22 Mar 2007 16:11:32 GMT


Lahiru Sandakith commented on AXIS2-2263:

Hi John, 

I believe that simply replacing the axis2-1.1.jar would not solve the issue, since other axis2
dependencies for example like axion-*.jars will be also needed to replace. So its better that
to replace all the jars. But better that if you can build the plugin from the source distribution
according to readme.txt module/tools. 

But since you dont have any encoded bindings now, the earlier plugins  that worked for you
will be fine, and will do the job for you. The nightly has the fix for earlier problem that
you raised.



> Cannot run generated Java client code (Eclipse). Get exception in: org.apache.axis2.description.ClientUtils.inferInTransport(
> -------------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: AXIS2-2263
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb, client-api, codegen
>    Affects Versions: 1.1.1
>         Environment: Axis2: 1.1.1
> Code Generator Wizard - Eclipse plugin: 1.2.1 (for Axis2 1.1.1)
> JVM: 1.5.0 (and 1.4.2)
> Eclipse: 3.2.1
>            Reporter: John Dalsgaard
>         Assigned To: Lahiru Sandakith
>            Priority: Blocker
>             Fix For: nightly
>         Attachments: Screenshot-Error.png
> I have used AXIS1 for quite some time - but only for generating and running clients to
call webservices. Due to the statements about improved memory handling and performance I would
like to start using AXIS2 instead. This has also been triggered by a system I am working on
that uses AXIS1 - and it has some stability issues.
> In my final setup I incoorporate the webservice clients in Lotus Notes/Domino (hence
the need for running JVM 1.4.2). But for the current issue I have isolated the problem to
running the code inside Eclipse. 
> Ideally, I would like to use the xmlbeans databinding (to be able to handle more complex
WSDLs). Though the Java client is slightly different, executing a client generated with xmlbeans
databinding gives exactly the same error as using the default (adb) as shown below. Therefore,
I am assuming that something is wrong with my configuration/setup. After having tried a number
of things (including generating code from different WSDLs, installing the full Axis2 distribution,
setting environment variables, trying to set Options and Configurations in the Java code)
I ended up with trying the very simple webservice in the scenario below. And it still fails
> These are the steps I have performed:
> =====================================
> 1. Downloaded and installed the Codegen plugin for Eclipse (
> 2. Created a new Java project in Eclipse (using default JRE 1.5.0). I configured the
source ("src") and default output ("bin") folders in the project properties.
> 3. Ctrl+N and selected "Axis2 Code Generator"
> 4. Selected "Generate Java source code from a WSDL file"
> 5. Use WSDL:
> 6. Use default options
> 7. Browse and select the project in Eclipse (output path)
> 8. Select "Add Axis2 libraries to the codegen result project". Pick: C:\Program Files\eclipse\plugins\Axis2_Codegen_Wizard_1.2.1
and press "Check Libs" - Message: "Axis libs loaded successfully !!" is shown.
> 9. Press "Finish" - and message "All operations completed successfully" is shown.
> 10. Refresh the project by right-clicking on the project and selecting "Refresh". Now
I can see the "src" folder with the Java code, the "bin" folder with the classes, and the
"lib" folder with the 15 Axis2 jar files.
> 11. Open the project properties, select "Libraries" and "Add JARs...". Select all the
jar files under the project's "lib" folder.
> 12. Create a new Java Class "TestGet" with the following source:
> import org.apache.axis2.AxisFault;
> import defaultnamespace.GetSubjectServiceStub;
> import defaultnamespace.GetSubjectServiceStub.GetNthField;
> import defaultnamespace.GetSubjectServiceStub.GetNthFieldResponse;
> public class TestGet {
> 	public static void main(String[] args) {
> 		try {
> 			String endPoint = "";
> 			GetSubjectServiceStub stub = new GetSubjectServiceStub(endPoint);
> 			GetNthField func = new GetNthField();
> 			func.setDbname("d-d/wsdemo.nsf");
> 			func.setViewname("people");
> 			func.setN(1);
> 			func.setFieldname("name");
> 			GetNthFieldResponse resp = stub.getNthField(func);
> 			String x = resp.getGetNthFieldReturn();
> 			System.out.println(x);
> 		} catch (AxisFault axisFault) {
> 			axisFault.printStackTrace();
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 		}
> 	}
> }
> 13. Right-click on the client program and select "Run As Java Application"
> 14. The code fails with the following error:
> log4j:WARN No appenders could be found for logger (
> log4j:WARN Please initialize the log4j system properly.
> java.lang.NullPointerException
> 	at org.apache.axis2.description.ClientUtils.inferInTransport(
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(
> 	at defaultnamespace.GetSubjectServiceStub.getNthField(
> 	at TestGet.main(
> What am I doing wrong???
> Thank you in advance!
> John

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message