EJB 3.0 example in JDeveloper 3

Hi,
I'm a brand new Java Developer carefully looking to the new EJB 3.0 standard as well as the new version of JDev (10.1.3.0.4.3673).
I decided to test some examples and ended up with this one: http://www.oracle.com/technology/products/jdev/101/tutorials/ejb_30/ejb_30.htm
When I'm creating the HRAppFacade session bean in this example JDev generates 2 files but only shows one in the Applications Navigator. The remote interface is generated but not shown.
I only get to see the interface in JDev when I make a difference in the filename between the interface and the bean.
Is this expected behavior?
Best Regards,
Kris

The application navigator tries to abstract complexities by providing a more high-level view.
If you actually stand on the bean in the application navigator and look at the structure pane you should see both your files.
One more thing to check is the system navigator that gives a more "file system" like view of your code.

Similar Messages

  • Access Denied with EJB Deployment to 8i with JDeveloper

    Hi,
    I'm having a problem deploying an EJB to Oracle 8i with
    JDeveloper 2.0.
    I am receiving an insufficient privileges error in the
    deployment process when it reaches the stage Generating EJBHome
    and EJBObject on the server. I am logging in using the system,
    sys, scott or internal account and all still receive the same
    error. What role/privelege do I need to deploy an ejb to 8i?
    Thanks in advance.
    Here is a dump of the output JDeveloper produces.
    *** Invoking the Oracle JDeveloper deployment utility ***
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    Writing archive...done
    *** Invoking the Oracle8i deployment utility ***
    Reading Deployment Descriptor...done
    Verifying Deployment Descriptor...done
    Gathering users...done
    Generating Comm Stubs...done
    Compiling Stubs...done
    Generating Jar File...done
    Loading EJB Jar file and Comm Stubs Jar file...done
    Generating EJBHome and EJBObject on the
    server...oracle.aurora.server.tools.sess_iiop.ToolsException: A
    SQL exception occured while compiling:
    oracle.aurora.ejb.gen.test_MyEJB.EjbObject_MyEJB : ORA-01031:
    insufficient privileges
    at oracle.aurora.server.tools.sess_iiop.ToolImpl.error
    (Compiled Code)
    at oracle.aurora.ejb.deployment.GenerateEjb.generateBean
    (Compiled Code)
    at oracle.aurora.ejb.deployment.GenerateEjb.invoke
    (Compiled Code)
    at oracle.aurora.server.tools.sess_iiop.ToolImpl.invoke
    (Compiled Code)
    at
    oracle.jdeveloper.wizard.deployment.EJBDeployMonitor.run
    (Compiled Code)
    at oracle.jdeveloper.wizard.common.ProgressDialog.run
    (Compiled Code)
    at java.lang.Thread.run(Compiled Code)
    null

    Chris,
    Perhaps you should be checking if the user you wish to deploy
    EJBs to has at least JAVAUSERPRIV.
    As SYSTEM
    grant JAVAUSERPRIV to <user>;
    Good luck
    /Mark
    Chris Jones (guest) wrote:
    : Hi,
    : I'm having a problem deploying an EJB to Oracle 8i with
    : JDeveloper 2.0.
    : I am receiving an insufficient privileges error in the
    : deployment process when it reaches the stage Generating EJBHome
    : and EJBObject on the server. I am logging in using the system,
    : sys, scott or internal account and all still receive the same
    : error. What role/privelege do I need to deploy an ejb to 8i?
    : Thanks in advance.
    : Here is a dump of the output JDeveloper produces.
    : *** Invoking the Oracle JDeveloper deployment utility ***
    : Scanning project files...done
    : Generating classpath dependencies...done
    : Generating archive entries table...done
    : Writing archive...done
    : *** Invoking the Oracle8i deployment utility ***
    : Reading Deployment Descriptor...done
    : Verifying Deployment Descriptor...done
    : Gathering users...done
    : Generating Comm Stubs...done
    : Compiling Stubs...done
    : Generating Jar File...done
    : Loading EJB Jar file and Comm Stubs Jar file...done
    : Generating EJBHome and EJBObject on the
    : server...oracle.aurora.server.tools.sess_iiop.ToolsException: A
    : SQL exception occured while compiling:
    : oracle.aurora.ejb.gen.test_MyEJB.EjbObject_MyEJB : ORA-01031:
    : insufficient privileges
    : at oracle.aurora.server.tools.sess_iiop.ToolImpl.error
    : (Compiled Code)
    : at oracle.aurora.ejb.deployment.GenerateEjb.generateBean
    : (Compiled Code)
    : at oracle.aurora.ejb.deployment.GenerateEjb.invoke
    : (Compiled Code)
    : at oracle.aurora.server.tools.sess_iiop.ToolImpl.invoke
    : (Compiled Code)
    : at
    : oracle.jdeveloper.wizard.deployment.EJBDeployMonitor.run
    : (Compiled Code)
    : at oracle.jdeveloper.wizard.common.ProgressDialog.run
    : (Compiled Code)
    : at java.lang.Thread.run(Compiled Code)
    null

  • Where can find a simple BPEL example using Jdeveloper

    Hi, I'm a beginner of BPEL. I searched about BPEL developing documents on OTN, but I cannot find an example for Jdeveloper. Who can tell me how Jdeveloper create a BPEL project, then call the BPEL in JSP/JSF.
    Thanks.
    Stone

    Hi,
    take a look at this document:
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28983/toc.htm
    or more detailed at
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/toc.htm

  • Requesting Versioning ChangeSet Example in Jdeveloper 11g

    Hi !
    Can Anyone Please Provide Any Assitance Regarding The Awareness Of The ChangeSet(Versioning)Concept Through Any Example In Jdeveloper 11g .
    Hoping A Positive Response ASAP,
    Regards,
    RK

    Hi Frank,
    Using subveriosning in Jdeveloper 11g and in the versioning module there exists a topic called "ChangeSet" i.e for Instance doing a modification in one file affecting two or more files in the repository and in this case if we are supposed to Update all the files including the Changing file we can use "Change Set" Concept .But In the Jdeveloper 11g Help Menu,specification about this topic is very less .
    Can U Please provide any examples regarding this in Jdeveloper 11g !
    Thanks & Regards,
    RK

  • New EJB 2.0 example is available for download

    A new EJB 2.0 example available for download (include the source code and database schema). This example is created with the EJBX Version 1.1, the EJB 2.0 Code Generator. It uses several proven design patterns such as session facade, value object, versioning, sequence key generator, service locator, and business delegate.

    http://www.myhtg.com/examples.zip
    or
    http://www.myhtg.com

  • Entity EJB deployment on Oracle through JDeveloper 3.2

    I have a project which is using Oracle 9iAS as the for the web server. There were intial plans to use the 8i database within the 9iAS machine as the place where the EJBs would be stored. There was a comment from the Oracle support people that the EJBs would be better off stored on the backend. We are trying to do the same.
    We have experienced mainly two problems
    1) While trying to deploy the container managed beans through JDeveloper, just after creating the deployment profile, an error ORA - 00904 comes up. (no columns). Then there is a prompt to install BC4J. On doing that the error comes up again and while it goes further, it says 'Exhausted ResultSet'. But the BMP entity beans are working OK.
    2) We had a bug report from the Oracle people on entity bean support through JDeveloper on non-NT machines. But we have been trying to deploy beans on the Solaris DB using JDeveloper and we keep getting 'peer socket disconnected errors'. I'll try the workaround which was suggestesd by the Oracle people to solve the problem and get back on this.
    I don't know how Oracle will measure up to the performance when EJBs are running. But the problems mentioned above would have to be solved first.
    Can anyone help out?
    Thanks in advance.
    Aby Philip

    I can't resist a comment here. Oracle folks seem to always recommend putting the EJBs in back-end database. How many real-world enterprise-scale applications (i.e., one's that would need EJBs at all) have a non-shared back-end database? And in those cases, who in their right mind would accept running application code in the back-end database? I guess Oracle just hasn't really bought in to the concept of multi-tiered applications. The whole reason for separating the business logic tier from the EIS tier is to insulate the EIS services from the demands of the business logic code.
    So from that perspective, I would highly recommend running an 8.1.7 instance in your middle tier to house your EJBs. Then you can hook up to your EIS tier either with database links, or (for better performance) by caching data in the EJB database from the EIS tier.
    As for your specific issues, I can't help with the first. On issue 2, I am installing the 8.1.7.1 patch set today and I'll let you know if it fixes the JDeveloper --> Solaris deployment problem.
    John H.

  • ejb-client-jar example from the core specification

    Hello all,
    the ejb3.0 specification says (chapter 60 page 241):
    the jar file that contains the client should contain one of the following: 
    • a reference to the ejb-client JAR file 
    • a reference to the ejb-jar file that contains the client view classes 
    • a copy of the client view classes  There is also an example on page 242:
    In this example, the Bean Provider has chosen to package the enterprise bean client view classes in a
    separate jar file and to reference that jar file from the other jar files that need those classes. Those classes
    are needed both by ejb2.jar, packaged in the same application as ejb1.jar, and by ejb3.jar,
    packaged in a different application. Those classes are also needed by ejb1.jar itself because they
    define the remote interface of the enterprise beans in ejb1.jar, and the Bean Provider has chosen the
    by reference approach to making these classes available.
    The deployment descriptor for ejb1.jar names the client view jar file in the ejb-client-jar
    element. Because ejb2.jar requires these client view classes, it includes a Class-Path reference to
    ejb1_client.jar.
    The Class-Path mechanism must be used by components in app2.ear to reference the client view jar
    file that corresponds to the enterprise beans packaged in ejb1.jar of app1.ear. Those enterprise
    beans are referenced by enterprise beans in ejb3.jar. Note that the client view jar file must be
    included directly in the app2.ear file.
        app1.ear:
            META-INF/application.xml
            ejb1.jar Class-Path: ejb1_client.jar
                deployment descriptor contains:
                    <ejb-client-jar>ejb1_client.jar</ejb-client-jar>
            ejb1_client.jar
            ejb2.jar Class-Path: ejb1_client.jar
        app2.ear:
            META-INF/application.xml
            ejb1_client.jar
            ejb3.jar Class-Path: ejb1_client.jarNow finally my questions are:
    1. Why did we need to include the ejb1_client.jar in app2.ear (or even in app1.ear), wasn't it enough to deploy the ejb1_client.jar separately then refer to it (using class-path in Manifest, or may be just by using <ejb-client-jar>) as the bullets quoted first suggest?
    2. How come we didn't need to use <ejb-client-jar> for ejb2.jar
    3. Since both of ejb1.jar and ejb2.jar are packaged in app1.ear couldn't we simply refer to the ejb1_client.jar in the Manifest file of app1.ear?
    Please, I appreciate your input on this

    I am guessing here and please correct me if I am wrong:
    ejb1.jar uses interfaces in ejb1_client.jar as the interface for some of the beans so we needed to use ejb-client-jar and we needed a reference in the manifest file.
    ejb2.jar uses some of the claess/interfaces as may be a return type but not as an interface for one of its beans so we didn't need to use ejb-client-jar but we needed an entry in the manifest file.
    regarding app1.ear, we can put the ejb1_client.jar in the META-INF/lib app1.ear without the need for any entries in the manifest files.
    Edited by: malrawi on Jun 14, 2009 11:59 PM

  • How to write the jndi lookup for ejb using oc4j server in jdeveloper

    Hi All,
    i am new to the JDeveloper. i want to develop the session bean in JDeveloper using the OC4J server. how to write the jndi lookup in cllient. what are the xml files need to deploy the application. where can i mention the JNDI name in xml file. so please provide the information as soon as possible.
    regards
    ram

    There is quite in-depth information in the Enterprise JavaBeans Developer's Guide.
    Section 2 (Understanding EJB Application Development) explains the xml files needed and Section 29 (Accessing an EJB from a Client) explains how to do a JNDI lookup.
    Hope this helps.

  • EJB 3.x datacontrol in JDeveloper.

    Hello.
    Does anyone know if the next release of JDeveloper will support the making of EJB 3.x datacontrols for ADF? For the time being, it seems that JDeveloper only supports creation of EJB 2.1 datacontrol and WebService DataControl. My ejb uses eclipselink, so I want to develop adf-pages with datacontrols from my existing ejb.
    Thanks a lot!

    Thanks for quick reply! I''m sorry if my explanation wasn't good enough. I'm aware of the possibilty to create EJB 3.0 datacontrols as long as they are developed within Jdeveloper. My EJB 3.0 - remote interface is already developed and deployed on a Glassfish 3.1 server. The 'New' - gallery in Jdeveloper lets you create a Webservice datacontrol from a wsdl and an EJB 2.1 datacontrol from an existing jar. I want to create a EJB 3.0 datacontrol from an existing jar, but can't find the right way to implement this. I've managed to create WS and EJB2.1 datacontrols, but my bean is already implemented and fully functional as a 3.0.
    I'm using JDeveloper 11.1.2.1.0, btw.
    PS! If I'm not mistaken, the tutorials mentioned develops the EJB 3.0 from scratch. Mine is already developed in NetBeans with Maven and deployed on a GF 3.1.
    Regards.
    Edited by: user9171811 on Jan 11, 2012 12:37 AM

  • EJB 2. ejbSelect example

    Hello.
    i have some entity beans (EJB 2) and those entityes have some find methods.
    i want to implement some ejbSelectXXX methods but i dont know how.
    can anybody send me url for reading ejbSelectXXX examples?, xml configuration files and java examples.
    thanks

    http://www.myhtg.com/examples.zip
    or
    http://www.myhtg.com

  • How Depoly EJB to Oracle 9iAS through JDeveloper

    3.1.1.2 support depoly EJB direct to OWS.
    How to depoly EJB to 9iAS directly?
    If not, which version of JDeveloper support to do that?

    Kenny,
    I think you are referring to OAS with the 3.1 release.
    Oracle9iAS does not currently have an EJB server running outside the database. I believe they have plans to provide an external EJB server in future releases, but do not know the exact details. You could check the 9iAS forum.
    If you do not want to deploy to the database, then you can deploy to WebLogic or Visibroker in the middle tier for now.
    See the online docs for all the available deployment platforms from JDeveloper 3.2 for EJBs.

  • AUCTIONS example in JDeveloper.

    How can I replace username and password in AUCTIONS example with database's username and password. I don't want to check username and password in table CUSTOMERS. I want to identify by user in database like scott/tiger or system/manager if I had granted all auctions' privilage to them.

    Hi Frank,
    Using subveriosning in Jdeveloper 11g and in the versioning module there exists a topic called "ChangeSet" i.e for Instance doing a modification in one file affecting two or more files in the repository and in this case if we are supposed to Update all the files including the Changing file we can use "Change Set" Concept .But In the Jdeveloper 11g Help Menu,specification about this topic is very less .
    Can U Please provide any examples regarding this in Jdeveloper 11g !
    Thanks & Regards,
    RK

  • Need  one to many toplink+Jdeveloper tutorial with example

    Hi
    I need tutorial with example of one to many with Toplink+J developer
    Thanks
    Edited by: user11802935 on Aug 18, 2009 1:06 PM

    Hi,
    The following links should get you started.
    EclipseLink JPA + Eclipse
    http://wiki.eclipse.org/EclipseLink/Examples/JPA
    JDeveloper tutorials
    http://www.oracle.com/technology/products/jdev/index.html
    TopLink + JDeveloper tutorial
    http://www.oracle.com/technology/obe/obe11jdev/bulldog/ejb_jpa_jsf/ejb.html
    @OneToMany documentation
    http://wiki.eclipse.org/Introduction_to_EclipseLink_JPA_%28ELUG%29#.40OneToMany
    thank you
    /michael
    www.eclipselink.org

  • How to create a local EJB 3.0 and execute in JDeveloper?

    Hello guys!
    I'm brand new with EJB 3.0.
    I would like to know how can I create a @Local EJB and a client in JDeveloper?
    It's was ease to create a @Remote EJB and the sample java client, how can I do same to @Local EJB?
    I'm using JDeveloper 10.1.3.1.0.3914
    Thanks in advance.

    Creating a @Local EJB is just as easy, just replace the @Remote by @Local, or checkmark local in the EJB wizard.
    You can create a client for a @Local EJB, as local methods aren't available outside the EJB container, that's why they are called local. A test client doesn't run in the ejb container, and therefor cannot access the local ejb methods.
    If you want to test the local methods of an ejb, you should create another ejb which calls the first.

  • JDeveloper / OC4J rewriting my orion-ejb-jar.xml

    Hi All.
    Im having a play around with OC4J and CMP entity beans and struts at the moment learning some stuff for a new job, so ive started to write a little test app to get used to things.
    Ive created a CMP entity - CustomerEntityEJB, manually defined the tables etc wrote and built it using JDeveloper 10.
    Ive created all the necessary classes and descriptors in JDeveloper and the bean compiles and deploys fine, however no matter what i do, the table attribute of the <entity-deployment> elemnt is ALWAYS removed from the orion-ejb-jar.xml file before its deployed and i have no idea why.
    Here are some snippets form the xml config files im using....
    ejb-jar.xml :
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>CustomerEntityEJB</display-name>
    <ejb-name>CustomerEntityEJB</ejb-name>
    <local-home>com.gb.ejb.entity.customer.CustomerEntityEJBLocalHome</local-home>
    <local>com.gb.ejb.entity.customer.CustomerEntityEJBLocal</local>
    <ejb-class>com.gb.ejb.entity.customer.CustomerEntityEJBBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>false</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CustomerEntityEJB</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>title</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>forename</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>surname</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>email</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>password</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>active</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params/>
    </query-method>
    <ejb-ql>SELECT OBJECT(c) FROM CustomerEntityEJB c</ejb-ql>
    </query>
    </entity>
    orion-ejb-jar.xml as in JDeveloper:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" schema-major-version="10" schema-minor-version="0">
    <enterprise-beans>
    <persistence-manager name="toplink"/>
    <session-deployment name="CustomerSessionEJB" local-location="CustomerSessionEJB" />
    <entity-deployment name="CustomerEntityEJB" data-source="jdbc/PostgresDS" table="Customer" local-location="CustomerEntityEJB">
    <primkey-mapping>
    <cmp-field-mapping name="id"/>
    </primkey-mapping>
    <cmp-field-mapping name="active"/>
    <cmp-field-mapping name="email"/>
    <cmp-field-mapping name="forename"/>
    <cmp-field-mapping name="id"/>
    <cmp-field-mapping name="password"/>
    <cmp-field-mapping name="surname"/>
    <cmp-field-mapping name="title"/>
    </entity-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    orion-ejb-jar.xml as viewed in the OC4J enterprise manager.     
    <?xml version="1.0" encoding="utf-8"?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="10.1.3.3.0" deployment-time="1151415a0e3" schema-major-version="10" schema-minor-version="0" >
    <enterprise-beans>
    <persistence-manager name="toplink" class="oracle.toplink.internal.ejb.cmp.oc4j.Oc4jPersistenceManager" descriptor="toplink-ejb-jar.xml">
    </persistence-manager>
    <session-deployment name="CustomerSessionEJB" location="CustomerSessionEJB" local-location="CustomerSessionEJB" persistence-filename="CustomerSessionEJB">
    <ejb-ref-mapping name="ejb/local/CustomerEntityEJB" location="TWA-EJB_CustomerEntityEJBLocal" />
    </session-deployment>
    <entity-deployment name="CustomerEntityEJB" location="CustomerEntityEJB" local-location="CustomerEntityEJB" concrete-bean-class="CustomerEntityEJB_ConcreteSubClass3" data-source="jdbc/PostgresDS" local-wrapper="CustomerEntityEJBLocalHome_LocalEntityHomeWrapper5">
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="<default-ejb-caller-role>" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    As you can see, the orion-ejb-jar.xml that been deployed on the server has had extra attributes defined in it (like concrete-bean-class) which makessense - its adding in the bits i didnt to get th bean to deploy - however the table attribue is just removed, meaning my bean cant find the table - hence my app not working.
    i just dont know how to stop this and would be extremely grateful if someone could give me a clue how to get my bean up and working properly as this is driving me insane.
    Thanks in advance..
    Gareth.

    sorted - the <persistence-manager name="toplink"/> element was automatically generated by JDeveloper and put in my orion-ejb-jar.xml appears to be un necessary and seemed to be breaking eveything - as soon as i removed it, the bean seemed to deploy ok and pick up the table name =]
    as a bit of an aside does anyone know why it was automatically put there in the first place if it breaks things?

Maybe you are looking for