You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Thilina Gunarathne (JIRA)" <ji...@apache.org> on 2007/01/08 03:58:27 UTC

[jira] Created: (AXIS2-1951) Axis2 Quick Start Guide is not working with JDK 1.5

Axis2 Quick Start Guide is not working with JDK 1.5
---------------------------------------------------

                 Key: AXIS2-1951
                 URL: https://issues.apache.org/jira/browse/AXIS2-1951
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
         Environment: java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)

Linux fawad-desktop 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006
i686 GNU/Linux
            Reporter: Thilina Gunarathne
            Priority: Blocker


Creating a JIRA as per the request from an user..

Hi,

I am following the Axis2 Quick Start Guide section (Getting Ready).

There are two steps for creating a WSDL file:

1.Create and compile the Java class.
For this i am using the sample java class
samples/quickstart/service/pojo/StockQuoteService.java.
then i compiled the file.

fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
javac samples/quickstart/service/pojo/StockQuoteService.javaNote:
samples/quickstart/service/pojo/StockQuoteService.java uses unchecked or
unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

I got the above error, then i did this:

fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
javac -Xlint:unchecked
samples/quickstart/service/pojo/StockQuoteService.javasamples/quickstart/service/pojo/StockQuoteService.java:17:
warning: [unchecked] unchecked call to put(K,V) as a member of the raw
type java.util.HashMap
       map.put(symbol, new Double(price));
              ^
1 warning

Then i got the above mentioned warning. Is there anyway to get rid of this
warning??

My java version is:
fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
java -version
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)


2.The step two was: Generate the WSDL using the following command:

fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
$AXIS2_HOME/bin/java2wsdl.sh -cp . -cn
samples.quickstart.service.pojo.StockQuoteService -of
StockQuoteService.wsdl
Using AXIS2_HOME:   /home/fawad/project/cobra/axis/axis2-1.1
 Using JAVA_HOME:       /usr/lib/jvm/java-1.5.0-sun-1.5.0.08
Unrecognized option: -cn
Could not create the Java virtual machine.

I got the above error. Please help me understand this and get rid of this.

Thanks...
--
Fawad Nazir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [jira] Created: (AXIS2-1951) Axis2 Quick Start Guide is not working with JDK 1.5

Posted by Charitha Kankanamge <ch...@wso2.com>.
I was trying to reproduce this issue. I got the same warnings in the 
first step. (samples\quickstart\service\pojo\StockQuoteService.java uses 
unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked 
for details.)

However I was able to generate the wsdl without getting any errors in 
the second step.  Please check the wsdl generation again.

regards
Charitha

Note :- Tested with java version "1.5.0_06"

Thilina Gunarathne (JIRA) wrote:
> Axis2 Quick Start Guide is not working with JDK 1.5
> ---------------------------------------------------
>
>                  Key: AXIS2-1951
>                  URL: https://issues.apache.org/jira/browse/AXIS2-1951
>              Project: Apache Axis 2.0 (Axis2)
>           Issue Type: Bug
>          Environment: java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
>
> Linux fawad-desktop 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006
> i686 GNU/Linux
>             Reporter: Thilina Gunarathne
>             Priority: Blocker
>
>
> Creating a JIRA as per the request from an user..
>
> Hi,
>
> I am following the Axis2 Quick Start Guide section (Getting Ready).
>
> There are two steps for creating a WSDL file:
>
> 1.Create and compile the Java class.
> For this i am using the sample java class
> samples/quickstart/service/pojo/StockQuoteService.java.
> then i compiled the file.
>
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> javac samples/quickstart/service/pojo/StockQuoteService.javaNote:
> samples/quickstart/service/pojo/StockQuoteService.java uses unchecked or
> unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
>
> I got the above error, then i did this:
>
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> javac -Xlint:unchecked
> samples/quickstart/service/pojo/StockQuoteService.javasamples/quickstart/service/pojo/StockQuoteService.java:17:
> warning: [unchecked] unchecked call to put(K,V) as a member of the raw
> type java.util.HashMap
>        map.put(symbol, new Double(price));
>               ^
> 1 warning
>
> Then i got the above mentioned warning. Is there anyway to get rid of this
> warning??
>
> My java version is:
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> java -version
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
>
>
> 2.The step two was: Generate the WSDL using the following command:
>
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> $AXIS2_HOME/bin/java2wsdl.sh -cp . -cn
> samples.quickstart.service.pojo.StockQuoteService -of
> StockQuoteService.wsdl
> Using AXIS2_HOME:   /home/fawad/project/cobra/axis/axis2-1.1
>  Using JAVA_HOME:       /usr/lib/jvm/java-1.5.0-sun-1.5.0.08
> Unrecognized option: -cn
> Could not create the Java virtual machine.
>
> I got the above error. Please help me understand this and get rid of this.
>
> Thanks...
> --
> Fawad Nazir
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-1951) Axis2 Quick Start Guide is not working with JDK 1.5

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilina Gunarathne resolved AXIS2-1951.
---------------------------------------

    Resolution: Fixed

I was able to generate the WSDL without and issue on Linux with JDK 1.5. 

Charitha also confirmed this by testing on Windows with jdk 1.5..

We can ignore the JSK 1.5 warning due to the HashMap..


> Axis2 Quick Start Guide is not working with JDK 1.5
> ---------------------------------------------------
>
>                 Key: AXIS2-1951
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1951
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
> Linux fawad-desktop 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006
> i686 GNU/Linux
>            Reporter: Thilina Gunarathne
>            Priority: Blocker
>
> Creating a JIRA as per the request from an user..
> Hi,
> I am following the Axis2 Quick Start Guide section (Getting Ready).
> There are two steps for creating a WSDL file:
> 1.Create and compile the Java class.
> For this i am using the sample java class
> samples/quickstart/service/pojo/StockQuoteService.java.
> then i compiled the file.
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> javac samples/quickstart/service/pojo/StockQuoteService.javaNote:
> samples/quickstart/service/pojo/StockQuoteService.java uses unchecked or
> unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> I got the above error, then i did this:
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> javac -Xlint:unchecked
> samples/quickstart/service/pojo/StockQuoteService.javasamples/quickstart/service/pojo/StockQuoteService.java:17:
> warning: [unchecked] unchecked call to put(K,V) as a member of the raw
> type java.util.HashMap
>        map.put(symbol, new Double(price));
>               ^
> 1 warning
> Then i got the above mentioned warning. Is there anyway to get rid of this
> warning??
> My java version is:
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> java -version
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
> 2.The step two was: Generate the WSDL using the following command:
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> $AXIS2_HOME/bin/java2wsdl.sh -cp . -cn
> samples.quickstart.service.pojo.StockQuoteService -of
> StockQuoteService.wsdl
> Using AXIS2_HOME:   /home/fawad/project/cobra/axis/axis2-1.1
>  Using JAVA_HOME:       /usr/lib/jvm/java-1.5.0-sun-1.5.0.08
> Unrecognized option: -cn
> Could not create the Java virtual machine.
> I got the above error. Please help me understand this and get rid of this.
> Thanks...
> --
> Fawad Nazir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1951) Axis2 Quick Start Guide is not working with JDK 1.5

Posted by "Fawad Nazir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462936 ] 

Fawad Nazir commented on AXIS2-1951:
------------------------------------

Got a reply from "Martin Gainty" <mg...@hotmail.com>

> package samples.quickstart.service.pojo;

> 

> import java.util.HashMap;

> 

> public class StockQuoteService {

> //    private java.util.HashMap map = new HashMap();

> //remember templates in C++ well we can do the same thing here in our declaration
for HashMap

>    protected HashMap<String, Double> map = new HashMap<String, Double>();

> 

>    public double getPrice(String symbol) {

>        Double price = (Double) map.get(symbol);

>        if(price != null){

>            return price.doubleValue();

>        }

>        return 42.00;

>    }

> 

>    public void update(String symbol, double price)

>    {

>  //quick sanity check..MCG

>  if(!map.isEmpty())

>  { //technically map.put returns either previous value associated with key or null
if error

>         Object returned_object = map.put(symbol, new Double(price));

>     }

>    }

> }


A small correction:

orrection
the test for map.isEmpty is not needed for put so comment or delete that line

>    public void update(String symbol, double price)

>    {

>  //quick sanity check..MCG

>  if(!map.isEmpty())

>  { //technically map.put returns either previous value associated with key or null
if error

>         Object returned_object = map.put(symbol, new Double(price));

>     }

>    }

to
    public void update(String symbol, double price)
    {
 //technically map.put returns either previous value associated with key or null if
error
         Object returned_object = map.put(symbol, new Double(price));
    }

> Axis2 Quick Start Guide is not working with JDK 1.5
> ---------------------------------------------------
>
>                 Key: AXIS2-1951
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1951
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
> Linux fawad-desktop 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006
> i686 GNU/Linux
>            Reporter: Thilina Gunarathne
>            Priority: Blocker
>
> Creating a JIRA as per the request from an user..
> Hi,
> I am following the Axis2 Quick Start Guide section (Getting Ready).
> There are two steps for creating a WSDL file:
> 1.Create and compile the Java class.
> For this i am using the sample java class
> samples/quickstart/service/pojo/StockQuoteService.java.
> then i compiled the file.
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> javac samples/quickstart/service/pojo/StockQuoteService.javaNote:
> samples/quickstart/service/pojo/StockQuoteService.java uses unchecked or
> unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> I got the above error, then i did this:
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> javac -Xlint:unchecked
> samples/quickstart/service/pojo/StockQuoteService.javasamples/quickstart/service/pojo/StockQuoteService.java:17:
> warning: [unchecked] unchecked call to put(K,V) as a member of the raw
> type java.util.HashMap
>        map.put(symbol, new Double(price));
>               ^
> 1 warning
> Then i got the above mentioned warning. Is there anyway to get rid of this
> warning??
> My java version is:
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> java -version
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
> 2.The step two was: Generate the WSDL using the following command:
> fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$
> $AXIS2_HOME/bin/java2wsdl.sh -cp . -cn
> samples.quickstart.service.pojo.StockQuoteService -of
> StockQuoteService.wsdl
> Using AXIS2_HOME:   /home/fawad/project/cobra/axis/axis2-1.1
>  Using JAVA_HOME:       /usr/lib/jvm/java-1.5.0-sun-1.5.0.08
> Unrecognized option: -cn
> Could not create the Java virtual machine.
> I got the above error. Please help me understand this and get rid of this.
> Thanks...
> --
> Fawad Nazir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org