Ejb servlet application

i am using orion.
i have an ejb app running.. i can connect to it from an external client.
however, as soon as i turn the client into another ejb app that is just a servlet, i get ClassCastException when getting the remote interface.
any ideas?

i think it's due to the fact that your Home is not only in the classpath of the container but in the classpath of the servlet engine too. so when you're trying to get the home, a ClassCastException is thrown bcz the home you got has not the same version as the home in servlet engine (uid).
hope it helps.

Similar Messages

  • How to deploy Servlet Application in Weblogic 8.1

    Hi,
    I am new to BEA Weblogic 8.1 .
    I was trying to create a sample application using InelliJ IDea 5.1 , and IntelliJIdea 10.5 . i configured weblogic with IDE , but now i do not know how to deploy my application in weblogic .
    I am new in IntelliJ also .
    So Can anyone tell me how can i deploy a servlet application in any IDE like i also have eclipse indigo.
    Thanks & Regards
    Komi

    Hi Komi
    Basically you deploy your Servlet as a WAR File. I am not familiar with IntellJ IDE. But it should have a provision to export/create a WAR file that has your Servlet. Also I hope you already have web.xml file with 2 sections like this: First you mention full package of your servlet and give it a name. Then enter a mapping url. You will use this url to run your servlet like http://weblogichost:weblogicport/yourWebappcontextroot/myservlet
    <servlet>
         <servlet-name>MyServlet</servlet-name>
         <servlet-class>com.abd.def.MyServlet</servlet-class>
    </servlet>
    <servlet-mapping>
         <servlet-name>MyServlet</servlet-name>
         <url-pattern>/myservlet</url-pattern>
    </servlet-mapping>
    Coming to deployment, I hope you already created a Weblogic Domain and have admin username/password. Start your domain. Login into weblogic console like http://host:port/console and use admin username/password. Then from Deployments section, deploy the above WAR file. In Weblogic you can deploy JAR (EJBs, java files), WAR (web jsp, html, webservices, servlets) or EAR (JAR + WAR). In your case its just a WAR file.
    Refer the online docs for more details on Deployments in Weblogic.
    http://docs.oracle.com/cd/E13196_01/platform/docs81/deploy/deploy.html
    Thanks
    Ravi Jegga

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

  • Memory issue in servlet application in a tomcat  container

    Hi ,
    i am a newbie in tomcat server and webapplication . we have a simple servlet application running in a tomcat container . which handles more than 10 requests in a sec . in the application we are storing the recieved xml in the server .
    the used memory size was gradually inceased upto 11 GB out of 12GB . when i killed all java also the memory used was not released .
    28390: /usr/java/jdk1.5.0_06/bin/java -Xms128m -Xmx1536m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/tomcat//conf/logging.properties -Djava.endorsed.dirs=/usr/local/tomcat//common/endorsed -classpath :/usr/local/tomcat//bin/bootstrap.jar:/usr/local/tomcat//bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat/ -Dcatalina.home=/usr/local/tomcat/ -Djava.io.tmpdir=/usr/local/tomcat//temp org.apache.catalina.startup.Bootstrap start
    Address Kbytes RSS Anon Locked Mode Mapping
    00283000 60 - - - r-x-- libresolv-2.5.so
    00292000 4 - - - r-x-- libresolv-2.5.so
    00293000 4 - - - rwx-- libresolv-2.5.so
    00294000 8 - - - rwx-- [ anon ]
    009b2000 104 - - - r-x-- ld-2.5.so
    009cc000 4 - - - r-x-- ld-2.5.so
    009cd000 4 - - - rwx-- ld-2.5.so
    009d0000 1268 - - - r-x-- libc-2.5.so
    00b0d000 8 - - - r-x-- libc-2.5.so
    00b0f000 4 - - - rwx-- libc-2.5.so
    00b10000 12 - - - rwx-- [ anon ]
    00b15000 8 - - - r-x-- libdl-2.5.so
    00b17000 4 - - - r-x-- libdl-2.5.so
    00b18000 4 - - - rwx-- libdl-2.5.so
    00b1b000 148 - - - r-x-- libm-2.5.so
    00b40000 4 - - - r-x-- libm-2.5.so
    00b41000 4 - - - rwx-- libm-2.5.so
    00b44000 76 - - - r-x-- libpthread-2.5.so
    00b57000 4 - - - r-x-- libpthread-2.5.so
    00b58000 4 - - - rwx-- libpthread-2.5.so
    00b59000 8 - - - rwx-- [ anon ]
    00c7f000 76 - - - r-x-- libnsl-2.5.so
    00c92000 4 - - - r-x-- libnsl-2.5.so
    00c93000 4 - - - rwx-- libnsl-2.5.so
    00c94000 8 - - - rwx-- [ anon ]
    08048000 60 - - - r-x-- java
    08057000 8 - - - rwx-- java
    0977a000 14444 - - - rwx-- [ anon ]
    47da4000 12 - - - rwx-- [ anon ]
    47da7000 504 - - - rwx-- [ anon ]
    47e25000 12 - - - rwx-- [ anon ]
    47e28000 504 - - - rwx-- [ anon ]
    47ea6000 12 - - - ----- [ anon ]
    47ea9000 504 - - - rwx-- [ anon ]
    47f27000 12 - - - ----- [ anon ]
    47f2a000 504 - - - rwx-- [ anon ]
    47fa8000 12 - - - ----- [ anon ]
    47fab000 504 - - - rwx-- [ anon ]
    48029000 12 - - - ----- [ anon ]
    4802c000 504 - - - rwx-- [ anon ]
    480aa000 12 - - - ----- [ anon ]
    480ad000 504 - - - rwx-- [ anon ]
    4812b000 12 - - - ----- [ anon ]
    4812e000 504 - - - rwx-- [ anon ]
    481ac000 12 - - - ----- [ anon ]
    481af000 504 - - - rwx-- [ anon ]
    4822d000 12 - - - ----- [ anon ]
    48230000 504 - - - rwx-- [ anon ]
    482ae000 12 - - - rwx-- [ anon ]
    482b1000 504 - - - rwx-- [ anon ]
    4832f000 12 - - - ----- [ anon ]
    48332000 504 - - - rwx-- [ anon ]
    4d201000 204 - - - r-xs- catalina-cluster.jar
    4d234000 108 - - - r-xs- commons-modeler.jar
    4d24f000 8 - - - r-xs- servlets-invoker.jar
    4d251000 88 - - - r-xs- tomcat-http.jar
    4d267000 164 - - - r-xs- tomcat-ajp.jar
    4d290000 24 - - - r-xs- servlets-webdav.jar
    4d296000 24 - - - r-xs- catalina-ant-jmx.jar
    4d29c000 20 - - - r-xs- tomcat-coyote.jar
    4d2a1000 20 - - - r-xs- tomcat-jkstatus-ant.jar
    4d2a6000 64 - - - r-xs- catalina-storeconfig.jar
    4d2b6000 28 - - - r-xs- catalina-ant.jar
    4d2bd000 20 - - - r-xs- servlets-default.jar
    4d2c2000 48 - - - r-xs- naming-resources.jar
    4d2ce000 52 - - - r-xs- jsp-api.jar
    4d2db000 40 - - - r-xs- naming-factory.jar
    4d2e5000 76 - - - r-xs- jasper-runtime.jar
    4d2f8000 112 - - - r-xs- commons-el.jar
    4d314000 96 - - - r-xs- servlet-api.jar
    4d32c000 400 - - - r-xs- jasper-compiler.jar
    4d390000 152 - - - r-xs- naming-factory-dbcp.jar
    4d3b6000 412 - - - r-xs- mysql-connector-java-3.1.10-bin.jar
    4d41d000 1188 - - - r-xs- jasper-compiler-jdt.jar
    4d546000 40 - - - r-xs- tomcat-i18n-en.jar
    4d550000 36 - - - r-xs- tomcat-i18n-es.jar
    4d559000 32 - - - r-xs- tomcat-i18n-fr.jar
    4d561000 36 - - - r-xs- tomcat-i18n-ja.jar
    4d56a000 784 - - - r-xs- localedata.jar
    4d62e000 172 - - - r-xs- sunpkcs11.jar
    4d659000 152 - - - r-xs- sunjce_provider.jar
    4d67f000 4 - - - ----- [ anon ]
    4d680000 1528 - - - rwx-- [ anon ]
    4d7fe000 8 - - - ----- [ anon ]
    this is the total java process running in the system . i am not able to identify the process - r-x-- [ anon ] ..( i deleted more anon process as the character exceeds more ) please advise me to find a solution for this ..
    thanks
    Dhinesh

    bedhinesh wrote:
    the used memory size was gradually inceased upto 11 GB out of 12GB . when i killed all java also the memory used was not released . Some possible reasons.
    1. You are using a memory tool and are incorrectly reading the results.
    2. You are using JNI or using a third party JNI which uses an unusual system resource and that is not cleaning up that resource.
    3. One very unusual case, you have a log file (or some other file) which is being posted into the same place in the file system as the OS swap space. When that happens the "memory" fills up.

  • Unable to Create EJB Test Application ....

    Folks - I realize that I need to have my EJB offer remote interfaces in order to be able to setup an EJB Test Application from within SJSE6 - but nonetheless, the option is uanvailble off the main menu for logical Session Bean node -
    Any thoughts ?
    John Schmitt

    Hi,
    in order to generate the test app, you have to create a J2EE application and add the beans to it using the explorer, than the option should be enabled.
    Also it is much better that you use Studio to create the beans and all of the components of the application. Do not create the beans by hand, the IDE will create all of the interfaces for you automatically when you use it to create the beans.
    Regards Jirka

  • Business Intelligence -- Servlet Application

    Hello
    I have created Business Intelligence --> Designer and then
    I have created Servlet Application through
    New --> Business Intelligence --> Servlet Application
    It working fine and runs with url
    http://192.168.1.237:8988/dw-dw_proj-context-root/mypackage1.BIController1
    I want to define a alias for it i.e.
    user can access it with the url
    http://dwapp/ {How to define such alias?}
    I want to make different tiers how to do that i m new so plz guide me

    Have your application been deployed to an application server? If yes, you can define a virtual root to point to the url of the servlet application. If no, you may want to create a page that redirects the user to the servlet application.
    Thanks

  • I unable to run ejb with application client using oc4j j2ee container

    Hi,
    I have installe oracle9i (1.0.2.2) oc4j j2ee container.
    I unable to run the ejbs . please help me how to run ejbs with application client and which files are shall configure.
    See the client application is :
    public static void main (String []args)
    try {
    //Hashtable env = new Hashtable();
    //env.put("java.naming.provider.url", "ormi://localhost/Demo");
    //env.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory");
    //env.put(Context.SECURITY_PRINCIPAL, "guest");
    //env.put(Context.SECURITY_CREDENTIALS, "welcome");
    //Context ic = new InitialContext (env);
    System.out.println("\nBegin statelesssession DemoClient.\n");
    Context context = new InitialContext();
    Object homeObject = context.lookup("java:comp/env/DemoApplication");
    DemoHome home= (DemoHome)PortableRemoteObject.narrow(homeObject, DemoHome.class);
    System.out.println("Creating Demo\n");
    Demo demo = home.create();
    System.out.println("The result of demoSelect() is.. " +demo.sayHello());
    }catch ( Exception e )
    System.out.println("::::::Error:::::: ");
    e.printStackTrace();
    System.out.println("End DemoClient....\n");
    When I am running client application I got this type of Exception
    java.lang.SecurityException : No such domain/application: sampledemo
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java : 2040)
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java : 1884)
    at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java : 1491)
    at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java : 323)
    at com.evermind.server.rmi.RMIContext.lookup(RMIConext.java : 106)
    at com.evermind.server.administration.LazyResourceFinder.lookup(LazyResourceFinder.java : 59)
    at com.evermind.server.administration.LazyResourceFinder.getEJBHome(LazyResourceFinder.java : 26)
    at com.evermind.server.Application.createContext(Application.java: 653)
    at com.evermind.server.ApplicationClientInitialContext.getInitialContext(ApplicationClientInitialContextFactory.java :179 )
    at javax.naming.spi.NamingManager.getInitialContext(NamingManger.java : 246)
    at javax.naming.InitialContext.getDefaultInitialCtx(InitialContext.java : 246)
    at javax.naming.InitialContext.init(InitialContext.java : 222)
    at javax.naming.InitialContext.<init>(InitialContext.java : 178)
    at DemoClient.main(DemoClient.java : 23)
    .ear file is copied into applications directory.
    I have configured server.xml file like this
    <application name="sampledemo" path="../applications/demos.ear" />
    demos.ear file Contains following files
    application.xml
    demobean.jar
    Manifest.mf
    demobean.jar file contains following files
    application-client.xml
    Demo.class
    DemoBean.class
    DemoHome.class
    ejb-jar.xml
    jndi.properties
    Mainifest.mf
    Please give me your valuable suggestions. Which are shall i configure .
    Thanks & Regards,
    Badri

    Hi Badri,
    ApplicationClientInitialContextFactory is for clients which got deployed inside OC4J container..
    For looking up EJB from a stand alone java client please use RMIInitialContextFactory..So please change ur code....
    Also please check ur server.xml
    Since you have specified your ejb domain as "sampledemo"
    you have to use that domian only for look up..But it seems that you are looking up for "Demo" domain instead of "sampledemo" domain...So change your code to reflect that..
    Code snippet for the same is :
    Hashtable env = new Hashtable();
    env.put("java.naming.provider.url", "ormi://localhost/sampledemo");
    env.put("java.naming.factory.initial", "om.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "guest");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    Context ic = new InitialContext (env);
    Hope this helps
    --Venky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Is it possible to include JSF into JSP-Servlet application?

    I have an existing JSP-servlet application. I am wondering if it is OK to add new pages to this application in form of JSF?
    Thanks

    Just learn JSF and it will all be clear.
    They can perfectly co-exist and you can perfectly link or redirect from one to other (plain GET requests), you can perfectly share the same session and application scoped attributes, but for POST requests (forms submits) from JSP to JSF or vice verse you just need to understand how the one handles/expects the request parameters and that kind of stuff.

  • How to launch a new JVM to run a Java Servlet application?

    Is there any way of launching an independent JVM to run a Servlet application in Tomcat environment?

    search in google.com
    BrowserLaucher.java

  • Monitor my jsp-servlet application through the jmx

    heloo,
    i am new in JMX. and i want to manage(or monitor) my jsp-servlet application. there lots of
    servlets and jsp files. its is running in tomcat. i made simple demo application which
    is given by oracle tutorial. but it is just for one interface and its implementations so how
    can i monitor my whole jsp-servlet application by JMX.
    i want to Monitor three things
    Memory
    JVM
    Thread
    Thanks...

    Hi,
    I fixed my problem by setting the system wide variable (WindowsXP)
    CLASSPATH to r:\\dealershop\\WEB-INF\\classes.
    Thanks,
    Andrea
    andrea costantinis wrote:
    Hi,
    I developed a JSP/servlet test application that makes
    use of kodo 2.2.3 STANDARD EDITION for its persitence.
    I successfully compile and annotate the application.
    I am also able to successfully generate the db
    schema with schematool.
    Unfortunately, when I run the application using
    Resin 2.0.2, Kodo is unable to initialize properly.
    Initially it was not able to find \"system.prefs\" file.
    I fixed that by putting \"system.prefs\" in WEB-INF\\classes.
    Unfortunately, Kodo is still unable to initialize and
    gives the following message:
    The system could not initialize; the following registered
    persistent types are missing metadata
    or have not been enhanced:
    [class com.dpov.purchaseorder.PurchaseOrder,
    class com.dpov.catalog.Product,
    class com.dpov.uidgen.counter.Counter,
    class com.dpov.catalog.dao.jdo.CategoryHierarchyEntry,
    class com.dpov.catalog.dao.jdo.CategoryHierarchyDAO,
    class com.dpov.pricelist.PriceInfo,
    class com.dpov.pricelist.PriceList,
    class com.dpov.catalog.Category,
    class com.dpov.lineitem.LineItem,
    class com.dpov.dealer.Dealer,
    class com.dpov.user.User,
    class com.dpov.customer.Customer].
    I use \"system.jdo\" to describe metadata for the enhancer.
    I tried to put it both in WEB-INF\\lib and WEB-INF\\classes but
    it still fails.
    Please note that:
    1) my classpath variable is not set
    2) my application\'s class file are in WEB-INF\\classes
    3) kodo jars are in WEB-INF\\lib
    4) mysql jdbc driver is in WEB-INF\\lib
    5) system.prefs is in WEB-INF\\classes
    6) system.jdo is in WEB-INF\\classes
    Thanks in advance,
    Andrea

  • How to run JSP/Servlet applications on Apache?

    As we all know that tomcat is an JSP/Servlet engine. Apache is a web server not a JSP/Servlet enabled web server. Then in order to run JSP/Servlet applications on Apache web server on unix, what should I do?
    Thanks.
    James Liu

    Can you give me some detailed information about how to combine Apache and Tomcat? Note, the application is going to run on Sun Solaris Operating System.
    By the way, where do you put your final version of application? on windows or on Unix? on tomcat or on apache?
    I am building the application using tomcat on windows, but now I almost finished the application, so I decide to move it to Unix which uses apache as the web server. But I got problems, the Servlet engine (JServ) can not understand "RequestDispatcher" (an object used to redirect jsp pages).
    Help please.
    James

  • Can an EJB client application access to EJBs on two domains concurrently?

    It is well-known that there can be multiple domains in a SUN application server. If two domains are started up, can the same EJB client application call different EJB methods from the two domains? If can, how to implement? Please kindly give a snippet of sample codes.
    Another question: can EJBs among multiple domains communicate with each other? If can, tell me how to implement and had better provide some sample codes as well.

    I have my client working now!
    I was looking around on other forums and found a guy who said that javax.comm has problems with security. here is the address
    http://lists.dalsemi.com/maillists/java-powered-ibutton/2002-February/002168.html
    He said,
    "This is an error generated by the javax.comm packages when initializing
    the
    serial ports. It's basically a security related bug. Officially, all
    packages stored in your lib/ext folder should be considered trusted
    code,
    running with the same permissions as your trusted main application. But
    it
    seems that isn't the case with comm.jar.
    I've heard that signing the comm.jar file might fix it, but I wasn't
    able to
    verify that myself (but I didn't test with Netscape's java plugin). I
    found
    a workaround that should take care of it (as long as your main
    application
    has "all-permissions"). Try adding this line to the top of your main
    method:
    System.setSecurityManager(null);
    So I did that and it worked except for one thing. at the end of my program the client tells me
    The system cannot find the path specified.
    Do you think this is a major problem? What is it trying to find??
    Michael B

  • Need to restrict access to multiple servlet applications on same box

    Hi!
    I have deployed two separate servlet applications to the same IAS. I need
    to restrict access to each application - that is requests from one source
    should only have access to one application and not the other. The web
    server we are using is IIS.
    Should I create a separate IAS to deploy the second application to? Can I
    restrict based on IP - that is port 80 is reserved to application 1 while
    port 81 is restricted to application 2? If so, how do I go about this? It
    appears that the web connector only receives on one port (default 80).
    Any help would be greatly appreciated.
    Sheila

    I see. So do you mean that I can override the port number in the proxy startup script itself? I can try doing that and see if it works fine.
    About Coherence 3.7, yes. I did see that it has some cool features about proxy discovery. But at this point I am stuck at using 3.6 and 3.6.1.
    Edited by: online19 on Jun 29, 2011 5:41 PM

  • Problem with iWay Servlet Application Explorer

    Hello Everyone,
    I have installed the iWay SWIFT adapter. Now I am trying to configure the iWay Servlet Application Explorer. I have deployed the iwae.ear after making necessary changes as suggested. But the problem is when I am trying to open the Servlet Application Explorer at http://<XI host:port>/iwae/index.html, the page opens but it is not showing the available adapters and in the right pane it is giving following error:
    <b>Unable to Retrieve Information
    The underlying connection was closed: Unable to connect to the remote server. Check your configuration or try to connect later</b>
    Has anyone faced any similar problem earlier, if so how to solve this issue.
    I have used the following values for service line in the web.xml inside the iwae.war.
    <service displayName="localhost" url="http://localhost:50100/"/>
                        <service displayName="jca" provider="com.ibi.adapter.jspae.CustomJCAIWAEConnection" url="c:\program files\iway55#base" />
    (Where 50100 is the j2EE port on our XI server.)
    Any tip regarding this is highly appreciated.
    Thanks
    Abinash

    Hi,
    Check out for the parameter to be set in config tool.
    Check these link.
    http://egeneration.bea.com/iwaydocs/iway55/5.5.001/iw55_cics.pdf
    SWIFT
    file to swift
    file to swift file scenario
    http://download.sap.com/download.epd?context=876CA1622A3C697FF1D756D2FE10D2727D9FE0E9740911DBA785883225B46DF4F27EA184832BFBF3FDABDAAECF26794BC249BB326209F958
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/34a1e590-0201-0010-2c82-9b6229cf4a41
    http://martin.hinner.info/bankconvert/swift_mt940_942.pdf - MT 940
    http://www.bph.pl/res/docs/korp/DBE/MC/Aktualnosci_instrukcje/file_format_description_rft_mt101_v20050411.pdf - MT 101
    iway's SWIFT adapter http://www.iwaysoftware.com/products/adapters/swift.html
    SWIFT adapter available from iWay..
    check... you can get documentation about conversion agent from service marketplace..
    /people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
    /people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield
    /people/bla.suranyi/blog/2006/09/29/conversion-agent--handling-edi-termination-characters
    /people/bla.suranyi/blog/2006/09/29/conversion-agent--handling-edi-termination-characters
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • Regarding Runnig of Java Servlet Application

    I am facing problems in running Servlet Application in "bea worshop for jsp".
    Though I set Tomcat settings,it was showing error at port numbers.
    How can i solve that problem?
    Can any body help?

    Hi,
    Could you post the exact error message from the console that you're referring to?
    _steve.                                                                                                                                                                                               

Maybe you are looking for

  • Is it possible to watch a previously purchased movie on Apple TV without having to turn on my computer?

    I just bought a 3rd gen Apple TV. I have some movies on my MacBook which I purchased through the iTunes store. I know I can watch those movies on my Apple TV, but is it possible to watch those movies on my Apple TV WITHOUT having to turn on my comput

  • How to restore iPhoto pictures from time machine

    Knowing this:  " When using iPhoto '11 (version 9.2 or later) and Time Machine with OS X Lion 10.7.2 (or later), iPhoto no longer has the Browse Backups option. This means that instead of restoring specific photos within your iPhoto Library, you must

  • Too heavy photos

    i want to email come photos but they are too heavy over 2 MB and I can't sent them...

  • Process signs like é, ë, á etc. in FDM

    Hi All, My FDM (essbase and HFM 9.3.1 adapters) don't import files that contain é, ë, á, ç and ô. I now have created a script to convert these signs to regular letters. But for one application these signs are in the member names so i do need to proce

  • SCCM 2012 R2 CU3 - ADR Update 2K12R2

    Hello, I've some problems with update ADR (Full update 2K12R2 server). So far everything worked perfectly but since a few days, the first 15 updates are installed correctly and then nothing .. I inspected the logs and saw nothing unusual. Any ideas ?