Problem in developing a simple ejb app

Hi readers,
i am new to ejb technology, so have doubt in developing and deploying a simple ejb application
i am using EJB 2.0, JBOSS 4.0 , eclipse 3.2 and java 1.5
i searched in the net , got through many materials that can guide to develop one of it.
all are using higher versions of the above, i mean, using ejb 3.0 or using xdoclet etc.
i am need of material which guides me to develop and deploy the ejb application using the same versions of softwares step by step.
please help me in this

Hi readers,
i am new to ejb technology, so have doubt in developing and deploying a simple ejb application
i am using EJB 2.0, JBOSS 4.0 , eclipse 3.2 and java 1.5
i searched in the net , got through many materials that can guide to develop one of it.
all are using higher versions of the above, i mean, using ejb 3.0 or using xdoclet etc.
i am need of material which guides me to develop and deploy the ejb application using the same versions of softwares step by step.
please help me in this

Similar Messages

  • How To Develop a Simple WebService App XI Scenarios

    Hi,
    How can I develop A simple Webservice for any scenario, for example, if am doing File to file scenario, and i want to develop a Webservice for the same scenario,
    I think in ID we have an option Under Tools "Define Webservice" where in we can use wsdl format of the message interfaces.
    How should i proceed to develop the Webservice?
    Regards,
    Varun

    Hi Varun,
    After creating the wsdl file u can deploy using MS visual studio.
    Follow the steps and run the scenario.
    use it in a Client Program in .NET : (assuming Maths as the WSDL and Webserice name)
    1.) Place maths.wsdl in C:/Sample/ folder
    2.) Open Visual studio command prompt using the Start Menu
            Start->Programs->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt
    3.) In the Command prompt go to that directory
        > C: 
        > CD\
        > CD Sample
        > wsdl maths.wsdl /out:"c:\sample"
    4.) The previous step will create a file called Maths.cs , go to that folder and confirm this
    5.) Open Microsoft Visual Studio 2005, open the Client application where this webservice needs to be called
    6.) If your Client application is a web application, the see if the website has a folder called "App_Code"
        If not then create this folder. Right Click on this folder and click on "Add Existing Item"
    7.) Browse to C:/sample and select the Maths.cs file
    8.) If your client is a Desktop application , just add this file in a similar manner to the project(no need of creating any folder)
    9.) After the file gets added, open Maths.cs file
    10.) Add a namespace to it for convinience
            eg:
                namespace SAP
       This should come before the Class Declaration and close it after the class
        eg: See the red lines
        namespace SAP
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        [System.Web.Services.WebServiceBindingAttribute(Name = "Equi_get_NotifBinding", Namespace = "http://Equipment_Get_Notifications")]
        public partial class Equi_get_NotifService : System.Web.Services.Protocols.SoapHttpClientProtocol
          functions....
    11.) Save the Maths.cs file
    12.) Open the Webform or windows form code where this webserive will be called
    13.) The webservice will now be available here under the SAP namespace
            so when u type "SAP." u will get all the classes in it.
            Add credential in this code as shown below
        eg:
        private void GetNotifications()
            try
                SAP.Equi_get_NotifService ser1 = new SAP.Equi_get_NotifService();       //This is the Webserive Proxy class
                SAP.Equi_get_Notif_Request req = new SAP.Equi_get_Notif_Request();      //Request Class
                req.Equipment = SAPID;
                req.Date = Calendar1.SelectedDate;
                System.Net.CredentialCache ch = new System.Net.CredentialCache();                                    //Adding Credentials for authentication on webservice server
                System.Net.NetworkCredential cr = new System.Net.NetworkCredential("xisuper", "infotech");
                ch.Add(new Uri(ser1.Url), "Basic", cr);
                ser1.Credentials = ch;                // Assing this Credential to the ProxyClass.Credentials property as shown here
                SAP.Equi_get_Notif_ResponseNotifications[] res = ser1.Equi_get_Notif(req);        //Call the webservice, res is the responce object
                GridView1.DataSource = res;
                GridView1.DataBind();
            catch (Exception ex)
                Response.Write(ex.Message);
    "Award points if it is helpful"

  • Help: Problem in running a simple EJB client

    Hi All,
    I have just started learning EJB and I am facing an issue in running a client for the EJB I developed (a "Hello World" EJB)
    I have deployed my application in Sun's reference implementation of j2ee server. I have the following client code through which I intend to access EJB methods
    // EJB client code in main()
    Context ctx = new InitialContext();
    Object hwobj = ctx.lookup("HelloWorldApp");
    HelloWorldHome hworldHome = (HelloWorldHome)
    PortableRemoteObject.narrow(hwobj,HelloWorldHome.class); // exception here
    HelloWorld hworld = hworldHome.create();
    String msg = hworld.sayHelloWorld();
    System.out.println(msg);
    When I am running my client I am getting the following exception. Can anyone tell me why ?
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    at HelloWorldClient.main(HelloWorldClient.java:13)
    Thanks
    Ratheesh

    * I found the solution for this . Add j2ee.jar and Client jar returned by deploytool [ if we check return client jar ] to classpath when running client .
    * Then I got CORBA_NO_PERMISSION error . After searching in forum , I found the solution. Posting
    Forum Home > Enterprise JavaBeans
    Topic: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Welcome ratheeshpai!
    Search Forum
    Not watching this topic.
    This topic has 4 replies on 1 page (Most recent message: Nov 19, 2002 7:59 AM)
    [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: NicholasHsiao Oct 28, 2001 5:51 AM
    Hi,
    I was trying to deploy one simple session bean into J2EE RI Server. It works fine. And I wrote one client to access this session bean, it show me
    java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
    org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
    Context ic = null;
    try
    ic = new InitialContext();
    catch(Exception e)
    System.out.println("1: "+e.toString());
    This exception is happend when I try to lookup the jndi name
    This error message is happend only on J2EE 1.3 (1.3_01) . If I downgrade to J2EE 1.3Beta or even 1.2, everything would be okay. Any one know how to solve such problem ??
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: cdunn5
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Oct 31, 2001 10:04 PM
    Reply 1 of 4
    hi,
    I don't know the solution but I have the exact same problem. I see your message was posted in October, have you found any solutions yet?
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: scottiep
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Nov 22, 2001 11:21 AM
    Reply 2 of 4
    Da:Frederik Hansen ([email protected])
    Message 2 in thread
    Soggetto:Re: J2EE - NO_PERMISSION
    Newsgroups:dk.edb.programmering.java
    View this article only
    Data:2001-11-10 03:32:12 PST
    For at svare p� mit eget sp�rgsm�l: Access and Security Issues Q1: Some applications that ran under J2EE SDK 1.3
    beta 2 stop running under the 1.3 FCS release with the
    following message: java.rmi.AccessException: CORBA
    NO_PERMISSION 0 No. Why does this happen and what
    can be done about it? When your application ran under the 1.3 beta 2
    version of the reference implementation (RI), security permissions may
    not have
    been checked. For example, the beta 2 RI allowed
    calls to enterprise beans that required username-password permission,
    even
    when the client provided no username-password
    information. With 1.3 FCS release, the J2EE SDK became strict
    about checking adherence to the security policies of J2EE components. How can you make your application run under the
    FCS release? 1.If you don't want security checks, do the
    following: Use the deploytool to build a deployment
    descriptor that does not require a strict security policy: Under the Security screen of the EJB wizard
    or the Security tab of the EJB inspector in deploytool, click
    "Deployment
    Settings..". Under the box "Client
    Authentication", make sure "Support Client Choice" is checked instead of
    "Certificate"
    or "Password". 2.To require the application pass security
    checks to run, do the following: When an enterprise bean specifies
    "Certificate" or "Password" as the method of Client Authentication, use
    a J2EE
    application client, instead of a stand-alone
    Java application, to access the bean. You will need to login as a valid
    J2EE
    user.
    By : scottiep
    Thanks
    Ratheesh

  • Visual Studio 2013 problem during develop basic SharePoint-hosted app

    Hi,
    i am begginer in developing Sharepoint apps using Visual studio 2013.
    I followed this instructions http://msdn.microsoft.com/en-us/library/fp142379.aspx for creating a basic SharePoint-hosted app.  
    When i tried to build my application (Step 10 in create and deploy your first Sharepoint-hosted app) i got the following error: 
    Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site.
    What is the problem?
    thanks, Aphrodite

    http://blogs.msdn.com/b/josrod/archive/2013/02/04/quot-sideloading-of-apps-is-not-enabled-on-this-site-quot.aspx
    In order to publish a SharePoint hosted app to a site collection the site must be based on the developer site template or have the “Developer” Feature enabled on it.  The “Developer” Feature is marked as hidden in its definition so you must use PowerShell
    to enable the Feature. 
    Enable-SPFeature e374875e-06b6-11e0-b0fa-57f5dfd72085 –url
    http://sp.contoso.com
    Also check below:
    http://blogs.msdn.com/b/officeapps/archive/2013/12/10/enable-app-sideloading-in-your-non-developer-site-collection.aspx
    If this helped you resolve your issue, please mark it Answered

  • Developing Simple Chat App in ADF

    I have JDev 11.1.2.1.0.
    Can anyone provide any references to develop a simple chat app?
    I want it for:
    Two PCs connected together over a LAN.

    Hi,
    You would probably use Active Data Service, see here for an example of a simple Google Talk client: http://www.oracle.com/technetwork/articles/jellema-googletalk-094343.html
    Documentation: http://docs.oracle.com/cd/E24382_01/web.1112/e16182/adv_ads.htm#BEIDHJFD
    Regards,
    Joonas

  • Error in running a simple JSF app developed in Jdeveloper over weblogic

    I have a developed a simple JSF application using Jdeveloper 11g.
    To this application i have added a webservice proxy which generates the proxy client which communicates with the peoplesoft webservice.
    when i run the standalone proxy class, it is able to connect to the webservice and get the required data.
    But as i deploy the whole JSF application (where the managed bean calls a method in the client) in Integrated weblogic server, i get an XMLStreamReaderException.
    To debug this issue i deployed the war file in apache-tomcat6.0.26 with all the reqquired libraries in the Lib folder, it actually worked , my jsf application was able to get the data from the webservice.
    This makes me think that there is some problem in the way Jdeveloper is packaging the application.I have added all the lib & jar through "libraries &classpath" setting on project properties.But i am sure there is some problem in this process.
    I just need some help in understanding how to package an application,how to make sure all lib & jar are included in the war file??
    Any help is appreciated.
    The error i get in the weblogic is
    com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
    avax.faces.el.EvaluationException: com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    at javax.faces.component.UICommand.broadcast(UICommand.java:387)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227
    thanks in advance
    Ash

    HI
    First of all, how do you concluded that you're dealing with packaging problem?? It seems problem is in response from web service. The toolkit you have is not able to parse the soap response. Tomcat solves problem probably because of the different jars he has for web service client.
    In either way, i have personally experienced problems with JD packaging (11g). The WAR created by JD was working well in embedded WLS shipped with JD, but when deployed to production WLS 10.3.1, i got a "IO exception; premature end of file". The only solution was to create a WAR by ant.
    Here is ANT sample script for building java classes, packaging into war, deploying to WLS (for this last one, you need to reference external jar):
    <target name="build">
    <!-- compile -->
    <javac debug="true" debuglevel="${debuglevel}" source="${source_version}" target="${target_version}" destdir="${output.dir}">
    <src path="${src.location}"/>
    </javac>
    </target>
         <target name="war" depends="build">
    <delete file="${target_war_file}"/>
    <war destfile="${target_war_file}" webxml="src/WEB-INF/web.xml" manifest="/src/META-INF/MANIFEST.MF" update="true">
    <classes dir="${output.dir}"/>
    <lib dir="${build_libs.location}">
    <include name="**/*.jar"/>
    </lib>
    <!-- include important jsf files files -->
    <zipfileset dir="${path.to.conf.folder}" prefix="WEB-INF">
    <include name="adfc-config.xml"/>
    <include name="trinidad-config.xml"/>
    <include name="web.xml"/>
    <include name="weblogic.xml"/>
    </zipfileset>
    </war>
    </target>
         <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
    <classpath>
    <pathelement location="c:/oracle/wlserver_10.3/server/lib/weblogic.jar"/>
    </classpath>
    </taskdef>
    <target name="deploy">
    <wldeploy action="deploy" verbose="true" upload="true" remote="true" debug="true" name="${wls.app.name}" user="${wls.user}" password="${wls.password}" adminurl="${wls.admin.url}"
    targets="${wls.targets}" securitymodel="CustomRoles" source="${target_war_file}" nostage="false"/>
    </target>
    <target name="undeploy">
    <wldeploy action="undeploy" verbose="true" name="${wls.app.name}" user="${wls.user}" password="${wls.password}" adminurl="${wls.admin.url}" targets="${wls.targets}" failonerror="false"/>
    </target>
    <!--     properties for deploy
         wls.targets=DefaultServer
         wls.user=weblogic
         wls.password=weblogic1
         wls.app.name=myapp
         wls.admin.url=t3://127.0.0.1:7101
         -->
    Regards

  • Problems deploying a simple EJB

    I am trying to deploy a simple EJB on the 8.1.5. The bean only owns a single method that needs a unique parameter.
    No problems with compilation of source bean, home and remote interfaces, whatever the type of this parameter is.
    But when I try to deploy the jar on the server, I only succeed if the parameter of my method is a simple type (int, String ...).
    If I try the same passing a complex type (here a oracle.xml.parser.v2.XMLDocument type), I encounter this message from the deployejb tool :
    Generating EJBHome and EJBObject on the server...
    Compilation errors in oracle/aurora/ejb/gen/test_myFluxInsert/EjbObject_FluxInsert:ORA-29535: source requires recompilationjava/lang/Object: Authorization error for referenced class Oracle/xml/parser/v2/XMLDocument.java/lang/Object: Authorization error for referenced class oracle/xml/parser/v2/XMLDocument.oracle/aurora/ejb/gen/test_myFluxInsert/EjbObject_FluxInsert:50: Class oracle.xml.parser.v2.XMLDocument not found in type declaration.
    public java.lang.String insereFlux (oracle.xml.parser.v2.XMLDocument arg0)
    ^ Info: 3 errors
    And if I use an int instead of the XMLDocument parameter, everithing's right.
    Can anybody submit a no-paranormal solution ?
    Thanks.
    GH

    Parameter passing in EJB must implement Serializable. One way to solve this is:
    1. Define a new class which implements
    Serializable.
    2. Place whatever you want to pass inside
    this class.
    3. Now use the new class as your parameter.
    eg.
    public class Params implements java.io.Serializable {
    String p1;
    XmlDocmuent xdoc;,
    etc, etc
    Your program now have to use the class Params for parameter passing.
    Hope this helps.
    Tam
    null

  • Developing simple web app

    Hi,
    Really just want to know, I have this task to develop a sime web app that involves a database (to add new records, retrieve data, del, perform queries etc), where there are a number of user access levels. I'm envisioning that users will perform all this via JSP screens, with the input boxes taking parameters.
    I'm ok with java but new to all this jsp stuff.... just want to know, will knowledge of jsp and sql queries do in sufficing this task?
    Or, is the use of EJB and such other technologies be needed to complete such a task? (I'm on a very short timescale, and given that I already need to learn JSP whilst I do the task, things will be very tight if EJB is a must)
    Thanks.

    Hi,
    Thx for the reply.
    I was under the impression that JSP pages could be
    created with just HTML and SQL after I saw one JSP
    example, where the actual SQL resided in the files.This is true, but it is not looked at like a good thing. It makes the JSP ugly and hard to maintain. Besides, if you write a DB access class, then a JavaBean to represent your Data, you can do a good bit of testing and coding before you have an understanding of JSP. Then you can use the JSP to display the data, and not worry about accessing, scriptlets, where quotation marks go, and things like that... JSP are used for display, if you do your processing and logic in normal Java classes, then JSPs are much easier to work with, especially if you already know java.
    >
    Just some followup-q's, I'm been looking around and
    everyone mentions a web-inf folder... but in the same
    example I read, no such thing existed, nor did it
    include a single javabean/servletfile (all jsps). I'm
    not entirely sure if the example I saw is the full
    thing or just including those files accessible to the
    user on the client end.... so this may sound stupid,
    but is the web-inf compulsory for a web-app?
    If so, would you happen to have any good links to
    pages teaching this? I've googled this but found a
    series of confusing pages.So Web Apps are normally deplyed as a WAR (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/WebApp3.html). The link should describe how the WAR is put together.
    Even if you don't package the web app in a WAR, your directory structure should look the same.

  • Error in deploying a simple EJB 3.0

    Hi ,
    I am getting the following error while deploying my simple ejb of version 3.0 in Weblogic 9.2.
    Exception preparing module: EJBModule(build) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Error processing annotations: java.lang.NullPointerException.
    During my evaluation of Weblogic 9.2 for EJB 3.0 , I have got the following questions.
    EJB Specification states that EJB's in EJB 3.0 can be developed and deployed without the need of deployment descriptors. I have created a simple EJB with two file Env.java and EnvBean.java and the source code is given below.
    a) I just complied these class files and when I was trying to deploy without ejb-jar.xml and weblogic-ejb-jar.xml, the console was not at all allowing me to deploy.Why is this so?
    b) After I created a META-INF file under root of classes directory by placing ejb-jar.xml with empty <enterprise-beans> element, console was allowing me to deploy with errors in parsing ejb-jar.xml. The error was either session/entity/mdb is a required under <enterprise-beans> element. Why is this required when there are several examples stating <enterprise-beans> element can be empty.
    c) Later I updated ejb-jar.xml with <session> element under <enterprise-beans> with the following values. I got the above error when deployed with this change.
    I had been struggling to deploy this simple bean for almost a day.Pleas point me if there is any documentation that solves my stated problem or if there is a solution.Thanks in advance.
    regards
    Karim
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
    <enterprise-beans>
    <session>
    <description>This is the stateless ejb</description>
    <display-name>Env Bean</display-name>
    <ejb-name>EnvBean</ejb-name>
    </session>
    </enterprise-beans>
    </ejb-jar>
    Env.java
    package examples ;
    public interface Env {
    public void display();
    EnvBean.java
    package examples;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    @Stateless
    @Remote(Env.class)
    public class EnvBean implements Env {
    public void display() {
    System.out.println("Welcome to EJB 3.0");
    }

    Presumably you're using the EJB3 tech preview, and not a vanilla WebLogic 9.2 install, right?
    Can you post the full stack trace?
    -Patrick

  • Trying to write a basic EJB app w/ JPA and remote client

    I'm trying to put together a simple sample app that shows a simple stateless session bean that grabs a Java EE 5 entity from the DB and sends it to the remote caller. I have an entity class called Person that simply has getId() and getName() methods.
    I'm trying to get a reference to the session bean (using InitialContext.lookup()), which works. Then I try to call a method on that bean, which works as long as the type being returned is not a Person object. I've had the bean always return "Hello" and it works just fine.
    Here's the bean code.
    @Stateless(mappedName="RolodexSession")
    public class RolodexSessionBean implements RolodexSessionRemote {
        @PersistenceContext
        private EntityManager em;
        /** Creates a new instance of RolodexSessionBean */
        public RolodexSessionBean() {
        public Object getPersonByName(String name)
            Query q = em.createQuery("select object(o) from Person o where o.name=:n");
            q.setParameter("n",name);
            List results = q.getResultList();
            if (results.isEmpty())
                return "emtpy";
            // this would work just fine...
            // return "Some string";
            // but this doesn't work at all
            return results.get(0);
    }Here's the client code...
    public class Main {
        @EJB
        protected RolodexSessionRemote rolodexSession;
        /** Creates a new instance of Main */
        public Main() throws NamingException {
            Context ctx = new InitialContext();
            rolodexSession = (RolodexSessionRemote)ctx.lookup("RolodexSession");
            Object result = rolodexSession.getPersonByName("John Smith");
            System.out.println(result);
         * @param args the command line arguments
        public static void main(String[] args) throws NamingException {
            Main m = new Main();
    }I made sure to put a Person object into my database with the name "John Smith".
    The error I keep getting is...
    Dec 7, 2006 4:40:29 PM com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
    WARNING: "IOP00810257: (MARSHAL) Could not find class"
    org.omg.CORBA.MARSHAL:   vmcid: SUN  minor code: 257 completed: Maybe
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:8309)
            at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:984)
            at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
            at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1987)
            at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2211)
            at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1219)
            at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:398)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:329)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:295)
            at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1005)
            at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
            at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:269)
            at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:558)
            at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:710)
            at com.sun.corba.ee.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:225)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:449)
            at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.read(DynamicMethodMarshallerImpl.java:251)
            at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:162)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
            at session.__RolodexSessionRemote_Remote_DynamicStub.getPersonByName(__RolodexSessionRemote_Remote_DynamicStub.java)
            at session._RolodexSessionRemote_Wrapper.getPersonByName(session._RolodexSessionRemote_Wrapper.java)
            at clientapp.Main.<init>(Main.java:33)
            at clientapp.Main.main(Main.java:41)I'm running this on the Sun Java System App Server 9.0.
    Any ideas?

    I've narrowed down the issue. The Person object that I'm trying to send back has a one-to-many relationship with Address objects. I have this all setup correctly, I think. Here's the code from Person.java that establishes that relationship.
         * Holds value of property addresses.
        @OneToMany(mappedBy = "person")
        private List<Address> addresses;
         * Getter for property addresses.
         * @return Value of property addresses.
        public List<Address> getAddresses() {
            return this.addresses;
         * Setter for property addresses.
         * @param addresses New value of property addresses.
        public void setAddresses(List<Address> addresses) {
            this.addresses = addresses;
        }In Address.java I have the other side of the relationship defined (again, correctly, I think).
    IF I COMMENT OUT THIS RELATIONSHIP EVERYTHING WORKS! So, the problem seems to be related to using foreign key associations. Is there something I'm missing here? Perhaps it's related to lazy-loading of foreign keys?

  • Always fail to deploy to server when (Create a Simple EJB Session Bean )

    Hi,
    I'm trying the "Oracle JDeveloper 11g Tutorials" - "Create a Simple EJB Session Bean", I just follow the instructions in that page. But when I tried to run it, it always failed. Can anyone help me to have a look. I paste the log below. thank you.
    There's an error in the log "java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener". but I don't know what's that meaning.
    E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m
    WLS Start Mode=Development
    CLASSPATH=;e:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;e:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;e:\Oracle\MIDDLE~1\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;e:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;e:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.0.0.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;e:\Oracle\MIDDLE~1\modules\ORGAPA~1.5/lib/ant-all.jar;e:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;;E:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;;
    PATH=e:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\native;e:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;e:\Oracle\MIDDLE~1\patch_cie660\profiles\default\native;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;e:\Oracle\MIDDLE~1\modules\ORGAPA~1.5\bin;e:\Oracle\MIDDLE~1\JDK160~1\jre\bin;e:\Oracle\MIDDLE~1\JDK160~1\bin;C:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;G:\D\JACKYH\Installed\apache-ant-1.7.1\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CollabNet Subversion;U:.;V:.;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
    Starting WLS with line:
    e:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m -DproxySet=false -Djbo.34010=false -Xverify:none -da -Dplatform.home=E:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=e:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sysext_manifest_classpath;e:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath;e:\Oracle\MIDDLE~1\patch_cie660\profiles\default\sysext_manifest_classpath -Dweblogic.Name=DefaultServer -Djava.security.policy=E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy weblogic.Server
    <12/11/2008 10:54:31 AM EST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    E:\Oracle\Middleware\patch_wls1030\profiles\default\sysext_manifest_classpath\weblogic_ext_patch.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_TW.jar>
    <12/11/2008 10:54:32 AM EST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 10.0-b19 from Sun Microsystems Inc.>
    <12/11/2008 10:54:32 AM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for CR380042 Thu Sep 11 13:33:40 PDT 2008
    WebLogic Server Temporary Patch for 7372756 Fri Sep 12 17:05:44 EDT 2008
    WebLogic Server 10.3 Mon Aug 18 22:39:18 EDT 2008 1142987 >
    <12/11/2008 10:54:33 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <12/11/2008 10:54:33 AM EST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <12/11/2008 10:54:34 AM EST> <Notice> <Log Management> <BEA-170019> <The server log file E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    <12/11/2008 10:54:36 AM EST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <12/11/2008 10:54:38 AM EST> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddi was not deployed. Error: [Deployer:149158]No application files exist at 'E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddi.war'.>
    <12/11/2008 10:54:38 AM EST> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddiexplorer was not deployed. Error: [Deployer:149158]No application files exist at 'E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddiexplorer.war'.>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <12/11/2008 10:54:39 AM EST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <12/11/2008 10:54:39 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <12/11/2008 10:54:39 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.12.54:7101 for protocols iiop, t3, ldap, snmp, http.>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <12/11/2008 10:54:39 AM EST> <Warning> <Server> <BEA-002611> <Hostname "jackyh.dst.com.au", maps to multiple IP addresses: 192.168.12.54, 127.0.0.1>
    <12/11/2008 10:54:39 AM EST> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 192.168.12.54, 127.0.0.1>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    DefaultServer startup time: 13829 ms.
    DefaultServer started.
    [Running application SessionEJB on Server Instance DefaultServer...]
    ---- Deployment started. ---- 12/11/2008 10:54:43
    Target platform is (Weblogic 10.3).
    Running dependency analysis...
    2008-11-12 10:54:43.882: Writing EJB JAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB\SessionEJB-Project1-ejb
    2008-11-12 10:54:43.914: Wrote EJB JAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB\SessionEJB-Project1-ejb
    2008-11-12 10:54:44.148: Writing EAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB
    2008-11-12 10:54:44.164: Wrote EAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB
    Deploying Application...
    <12/11/2008 10:54:46 AM EST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1226447686226' for task '0'. Error is: 'weblogic.management.DeploymentException: '
    weblogic.management.DeploymentException:
         at weblogic.application.internal.flow.BaseLifecycleFlow$CreateListenerAction.run(BaseLifecycleFlow.java:171)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.application.internal.flow.BaseLifecycleFlow$BaseAction.invoke(BaseLifecycleFlow.java:99)
         at weblogic.application.internal.flow.HeadLifecycleFlow.createListener(HeadLifecycleFlow.java:117)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)
         Truncated. see log file for complete stacktrace
    >
    <12/11/2008 10:54:46 AM EST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'SessionEJB'.>
    <12/11/2008 10:54:46 AM EST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.management.DeploymentException:
         at weblogic.application.internal.flow.BaseLifecycleFlow$CreateListenerAction.run(BaseLifecycleFlow.java:171)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.application.internal.flow.BaseLifecycleFlow$BaseAction.invoke(BaseLifecycleFlow.java:99)
         at weblogic.application.internal.flow.HeadLifecycleFlow.createListener(HeadLifecycleFlow.java:117)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)
         Truncated. see log file for complete stacktrace
    >
    [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application SessionEJB on DefaultServer.: .
    weblogic.management.DeploymentException:
    #### Deployment incomplete. #### 12/11/2008 10:54:46
    oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$4$1.run(AdrsStarter.java:1316)
    Caused by: oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
         ... 12 more
    #### Cannot run application SessionEJB due to error deploying to DefaultServer.
    [Application SessionEJB stopped and undeployed from Server Instance DefaultServer]

    Steve,
    I'm facing the same issue as user#####.
    Your workaround does not work ; when I deploy manuelly the ear file, with a new weblogic-application.xml, I get the same error.
    Does that happen a lot ? :p
    Edit :
    my web.xml :
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
      <description>Empty web.xml file for Web Application</description>
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
      </context-param>
      <context-param>
        <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
        <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
        <description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
        <param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
        <param-value>false</param-value>
      </context-param>
      <filter>
        <filter-name>JpsFilter</filter-name>
        <filter-class>oracle.security.jps.ee.http.JpsFilter</filter-class>
      </filter>
      <filter>
        <filter-name>trinidad</filter-name>
        <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
      </filter>
      <filter>
        <filter-name>adfBindings</filter-name>
        <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>JpsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>
      <filter-mapping>
        <filter-name>trinidad</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
      </filter-mapping>
      <filter-mapping>
        <filter-name>adfBindings</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
      </filter-mapping>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet>
        <servlet-name>resources</servlet-name>
        <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/afr/*</url-pattern>
      </servlet-mapping>
      <session-config>
        <session-timeout>35</session-timeout>
      </session-config>
      <mime-mapping>
        <extension>html</extension>
        <mime-type>text/html</mime-type>
      </mime-mapping>
      <mime-mapping>
        <extension>txt</extension>
        <mime-type>text/plain</mime-type>
      </mime-mapping>
    </web-app>Luc-
    Edited by: Lucas Ismag on 4 déc. 2008 05:33

  • A simple EJB in OAS 4081

    We failthfully followed the procedure given in technet.oracle.com/products/jdev (JDeveloper 3.0 Technical Information - Developing and Deploying EJBs using JDeveloper 3.0 and running the deployed EJB from a client application) to create an EJB.
    We got the following error when we tried to run the client from JDeveloper.
    "D:\jdeveloper\java1.2\jre\bin\javaw.exe" -mx50m -classpath "D:\jdeveloper\myclasses;D:\jdeveloper\lib\ejbapi.jar;D:\jdeveloper\lib\oasoorb.jar;D:\jdeveloper\myprojects\jayEJBCl.jar;D:\jdeveloper\lib\jdev-rt.zip;D:\jdeveloper\jdbc\lib\oracl e8.1.5\classes111.zip;D:\jdeveloper\lib\connectionmanager.zip;D:\jdeveloper\lib\javax_ejb.zip;D:\jdeveloper\java1.2\jre\lib\rt.jar" jayEJB.jayEJBClient
    Creating an initial context
    Looking for the EJB published as 'jayEJB/HelloEJB'
    Naming exception occurred!
    Cause: This may be an unknown URL, or some classes required by the EJB are missing from your classpath, or your OAS host is short of resources
    Suggestion: Check the components of the URL, and make sure your project includes a library containing the EJB .jar files generated by the deployment utility.
    [Root exception is org.omg.CORBA.NO_IMPLEMENT: minor code: 0 completed: No]javax.naming.ServiceUnavailableException
    java.lang.Object oracle.oas.jndi.oas.SecCosNamingContext.resolve(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanContext.lookup(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanInitialContext.resolve(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanContext.lookup(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanInitialContext.lookup(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.WrapperContext.lookup(javax.naming.Name)
    java.lang.Object oracle.oas.jndi.oas.BeanContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void jayEJB.jayEJBClient.main(java.lang.String[])
    Can anyone suggest the remedy ?
    null

    I don't know if this applies for you but this may help you:
    "I am running OAS on Windows NT, and my client hangs during the JNDI home interface lookup. What can I do ?
    If your OAS EJB client hangs, and then throws an exception similar to the one below during the JNDI home interface lookup, this is
    probably due to the fact that the java process in which your application is supposed to run cannot be started.
    [Root exception is org.omg.CORBA.NO_RESOURCES:
    ]javax.naming.InsufficientResourcesException
    at oracle.oas.jndi.oas.SecCosNamingContext.resolve(Compiled Code)
    at oracle.oas.jndi.oas.BeanContext.lookup(Compiled Code)
    at oracle.oas.jndi.oas.BeanInitialContext.resolve(Compiled Code)
    at oracle.oas.jndi.oas.BeanContext.lookup(Compiled Code)
    at oracle.oas.jndi.oas.BeanInitialContext.lookup(Compiled Code)
    at oracle.oas.jndi.oas.WrapperContext.lookup(Compiled Code)
    at oracle.oas.jndi.oas.BeanContext.lookup(Compiled Code)
    at javax.naming.InitialContext.lookup(Compiled Code)
    at appPackage.BeanClient.main(Compiled Code)
    You can verify that by looking at the wrb.log file (located in ows/admin/website40/log). It should report that it failed to get the cartridge for your
    application (yourAppName__) by a message similar to the one below:
    12-01-1999 09:43:10 0 plemouel-pc `RM Proxy` 301 0 0x1200fff `OWS-25010:
    Failed to get cartridge 'appPackage/__' for '360' times.
    If your EJB is deployed in OAS on NT, and you have installed the JDK 1.2, or JRE1.2 on your machine don't look further. Even if your path and
    classpath are set to use the correct 1.x JDK, OAS EJBs runtime uses the createProcess system command, which will cause the JDK1.2 JVM
    to be loaded. This version of the JVM is not supported at the moment by OAS.
    The reason behind this unfortunate behavior is twofold:
    When you install JDK 1.2, the java.exe executable is also copied in the Windows system32 directory.
    The system command we are using (createProcess) to start the JVM looks there first (MS design) before looking in the PATH
    environment variable.
    Therefore OAS tries to start your EJB application in JDK1.2 JVM, which is not supported at the moment.
    We will fix this problem, but in the meantime, if you need to have the JDK1.2 on the same machine as your OAS installation. You will need to
    edit the wrb.app (this file is located in directory ows\admin\website40\wrb) file after deploying your EJB.
    In the wrb.app file look for:
    [APPLICATION.myAppName]
    where myAppName is the name of your EJB application. Below this tag, you should have the following line:
    ExecString = javaw -mx64M oracle.oas.container.Main
    Edit this line to add the javaw path. This should look something like this:
    ExecString = c:\orant\ows\4.0\jdk\bin\javaw -mx64M oracle.oas.container.Main
    Save the wrb.app file and then reload OAS.
    If you have not installed the JDK1.2 or JRE1.2, your EJB has probably been deployed incorrectly. Check in directory
    ows/apps/ejb/yourAppName to make sure that the following three files are present: _application.jar; _client.jar; and _server.jar."
    null

  • Can't get simple Struts app to work when using DCs

    Hello,
    I need to use Struts to develop web apps. I took a simple example app of 3 screens and was able to get it working fine in local development.
    Then I tried to do same thing using DCs in a Track. The first page of the app is a jsp called login.jsp. That file has the following two lines at the beginning:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    This works fine in local development. However in the DC I get the following error when I try to run login.jsp:
    Application error occurs during processing the request.
      Internal error while parsing JSP page C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/com.firstenergycorp/pilot_webapp~strutsear/servlet_jsp/struts/root/login.jsp.
      Details:   com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Tag library descriptor cannot be found for uri:{1}.  The ID of this error is
    Exception id: [000F1FCC15FA00450000000F00000CA4000400A8BC089FE5].
    The struts-html.tld and struts-bean.tld are both in the WEB-INF folder of my Web Module DC.
    So why am I getting this error?
    Thanks in advance for any help.
    David.

    David,
    we are using Struts in our application without any problems. But we don't deploy via JDI but build the ear-files in Netweaver Studio and deploy with SDM.
    I guess the tag libs are not added properly to the war file of your productive environment. Can you check whether they contain the files in the correct path ?
    And you shouldn't mix Tag Libs and struts.jar of different versions (e.g 1.0 + 1.2). That will result in the very same error message.
    Regards, Astrid
    Regards, Astrid

  • Problem while developing stasteless session bean

    Hi All,
    I am learning Ejb,i developed a simple hello world application using statelesssession bean in weblogic server8.1.And i packed it in a jar file named slb.jar.
    Then i am trying to create stub and skeleton using following command,but i am getting this error.can anybody please help me.
    C:\nkmb\ejb\HelloEjb>java weblogic.ejbc slb.jar
    <Jun 22, 2006 9:55:35 AM EDT> <Warning> <EJB> <BEA-010212> <The EJB 'HelloBean(J
    ar: slb.jar)' contains at least one method without an explicit transaction attri
    bute setting. The default transaction attribute of Supports will be used for the
    following methods: remote[hello()] >
    C:\nkmb\ejb\HelloEjb\ejbcgen\examples\HelloBean_gbyfgg_Impl.java:11: cannot a
    ccess java.io.Serializable
    bad class file: C:\Program Files\Java\jre1.5.0_06\lib\rt.jar(java/io/Serializabl
    e.class)
    class file has wrong version 49.0, should be 48.0
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    public final class HelloBean_gbyfgg_Impl
    ^
    1 error
    Exec failed .. exiting
    can anybody help me to getting out of this problem.
    thanks inadvance,
    nkmb

    http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_solution&answerpage=solution&page=wlw/S-28139.htm

  • Unable to deploy simple EJB example with J2EE Ref. Impl.

    Hi there,
    I'm new to EJB development so please bare with me. I've written a simple EJB, taken from Enterprise JavaBeans by Richard Monson-Haefel (O'Reilly). I can compile the code without problems, load it into the J2EE deployment tool (I'm using version 1.3.1 of the J2EE Reference Implementation), and have succesfully set up the data source and SQL commands for each persistent field.
    When it comes to deployment, I'm stumped with the following error:
    java.rmi.RemoteException: Error processing ejb jar: Compilation failed.
    Here's the stacktrace in the error logs:
    Compilation failed.
         at com.sun.ejb.codegen.GeneratorDriver.compileClasses(GeneratorDriver.java:232)
         at com.sun.ejb.codegen.GeneratorDriver.preDeploy(GeneratorDriver.java:610)
         at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployEjbs(JarInstallerImpl.java:707)
         at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployApplication(JarInstallerImpl.java:221)
         at org.omg.stub.com.sun.enterprise.tools.deployment.backend._JarInstallerImpl_Tie._invoke(Unknown Source)
         at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:350)
         at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:250)
         at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:79)
         at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:104)Here's the source:
    ==============================CabinHome.java=========================
    package com.titan.cabin;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    public interface CabinHome extends javax.ejb.EJBHome {
      public Cabin create (int d) throws CreateException, RemoteException;
      public Cabin findByPrimaryKey (CabinPK pk) throws FinderException;
    }================================CabinBean.java========================
    package com.titan.cabin;
    import javax.ejb.EntityContext;
    public class CabinBean implements javax.ejb.EntityBean {
      public int id;
      public String name;
      public int deckLevel;
      public int ship;
      public int bedCount;
      public CabinPK ejbCreate (int id) {
        this.id = id;
        return null;
      public void ejbPostCreate (int id) {
      public String getName () {
        return name;
      public int getShip () {
        return ship;
      public int getDeckLevel () {
        return deckLevel;
      public int getBedCount () {
        return bedCount;
      public void setName (String str) {
        this.name = str;
      public void setShip (int s) {
        this.ship = s; 
      public void setDeckLevel (int d) {
        this.deckLevel = d;
      public void setBedCount (int c) {
        this.bedCount = c;
      public void setEntityContext (EntityContext ctx) {}
      public void unsetEntityContext () {}
      public void ejbActivate() {}
      public void ejbPassivate () {}
      public void ejbLoad () {}
      public void ejbStore () {}
      public void ejbRemove () {}
    }===============================Cabin.java============================
    package com.titan.cabin;
    import java.rmi.RemoteException;
    public interface Cabin extends javax.ejb.EJBObject {
      public String getName() throws RemoteException;
      public void setName(String str) throws RemoteException;
      public int getDeckLevel() throws RemoteException;
      public void setDeckLevel (int level) throws RemoteException;
      public int getShip() throws RemoteException;
      public void setShip (int sp) throws RemoteException;
      public int getBedCount() throws RemoteException;
      public void setBedCount() throws RemoteException;
    }============================CabinPK.java=============================
    package com.titan.cabin;
    public class CabinPK implements java.io.Serializable {
      public int id;
      public int hashCode() {
        return id;
      public boolean equals (Object obj) {
        if (obj instanceof CabinPK) {
          return (id == ((CabinPK) obj).id);
        return false;
    }Has anyone else experienced anything similar, or is there something I'm obviously doing wrong?
    Thanks for your help.
    Matt

    Here's the ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Created by matt on 10 September 2002, 14:32 -->
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
        "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
    <ejb-jar>
        <enterprise-beans>
            <entity>
                <description>
                    This Cabin enterprise bean entity represents a cabin on a cruise ship.
                </description>
                <ejb-name>CabinBean</ejb-name>
                <home>com.titan.cabin.CabinHome</home>
                <remote>com.titan.cabin.Cabin</remote>
                <ejb-class>com.titan.cabin.CabinBean</ejb-class>
                <persistence-type>Container</persistence-type>
                <prim-key-class>com.titan.cabin.CabinPK</prim-key-class>
                <reentrant>False</reentrant>
                <cmp-field><field-name>id</field-name></cmp-field>
                <cmp-field><field-name>name</field-name></cmp-field>
                <cmp-field><field-name>deckLevel</field-name></cmp-field>
                <cmp-field><field-name>ship</field-name></cmp-field>
                <cmp-field><field-name>bedCount</field-name></cmp-field>
            </entity>
        </enterprise-beans>
        <assembly-descriptor>
            <security-role>
                <description>
                    This role represents everyone who is allowed
                    full access to the cabin bean.
                </description>
                <role-name>everyone</role-name>
            </security-role>
            <method-permission>
                <role-name>everyone</role-name>
                <method>
                    <ejb-name>CabinBean</ejb-name>
                    <method-name>*</method-name>
                </method>
            </method-permission>
            <container-transaction>
                <method>
                    <ejb-name>CabinBean</ejb-name>
                    <method-name>*</method-name>
                </method>
                <trans-attribute>Required</trans-attribute>
            </container-transaction>
        </assembly-descriptor>
    </ejb-jar>Thanks...

Maybe you are looking for