Cannot find javax.jws.WebService

Hello
I'm kinda new to this web service thing. I tried to run the hello program using jdk 1.5 update 5. It said it cannot find the javax.jws.WebService. Does anyone know where does this package located so I can set the environment variables? Or if anyone can give me step by step guide for setting the environment to deploy a web service it'd be greatly appreciated.
Thanks
SqW

I'm using this way...
If you installed Java 1.5, then make JRE directory like below.
%JAVA_HOME\jre\lib
C:\Program Files\Java\jre1.5.0_04\lib
Copy all JWSDP 1.6's jar file to JRE\lib\ext folder..
Then, do not pay careful attention to classpath..

Similar Messages

  • Javax.jws.WebService.portName() class not found

    Hi there,
    I am running OC4J Version 10.1.3.4.0.
    Upon trying to deploy a web service .WAR file (JAX-WS 2.1, JAXB 2.1) got this error:
    "Operation failed with error: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String;"
    Is there a way to make OC4J to reference these new versions of web services, rather than utilizing what is loaded at the boot time?
    Thanks in advance,
    ws-girl

    hmmm... i had a look and it seems that what you are trying to "import" is actually in a package... instead of import try:
    package javax.servlet.jsp;you may need to go download this "package" and complile it in the directory you are working in.
    my advice: try the above statement (which does compile for me), if it doesn't work, you will need to find the source code for this package and compile it just like you do any other source code.
    hope this helps.

  • Html tags using javax.jws.WebService

    Hi,
    I am using javax.jws.WebService and I met a problem for html tags.
    In a String containing "<" and ">", the javax.jws.WebService implmentation of IBM transfered the String with "<" and ">" in the XML reply. How could this translation be avoided?
    Regards.
    Pengyou

    The XML content in the soap request looks like this:
    <myXml>
        <tagWithCdata><![CDATA[<test>123</test>]]></tagWithCdata>
    </myXml> The String "tagWithCdata" in the Java object looks like this: "<test>123</test>"
    And the marshalled XML in the soap response looks like this:
    <myXml>
        <tagWithCdata><test>123<test></tagWithCdata>
    </myXml>But I expect to have the same format as the soap request, i.e.
    <myXml>
        <tagWithCdata><![CDATA[<test>123</test>]]></tagWithCdata>
    </myXml>

  • Cannot find javax.servlet package

    I have just downloaded and installed the latest JEE SDK having installed Tomcat on a Linux box so that I can start getting to know JSP.
    I am following an example in a book I have for this Servlet...
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.IOException;
    public class BasicServlet extends HttpServlet {
         public void doGet (HttpServletRequest req, HttpServletResponse res)
              throws IOException {
              ServletOutputStream out = res.getOutputStream();
              res.setContentType("text/html");
              out.println("<html><head><title>Basic Servlet</title></head>");
              out.println("<body>Hello World</body></html>");
    I am using Textpad to write and compile my java and when I try to compile I get errors basically saying that it cannot find the first 2 packages I am trying to import (it manages to find the IOException fine)
    Any ideas why? I suspect that the servlet package is not in the classpath but I do no know where the package is in order to add it to my class path.
    many thanks

    I have just downloaded and installed the latest JEE
    SDK having installed Tomcat on a Linux box so that I
    can start getting to know JSP.
    I am following an example in a book I have for this
    Servlet...
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.IOException;
    public class BasicServlet extends HttpServlet {
    public void doGet (HttpServletRequest req,
    , HttpServletResponse res)
              throws IOException {
              ServletOutputStream out = res.getOutputStream();
              res.setContentType("text/html");
    out.println("<html><head><title>Basic
    ic Servlet</title></head>");
              out.println("<body>Hello World</body></html>");
    I am using Textpad to write and compile my java and
    when I try to compile I get errors basically saying
    that it cannot find the first 2 packages I am trying
    to import (it manages to find the IOException fine)
    Any ideas why? I suspect that the servlet package is
    not in the classpath but I do no know where the
    package is in order to add it to my class path.
    many thanksHave u included your servletapi.jar into classpath
    If u havnt . set classpath to point to servletapi.jar
    if it helps .. release dukes.
    sudhir nimavat
    http://www.jyog.com

  • Cannot find javax.ejb.CreateException fix classpath

    Hi Guys,
    I have made a Webdynpro in which I am using an EJB in the libraries of the project. When I access the classes of EJB I am getting a complie time error saying
    Cannot find class file for javax.ejb.CreateException. Fix the classpath then try rebuilding this project.
    Can you tell me how to fix this.
    Regards,
    Khusro Habib

    Hi,
    Guys I was able to solve this problem, by adding
    C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.tssap.ext.libs.j2ee_1.3.0\lib\ejb20.jar
    into the project properties>> in the Java Buildpath adding external jars.
    Khusro Habib

  • Cannot find javax

    Hi I hit 2 problem here...
    1) My jbuilder got corrupted when I closed it without saving my project and I hit the following error
    "Fail to start Java VM:193"
    May I know how am I going to revive it back??
    2) Left without any choice, I compile my java file from the jdk1.3\bin directory... and I hit this error--( basically I import javax package and I compile them in dos mode using javac.)
    testAppln.java:10: package javax does not exist
    import javax.*;
    ^
    1 error
    I had include those classpath that store all the javax folder but still I cannot compile successfully.....Pls help.........:((((

    The rt.jar that hold all of the "standard library" classes, java... javax... Are not part of the "user" classpath. Instead, they are part of the "bootClassPath" so the users don't have to worry about it.
    So basically if you can't find javax.*; for an import your installation of the JRE is messed up. You can try to set the bootClassPath to the path of rt.jar and see if this is true with the following command.
    java -XbootClassPath:c:\jdk1.3\jre\lib\rt.jar MyMain
    experiment with that, and see if that works. Or just reinstall :)

  • Cannot find javax.management.snmp

    Dear all,
    I have a question hope yours could help me. Where can I find the javax.management.snmp package. I have already browse the ..\JavaManagement web page, but cannot find it.
    Could anyone help me?
    Thanks a lot.
    Regards,
    Vincent

    http://java.sun.com/products/jdmk/

  • Cannot find javax.servlet in J2EE

    I am learning about servlet programming. I am using JBuilder-student edition. I downloaded J2EE. I changed the project properties in JBuilder to use the java.exe in J2EE, but when I try importing javax.servlet or the like, it does not show that javax has such a package. Please help. I am working on this project with a professor, and I have to show some work done soon! I cannot get started with my work unless I get javax.servlet.
    I hope somebody can help me.
    Thank you,

    It seemed that the installation did not unzip the j2ee.WAR, which contains the servlet stuff.(or is it not supposed to?) I then added the folder j2ee to the class path, and it works. I am dumb enough not to understand how it worked, could someone explain please.
    Thank you

  • I cannot find javax.servlet package in j2sdk-1.4.0-beta3

    I just download and install j2sdk-1.4.0-beta3 and progam a very simple program use import javax.servlet.* and compile it, there is a mistake:
    package javax.servlet.* does not exist
    And I check the doc of j2sdk-1.4.0-beta3,I also can not find package javax.servlet.So where could I find this package? Need I configure somewhere or download another products?

    Hi,
    You can go to http://java.sun.com/products/servlet/download.html,
    download the servlet 2.3 class files, add the zip file to the classpath.

  • Cannot find javax.crypto.KeyGeneratorSpi

    The following code compiles but
    I get a runtime error as follows.
    NoClassDefFoundError for javax.crypto.KeyGeneratorSpi
    I did a jar tf on the sunjce_provider.jar file and
    this class is not contained?
    It is in the jce1_2_1.jar file and is abstract.
    When at runtime the factory tries to create an instance
    of the keyGeneratorSpi I think it tries to get a concrete
    implementation of the class from the SunJCE implementation and cant find it?
    Is this correct.
    Obviously the classpath is set correct as I am able to
    import all of the SunJCE classes.
    Heres the code.
    import java.io.*;
    import java.util.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import com.sun.crypto.provider.*;
    import java.security.*;
    public class CryptoTest {
    public static void main(String[] args)
    KeyGenerator keygen = null;
    SecretKey desKey = null;
    Cipher desCipher = null;
    Security.addProvider( new com.sun.crypto.provider.SunJCE() );
    byte[] ciphertext;
    try
    keygen = KeyGenerator.getInstance("DES","SunJCE");
    catch(Exception e){
    System.out.println("Exception getting keygenerator");
    e.printStackTrace();
    }

    What jdk version do you use?
    I use the J2SDK 1.4.0-beta(contains the jce and the Sun JCE provider).
    And the following code works fine to me:
    KeyGenerator keygen = null;
    try {
    keygen = KeyGenerator.getInstance("DES","SunJCE");
    } catch(Exception e) {
    System.out.println("Exception getting keygenerator");
    e.printStackTrace();
    }

  • Javac cannot find javax.servlet.*; package

    getting an error when I try to compile code that contains the line:
    import javax.servlet.jsp.*;
    import javax .servlet.*;
    Yet, other classes in javax can be seen by the compiler such as javax.swing.*;

    I had to download the servlet specification from sun as it wasn't in my jdk (I prefer stripped down versions). Then I placed the jar file in my classpath.
    Alternatively, if you are already running tomcat you can point to the servlet api jar file in the lib directory.
    And a clear indication that the person stumbling like
    that shouldn't try writing servlets yet, as he
    clearly lacks knowledge about what's even in the
    standard API and what isn't.That's a clear indication that the person making such comments should not be on the forums as the idea is to help people and encourage people.

  • Cannot find javax.microedition.khronos.opengles

    Hi all,
    I'm relatively new to Java, and have gone through much of the tutorial. I am trying to utilize the OpenGL ES API and am unable to locate it in the latest 1.6 SDK. What am I missing here? I found documentation around the API but haven't located the API itself to save into my JDK source file. Any help would be appreciated.

    oh. I think I got it. You managed to run the opengles code in emulator, right? Now, you want this code somehow to run without emulator, correct?
    Well, per my understanding of the nature of "JSR 239: Java _Binding_ for the OpenGL ES API", only having API jar should not be sufficient for that.
    Thing is, jsr 239 only binds java to underlying platform-specific OpenGL code. Code in jar is rather an adapter, it doesn't do the real job.
    I think that in order to run opengles code without emulator, one has to figure and reproduce a way how emulator performs that binding to platform-specific code on the particular machine. If I understand correctly, there should be something outside the API jar, something that does the real thing, something passing java stuff to "real", platform-specific OpenGL.
    Edited by: gnat on Oct 29, 2009 12:06 AM

  • Application Client Enity Manager cannot find Persistence Unit with JWS

    I have an Enterprise Application Project in Netbeans 6.7.1.
    The enterprise application client module has the business code and the
    persistence unit (TopLink) defined in the app-client.jar. I can run this
    application clinet from NB without a problem. I can also run it with JWS
    if I remove the EnityManager.
    I'm using JPA (EnityManager) in a Java SE environment.
    When I try and run the app-client from Java Web Start I get an error
    that the EnityManager cannot find the PU. The persistence unit is packaged in the app.ear->app-client.jar->META-INF->persistence.xml.
    There's not a wealth of information, that I could find on the net, but this
    seems to be correct.
    The error I get is:
    INFO: ACC009: Load Application Class: [jws.Main]
    hello world! From JWS
    Dec 3, 2009 11:44:21 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.persistence.PersistenceException: No Persistence provider for EntityManager named JWS-app-clientPU: The following providers:
    oracle.toplink.essentials.PersistenceProvider
    oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    Returned null to createEntityManagerFactory.
    Any ideas on what I need to do to properly package the PU for an Enterprise Application Client ??
    Thanks,
    David

    I solved this problem.
    When we call resources from EAR application, WebLogic adds "Cache-Control=private, no-cache, no-store, s-maxage=0, must-revalidate" to all responses header.
    It was the reason of error occurence.
    I used filter from http://flavio.tordini.org/http-headers-filter to remove Cache-Control from header when calling jar resources.
    After that, applicatiom started to work again.

  • Javax.media.NoPlayerException: Cannot find a Player

    Hi all,
    I've installed JMF,
    and tried the sample 'SimplePlayerApplet.java' from Sun:
    http://java.sun.com/products/java-media/jmf/2.1.1/samples/
    (see the code below)
    However, everytime I run the applet,
    I get the message:
    "javax.media.NoPlayerException: Cannot find a Player"
    Can anybody help?
    -------code from sun website-----------------
    * @(#)SimplePlayerApplet.java     1.2 01/03/13
    * Copyright (c) 1996-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.String;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
    import java.util.Properties;
    import javax.media.*;
    //import com.sun.media.util.JMFSecurity;
    * This is a Java Applet that demonstrates how to create a simple
    * media player with a media event listener. It will play the
    * media clip right away and continuously loop.
    * <!-- Sample HTML
    * <applet code=SimplePlayerApplet width=320 height=300>
    * <param name=file value="sun.avi">
    * </applet>
    * -->
    public class SimplePlayerApplet extends Applet implements ControllerListener {
    // media Player
    Player player = null;
    // component in which video is playing
    Component visualComponent = null;
    // controls gain, position, start, stop
    Component controlComponent = null;
    // displays progress during download
    Component progressBar = null;
    boolean firstTime = true;
    long CachingSize = 0L;
    Panel panel = null;
    int controlPanelHeight = 0;
    int videoWidth = 0;
    int videoHeight = 0;
    * Read the applet file parameter and create the media
    * player.
    public void init() {
    //$ System.out.println("Applet.init() is called");
    setLayout(null);
    setBackground(Color.white);
    panel = new Panel();
    panel.setLayout( null );
    add(panel);
    panel.setBounds(0, 0, 320, 240);
    // input file name from html param
    String mediaFile = null;
    // URL for our media file
    MediaLocator mrl = null;
    URL url = null;
    // Get the media filename info.
    // The applet tag should contain the path to the
    // source media file, relative to the html page.
    if ((mediaFile = getParameter("FILE")) == null)
    Fatal("Invalid media file parameter");
    try {
    url = new URL(getDocumentBase(), mediaFile);
    mediaFile = url.toExternalForm();
    } catch (MalformedURLException mue) {
    try {
    // Create a media locator from the file name
    if ((mrl = new MediaLocator(mediaFile)) == null)
    Fatal("Can't build URL for " + mediaFile);
    try {
    JMFSecurity.enablePrivilege.invoke(JMFSecurity.privilegeManager,
    JMFSecurity.writePropArgs);
    JMFSecurity.enablePrivilege.invoke(JMFSecurity.privilegeManager,
    JMFSecurity.readPropArgs);
    JMFSecurity.enablePrivilege.invoke(JMFSecurity.privilegeManager,
    JMFSecurity.connectArgs);
    } catch (Exception e) {}
    // Create an instance of a player for this media
    try {
    player = Manager.createPlayer(mrl);
    } catch (NoPlayerException e) {
    System.out.println(e);
    Fatal("Could not create player for " + mrl);
    // Add ourselves as a listener for a player's events
    player.addControllerListener(this);
    } catch (MalformedURLException e) {
    Fatal("Invalid media file URL!");
    } catch (IOException e) {
    Fatal("IO exception creating player for " + mrl);
    // This applet assumes that its start() calls
    // player.start(). This causes the player to become
    // realized. Once realized, the applet will get
    // the visual and control panel components and add
    // them to the Applet. These components are not added
    // during init() because they are long operations that
    // would make us appear unresposive to the user.
    * Start media file playback. This function is called the
    * first time that the Applet runs and every
    * time the user re-enters the page.
    public void start() {
    //$ System.out.println("Applet.start() is called");
    // Call start() to prefetch and start the player.
    if (player != null)
    player.start();
    * Stop media file playback and release resource before
    * leaving the page.
    public void stop() {
    //$ System.out.println("Applet.stop() is called");
    if (player != null) {
    player.stop();
    player.deallocate();
    public void destroy() {
    //$ System.out.println("Applet.destroy() is called");
    player.close();
    * This controllerUpdate function must be defined in order to
    * implement a ControllerListener interface. This
    * function will be called whenever there is a media event
    public synchronized void controllerUpdate(ControllerEvent event) {
    // If we're getting messages from a dead player,
    // just leave
    if (player == null)
    return;
    // When the player is Realized, get the visual
    // and control components and add them to the Applet
    if (event instanceof RealizeCompleteEvent) {
    if (progressBar != null) {
    panel.remove(progressBar);
    progressBar = null;
    int width = 320;
    int height = 0;
    if (controlComponent == null)
    if (( controlComponent =
    player.getControlPanelComponent()) != null) {
    controlPanelHeight = controlComponent.getPreferredSize().height;
    panel.add(controlComponent);
    height += controlPanelHeight;
    if (visualComponent == null)
    if (( visualComponent =
    player.getVisualComponent())!= null) {
    panel.add(visualComponent);
    Dimension videoSize = visualComponent.getPreferredSize();
    videoWidth = videoSize.width;
    videoHeight = videoSize.height;
    width = videoWidth;
    height += videoHeight;
    visualComponent.setBounds(0, 0, videoWidth, videoHeight);
    panel.setBounds(0, 0, width, height);
    if (controlComponent != null) {
    controlComponent.setBounds(0, videoHeight,
    width, controlPanelHeight);
    controlComponent.invalidate();
    } else if (event instanceof CachingControlEvent) {
    if (player.getState() > Controller.Realizing)
    return;
    // Put a progress bar up when downloading starts,
    // take it down when downloading ends.
    CachingControlEvent e = (CachingControlEvent) event;
    CachingControl cc = e.getCachingControl();
    // Add the bar if not already there ...
    if (progressBar == null) {
    if ((progressBar = cc.getControlComponent()) != null) {
    panel.add(progressBar);
    panel.setSize(progressBar.getPreferredSize());
    validate();
    } else if (event instanceof EndOfMediaEvent) {
    // We've reached the end of the media; rewind and
    // start over
    player.setMediaTime(new Time(0));
    player.start();
    } else if (event instanceof ControllerErrorEvent) {
    // Tell TypicalPlayerApplet.start() to call it a day
    player = null;
    Fatal(((ControllerErrorEvent)event).getMessage());
    } else if (event instanceof ControllerClosedEvent) {
    panel.removeAll();
    void Fatal (String s) {
    // Applications will make various choices about what
    // to do here. We print a message
    System.err.println("FATAL ERROR: " + s);
    throw new Error(s); // Invoke the uncaught exception
    // handler System.exit() is another
    // choice.
    }

    First and most obvious question is, what are you trying to have the applet view? The NoPlayerException generally means that JMF couldn't figure out how to display what you're telling it to display, be that an unknown codec, or unknown media type.

  • Cannot find class javax.swing.JOptionPane

    Hello,
    I imported the class
    import javax.swing.JOptionPane;and written as a first line of my code in the form of a .java file.
    but error occurs as : cannot find the class javax.swing.JOptionPane. What should I do.
    Thank you.

    Are you doing something likeimport javax.swing.JOptionPane;
    class Test {
        public static void main(String args[]) {
            JOptionPane.showMessageDialog(null, "Testing",
                    "Testing", JOptionPane.INFORMATION_MESSAGE);
    }Mark

Maybe you are looking for

  • Ipod classic connects to Itunes for a few seconds, then disconnects. Cannot sync!

    Help! I have followed all guidelines to uninstall Itunes and related software many times in the past two days. I have reinstalled multiple versions (downgrades) - none have worked. I have tried disabling processes, running Windows in safe mode, and r

  • Crashes on Welcome screen when I click Organizer

    I have Photoshop 11, running it on Windows 7.  It has worked for about 18 months, but now system crashes on the welcome screen every time I click on the Organizer button

  • Third party logistics (TPL) Urgent

    Hello everyone, Can anyone help me with third party logistics (maintaining). To my understanding from: "A third-party logistics provider (abbreviated 3PL) is a firm that provides outsourced or "third party" logistics services to companies for part or

  • Need help on ammount formating with num{$z,zzz,zz9.99}

    Hi All Need help in formating the amount fields. Currently I am using num{$z,zzz,zz9.99} Its working fine for positive ammount value. But for negative amount its giving output as $-18,970.50 Expected out is -$18,970.50 need '-' sign before $ Thanks,

  • Has anyone ever had a virus on the iMac?

    I just clicked on a website for black friday ads and when I did this virus scan thing came up on the screen and said that I had like 27 viruses on my computer??? I'm really concerned!! I was saying that I needed to download a virus protection to get