Calling webservice - meta-inf/services/javax.xml.ws.spi.provider not found

Hi,
I have created an applet. Its running well in standalone application. But it is not getting referred in some other localhost. The JAXWS is not getting referred by the JRE. I'm getting the exception as invocation exception, and cannot find the META-INF/services/javax.xml.ws.spi.provider.
Anyone can solve, pls reply me.

your problem is too stuffed to understand properly..could you elobarate a lil bit

Similar Messages

  • Contents of META-INF/services/javax.xml.parsers.DocumentBuilderFactory?

    I am currently working on an applet that solves Sudoku puzzles, allowing you to build your own in a Constructor and then solve them in a seperate Solver. To do this, we are implementing the puzzles files as XML documents.
    I have the code completely complied and on the server ( [sudoku.unl.edu|sudoku.unl.edu]) and it runs NEARLY perfectly, however when trying to access the server to save the xml code, the apache error_log presents this message: "File does not exist: classes/META-INF/services
    /javax.xml.parsers.DocumentBuilderFactory"
    Looking at the Java Doc here it says that the program should look for that in the jars. I am unsure of exactly how the applet is interacting with the server, but typing "java -version" yields:
    java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)Notably, the code works PERFECTLY in NetBeans, contacting the server using SCP and uploading the file and such, so the code doesn't seem to be the problem, unless I need to direct the DocumentBuilder code somehow. This is the code that I believe is causing the trouble (I have tried to include all relevant imports that are in my code):
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    DocumentBuilderFactory factoryBuilder;
              DocumentBuilder builder;
              Document doc;
              Element docElement;
              try
                   factoryBuilder  = DocumentBuilderFactory.newInstance( );
                   builder = factoryBuilder.newDocumentBuilder();
                   doc = builder.parse( indexLocation );
                   docElement = doc.getDocumentElement();
                   NodeList children = docElement.getChildNodes();          
                   for(int i =0; i < children.getLength(); i++)
                        if(children.item(i).getNodeType() == 1)
                             if((children.item(i).getNodeName()).equals("directory"))
                                  if ((children.item(i).getAttributes().getNamedItem("name").getNodeValue()).equals("UsersInput")) {
                                       Node firstChild = findNodeItem(children.item(i), "Difficulty0.." + this.upperField.getText());
                                       Node secondChild = findNodeItem(firstChild, "Level" + this.levelField.getText());
                                       Node thirdChild = findNodeItem(secondChild, (String)suTypeList.getSelectedItem());
                                       Element newFile = doc.createElement("file");
                                       newFile.setAttribute("name", fileName);                              
                                       thirdChild.appendChild(newFile);                              
                   SshParameters params = new SshParameters("cse.unl.edu", "consystlab","A/tutti");
                // create new Scp instance
                Scp scp = new Scp(params);
                // register event listener
                scp.addListener(this);
                // establish connection
                scp.connect();
                   TransformerFactory tFactory = TransformerFactory.newInstance();
                   Transformer transformer = tFactory.newTransformer();
                   DOMSource source = new DOMSource(doc);
                   StringWriter sw=new StringWriter();
                   StreamResult result = new StreamResult(sw);
                   transformer.transform(source, result);
                   String xmlString=sw.toString();
                // upload file
                  scp.upload(xmlString.getBytes(), indexPath, "libraryIndex.xml");
                 // disconnect
                scp.disconnect();
              catch (IOException e)
                   System.out.println("IO ERROR7");
                   System.out.println(e);
              catch (TransformerException tranE){
                   tranE.printStackTrace();               
              catch (ParserConfigurationException e)
                   System.out.println("IO ERROR8");
                   System.out.println(e);
              catch (SAXException e)
                   System.out.println("IO ERROR9");
                   System.out.println(e);
              }So my question is, what exactly are the contents of the file in the META-INF/services folder? I have manually created this file in my classes directory, where the program is searching. When I place text in it, it appends the text with .class and searches for that file, but doesn't seem to do anything with the file. I attempted directing it to the "DocumentBuilderFactory.class" file that I extracted from the classes.jar included with the JDK.
    I feel like all I need is this file to contain the correct content and the code will FINALLY work, but I have not been able to find anything out there on it.
    Thank for you for your help, sorry this was such a long message.
    -Jason

    Thanks!
    Thanks for the fast reply. I don't know if I made my point clear.
    I do not want to determine the parser by myself. I want the client system use the default parser, so I do not have the hit of downloading the fairly large parser jar.
    However, I want it not to do an empty request to the server for nothing. This turn around time kills an Applet. I want a fast loading applet!
    I'll go in trial and error mode, when I find the time next week.
    Thanks again, I appreciate it!
    K<o>

  • Format of  "META-INF/services/javax.xml.parsers.SAXParserFactory"

    Hi there,
    I have written an applet utilizing JAXP. Now the applet does hit the server with requests to
    "META-INF/services/javax.xml.parsers.SAXParserFactory", which off course produces a 404-error.
    What is the best way to get rid of this unnecessary request in an Applet?
    - I can't set the property, because I do not know which xml-parser implementation is available at the client .
    - I can't rely on lib/jaxp.properties, obviously!
    - I could not find any conclusive information about the format of this request. It says in the Javadoc, a file at this location is used to determine the Factory? waht is the Format of this file? What should it contain?
    - The applet works fine, as it defaults to the system factory anyway.
    However, the request brings an extra delay in the applet, which I just do not need. I also do not want to download my preferred xml-parser, I want ot use, what ever is installed on the client.
    Any idea what to do?
    Thanks
    Kaj
    Chief Designer at Conficio.com
    What is your Plan-B? We just released Plan-B 2.1

    Thanks!
    Thanks for the fast reply. I don't know if I made my point clear.
    I do not want to determine the parser by myself. I want the client system use the default parser, so I do not have the hit of downloading the fairly large parser jar.
    However, I want it not to do an empty request to the server for nothing. This turn around time kills an Applet. I want a fast loading applet!
    I'll go in trial and error mode, when I find the time next week.
    Thanks again, I appreciate it!
    K<o>

  • Oracle TopLink Object-to-XML - issue JAXBException: Provider not found...

    Env:
    OS:XP
    Java dev env: JDev 10.1.2 production
    Toplink Workbench - 10g Developer Preview 3 (10.1.3.0) build 041116
    I am attempting to use the toplink object to xml functionality through carefully following the tutorial titled Oracle TopLink Object-to-XML on OTN (link: http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/ox/index.htm)
    The first 11 steps are nice and clear and very easy to follow. However, when I hit 12 I run into problems. I believe I have done all I am required to do.
    My demo test code falls over on the attempting to create the JAXB context:
    JAXBContext jaxbContext = JAXBContext.newInstance("examples.ox.model");
    The exception I get is:
    javax.xml.bind.JAXBException: Provider oracle.toplink.ox.jaxb.JAXBContextFactory not found
    - with linked exception:
    [java.lang.ClassNotFoundException: oracle.toplink.ox.jaxb.JAXBContextFactory ]
    The code is capable of loading the jaxb.properties file, and has toplink.jar in the classpath. I am able to create a is located JAXBContextFactory prior to calling the new instance logic, illustrating that the class is in the classpath.
    Using google I have seen it mentioned that the newInstance call could be making use of a different JVM to the Application (https://jaxb.dev.java.net/faq/#classloader) hence may not be able to pick up the JAXBContextFactory class. I have attempted to follow their advice of passing in a class loader - but this makes no difference.
    I.E. JAXBContext jaxbContext = JAXBContext.newInstance("examples.ox.model", this.getClass().getClassLoader());
    Does anyone recognise this issue and have a solution.
    Here is my code:
    try
    File file = new File("D:\\Toplink\\demo\\Customer-data.xml");
    JAXBContext jaxbContext = JAXBContext.newInstance("examples.ox.model);
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    Customer customer = (Customer) unmarshaller.unmarshal(file);
    System.out.println(" customer.getFirstName() : "+customer.getFirstName());
    catch(Exception e)
    System.out.println("Error: "+ e.toString());
    As mentioned earlier it falls over on JAXBContext.newInstance("examples.ox.model);
    cheers
    Nick

    Hi Blaise,
    thanks for your response.
    My session.xml file is located:
    D:\Toplink\demo\classes\session.xml
    And contains:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <toplink-sessions version="10g Developer Preview 3 (10.1.3.0 )" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <session xsi:type="database-session">
    <name>examples.ox.model</name>
    <event-listener-classes/>
    <primary-project xsi:type="xml">D:/Toplink/demo/classes/CustomerProject.xml</primary-project>
    <login xsi:type="xml-login"/>
    </session>
    </toplink-sessions>
    My classpath references only jars downloaded with the links on the How To tutorial titled Oracle TopLink Object-to-XML on OTN (link: http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/ox/index.htm)
    This is the JDev output indicating the classpath and error:
    D:\Jdev1013Preview\jdk\bin\javaw.exe -ojvm -classpath D:\Toplink\demo\classes;D:\Toplink\lib\xml.jar;D:\Toplink\lib\xmlparserv2.jar;D:\Toplink\toplink\jlib\tljaxb.jar;D:\Toplink\toplink\jlib\toplink.jar examples.ox.model.RunDemo
    Error: javax.xml.bind.JAXBException: Provider oracle.toplink.ox.jaxb.JAXBContextFactory not found
    - with linked exception:
    [java.lang.ClassNotFoundException: oracle.toplink.ox.jaxb.JAXBContextFactory
    Process exited with exit code 0.
    Any more suggestions?
    In the meantime I will go through the information on the link that you have sent and see if I can get anyfurther.
    Thanks
    Nick
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help required download JAXM package (javax.xml.messaging.* pkg not found)

    Hi all,
    With an intention to sun some sample programmes for JAXM, I have downloaded "JavaTM Web Services Developer Pack 2.0" from Sun's website, but unfortunately I couldn't find the package javax.xml.messaging. Can someone help findout where's this package available ?
    Thanking you in advance and looking forward to immediate response.
    Regards/Sim.

    Hi,
    The jar file jaxm-api.jar contains the package javax.xml.messaging.
    Make sure you have correctly set it to your classapth.
    -Amol

  • META-INF/context.xml, Tomcat, META-INF/services

    I presently have a Netbeans project laid out like this:
    src
    src\java
    web
    web\META-INF
    web\META-INF\context.xml
    etc. Tomcat finds that META-INF/context.xml OK and does what I expect with it.
    I have recently added something that is loaded by java.util.ServiceLoader, which requires a META-INF/services/x.y.z file containing the name(s) of the classes that implement x.y.z. After deployment, my webapp's ServiceLoader doesn't find it, because in the target it isn't in WEB-INF/classes/META-INF/services/x.y.z. If I put it into src/java/META-INF/services/x.y.z it works correctly, as it then ends up in the right place. However I'm now concerned that either Tomcat won't find the context.xml if I put it in the same place under src, because it would then not be in /META-INF/context.xml but rather /WEB-INF/classes/META-INF/context.xml, which in turn would mean that I would then need two META-INF directories. I'm about to test that conjecture about Tomcat finding it under WEB-INF/classes/META-INF, but I'm wondering whether I'm doing something basically wrong in the first place here.

    You seem to think that you can have only one META-INF directory; this is simply not true. Keep both your META-INF directories and put the files where they are expected. Yay for using overlapping names :/

  • Multiversion config - saxparser re META-INF service provider

    I have a problem with the configuration for an applet when using the SAXParser and support for browsers using JDK 1.4.2 and JDK 1.5 in specification of which SAXPaser implementation classes to use.
    We had specified in the META-INF/services directory the implementation classes used for the SAXParser.
    serviceprovides config file javax.xml.parsers.SAXParser contains org.apache.crimson.jaxp.SAXParserImpl
    and
    File javax.xml.parsers.SAXParserFactory contains org.apache.crimson.jaxp.SAXParserFactoryImpl
    However in JDK 1.5 the SAXParser is now in a different package namely,
    com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
    and similar for the SAXPaserFactory.
    We don't have access to client browser JRE configuration only server side.
    Would appreciate if anyone has any ideas how to provide this configuration for multiple Java client versions
    This was all necessary to stop the classloader search mechanism from hitting the web server with class requests and causing 404 errors.
    Thanks

    I had a similar problem and solved it like this :
    //  get version number
    String strVersion = System.getProperty("java.specification.version");
    // it's it version 1.5.x or not?
    if (strVersion != null && strVersion.startsWith("1.5"))
        // set version 1.5.x specific values
        System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
        System.setProperty("javax.xml.parsers.SAXParserFactory", "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
        //org.apache.axis.utils.XMLUtils.initSAXFactory("com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", false, false);
    else
        System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.crimson.jaxp.DocumentBuilderFactoryImpl");
        System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.crimson.jaxp.SAXParserFactoryImpl");
        //org.apache.axis.utils.XMLUtils.initSAXFactory("org.apache.crimson.jaxp.SAXParserFactoryImpl", false, false);
    }petter

  • Problem deploying connector: META-INF/ejb-jar.xml not found in jar file

              Has anyone seen this problem:
              I built Sun's Blackbox implementation and packaged
              it identical to the BlackBoxNoTx.rar included with
              Weblogic's 'jconnector' sample (even using the same
              ra.xml and weblogic-ra.xml). When I try to deploy
              it, the server reports:
              java.io.FileNotFoundException:
              META-INF/ejb-jar.xml not found in jar file
              I have no idea why the server thinks my connector
              is an EJB. If I deploy the BlackBoxNoTx.rar included
              with the sample, everything works without a hitch.
              The only variable that I'm changing in my BlackBoxNoTx.rar
              is that I build the Blackbox classes myself--otherwise,
              the RAR packagings are identical. Any assistance is
              greatly appreciated since I'm banging my head against
              a wall...
              Thanks,
              -jason
              

              I was finally able to resolve this one. On the odd chance that someone else encounters
              the same problem, here's what went wrong:
              My RAR file had two directories: 'META-INF' and 'meta-inf'. The first was created
              by the jar tool and contained the manifest.mf file. The second I created manually
              and it contained my ra.xml and weblogic-ra.xml. When I examined the RAR using
              any tools or I extracted the contents, it looked like it only contained one directory:
              META-INF (because NT is case-insensitive).
              "Jason L" <[email protected]> wrote:
              >
              >Has anyone seen this problem:
              >
              >I built Sun's Blackbox implementation and packaged
              >it identical to the BlackBoxNoTx.rar included with
              >Weblogic's 'jconnector' sample (even using the same
              >ra.xml and weblogic-ra.xml). When I try to deploy
              >it, the server reports:
              >
              >java.io.FileNotFoundException:
              >META-INF/ejb-jar.xml not found in jar file
              >
              >I have no idea why the server thinks my connector
              >is an EJB. If I deploy the BlackBoxNoTx.rar included
              >with the sample, everything works without a hitch.
              >The only variable that I'm changing in my BlackBoxNoTx.rar
              >is that I build the Blackbox classes myself--otherwise,
              >the RAR packagings are identical. Any assistance is
              >greatly appreciated since I'm banging my head against
              >a wall...
              >
              >Thanks,
              >
              >-jason
              

  • How to include AdfcExceptionHandler entry from adf\META-INF\services\

    I am referring to this article from Frank : http://thepeninsulasedge.com/frank_nimphius/2010/02/01/how-to-create-custom-adfc-exception-handler/
    As mentioned in the blog, everything works , exception handler handles the exception , but
    When I create AdfLib JAR, it does not include adf\META-INF\services\ folder
    Thanks,

    Frank,
    Can we use AdfcExceptionHandler in our code directly with out worrying about any backward compatibility issues in future release of ADF? The reason I am asking this question is , it is from oracle.adfinternal. package and ORACLE can change it any time in future.
    What is the alternative if we can not use it?
    Thanks,
    Rama

  • Oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found

    I just install jdeveloper10.1.3.3.0 4157, and test ,When I run test ,
    display:"oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
    Please help me how to solve this problem!

    Just now I test jdeveloper 11g 4 preview
    test project display log:
    2008-6-15 22:38:14 oracle.security.jps.internal.config.xml.XmlConfigurationFactory handleLocation
    警告: [XmlConfigurationFactory.handleLocation] Exception occurred when handling origLocation=/D:/jdevstudio11114949/j2ee/home/config/system-jazn-data.xml : no protocol: /D:/jdevstudio11114949/j2ee/home/config/system-jazn-data.xml
    2008-6-15 22:38:14 oracle.security.jps.internal.config.xml.XmlConfigurationFactory handleLocation
    警告: [XmlConfigurationFactory.handleLocation] Exception occurred when handling origLocation=/D:/jdevstudio11114949/j2ee/home/config/system-jazn-data.xml : no protocol: /D:/jdevstudio11114949/j2ee/home/config/system-jazn-data.xml
    [JpsAuth] For permisson ( CredentialAccessPermission credstore.provider.credstore.ADF.anonymous#HR001 read), domain that failed: ProtectionDomain cs(file:/D:/jdevstudio11114949/BC4J/lib/adf-share-support.jar), []
    BC4J Tester exit code(0)
    Message was edited by:
    user616170

  • Provider com.sun.xml.internal.ws.spi.ProviderImpl not found

    I'm trying to run a webservice client on jdk1.5 and gives me the following error:
    javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found
    Any suggestions will be appreciated.

    michallis wrote:
    I had this problem once on a Linux where i forgot that openJDK was installed.
    openJDK doesn't contain sun packages.Great, but OpenJDK exists since Java 6 and this issue is about Java 5. jtahlborn's reply is still the relevant one.

  • Provider com.sun.xml.rpc.client.ServiceFactoryImpl not found

    I'm working on a Java Aplication and when I run the Application with Jdeveloper 11 I get this error
    javax.xml.rpc.ServiceException: Provider com.sun.xml.rpc.client.ServiceFactoryImpl not found
    When I run the Application with Jdeveloper 10.1.3 and it's works fine.
    What is the cause?
    thanks

    You may wish to compare the jar files referenced in both versions of JDeveloper, I did a quick Google search and found the following page which lists the .jar files that contain this class:
    http://javacio.us/search?q=com%2Fsun%2Fxml%2Frpc%2Fclient%2FServiceFactoryImpl+more%3Ajar_files&inline=true
    Hope this helps,
    Sean

  • Javax.mail.FolderNotFoundException: folder INBOX not found

    Hi
    I have a simple program called simpleread.java. I have javamail, JAF and javamaildir installed.
    Now I know that I am not providing more details and I can post more details. I am very apologetic about this. However I wanted to know if the error I have is kind of general.
    So I am posting the following error:
    Exception in thread "main" javax.mail.FolderNotFoundException. folder 'INBOX" not found
    =======
    thanks in advance
    I will provide details gladly

    Sounds like a problem with the way javamaildir is configured,
    or the way you're using it. You might want to talk to the
    javamaildir experts.

  • Error in jbosscmp-jdbc.xml : datasource-mapping Pointbase not found

    Hi I'm having problems deploying my EJBs using the Pointbase Database.
    This is what I'm working with:
    standardjbosscmp-jdbc.xml:
    <jbosscmp-jdbc>
       <defaults>
          <datasource>java:/PointbaseDS</datasource>
          <datasource-mapping>Pointbase</datasource-mapping>pointbase-ds.xml:
    <datasources>
         <local-tx-datasource>
              <jndi-name>PointbaseDS</jndi-name>
    <connection-url>jdbc:pointbase:server://localhost:19092/sample</connection-url>
              <driver-class>com.pointbase.jdbc.jdbcUniversalDriver</driver-class>
              <user-name>jboss</user-name>
              <password>password</password>
         </local-tx-datasource>
    </datasources>jbosscmp-jdbc.xml:
    <jbosscmp-jdbc>
         <defaults>
              <datasource>java:/PointbaseDS</datasource>
              <datasource-mapping>Pointbase</datasource-mapping>
         </defaults>I keep getting the error message:
    org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping Pointbase not found
    Any ideas why?
    Thanks.

    By the way I'm using JBoss server.

  • Javax.naming.NameNotFoundException: buslogic.HRAppFacade not found, help!!!

    I have followed the tutorial on http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/ejb_30.htm to create my own EJB with Jdeveloper, but I got some errors. Please help.
    When I run the client, it gave out the following errors:
    javax.naming.NameNotFoundException: buslogic.HRAppFacade not found
         at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at client.HRAppFacadeClient.main(HRAppFacadeClient.java:15)
    Process exited with exit code 0.
    I have created the entity and facade (with interface), but the client couldn't lookup the facade, giving out the above error. How to solve the problm? Thanks.
    The following is my source code:
    Employees.java
    package buslogic.persistence;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    @Entity
    @NamedQueries({
    @NamedQuery(name = "Employees.findAll", query = "select o from Employees o"),
    @NamedQuery(name = "Employees.findEmployeeById", query = "select o from Employees o where o.empid = :empid")
    @Table(name = "\"employees\"")
    public class Employees implements Serializable {
    @Id
    @Column(name="empid")
    private int empid;
    @Column(name="name")
    private String name;
    @Column(name="phone")
    private int phone;
    public Employees() {
    public int getEmpid() {
    return empid;
    public void setEmpid(int empid) {
    this.empid = empid;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public int getPhone() {
    return phone;
    public void setPhone(int phone) {
    this.phone = phone;
    (HRAppFacadeBean.java)
    package buslogic;
    import buslogic.persistence.Employees;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(name="HRAppFacade")
    public class HRAppFacadeBean implements HRAppFacade, HRAppFacadeLocal {
    @PersistenceContext(unitName="EJB_Project")
    private EntityManager em;
    public HRAppFacadeBean() {
    public Object mergeEntity(Object entity) {
    return em.merge(entity);
    public Object persistEntity(Object entity) {
    em.persist(entity);
    return entity;
    /** <code>select o from Employees o</code> */
    public List<Employees> queryEmployeesFindAll() {
    return em.createNamedQuery("Employees.findAll").getResultList();
    /** <code>select o from Employees o where o.empid = :empid</code> */
    public Employees queryEmployeesFindEmployeeById(int empid) {
    return (Employees)em.createNamedQuery("Employees.findEmployeeById").setParameter("empid", empid).getSingleResult();
    public void removeEmployees(Employees employees) {
    employees = em.find(Employees.class, employees.getEmpid());
    em.remove(employees);
    (HRAppFacade.java)
    package buslogic;
    import buslogic.persistence.Employees;
    import java.util.List;
    import javax.ejb.Remote;
    @Remote
    public interface HRAppFacade {
    Object mergeEntity(Object entity);
    Object persistEntity(Object entity);
    List<Employees> queryEmployeesFindAll();
    Employees queryEmployeesFindEmployeeById(int empid);
    void removeEmployees(Employees employees);
    (HRAppFacadeLocal.java)
    package buslogic;
    import buslogic.persistence.Employees;
    import java.util.List;
    import javax.ejb.Local;
    @Local
    public interface HRAppFacadeLocal {
    Object mergeEntity(Object entity);
    Object persistEntity(Object entity);
    List<Employees> queryEmployeesFindAll();
    Employees queryEmployeesFindEmployeeById(int empid);
    void removeEmployees(Employees employees);
    }

    I hit the exact same error. In my case it was due to missing "@Id" line in Departments.java. I must have accidently deleted it when pasting in some code.
    (my clue was the errors I got when starting imbedded OC4J)
    This section of Departments.java should read as follows:
    public class Departments implements Serializable {
    @Id
    @GeneratedValue(strategy=SEQUENCE, generator="DEPARTMENTS_SEQ")
    @Column(name="DEPARTMENT_ID", nullable = false)
    After fixing this, I ran a "make" of "HRApp", restarted the embedded OC4J server (terminate it, then right click HRAppFacadeBean.java, and click Run).
    Then ran the application...

Maybe you are looking for