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

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

  • How can I create my own TopLink ADF datacontrol in JDeveloper?

    To create your own TopLink ADF datacontrol in JDeveloper follow these steps:
    Step 1. Add “ADF TopLink Runtime” library to your project
    Step 2. Extend oracle.adf.model.generic.toplink.ToplinkDataControl with new class (e.g. MyToplinkDataControl)
    import java.util.Map;
    import oracle.adf.model.generic.toplink.ToplinkDataControl;
    public class MyToplinkDataControl extends ToplinkDataControl {
         public MyToplinkDataControl(String name, Map params, String beanClassName, boolean root)
         super(name, params, beanClassName, root);
         initialize(params, beanClassName);
         protected void initialize(Map params, String beanClassName){
              super.initialize(params, beanClassName);
              getServerSession().logMessages();
    Step 3. Extend oracle.adf.model.generic.toplink.DataControlFactoryImpl with new class (e.g. MyToplinkDataControlFactory) and override DataControlFactoryImpl.createSession as follows to return an instance of MyToplinkDataControl:
    import oracle.adf.model.generic.toplink.*;
    public class MyToplinkDataControlFactory extends DataControlFactoryImpl {
    public String getDataControlClassName() {
    return "MyToplinkDataControl";
    Step 4. Edit DataBindings.cpx (you may have to go to the disk directly). Set the FactoryClass attribute of the DataControl to equal the custom factory class name.
    FactoryClass="MyToplinkDataControlFactory"

    iOS Dev Center - Apple Developer
    iOS Developer Program - Apple Developer

  • Using a remote Ejb as a datacontrol for ADF

    Hi,
    I am trying to create an EJB 3.0 Data Control on top of remote deployed EJB. Difficulty is that I have no control over the EJB, and all I've been given is a Client jar file containing the remote interface and the entities used in the interface. When looking up the EJB using JNDI this is enough, so I was assuming it would also be enough to create a EJB Data Control, but it seems not.
    I've searched a lot of blogs and tutorials, but everyone seems to create the EJB's and entities from scratch.
    So the question is: how to create an EJB 3.0 Data Control based on just a Remote Interface?
    I tried the following:
    =============
    1. Create a new Fusion Web Application
    2. Add the EJB Client jar to the classpath. If you select "Show Libraries" in the Project Navigator, you can drill down to the Remote Interface class in the EJB Client jar. When you right-click the Remote Interface, there is an option to "Create Data Control", but that doesn't work for .class files. And even if you have the .java source file there, it will generate a POJO Data Control, which is obviously not what we want.
    After some time I found the following workaround:
    ===============================
    3. Create a Session Bean with exact same package and name in the Model project, and make sure its remote interface is the same as the given Remote EJB. Then generate a EJB 3.0 Data Control on top of that
    4. Then via file system remove the Session Bean and interface from Model project, so the Data Control will use the one on the classpath
    5. Update DataControls.dcx with jndi-name and provider-url from Remote EJB
    6. Remove <ejb-ref> from web.xml to avoid deployment issues.
    Problem is that in our project there are many of these Remote EJBs, and they are also work in progress. Means the remote interfaces are changing all the time, and then all of the above steps have to be performed. Isn't there an easier way, like the behaviour I was expecting in step 2?
    Thanks for any suggestions.

    ADF needs to be able to access the source of the facade to create the data control, so the recommended way is to have a project that contains the actual EJB and from it create the data control.
    This shouldn't be a problem assuming that you and the people who provide the EJB all work in the same company.
    You should be able to change the location of the EJB that you access at runtime by modifying the datacontrol definition after it has been created.
    Note also that if your EJBs are constantly changing you'll also need to update your data controls to leverage changes you need.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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?

  • Remote debugging (jboss deployed) ejb using JDeveloper

    Hi there
    Does anyone know how to remote debug an ejb deployed in JBoss using JDeveloper (or perhaps know of a link?)? All I can find is this from Oracle:
    http://www.oracle.com/technology/products/jdev/howtos/appservers/debug_in_jboss.html
    But the cmd to replace in the $bin\run.bat file to enable remote debugging doesn't exist in my version of JBoss (jboss-4.0.1RC1).
    Can anyone shed some light here?
    Thanks very much in advance...Jon

    In run batch file add
    set JAVA_OPTS= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%

  • EJB 3.0 Cache Issue With OC4J Instance With Multiple JVM's

    I created an EJB 3.0 project in JDeveloper 10.1.3.3.0 and everything works fine in the embedded OC4J server. I am deploying the application to an OC4J instance consisting of 3 Java Virtual Machines in Oracle Application server 10.1.3 and seem to be getting a different persistence context for each virtual machine. i.e. I'll have 3 browsers that can view the same data even after updating, another 2 browsers that can't see the first 3's changes but can see changes by any browser in this group, etc.
    I tried adding the below to the persistence-unit tag in the persistence.xml but it didn't seem to help.
    <properties>
    <property name="toplink.cache.shared.default" value="true"/>
    </properties>
    How do you get all connections to use the same cache?

    here is the code for my bean.
    package com.ups;
    import java.util.logging.Logger;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.EJBException;
    import javax.ejb.MessageDriven;
    import javax.ejb.MessageDrivenContext;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.TextMessage;
    * Message-Driven Bean implementation class for: MessageBean
    @MessageDriven(
              activationConfig = { @ActivationConfigProperty(
                        propertyName = "destinationType", propertyValue = "javax.jms.Queue"
    public class MessageBean implements MessageListener {
         private MessageDrivenContext mdc;
    * Default constructor.
    public MessageBean() {
    // TODO Auto-generated constructor stub
    * @see MessageListener#onMessage(Message)
    public void onMessage(Message message) {
         TextMessage tmsg = null;
    try {
    tmsg = (TextMessage) message;
    System.out.println("MESSAGE BEAN: Message received: " + tmsg.getText( ));
    System.out.println ("The onMessage() is called");
    } catch (JMSException e) {
    e.printStackTrace( );
    mdc.setRollbackOnly( );
    catch (Throwable th) {
    th.printStackTrace();
    public void ejbRemove( )throws EJBException{
         System.out.println("ejbRemove() is executed >>>>>>>");
    I have configured my JMS Distributed queue in the Weblogic.
    If possible please provide more details so that I can get rid of this error as soon as possible.
    Thanks for reply.
    Piyush

  • Error in deploying EJB 2.0 on OracleAS 10.1.2

    Hi All,
    This issue is related to a customer issue. I am trying to deploy an ejb-web application developed using JDeveloper 10.1.3 on OracleAS 10.1.2. The deployment fails with following error:
    Deployment failed: Nested exception
    Resolution:
    Base Exception:
    java.rmi.RemoteException
    deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Unknown persistence-manager tag: pm-properties. deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Unknown persistence-manager tag: pm-properties
    I guess this is some kind of version issue with some component in the application. I have tried to stick to EJB 2.0, J2EE 1.3 and J2SE 1.3 Versions in JDev, but to no avail.
    What would be the resolution to this issue? How can I deploy an EJB-JSF application developed using JDev 10.1.3 on OracleAS 10.1.2?
    Regards,
    Anand

    Hi All,
    This issue is related to a customer issue. I am trying to deploy an ejb-web application developed using JDeveloper 10.1.3 on OracleAS 10.1.2. The deployment fails with following error:
    Deployment failed: Nested exception
    Resolution:
    Base Exception:
    java.rmi.RemoteException
    deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Unknown persistence-manager tag: pm-properties. deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Unknown persistence-manager tag: pm-properties
    I guess this is some kind of version issue with some component in the application. I have tried to stick to EJB 2.0, J2EE 1.3 and J2SE 1.3 Versions in JDev, but to no avail.
    What would be the resolution to this issue? How can I deploy an EJB-JSF application developed using JDev 10.1.3 on OracleAS 10.1.2?
    Regards,
    Anand

  • [b]EJB Hotel RA Client Error - HELP[/b]

    1. Travel schema installed fine
    2. Web Client can successfully be run and all the buttons
    work fine
    3. The only file I modified was in config properties.
    Provider_Url = ormi://localhost:8888/OneEJBHotel
    4. in oc4j directory: principals file:
    user id is "admin", and password was given as
    "admin"
    4. deployment from jdeveloper is fine as follows:
    ---- Deployment started. ---- Jan 24, 2003 6:24:08 PM
    Wrote EJB JAR file to C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel.jar
    Wrote WAR file to C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel-Web.war
    Wrote EAR file to C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel-Web.ear
    Invoking OC4J admin tool...
    C:\jdeveloper\jdk\jre\bin\javaw.exe -jar C:\jdeveloper\j2ee\home\admin.jar ormi://DLEE/ admin **** -deploy -file C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel-Web.ear -deploymentName OneEJBHotel
    Auto-unpacking C:\oc4j\j2ee\home\applications\OneEJBHotel-Web.ear... done.
    Auto-unpacking C:\oc4j\j2ee\home\applications\OneEJBHotel-Web\OneEJBHotel-Web.war... done.
    Copying default deployment descriptor from archive at C:\oc4j\j2ee\home\applications\OneEJBHotel-Web/META-INF/orion-application.xml to deployment directory C:\oc4j\j2ee\home\application-deployments\OneEJBHotel...
    Auto-deploying OneEJBHotel (New server version detected)...
    Exit status of OC4J admin tool (-deploy): 0
    C:\jdeveloper\jdk\jre\bin\javaw.exe -jar C:\jdeveloper\j2ee\home\admin.jar ormi://DLEE/ admin **** -bindWebApp OneEJBHotel OneEJBHotel-Web http-web-site /OneEJBHotel
    Exit status of OC4J admin tool (-bindWebApp): 0
    Use the following context root(s) to test your web application(s):
    http://DLEE:8888/OneEJBHotel
    Elapsed time for deployment: 14 seconds
    ---- Deployment finished. ---- Jan 24, 2003 6:24:22 PM
    5. System Configuation
    jdeveloper: 9.0.3.1035
    DB: oracle 92010
    oc4j: 9.0.3.0.0
    6. When run from jdeveloper client: run Client.jpr
    the following errors were generated:
    Process exited with exit code 0.
    C:\jdeveloper\jdk\bin\javaw.exe -ojvm -classpath C:\oc4j\samples\ejb\OneEJBHotel\src\classes;C:\oc4j\samples\ejb\OneEJBHotel\config;C:\oc4j\samples\ejb\OneEJBHotel;C:\oc4j\samples\ejb\OneEJBHotel\src\web;C:\jdeveloper\jdev\lib\jdev-rt.jar;C:\jdeveloper\j2ee\home\lib\activation.jar;C:\jdeveloper\j2ee\home\lib\ejb.jar;C:\jdeveloper\j2ee\home\lib\jaas.jar;C:\jdeveloper\j2ee\home\lib\jaxp.jar;C:\jdeveloper\j2ee\home\lib\jcert.jar;C:\jdeveloper\j2ee\home\lib\jdbc.jar;C:\jdeveloper\j2ee\home\lib\jms.jar;C:\jdeveloper\j2ee\home\lib\jndi.jar;C:\jdeveloper\j2ee\home\lib\jnet.jar;C:\jdeveloper\j2ee\home\lib\jsse.jar;C:\jdeveloper\j2ee\home\lib\jta.jar;C:\jdeveloper\j2ee\home\lib\mail.jar;C:\jdeveloper\j2ee\home\oc4j.jar oracle.otnsamples.OneEJBHotel.client.EJBHotelSample
    javax.naming.NamingException: Lookup error: java.io.IOException: Server protocol was not ORMI, if uncertain about the port your server uses for ORMI then use the default, 23791; nested exception is:
         java.io.IOException: Server protocol was not ORMI, if uncertain about the port your server uses for ORMI then use the default, 23791
         java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
              RMIContext.java:134
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
              InitialContext.java:350
         void oracle.otnsamples.OneEJBHotel.client.EJBHotelSample.getHotelSystemBean()
              EJBHotelSample.java:132
         void oracle.otnsamples.OneEJBHotel.client.EJBHotelSample.main(java.lang.String[])
              EJBHotelSample.java:147
    Process exited with exit code 0.
    Thanks for help!
    David

    David,
    config.properties is used only by the client.jpr. Not by the Web.jpr
    config.properties file has been provided for looking up resources[EJB, Datasources] from JNDI tree of OC4J.
    Since servlet and other resources are in the same container[Single JVM] there is no need to specify the username, password, Provdier_URL at the time of lookup.
    Look at the init method of EJBHotelServlet.java :
    Context ctx = new InitialContext();
    // Acquire the home interface handle and call the create
    //method on it
    homeInterface = (HotelSystemHome)ctx.lookup("OneEJBHotel");
    Here servlet looks up EJB without any authentication information, as servlet and EJB are in the same container.
    Whereas Stand alone client is running outside the OC4J.
    So the stand alone client need to authentcate itself for looking up the resources from JNDI tree.
    Look at the getHotelSystemBean method of EJBHotelSample.java :
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, prop.getProperty("Initial_Context_Factory"));
    env.put(Context.SECURITY_PRINCIPAL, prop.getProperty("Principal"));
    env.put(Context.SECURITY_CREDENTIALS, prop.getProperty("Credential"));
    env.put(Context.PROVIDER_URL, prop.getProperty("Provider_Url") );
    // Associate the properties with the context
    Context ctx = new InitialContext(env);
    // Acquire the home interface handle and call the create
    //method on it
    homeInterface = (HotelSystemHome)ctx.lookup("OneEJBHotel");
    Here stand alone client looks up EJB by specifying the authentication information, as stand alone client and EJB are running in different JVM's.
    Hope this helps...
    Cheers
    --Venky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Broken orion-ejb-jar.dtd?

    I use the Ant task <xmlvalidate> in an EJB project to check the EJB XML deployment descriptors against their DTDs. Checking the (Sun-specified) "ejb-jar.xml" is fine. JDeveloper creates the OC4J specific deployment descriptor "orion-ejb-jar.xml" with a reference to the DTD located at "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd". Now this DTD seems to be broken.
    Firstly, the DTD seems to have an invalid syntax. I'm not a DTD expert but Ant complains about lines 279-281 of that DTD :
    279: isolation (commited | serializable | uncommited | repeatable_reads)
    280: CDATA #IMPLIED
    281: locking-mode (pessimistic | optimistic | read-only | old_pessimistic)
    286: max-tx-retries CDATA #IMPLIED
    287: update-changed-fields-only (true | false) "true"
    There seems to be an attribut missing altogether at line 280 (see line 286) so I deleted that line. Then for lines 279 and 281, Ant complained about missing quotes - apparently, such an "enum" needs to have a "default value" (as in line 287), so I manually added such a value for each line.
    The final error was in the "orion-ejb-jar.xml" (created by JDeveloper itself). Here is a piece of that:
    <orion-ejb-jar>
    <enterprise-beans>
    <session-deployment max-instances="-1" name="DiscountCalculator"/>
    I assume that the "max-instances" attribute sets the number of EJB instances in the OC4J pool to "unlimited". However, according to the DTD, session beans don't have such a "max-instances" attribute (lines 10-21):
    <!-- Deployment info for a session bean. -->
    ELEMENT session-deployment (env-entry-mapping*, ejb-ref-mapping*, resource-ref-mapping*)
    ATTLIST session-deployment call-timeout CDATA #IMPLIED
    copy-by-value CDATA #IMPLIED
    location CDATA #IMPLIED
    max-tx-retries CDATA #IMPLIED
    name CDATA #IMPLIED
    persistence-filename CDATA #IMPLIED
    timeout CDATA #IMPLIED
    wrapper CDATA #IMPLIED
    replication CDATA #IMPLIED
    >
    So I copied and pasted the instances attribute from the entity bean section.
    How come the DTD is broken? Even the 9.0.3 OC4J docs (http://download-east.oracle.com/docs/cd/A97688_08/generic.903/a97677/dtdxml.htm#620714) talk about all sorts of features (such as the "max-instances" attribute for session beans) and still points to the DTD "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd" that doesn't have these features at all.

    Karsten,
    In case you are still on it, I stumbled upon this some time ago, too. My best guess is that they miss entire phrase, which I put in bold:
    ....mmited | repeatable_reads ) "commited"
    disable-wrapper-cache CDATA #IMPLIED
    locking-mode ( pesim...
    (There is a line break between '"commited"' and 'disable-wrapper-cache'. 'commited', 'uncommited' must be MISSPELLED exactly as above.)
    Btw, max-instances and min-instances are in the DTD that ships with 9.0.3 (jarred in oc4j.jar). This DTD, however, is still broken in the way that you found (it won't even XML-validate). How do they go around this? go figure! Oracle documentation? we all know ...
    Best regards,
    bjk

Maybe you are looking for