Use of EJB in a package application.

Has anyone come across a packaged application/product (Like and ERP system,
CRM product etc.) that was created using EJB as the "back-end" and then
deployed as a "shrink-wrapped" application?
I would like to hear some views on this from everyone.

I don't know about "shrink wrapped", but YouCentric's CRM (now owned by J.D.
Edwards) is EJB on the back-end.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Raju" <[email protected]> wrote in message
news:[email protected]..
Has anyone come across a packaged application/product (Like and ERPsystem,
CRM product etc.) that was created using EJB as the "back-end" and then
deployed as a "shrink-wrapped" application?
I would like to hear some views on this from everyone.

Similar Messages

  • How can I interface a Java application which is not running under NetDynamics, to use the EJBs in a NetDynamics application?

    One of them uses Enterprise Java Beans implemented with a SUN NetDynamics application server. The other is a straight Java application. Ideally I want the second application to remotely invoke methods on the existing Java beans, so the existing business logic will not be duplicated.
    This would seem to be simple, but NetDynamics appears to substitute some proprietary code for part of the EJB interface, and it is not immediately obvious how to let "foreign" java programs access the beans.
    I would appreciate it if anyone is able to provide any information on how to achieve this. If you know of any sample code that I could look at, that would be a help too. This may (or may not) be known to SUN as a "stand alone java client".

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

  • What data binding framework to use for EJB(JPA) - Swing desktop application

    Hi!
    I am developing EJB server application which mostly uses the same entities and session EJB's both for web and for desktop user interface. While JSF is working nicely, I am stuck with necessity to make decision with data binding framework to use for desktop application - I investigated:
    - JSR295 reference impementation at java.net (beans binding)
    - Eclipse JFace
    - JSR295 implementation at kenai.com (better beans binding)
    - JGoodies binding
    At present I like JGoodies, but I am not sure whether I am not missing something - I guess - large enterprises should develop a lot of desktop applications as well and what binding framework they are using?

    user454720 wrote:
    At present I like JGoodies, but I am not sure whether I am not missing something - I guess - large enterprises should develop a lot of desktop applications as well and what binding framework they are using?No, not really. I create them sometimes but they are service tools, not part of the main application framework. Generally you keep everything on the server, web based - this keeps it secure, accessible and contained. With all the web 2.0 javascript toolkits available nowadays you can go quite far creating a desktop experience in a browser, with limitations.

  • Use an EJB from a C++ application

    Hello,
    How could i call an EJB which lives in a JBoss application server from a C++ application which runs on a Windows client ?
    Cheers.
    Stefano

    Greetings,
    Hello,
    How could i call an EJB which lives in a JBoss
    application server from a C++ application which runs
    on a Windows client ?Three or four steps must be completed to accomplish this, the details of all of which are beyond the "scope" of this forum. In summary, however, they are:
    1. Configure JBoss 3 for RMI-IIOP communication - the quick solution is to start the server in '-all' mode.
    2. Generate IDL stubs for your beans. Use 'rmic -idl ...'.
    3. Create communication stubs for and integrate them into your C++ application.
    4. Of course, if the application doesn't already have CORBA support it will have to be integrated as well.
    That's the quick "1, 2[, er... 3, 4]". :)
    Cheers.
    StefanoRegards,
    Tony "Vee Schade" Cook

  • Using EJBs in Web Dynpro Applications

    I have recently started to develop Web applications using the Web Dynpro framework. Coming from a pure J2EE world, I must admit that Web Dynpro has a few innovative features that I find interesting for user interface development. The use of component & view contexts, for example, is not unlike the ActionForms that one may find in a Struts application, but pushed a bit further. No complaints here.
    What I do have some problems with is the whole CommandBean paradigm that is put forth by SAP (refer to the document <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20ejbs%20in%20web%20dynpro%20applications.pdf">Using EJBs in Web Dynpro Applications</a>).
    I do understand the usefulness of defining a model that will be used to generate and eventually bind to Context data structures. That's fine. What I do object to is the use of a so-called CommandBean to play that role. Again, coming from a J2EE world, I am familiar with the BusinessDelegate pattern - which would typically be used by a client application to invoke business logic on the server side. I would propose that a better, cleaner way of integrating EJBs with the Web Dynpro framework would be to use a BusinessDelegate for invoking business logic, and importing a separate and distinct ModelBean (instead of a CommandBean) to be used for defining and binding to Context data.
    I have built one Web Dynpro application thus far. Instead of using a CommandBean, I created a ModelBean that extends my business object DTO (Data Transfer Object) (which is quite appropriate for that role, given that it implements all the get & set methods that are required for the business data that I need to model). My Web Dynpro application also makes use of an independant BusinessDelegate that is packaged with my EJB DC - this is a standard best practice on J2EE projects. I have been asked by the people working with me to modify this architecture to bring it more in line with the SAP way of doing things. I am open-minded and willing to learn and accept new ways of thinking and doing things. However, I fail to understand the usefulness of merging structure and behaviour by resorting to CommandBeans:
    - <b>It violates the MVC paradigm</b> by having one object (the CommandBean) serve as both model AND controller as far as the Web Dynpro application is concerned. The CommandBean is obviously a model - since it is literally imported as such into the Web Dynpro application. It is ALSO a controller from the Web Dynpro's application perspective, since all calls to the back-end go thru the CommandBean via one or more of its execute_xxx methods. In contrast, the use of a business delegate by the Web Dynpro application clearly separates the model (the CommandBean... or rather, a more suitably named ModelBean) from the controller (BusinessDelegate).
    - <b>Doesn't carry its own weight</b>. In other words, I haven't yet been provided with any valid justification for going thru the extra effort of coding the CommandBean's execute methods. It's been proposed to me that it somehow serves as an abstraction layer between the Web Dynpro application and the business logic. I would argue that it is the BusinessDelegate's role to abstract away the back-end logic from clients. If one does have a BusinessDelegate available, I would argue there's no need to code execute methods in a separate CommandBean. To prove my point, I would simply point out that all of the CommandBean examples that I have seen so far, either in How-To documents, or in production code, all follow the same pattern....
    CommandBean.execute_doSomething() calls BusinessDelegate.doSomething()
    Not a heck of an "abstraction" layer... I would in fact argue that it is worse than useless. If some major change occurs in the business logic that requires changing the doSomething() operation, we expect of course to modify the BusinessDelegate. The Web Dynpro client will also presumably need to be modified - that's to be expected, and unavoidable. But then, we'll also need to go about and change the CommandBean's execute_doSomething() method - again, extra work for no apparent benefit. Adding and removing business methods has the same implication. All this for an layer that simply adds the prefix execute_ in front of all business method calls... Is this "abstraction layer" worth the cost of creating and maintaining it ??
    - <b>Unnecessarily complicates error handling</b>. I have been told that for technical reasons, it is recommended that all exceptions thrown by the CommandBean be of type WDException or WDRuntimException. But what if the client application needs to react differently to different failure scenarios ? When I create a business object, I might wish to provide the user with an error messages if connection is lost to the backend, and with a different error message if an object already exists in the database with the same attributes. In order to do that, I will have to catch the WDException, extract the cause, and continue processing from there... possible, yes, but clearly less standard and more labor intensive than the classical try/catch mechanism.
    To say nothing about the fact that SAP's own API documentation clearly states that applications using Web Dynpro can reference and catch WDExceptions, but THEY MUST NOT THROW OR EXTEND IT !
    - <b>Produces unnecessary DCs</b>. Page 6 of the aforementioned document presents an architectural view of a Web Dynpro project that uses a CommandBean. Why an extra DC for the CommandBean ?? I created my ModelBean class right inside the Web Dynpro project (in the Package view). That, to me, is where this class should reside, because it is created for no other reason that to be used by this particular Web Dynpro application. What is the benefit of placing it in its own independant DC ?
    - <b>Not a typical application of the Command pattern</b>. The well-documented command pattern (Design Patterns - Gang of Four) has been devised mainly to enable encapsulation of request as objects, thereby making it possible to:
    - specify, queue and execute requests at different times
    - decouple execution of a command from its invoker
    - support undo operations
    - support logging changes so that they can be reapplied in case of system crash making it possible to assemble commands into composite commands (macros), thereby structuring a system around high-level operations built on primitive operations.
    None of this applies to the way the SAP CommandBeans are being used. Not that much of an issue to people new to J2EE and/or OO development... but quite confusing for those already familiar with the classic Command pattern.
    At this point, I fail to understand the advantage of merging structure (model) and behaviour (execute methods) through the use of a unique CommandBean object. Am I missing something ?

    Hi Romeo,
    You would be disappointed, this reply ain't anywhere nearby to what you are talking about...
    I wanted to mail you, but you have not mentioned your email in your profile.
    I am really impressed by your flair for writing. It would be far better had you written a blog on this topic. Believe me, it would really be better. There is a much wider audience waiting out there to read your views rather than on the forums. This is what I believe. To top it, you would be rewarded for writing something like this from SDN. On the blogs too, people can comment and all, difference being there you would be rewarded by SDN, here people who reply to you would be rewarded by you. Doesn't make  much a difference.
    Anyways the ball is still in your court
    As far as I am concerned, it has still not been much time since I have started working on Web Dynpro. So can't really comment on the issue...
    Bye
    Ankur

  • Using Sales Forecast packaged application

    Hi, i wish to use the sales forecast packaged application but, trying with different users all the users see the same data, i mean the Sales Rep A see the selling cycle of Sales rep B. Since the manager is right to be able to look to Rep's opportunities this is not valid between Reps. Am I doing something wrong?
    What is the best and fastest way to implement such controls?
    Thank you in advance.
    Maurizio

    Hi Maurizio,
    The sales forecasting app seems to be an overall view of sales and sales cycle, it doesn't restrict the data. It only restricts the Admin functions when you set at least one APEX user as admin.
    You'll need to implement some sort of VPD (Virtual Private Database) policy to restrict data to each user.
    You say that you "try with different users", how do you mean?
    Have you set up Apex users as reps?
    If you have, there will be no link to those users in the reps table in the database.
    What you may have to do is set up a custom authorization and link it to the Reps table.
    Search this forum and the Apex docs for "Custom Authorization" for help with this.
    Your custom authorization will then have to link with the VPD.
    See this link for VPD and other options
    Re: Any ideas on restriciting users/groups of users to data
    Hope this helps,
    Gus..

  • Can I use APEX Packaged applications for commercial purposes

    Hi,
    When you download and Install APEX, it comes with pre build packaged applications. Can I use it to make money?
    I understand that I will not be able to get any support for Oracle and all that.  But  using  Database XE with APEX, can I start shipping these applications and make money lawfully without violating Oracle's terms?
    Please advise.
    Darsh

    Hi Darsh,
    I can't say that this was a good answer, but I addressed a similar question in this forum posting:  https://forums.oracle.com/thread/2600958
    Joel

  • Is it Legal to use an APEX packaged application, improve it and Sell it?

    Any thought on this is appreciated, I'm trying to get an answer from Oracle but no one is sure of the answer. There is this Sample Database Application which is great to build a small shop POS program.
    Thank you

    This is quite good question, there are several tools which have very decent start for building larger and better application for e.g. in-house usage.
    But those improvements are very likely wasted when new versions of those packaged applications are released.
    One option could be community contributed enhancements to packaged applications which are then accepted/rejected to next release of the packaged applications?
    Other option could be commercial enhancements to packaged applications with some sort of 'certified to work in Apex5' stamp?
    Of course the licensing could be a bit more clear for the vanilla Packaged Apps. I think most of use love to 'reverse engineer' what they have eaten
    rgrds Paavo

  • I m not getting connected to oracle 9i database using my ejb...

    hi i have made a simple ejb which simply connects to a database of oracle 9i using a datasource on oracle 10g application server...but now my problem is that when i am trying to deploy the ejb ..it is not getting deployed...it shows the following error..
    Deployment failed:nested exception
    resolution:
    base exception:
    com.evermind.server.rmi.OrionRemoteException
    Disconnected:Connection reset. Disconnected:Connection reset.
    the code i am using for EJB class is as follows
    package Simpapp;
    import javax.ejb.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class SimpappBean implements SessionBean {
        static final String DATASOURCE = "bajaj";
        static final String SQL = "select * from login ";
        DataSource ds;
        public String upper (String input) throws java.rmi.RemoteException {
         try {
             Connection conn = ds.getConnection ("bajaj10g","bajaj10g");
             Statement sql = conn.createStatement ();
             //sql.setString (1, input);
             ResultSet results = sql.executeQuery (SQL);
             if (results.next () == false) {
              System.out.println ("No rows for "+ input);
                  throw new java.rmi.RemoteException ("SQL failure");
             } // if
             String result = results.getString ("username");
             results.close ();
             sql.close ();
             conn.close ();
             if (result == null) {
              System.out.println ("NULL result for "+ input);
                  throw new java.rmi.RemoteException ("SQL failure");
             } else
              return (result);
         } catch (SQLException sqle) {
             System.err.println ("While executing SQL: " +
              sqle.getMessage ());
             throw new java.rmi.RemoteException ("SQL failure");
            } catch (Exception e) {
             System.err.println ("Unknown Exception: " +
              e.getMessage ());
             throw new java.rmi.RemoteException ("Bean Exception: " +
              e.getMessage ());
         } // catch
        } // simpapp
        public void ejbCreate () {
             try {
             Context ctx = new InitialContext ();
             ds = (DataSource) ctx.lookup (DATASOURCE);
         } catch (Exception e) {
             System.out.println ("While creating Bean " +
              e.getMessage ());
         } // catch
        } // ejbCreate
        public void ejbRemove () {}
        public void ejbActivate () {}
        public void ejbPassivate () {}
        public void setSessionContext (SessionContext ctx) {}
    } // SimpappBeancan any body suggest me where lies the problem???
    all my Home ,Remote classes are doing well when they are used for any other simple helloworld type of program

    Is that the only Oracle client installed? If you have another one hanging around it could be using the wrong tnsnames file.

  • EJB 3.0 - JSF APPLICATION: DATA DOES NOT PERSIST TO THE DATABASE

    Hi,
    I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
    Here is my scenario ( Iam using JDeveloper IDE to create this application) -
    SCENARIO START
    The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
    1.) INDEX.JSP
    2.) ADDUSER.JSP
    Step 1: Create the USERS Table in database
    CREATE TABLE users
    user_id serial,
    username varchar(255) NOT NULL,
    first_name varchar(255),
    last_name varchar(255),
    password char(64) NOT NULL,
    CONSTRAINT pk_users PRIMARY KEY (user_id)
    Step 2: Add Database Connection To JDeveloper
    Go to Database Connection Navigator and create a New Database Connection using the Wizard
    Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
    Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
    Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows –
    User.java -
    package lux.domain;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name = "User.findAll", query = "select o from User o")
    @Table(name = "USERS")
    public class User implements Serializable {
    @Column(name="FIRST_NAME")
    private String firstName;
    @Column(name="LAST_NAME")
    private String lastName;
    @Column(nullable = false)
    private String password;
    @Column(nullable = false)
    private String username;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
    @SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
    @Column(name="USER_ID", nullable = false)
    private Long userId;
    public User() {
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String getUsername() {
    return username;
    public void setUsername(String username) {
    this.username = username;
    public Long getUserId() {
    return userId;
    public void setUserId(Long userId) {
    this.userId = userId;
    Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
    Again Right Click on Model and create Session Bean from Wizard which creates two files –
    UserDAOBean.java – Stateless Session Bean
    UserDAO.java – Local Interface
    package lux.facade;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.List;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import lux.domain.User;
    @Stateless(name="UserDAO")
    public class UserDAOBean implements UserDAO {
    @PersistenceContext(unitName="Model")
    private EntityManager em;
    public UserDAOBean() {
    public User getUser(int UserId) {
    User u = new User();
    u = em.find(User.class, UserId);
    return u;
    public List<User> getAllUsers() {
    Query q = em.createQuery("SELECT u FROM User u");
    List<User> users = q.getResultList();
    return users;
    public void createUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.persist(u);
    public void updateUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.merge(u);
    public void deleteUser(User u) {
    em.remove(u);
    private String hashPassword(String password) {
    StringBuilder sb = new StringBuilder();
    try {
    MessageDigest messageDigest = MessageDigest.getInstance("SHA");
    byte[] bs;
    bs = messageDigest.digest(password.getBytes());
    for (int i = 0; i < bs.length; i++) {
    String hexVal = Integer.toHexString(0xFF & bs);
    if (hexVal.length() == 1) {
    sb.append("0");
    sb.append(hexVal);
    } catch (NoSuchAlgorithmException ex) {
    Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
    return sb.toString();
    Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
    Step 7: Now Right Click on View/Controller Node and create a Java File –
    UserController.java -
    package lux.controllers;
    import javax.ejb.EJB;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import lux.domain.User;
    import lux.facade.UserDAO;
    public class UserController {
    @EJB UserDAO userDao;
    private User user;
    private DataModel model;
    public String createUser() {
    this.user = new User();
    return "create_new_user";
    public String saveUser() {
    String r = "success";
    try {
    userDao.createUser(user);
    } catch (Exception e) {
    e.printStackTrace();
    r = "failed";
    return r;
    public DataModel getUsers() {
    model = new ListDataModel(userDao.getAllUsers());
    return model;
    public User getUser() {
    return user;
    public void setUser(User user) {
    this.user = user;
    Step 8: Configure page flow in faces-config.xml
    1. Create the JSP file adduser.jsp by right-clicking View-Controller
    node and selecting New > JSP. Use the wizard to create JSF – JSP Page, fill in
    File Name adduser.jsp, click Finish. -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New user</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:messages/>
    <h:panelGrid columns="2">
    <h:outputText value="Username"/>
    <h:inputText
    id="Username"
    value="#{user.user.username}"
    required="true"/>
    <h:outputText value="First name"/>
    <h:inputText
    id="FirstName"
    value="#{user.user.firstName}" />
    <h:outputText value="Last name"/>
    <h:inputText
    id="LastName"
    value="#{user.user.lastName}" />
    <h:outputText value="Password" />
    <h:inputSecret
    id="Password"
    value="#{user.user.password}"
    required="true" />
    <h:panelGroup/>
    <h:commandButton
    action="#{user.saveUser}"
    value="Save"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    2. Repeat the previous step for another JSP file failed.jsp.
    3. On failed.jsp add the string
    Save failed
    Next we configure the page flow.
    1. Open faces-config.xml.
    2. Create index.jsp -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>User Listing</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:outputText value="User Listing"/>
    <h:commandLink action="#{user.createUser}" value="Create a user"/>
    <h:dataTable value="#{user.user}"
    var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Username"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.username}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="First name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.firstName}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Last name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.lastName}" />
    </h:column>
    </h:dataTable>
    </h:form>
    </f:view>
    </body>
    </html>
    3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow’s label to create_new_user.
    4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
    ailed
    5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
    This creates the following faces-config.xml file –
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config>
    <managed-bean>
    <managed-bean-name>user</managed-bean-name>
    <managed-bean-class>lux.controllers.UserController</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>username</property-name>
    <value>#{username}</value>
    </managed-property>
    <managed-property>
    <property-name>firstName</property-name>
    <value>#{firstName}</value>
    </managed-property>
    <managed-property>
    <property-name>lastName</property-name>
    <value>#{lastName}</value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <value>#{password}</value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>create_new_user</from-outcome>
    <to-view-id>/adduser.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/adduser.jsp</from-view-id>
    <navigation-case>
    <from-outcome>failed</from-outcome>
    <to-view-id>/failed.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/index.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
    Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model’s JAR and View-Controller’s
    WAR files to it.
    Step 11: Run the JSP Files
    SCENARIO END
    Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
    WHAT IS WRONG OUT HERE ???

    If you set a breakpoint in your createUser method - does this code get executed?
    We have a couple of tutorials that might show you how to do this.
    EJB/JSF with ADF-binding tutorial:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
    EJB/JSF without ADF binding:
    http://www.oracle.com/technology/obe/JavaEE_tutorial_10131/index.htm

  • Deploying EJB to an existing application

    hi!
    I've got an existing J2EE-application with many EJBs. Now I want to add 1 EJB to it.
    If I deploy this EJB, the application.xml within the existing application ist replaced by the
    application.xml of the deployed one. In this case, none of the old EJBs is startable.
    The only possibility to get it to work, is to change the application.xml after deployment (insert all existing
    <module> tags) or replacing the application.xml within the ear-file manually.
    Is there a better way? (within an application of 10 EJBs this shouldn't be a problem, but in our case with more than 100 EJBs, it is tedious)
    cu
    ed

    What I understand your posting that you have an existing application with say 10 EJBs and you overwrite the application.xml with new info about just the new EJBs. If you do so then application will lose the reference about the old EJBs and hence the old EJBs will not be available for use.
    You can deploy the new EJBs in a separate application and use the parent attribute to make parent/child relation between applications.
    The best way to redeploy is to package the EJBs in an EAR and redeploy the EAR. If your EAR is in $OC4J_HOME/j2ee/home/applications directory then replacing the EAR also redploys your application. You can use ant or tools like JDev to build your EAR.
    regards
    Debu

  • Error in Events Packaged Application

    Hello,
    I've been interested for some time in the "Events" packaged application. It was great to see it become available recently. I downloaded, installed, and ran it. It had a problem in changing the calendar type for display. I wanted a daily calendar, showing the hours, and couldn't figure it out.
    I went and looked, and on page 201, "Events" region, Calendar attributes, the Calendar Type Column is defined as P1_CALENDAR_TYPE. This should be changed to P201_CALENDAR_TYPE. Once this is done, you can switch to weekly and daily calendars using the buttons on the calendar page.
    Hope that saves some others from problems.
    Now, I'd like to see how the region could be changed to display 15 minute increments within the hour. How is this possible (is it)? Can someone maybe help me on this portion?
    Thanks,
    Mike Riley
    Vice President - Oracle Development Tools User Group

    Guess I should have added: Ideally, I'd like to see this like the Outlook daily calendar, where the events are shown in increments and blocked for the duration of the event (switch to the day view if you use Outlook to see an example).
    Thanks,
    Mike

  • How to access an EJB from a web application deployed in the same server

    Hey All,
    I deployed an EJB named EventServerBean to Sun Application Server 9.0, and put the client side jar file (named eventserver.jar which is generated by Sun Application Server) to C:\Sun\AppServer\lib. Now, I have a web application which is a simple jave file -- lookup EventServer EJB and invoke a remote method in this EJB. However, the web application always throws an exception "java.lang.NoClassDefFoundError: eventserver/EventServerRemoteHome"
    Here is my java class that access the ejb:
    public class Post_Event {
        public HashMap<String, String> getEventInfo(String event_name, String site) {
            System.out.println("Post_Event, the class path: " + System.getProperty("java.class.path"));       
            System.out.println("Post_Event, user.dir: " + System.getProperty("user.dir"));
            System.out.println("Post_Event, java.library.path: " + System.getProperty("java.library.path"));
            HashMap<String, String> result = null;
            EventServerRemote remote = null;
            StringTokenizer st, st2;
            // here get the event information from host
            try {
                String lookupStr = "corbaname:iiop:" + site + ":3700#ejb/EventServerBean";
                InitialContext initialContext = new InitialContext();
                EventServerRemoteHome remoteHome = (EventServerRemoteHome) javax.rmi.PortableRemoteObject.narrow(initialContext.lookup(lookupStr), EventServerRemoteHome.class);
                if (remoteHome != null) {
                    remote = remoteHome.create();
            } catch (javax.naming.NamingException ne) {
                ne.printStackTrace();
                return null;
            } catch (javax.ejb.CreateException ce) {
                ce.printStackTrace();
                return null;
            } catch (java.rmi.RemoteException re) {
                re.printStackTrace();
                return null;
            } catch (java.io.IOException ioe) {
                ioe.printStackTrace();
                return null;
            System.out.println("look up remote event server successfully.");
         result = remote.getEvent(event_name);
            return result;
        } I output the class path in this java file, and the class path DOES include the path C:\Sun\AppServer\lib where eventserver\EventServerRemoteHome.class is.
    Does anyone know why it happens? Why a java class can't find a class that is in its class path?
    appreciate any help!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Wael Abbas ([email protected]):
    Thank you for your great topic.
    I think you need to copy the snippet code and past it to every application, applet, servlet or JSP every time you need to use your EJB.
    Its better to include this snippet code in a simple JavaBean and use this bean as a bridge to your EJB, you may include a connect method in your JavaBean or but the connection code in the constructor and include a setters, getters and other methods to encapsulate your EJB methods.
    You can use your JavaBean in any application, applet, servlet or JSP just create an object form it and call its methods.
    Its just an idea
    I hope it will be useful.
    <HR></BLOCKQUOTE>
    null

  • Error when installing the supporting objects of OLL Packaged Application

    Hello,
    I am trying to install OLL Packaged Application|http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r41/inst_pkgapp/inst_pkgapp.htm#top
    but when installing the supporting objects, I got error when executing the code of "create_package_body"
    Error at line 274: PLS-00201: identifier 'UTL_TCP' must be declared
    create or replace package body eba_oll_log
    as
    g_start_time    number;
    procedure log_init
    is
    begin
        g_start_time := dbms_utility.get_time;
    end log_init;
    procedure log_page_view
    is
    begin
       insert into eba_oll_page_views
          ( APEX_USER,
            PAGE_ID,
            PAGE_NAME,
            VIEW_DATE,
            TS,
            ELAPSED_TIME,
            IP_ADDRESS,
            AGENT,
            APEX_SESSION_ID,
            CONTENT_ID,
            CONTENT_TITLE )
       values
          ( v('APP_USER'),
            v('APP_PAGE_ID'),
            wwv_flow.g_step_title,
            trunc(sysdate,'DD'),
            systimestamp,
            (dbms_utility.get_time-g_start_time)*(.01),
            owa_util.get_cgi_env('REMOTE_ADDR'),
            owa_util.get_cgi_env('HTTP_USER_AGENT'),
            v('APP_SESSION'),
            case when v('APP_PAGE_ID') = 24
                 then v('P24_CONTENT_ID')
                 else null
                 end,
            case when v('APP_PAGE_ID') = 24
                 then v('P24_CONTENT_TITLE')
                 else null
                 end );
       if v('APP_PAGE_ID') = 24 then
          insert into eba_oll_content_views
             ( APEX_USER,
               VIEW_DATE,
               TS,
               IP_ADDRESS,
               AGENT,
               APEX_SESSION_ID,
               CONTENT_ID,
               CONTENT_TITLE,
               NOTE )
          values
             ( v('APP_USER'),
               trunc(sysdate,'DD'),
               systimestamp,
               owa_util.get_cgi_env('REMOTE_ADDR'),
               owa_util.get_cgi_env('HTTP_USER_AGENT'),
               v('APP_SESSION'),
               v('P24_CONTENT_ID'),
               v('P24_CONTENT_TITLE'),
               'Viewed' );
       end if;
       commit;
    end log_page_view;
    procedure log_content_click
    is
    begin
       insert into eba_oll_content_views
          ( APEX_USER,
            VIEW_DATE,
            TS,
            IP_ADDRESS,
            AGENT,
            APEX_SESSION_ID,
            CONTENT_ID,
            CONTENT_TITLE,
            NOTE )
       values
          ( v('APP_USER'),
            trunc(sysdate,'DD'),
            systimestamp,
            owa_util.get_cgi_env('REMOTE_ADDR'),
            owa_util.get_cgi_env('HTTP_USER_AGENT'),
            v('APP_SESSION'),
            v('P24_CONTENT_ID'),
            v('P24_CONTENT_TITLE'),
            'Launched' );
       commit;
    end log_content_click;
    end eba_oll_log;
    create or replace package body eba_oll_api
    as
    function gen_id
       return number
    is
       l_id  number;
    begin
       select to_number(sys_guid(), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
         into l_id
         from dual;
       return l_id;
    end gen_id;
    function eba_oll_tags_cleaner (
        p_tags  in varchar2,
        p_case  in varchar2 default 'U' ) return varchar2
    is
        type tags is table of varchar2(255) index by varchar2(255);
        l_tags_a        tags;
        l_tag           varchar2(255);
        l_tags          apex_application_global.vc_arr2;
        l_tags_string   varchar2(32767);
        i               integer;
    begin
        l_tags := apex_util.string_to_table(p_tags,',');
        for i in 1..l_tags.count loop
            --remove all whitespace, including tabs, spaces, line feeds and carraige returns with a single space
            l_tag := substr(trim(regexp_replace(l_tags(i),'[[:space:]]{1,}',' ')),1,255);
            if l_tag is not null and l_tag != ' ' then
                if p_case = 'U' then
                    l_tag := upper(l_tag);
                elsif p_case = 'L' then
                    l_tag := lower(l_tag);
                end if;
                --add it to the associative array, if it is a duplicate, it will just be replaced
                l_tags_a(l_tag) := l_tag;
            end if;
        end loop;
        l_tag := null;
        l_tag := l_tags_a.first;
        while l_tag is not null loop
            l_tags_string := l_tags_string||l_tag;
            if l_tag != l_tags_a.last then
                l_tags_string := l_tags_string||', ';
            end if;
            l_tag := l_tags_a.next(l_tag);
        end loop;
        return substr(l_tags_string,1,4000);
    end eba_oll_tags_cleaner;
    procedure eba_oll_tag_sync (
        p_new_tags          in varchar2,
        p_old_tags          in varchar2,
        p_content_type      in varchar2,
        p_content_id        in number )
    as
        type tags is table of varchar2(255) index by varchar2(255);
        l_new_tags_a    tags;
        l_old_tags_a    tags;
        l_new_tags      apex_application_global.vc_arr2;
        l_old_tags      apex_application_global.vc_arr2;
        l_merge_tags    apex_application_global.vc_arr2;
        l_dummy_tag     varchar2(255);
        i               integer;
    begin
        l_old_tags := apex_util.string_to_table(p_old_tags,', ');
        l_new_tags := apex_util.string_to_table(p_new_tags,', ');
        if l_old_tags.count > 0 then --do inserts and deletes
            --build the associative arrays
            for i in 1..l_old_tags.count loop
                l_old_tags_a(l_old_tags(i)) := l_old_tags(i);
            end loop;
            for i in 1..l_new_tags.count loop
                l_new_tags_a(l_new_tags(i)) := l_new_tags(i);
            end loop;
            --do the inserts
            for i in 1..l_new_tags.count loop
                begin
                    l_dummy_tag := l_old_tags_a(l_new_tags(i));
                exception when no_data_found then
                    insert into eba_oll_tags (tag, content_id, content_type )
                        values (l_new_tags(i), p_content_id, p_content_type );
                    l_merge_tags(l_merge_tags.count + 1) := l_new_tags(i);
                end;
            end loop;
            --do the deletes
            for i in 1..l_old_tags.count loop
                begin
                    l_dummy_tag := l_new_tags_a(l_old_tags(i));
                exception when no_data_found then
                    delete from eba_oll_tags where content_id = p_content_id and tag = l_old_tags(i);
                    l_merge_tags(l_merge_tags.count + 1) := l_old_tags(i);
                end;
            end loop;
        else --just do inserts
            for i in 1..l_new_tags.count loop
                insert into eba_oll_tags (tag, content_id, content_type )
                    values (l_new_tags(i), p_content_id, p_content_type );
                l_merge_tags(l_merge_tags.count + 1) := l_new_tags(i);
            end loop;
        end if;
        for i in 1..l_merge_tags.count loop
            merge into eba_oll_tags_type_sum s
            using (select count(*) tag_count
                     from eba_oll_tags
                    where tag = l_merge_tags(i) and content_type = p_content_type ) t
               on (s.tag = l_merge_tags(i) and s.content_type = p_content_type )
             when not matched then insert (tag, content_type, tag_count)
                                   values (l_merge_tags(i), p_content_type, t.tag_count)
             when matched then update set s.tag_count = t.tag_count;
            merge into eba_oll_tags_sum s
            using (select sum(tag_count) tag_count
                     from eba_oll_tags_type_sum
                    where tag = l_merge_tags(i) ) t
               on (s.tag = l_merge_tags(i) )
             when not matched then insert (tag, tag_count)
                                   values (l_merge_tags(i), t.tag_count)
             when matched then update set s.tag_count = t.tag_count;
        end loop;
    end eba_oll_tag_sync;
    procedure render_tag_cloud (
       p_selection          in varchar2 default null,
       p_app_id             in number,
       p_session_id         in number,
       p_min_nbr_tags       in number default 1,
       p_max                in number default 100,
       p_limit              in number default 10000,
       p_link_to_page       in varchar2 default '2',
       p_tag_item_filter    in varchar2 default 'P2_TAGS',
       p_clear_cache        in varchar2 default '2,CIR,RIR',
       p_more_page          in varchar2 default '62' )
    as
       l_printed_records    number := 0;
       l_available_records  number := 20;
       l_max                number;
       l_min                number;
       l_class_size         number;
       l_class              varchar2(30);
       type l_tagtype is table of varchar2(2000);
       l_tags l_tagtype;
       type l_numtype is table of number;
       l_cnts l_numtype;
       l_size number;
       l_total number :=0;
       l_buffer varchar2(32676);  
       CURSOR c_all_tags
       IS
           select tag, c from (
           select t.tag, count(*) c
             from eba_oll_content c,
                  eba_oll_tags t
            where c.content_id = t.content_id
              and c.display_yn = 'Y'
              and (p_selection is null or
                   (p_selection is not null and
                   (   (substr(p_selection,1,1) = 'R' and
                        substr(p_selection,2) in (select release_id
                                                    from eba_oll_content_products cp
                                                   where cp.content_id = c.content_id))
                    or (substr(p_selection,1,1) = 'C' and
                        substr(p_selection,2) in (select product_id
                                                    from eba_oll_content_products cp
                                                   where cp.content_id = c.content_id))
                    or (substr(p_selection,1,1) = 'P' and
                        (substr(p_selection,2) in (select product_id
                                                     from eba_oll_content_products cp
                                                    where cp.content_id = c.content_id) or
                         substr(p_selection,2) in (select p.parent_product_id
                                                     from eba_oll_content_products cp,
                                                          eba_oll_products p
                                                    where cp.content_id = c.content_id
                                                      and cp.product_id = p.product_id)))
                    or (substr(p_selection,1,1) = 'G' and
                        (substr(p_selection,2) in (select pg.group_id
                                                     from eba_oll_product_groupings pg,
                                                          eba_oll_content_products cp
                                                    where pg.product_id = cp.product_id
                                                      and cp.content_id = c.content_id) or
                         substr(p_selection,2) in (select pg.group_id
                                                     from eba_oll_product_groupings pg,
                                                          eba_oll_products p,
                                                          eba_oll_content_products cp
                                                    where pg.product_id = p.parent_product_id
                                                      and p.product_id = cp.product_id
                                                      and cp.content_id = c.content_id)))
            group by tag
           ) x where rownum < p_limit
                 and c >= p_min_nbr_tags
            order by upper(tag) ;
    begin
       -- Fetch tags into arrays
       open c_all_tags;
          loop
              fetch c_all_tags bulk collect into l_tags,l_cnts limit p_limit;
              exit;
          end loop;
       close c_all_tags;
       l_available_records := l_tags.count;
       -- Determine total count and maximum tag counts
       l_max := 0;
       l_min := 1000;
       FOR i in l_cnts.first..l_cnts.last loop
          l_total := l_total + l_cnts(i);
          if l_cnts(i) > l_max then
             l_max := l_cnts(i);
          end if;
          if l_cnts(i) < l_min then
             l_min := l_cnts(i);
          end if;
       end loop;
       if l_max = 0 then l_max := 1; end if;
       l_class_size := round((l_max-l_min)/6);
       -- Generate tag cloud --
       sys.htp.prn('<div class="tagCloud"><ul>');
       for i in l_tags.first..l_tags.last loop
           l_printed_records := l_printed_records + 1;
           if l_cnts(i) < l_min + l_class_size then
              l_class := 'size1';
           elsif l_cnts(i) < l_min + (l_class_size*2) then
              l_class := 'size2';
           elsif l_cnts(i) < l_min + (l_class_size*3) then
              l_class := 'size3';
           elsif l_cnts(i) < l_min + (l_class_size*4) then
              l_class := 'size4';
           elsif l_cnts(i) < l_min + (l_class_size*5) then
              l_class := 'size5';
           else l_class := 'size6';
           end if;     
           l_buffer := '<li><a class="'||l_class||'" href="'||
                  'f?p='||p_app_id||':'||p_link_to_page||':'||p_session_id||':::'||p_clear_cache||':'||
                  p_tag_item_filter||':'||htf.escape_sc(l_tags(i))||'">'||
                  htf.escape_sc(l_tags(i)) || '<span>' || l_cnts(i) || '</span></a></li>';
           sys.htp.prn(l_buffer);
           l_buffer := '';
           if  l_printed_records > p_max then
               exit;
           end if;
       end loop;
       sys.htp.prn('</ul></div>');
       -- print if there's more
       if l_tags.count - l_printed_records != 0 then
               htp.prn('<p><a href="f?p='||p_app_id||':'||htf.escape_sc(p_more_page)||
                     ':'||p_session_id||':::'||htf.escape_sc(p_more_page)||'">View all tags</a></p>');
       end if;
       exception when others then
          sys.htp.prn('<p>No tags found.</p>');
    end render_tag_cloud;
    procedure email_when_feedback (
       p_feedback_id  in  number,
       p_host_url     in  varchar2,
       p_app_id       in  number )
    is
       l_body       clob;
       l_body_html  clob;
    begin
    for c1 in (
       select f.feedback_comment, f.feedback_by,
              c.title, nvl(ct.feedback_contacts,'[email protected]') email
         from eba_oll_content_feedback f,
              eba_oll_content c,
              eba_oll_team ct
        where f.id = p_feedback_id
          and f.content_id = c.content_id
          and c.team_id = ct.team_id (+) )
    loop
       l_body := 'You have received feedback for a piece of content you own in the Oracle Learning Library (OLL) Application.
    Content: '|| c1.title || utl_tcp.crlf || '
    Feedback: '|| c1.feedback_comment || utl_tcp.crlf || '
    Left by: '|| lower(c1.feedback_by) ||'
    You can respond via the OLL Application, '||p_host_url||'f?p='||p_app_id||':47:::NO::P47_ID:' || p_feedback_id || '.';
       l_body_html := '<div style="border: 1px solid #DDD; background-color: #F8F8F8; width: 460px; margin: 0 auto; -moz-border-radius: 10px; -webkit-border-radius: 10px; padding: 20px;">
    <p style="font: bold 12px/16px Arial, sans-serif; margin: 0 0 10px 0; padding: 0;">
    You have received feedback for a piece of content you own in the Oracle Learning Library (OLL) Application.
    </p>
    <table style="width: 100%;" cellspacing="0" cellpadding="0" border="0">
    <tr>' || utl_tcp.crlf || '
    <td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Content</td>
    <td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;"><a href="#" style="color: #000">'||c1.title||'</a></td>
    </tr>
    <tr>' || utl_tcp.crlf || '
    <td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Feedback</td>
    <td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||replace(c1.feedback_comment,CHR(10),'<br/>')||'</td>
    </tr>
    <tr>' || utl_tcp.crlf || '
    <td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Left by</td>
    <td style="font: bold 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||lower(c1.feedback_by)||'</td>
    </tr>
    <tr>' || utl_tcp.crlf || '
    <td colspan="2" style="text-align: center; font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">
    <a href="'||p_host_url||'f?p='||p_app_id||':47:::NO::P47_ID:' || p_feedback_id ||'" style="display: block; padding: 10px; background-color: #EEE; font: bold 16px/16px Arial, sans-serif; color: #444">Respond to this Feedback</a>
    </td>
    </tr>
    </table>
    </div>';
       apex_mail.send (
          p_to        => c1.email,
          p_from      => '[email protected]',
          p_subj      => 'OLL - New Feedback for your team',
          p_body      => l_body,
          p_body_html => l_body_html );
    end loop;
    end email_when_feedback;
    procedure email_when_response (
       p_feedback_id  in  number,
       p_host_url     in  varchar2,
       p_app_id       in  number )
    is
       l_body       clob;
       l_body_html  clob;
    begin
    for c1 in (
       select f.feedback_comment, f.feedback_by, f.response, c.title
         from eba_oll_content_feedback f,
              eba_oll_content c
        where f.id = p_feedback_id
          and f.content_id = c.content_id )
    loop
       l_body := 'You have received a response to your feedback left in the Oracle Learning Library (OLL) Application.
    Content: '|| c1.title || '
    Feedback: '|| c1.feedback_comment || '
    Response: '|| c1.response || '
    You can also view this response via the OLL Application, '||p_host_url||'f?p='||p_app_id||':60:::NO::IR_ID:' || p_feedback_id || '.';
          l_body_html := '<div style="border: 1px solid #DDD; background-color: #F8F8F8; width: 460px; margin: 0 auto; -moz-border-radius: 10px; -webkit-border-radius: 10px; padding: 20px;">
    <p style="font: bold 12px/16px Arial, sans-serif; margin: 0 0 10px 0; padding: 0;">
    You have received a response to your feedback left in the Oracle Learning Library (OLL) Application.
    </p>
    <table style="width: 100%;" cellspacing="0" cellpadding="0" border="0">
    <tr>' || utl_tcp.crlf || '
    <td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Content</td>
    <td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;"><a href="#" style="color: #000">'||c1.title||'</a></td>
    </tr>
    <tr>' || utl_tcp.crlf || '
    <td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Feedback</td>
    <td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||replace(c1.feedback_comment,CHR(10),'<br/>')||'</td>
    </tr>
    <tr>' || utl_tcp.crlf || '
    <td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Response</td>
    <td style="font: bold 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||replace(c1.response,CHR(10),'<br/>')||'</td>
    </tr>
    <tr>' || utl_tcp.crlf || '
    <td colspan="2" style="text-align: center; font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">
    <a href="'||p_host_url||'f?p='||p_app_id||':60:::NO::IR_ID:' || p_feedback_id ||'" style="display: block; padding: 10px; background-color: #EEE; font: bold 16px/16px Arial, sans-serif; color: #444">View Response in OLL Application</a>
    </td>
    </tr>
    </table>
    </div>';
       apex_mail.send (
          p_to        => c1.feedback_by,
          p_from      => '[email protected]',
          p_subj      => 'Oracle Learning Library - Response to your Feedback',
          p_body      => l_body,
          p_body_html => l_body_html );
    end loop;
    end email_when_response;
    end eba_oll_api;
    /Error at line 274: PLS-00201: identifier 'UTL_TCP' must be declared
    Edited by: Fateh on Jan 13, 2012 7:32 AM

    Thanks & Sorry for not mentioning the full information about my environment.
    it was:
    Oracle 11g xe R2 on Windows 7 machine
    Apex listener deployed on Glass Fish server 3.1 on Windows 7 machine
    Apex 4.1
    Google Chrome
    So, to have OLL application worked locally . we need the following:
    grant execute on utl_tcp to [your_schema_name]And to
    Configure an Application Express Application as a Partner Application in Oracle AS Single Sign-On http://www.oracle.com/technetwork/testcontent/sso-partner-app-100552.html.
    I think I am going to install on my work space on apex.oracle.com.
    Regards,
    Fateh
    Edited by: Fateh on Jan 15, 2012 9:38 AM

  • Error while installing a packaged application

    Hi
    I am getting the following error while trying to install the "Sample Master Detail" application in my apex oracle account on the web. All the others install without problem. What could it be ?
    Thanks
    Juan
    Execution of the statement was unsuccessful. ORA-00001: unique constraint (APEX_040200.WWV_FLOW_MESSAGES_IDX1) violated
    declare
    h varchar2(32767) := null;
    begin
    h:=h||'Help';
    wwv_flow_api.create_message (
    p_id=>2456294651379654494 + wwv_flow_api.g_id_offset,
    p_flow_id=>wwv_flow.g_flow_id,
    p_name=>'HELP',
    p_message_language=>'en',
    p_message_text=>h);
    null;
    end;
    ORA-00001: unique constraint (APEX_040200.WWV_FLOW_MESSAGES_IDX1) violated

    Hilary - I asked our DBA to open a SR, the number is SR 3-6553142501 : Unable to install packaged applications in Oracle Apex
    Looks like apex.oracle.com has been upgraded to 4.2.1. When did this happen?
    I am almost positive that I was able to install packaged apps on apex.oracle.com even when it was on 4.2.0.00.27 (same as the publicly available version) but not on my instance. But now since the versions are different, the support person is pointing to the different versions as a cause! This is what I was afraid of. To be honest, given that I was getting the error on my instance but not on apex.oracle.com, even when both systems (mine and apex.oracle.com) was on the same version of APEX, I am not very hopeful that the 4.2.1 patch will fix my situation since the root cause has not been identified. I just don't want to wait for 4.2.1 to be released, apply it and find out that the issue is still there. Can you share the list of bugs fixed in 4.2.1 to see if any of them may apply to this situation?
    Any other ideas? What diagnostics can I provide to help you get to the bottom of this? Frankly, Oracle Support, as I found in the past, is not very well qualified to resolve APEX-related SRs. Can you please assist or direct Support appropriately? Thanks, appreciate your help.
    Since I have the Builder app installed in my instance, I inspected the final page of the packaged app install wizard (4000:83) to see what APIs it uses and ran it manually as SYSTEM. This is what I get. Does that help narrow down the issue?
    SQL> alter session set current_schema=apex_040200;
    Session altered.
    SQL> exec wwv_flow_pkg_app_install.install_db_app(7050,'SCOTT');
    BEGIN wwv_flow_pkg_app_install.install_db_app(7050,'SCOTT'); END;
    ERROR at line 1:
    ORA-20987: APEX - Execution  of the statement was unsuccessful. ORA-01003: no
    statement parsed
    <pre>begin wwv_flow.g_import_in_progress := true; end;</pre> - ORA-01003: no
    statement parsed
    ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 853
    ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 888
    ORA-06512: at "APEX_040200.WWV_FLOW_PKG_APP_INSTALL", line 376
    ORA-06512: at line 1

Maybe you are looking for