axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fawad Nazir" <fawad.na...@nicta.com.au>
Subject Re: Unrecognized option: -cn... Could not create the Java virtual machine...
Date Mon, 08 Jan 2007 02:47:26 GMT
Hi Thilina,

I am new to Axis2, i am not sure how to log a JIRA. Can you please send me
the link or explain how can we do it?

BTW, my OS & Java version is:

fawad@fawad-desktop:~$ 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)

fawad@fawad-desktop:~$ uname -a
Linux fawad-desktop 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006
i686 GNU/Linux

Best Regards,
Fawad.

> Fawad, Martin,
> These samples need to work out of the box without any hassle..  We
> need to fix the sample to work in jdk 1.5 (if it's the case)...
>
> Can you please log a JIRA with information about your java -version, OS,
> etc....
>
> Thanks,
> Thilina
>
> On 1/8/07, Fawad Nazir <fawad.nazir@nicta.com.au> wrote:
>> Thanks a lot... Martin.
>>
>> > Here is the fix (I used StockQuoteService frpm
>> quickstart.service.pojo...
>> >
>> > 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));
>> >      }
>> >     }
>> > }
>> >
>> > HTH
>> > MG-
>> > ---------------------------------------------------------------------------
>> > This e-mail message (including attachments, if any) is intended for
>> the
>> > use of the individual or entity to which it is addressed and may
>> contain
>> > information that is privileged, proprietary , confidential and exempt
>> from
>> > disclosure. If you are not the intended recipient, you are notified
>> that
>> > any dissemination, distribution or copying of this communication is
>> > strictly prohibited.
>> > ---------------------------------------------------------------------------
>> > Le présent message électronique (y compris les pièces qui y sont
>> annexées,
>> > le cas échéant) s'adresse au destinataire indiqué et peut contenir des
>> > renseignements de caractère privé ou confidentiel. Si vous n'êtes pas
>> le
>> > destinataire de ce document, nous vous signalons qu'il est strictement
>> > interdit de le diffuser, de le distribuer ou de le reproduire.
>> > ----- Original Message -----
>> > From: "Fawad Nazir" <fawad.nazir@nicta.com.au>
>> > To: <axis-user@ws.apache.org>
>> > Sent: Sunday, January 07, 2007 7:41 PM
>> > Subject: Unrecognized option: -cn... Could not create the Java virtual
>> > machine...
>> >
>> >
>> >>
>> >> 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 email and any attachments may be confidential. They may contain
>> >> legally
>> >> privileged information or copyright material. You should not read,
>> >> copy,
>> >> use or disclose them without authorisation. If you are not an
>> intended
>> >> recipient, please contact us at once by return email and then delete
>> >> both
>> >> messages. We do not accept liability in connection with computer
>> virus,
>> >> data corruption, delay, interruption, unauthorised access or
>> >> unauthorised
>> >> amendment. This notice should not be removed.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: axis-user-help@ws.apache.org
>> >>
>> >>
>>
>>
>> --
>> Fawad Nazir
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> --
> Thilina Gunarathne
> WSO2, Inc.; http://www.wso2.com/
> Home page: http://webservices.apache.org/~thilina/
> Blog: http://thilinag.blogspot.com/
>


-- 
Fawad Nazir


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


Mime
View raw message