How deploy the EJB in security on the Sun Java System Application Server 9?

I hava deploied a simple Hello EJB Object on PE 9(Sun Java System Application Server Platform Edition 9). I can use this EJB object without user name an password On any client. See the following code section:
     public static void main(String[] args) {
          try{
               Properties props = System.getProperties();
               props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
               props.put(Context.PROVIDER_URL,"iiop://localhost:3700");
               Context ctx = new InitialContext(props);
               Hello h = (Hello) ctx.lookup("ejb/test/Hello");
               System.out.println(h.sayHello());
          }catch(Exception e){
               e.printStackTrace();
Please tell me how deploy the EJB in security on the Sun Java System Application Server 9? So that, The client must set the user name and password when lookup the ejb object. Like the following:
props.put(Context.SECURITY_PRINCIPAL,"admin")
props.put(Context.SECURITY_CREDENTIALS,"1234");

Guys,
I too have the same issue. If anyone has an answer, please let me know.
Is this GlassFish problem? or Prgram issue?
Find below the source code
package TransactionSecurity.bean;
import javax.annotation.Resource;
import javax.annotation.security.DeclareRoles;
import javax.annotation.security.PermitAll;
import javax.annotation.security.RolesAllowed;
import javax.ejb.Remote;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
@Stateless
@Remote(TSCalculator.class)
@DeclareRoles({"student", "teacher"})
public class TSCalculatorBean implements TSCalculator {
     private @Resource SessionContext ctx;
     @PermitAll
//     @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
     public int add(int x, int y) {
          System.out.println("CalculatorBean.add  Caller Principal:" + ctx.getCallerPrincipal().getName());
          return x + y;
     @RolesAllowed( { "student" })
     public int subtract(int x, int y) {
          System.out.println("CalculatorBean.subtract  Caller Principal:" + ctx.getCallerPrincipal().getName());
          System.out.println("CalculatorBean.subtract  isCallerInRole:" + ctx.isCallerInRole("student"));
          return x - y;
     @RolesAllowed( { "teacher" })
     public int divide(int x, int y) {
          System.out.println("CalculatorBean.divide  Caller Principal:" + ctx.getCallerPrincipal().getName());
          System.out.println("CalculatorBean.divide  isCallerInRole:" + ctx.isCallerInRole("teacher"));
          return x / y;
package TransactionSecurity.bean;
import javax.ejb.Remote;
@Remote
public interface TSCalculator {
        public int add(int x, int y);
        public int subtract(int x, int y);
        public int divide(int x, int y);
package TransactionSecurity.client;
import java.util.Properties;
import javax.ejb.EJBAccessException;
import javax.naming.Context;
import javax.naming.InitialContext;
import TransactionSecurity.bean.TSCalculator;
public class TSCalculatorClient {
     public static void main(String[] args) throws Exception {
          // Establish the proxy with an incorrect security identity
          Properties env = new Properties();
          env.setProperty(Context.SECURITY_PRINCIPAL, "kabir");
          env.setProperty(Context.SECURITY_CREDENTIALS, "validpassword");
        env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.appserv.naming.S1ASCtxFactory");
        env.setProperty(Context.PROVIDER_URL,"iiop://127.0.0.1:3700");
        env.setProperty("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
        env.setProperty("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
        env.setProperty("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
        env.setProperty("org.omg.CORBA.ORBInitialHost", "127.0.0.1");
        env.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
          InitialContext ctx = new InitialContext(env);
          TSCalculator calculator = null;
          try {
               calculator = (TSCalculator) ctx.lookup(TSCalculator.class.getName());
          } catch (Exception e) {
               System.out.println ("Error in Lookup");
               e.printStackTrace();
               System.exit(1);
          System.out.println("Kabir is a student.");
          System.out.println("Kabir types in the wrong password");
          try {
               System.out.println("1 + 1 = " + calculator.add(1, 1));
          } catch (EJBAccessException ex) {
               System.out.println("Saw expected SecurityException: "
                         + ex.getMessage());
          System.out.println("Kabir types in correct password.");
          System.out.println("Kabir does unchecked addition.");
          // Re-establish the proxy with the correct security identity
          env.setProperty(Context.SECURITY_CREDENTIALS, "validpassword");
          ctx = new InitialContext(env);
          calculator = (TSCalculator) ctx.lookup(TSCalculator.class.getName());
          System.out.println("1 + 1 = " + calculator.add(1, 1));
          System.out.println("Kabir is not a teacher so he cannot do division");
          try {
               calculator.divide(16, 4);
          } catch (javax.ejb.EJBAccessException ex) {
               System.out.println(ex.getMessage());
          System.out.println("Students are allowed to do subtraction");
          System.out.println("1 - 1 = " + calculator.subtract(1, 1));
}The user kabir is created in the server and this user belongs to the group student.
Also, I have enabled the "Default Principal To Role Mapping"
BTW, I'm able to run other EJB3 examples [that does'nt involve any
security features] without any problems.
Below is the ERROR
Error in Lookupjavax.naming.NamingException: ejb ref resolution error for remote business interfaceTransactionSecurity.bean.TSCalculator [Root exception is java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
     org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION:   vmcid: 0x0  minor code: 0  completed: No
     at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.handle_null_service_context(SecServerRequestInterceptor.java:407)
     at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:429)
     at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
     at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
     at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
     at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace----------  vmcid: 0x0  minor code: 0  completed: No]
     at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:425)
     at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74)
     at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
     at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:403)
     at javax.naming.InitialContext.lookup(InitialContext.java:351)
     at TransactionSecurity.client.TSCalculatorClient.main(TSCalculatorClient.java:35)
Caused by: java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
     org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION:   vmcid: 0x0  minor code: 0  completed: No
     at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.handle_null_service_context(SecServerRequestInterceptor.java:407)
     at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:429)
     at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
     at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
     at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
     at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace----------  vmcid: 0x0  minor code: 0  completed: No
     at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:277)
     at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
     at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
     at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
     at com.sun.ejb.codegen._GenericEJBHome_Generated_DynamicStub.create(com/sun/ejb/codegen/_GenericEJBHome_Generated_DynamicStub.java)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:372)
     ... 5 more
Caused by: org.omg.CORBA.NO_PERMISSION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_PERMISSION:   vmcid: 0x0  minor code: 0  completed: No
     at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.handle_null_service_context(SecServerRequestInterceptor.java:407)
     at com.sun.enterprise.iiop.security.SecServerRequestInterceptor.receive_request(SecServerRequestInterceptor.java:429)
     at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeServerInterceptorIntermediatePoint(InterceptorInvoker.java:627)
     at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeServerPIIntermediatePoint(PIHandlerImpl.java:530)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.getServantWithPI(CorbaServerRequestDispatcherImpl.java:406)
     at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:224)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
     at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
     at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace----------  vmcid: 0x0  minor code: 0  completed: No
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
     at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:913)
     at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:131)
     at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:685)
     at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:472)
     at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:363)
     at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:219)
     at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
     ... 13 moreAny help is appreciated.
Regards!
Nithi.
Edited by: EJB3 on Aug 17, 2008 8:17 PM

Similar Messages

  • Can't deploy my app on  Sun Java System Application Server Platform Edition

    Hi,
    I am trying to deploy me app on the Sun's app server but I get the following error:
    I am using Sun Java System Application Server Platform Edition 8.2
    Invalid Deployment Descriptors in archive jag-ejb.jar in deployment descriptor file META-INF/ejb-jar.xml
    Line 29 Column 15 -- The content of element type "session" must match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,ejb-class,session-type,transaction-type,env-entry*,ejb-ref*,ejb-local-ref*,security-role-ref*,security-identity?,resource-ref*,resource-env-ref*)". "It deploys on Orion 2.02
    The ejb.xml file is as follows:
      <enterprise-beans>
        <session>
          <display-name>Facade stateless session bean</display-name>
          <ejb-name>ejb/PetardsFacade</ejb-name>
          <home>com.jag.petardscmsbeans.interfaces.PetardsFacadeHome</home>
          <remote>com.jag.petardscmsbeans.interfaces.PetardsFacade</remote>
          <local-home>com.jag.businesslogic.interfaces.FacadeLocalHome</local-home
          ><local>com.jag.businesslogic.interfaces.FacadeLocal</local>
          <ejb-class>com.jag.petardscmsbeans.ejb.PetardsFacadeEJB</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
          <resource-ref>
            <res-ref-name>jdbc/OracleDSRES</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
          </resource-ref>
          <env-entry>
            <env-entry-name>DSName</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>jdbc/OracleDSRES</env-entry-value>
          </env-entry>
        </session>
      </enterprise-beans>also, in the error message what does ? and * signify?
    Thanks

    This is an element ordering issue. env-entry is before resource-ref in the schema so it must be declared in the same order.
    --ken                                                                                                                                                                                                                                                                               

  • How can I deploy JBI Application in Sun Java System Application Server 9?

    I developed a demo "Loan Processing Composite Application " in Netbeans.org(http://www.netbeans.org/kb/55/loanprocessing.html).
    The guide only show the deployment using Netbeans6.Now I want to deploy it directly using Server9 , how can I do?
    How to deploy a soa application in Sun Java System Application Server 9? Is there any doc?
    Please~~I'm puzzled.

    To deploy a JBI application to Sun's App Server, you will need a JBI compliant ESB installed. OpenESB would be my first choice here. Then as far as installing your components without Netbeans, there are two choices. 1) Copy your SA's to the JBI/ESB autodeploy directory and you binding components and service engines to the JBI/ESB autoinstall directory. 2) Use the ant tasks that the JBI specification (http://jcp.org/en/jsr/detail?id=208) requires for all JBI implementations. OpenESB's JBI tasks are detailed here: http://wiki.open-esb.java.net/Wiki.jsp?page=JBIAntTaskReference. These ant tasks can be wrapped with maven goals if needed.
    Jeff

  • The Sun Java System Application Server could not start

    Hello All,
    I downloaded the Java Pet Store example from sun's website and followed the instructions for installation. After successful installation, I tried to deploy the project and gave the following error
    C:\Documents and Settings\sina\My Documents\Projects\services\nbproject\build-impl.xml:194: Deployment error:
    The Sun Java System Application Server could not start.
    More information about the cause is in the Server log file.
    Possible reasons include:
    - IDE timeout: refresh the server node to see if it's running now.
    - Port conflicts. (use netstat -a to detect possible port numbers already used by the operating system.)
    - Incorrect server configuration (domain.xml to be corrected manually)
    - Corrupted Deployed Applications preventing the server to start.(This can be seen in the server.log file. In this case, domain.xml needs to be modified).
    - Invalid installation location.
    See the server log for details.
    BUILD FAILED (total time: 5 minutes 20 seconds)
    The link above points to the following line in the build-impl.xml file
    <nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}" clientUrlPart="${client.urlPart}" clientModuleUri="${client.module.uri}"/>
    Can any one help whats wrong.An early response will be highly appreciated.
    Kind Regards.
    Hasnain Javed.

    Hi,
    Maybe you already got this fix but here is a suggestion, a snippet from the readme index,html of the petstore download
    # Start the Sun Java System Application Server and the JavaDB database. To do so, open a command prompt and change directory to <javaeesdk.home>/bin and issue the following commands:
    asadmin start-database
    asadmin start-domain
    # Change directory to <petstore.home> and enter the following commands
    ant setup
    ant run
    This will setup, build and deploy the petstore on the application server, and then launch the application homepage in your default browser.
    The "ant setup" that you run from <petstore.home> (petstore.home is the directory where petstore is installed or where you unzipped it) will populate the database wth data and setup the proper database tables etc that are used by the application.
    hth,
    Sean

  • How to configure Sun Java System Application Server Enterprise Edition 8.1

    hi all,
    How to configure Sun Java System Application Server Enterprise Edition 8.1 to my IDE..( jstudio)
    I have installed jes for my windows system.. so that i have removed platform version of Application Server..
    I try to add the Enterprise application Server (Sun Java System Application Server Enterprise Edition 8.1) to JStudio IDE..
    but i couldn't;

    Configuring your IDE to integrate with Sun App Server is something you probably will have to ask in some sort of JStudio forum. Other than for Netbeans, Eclipse, or possibly IntelliJ IDEA, you might not have much luck answering an IDE question here. I could be wrong though. Maybe somebody will have an answer for you and set me straight.

  • How to install Sun Java System Application Server PE 9 in debian

    Hi,
    I have ubuntu installed on my system. I wanted to install the Sun Java System Application Server PE 9 on it. I didn't see any debian package for it on Sun's downloads. I downloaded the linux version and tried to install it. I got the following result...
    root@vineet :/usr/src# ./java_ee_sdk-5-linux.bin
    Checking available disk space...
    Checking Java(TM) 2 Runtime Environment...
    Error: Could not find the required version of the Java(TM) 2 Runtime Environment.
    This application needs version 1.5 or higher of the Java(TM) 2 Runtime
    Environment. If the required Java(TM) 2 Runtime Environment is not installed,
    you can download it from the following website:
    http://java.sun.com/j2se
    Or if you already have the required Java(TM) 2 Runtime Environment
    installed, try rerunning this application with the following usage:
    'java_ee_sdk-5-linux.bin' -javahome <Java(TM) installation directory>
    root@vineet:/usr/src# ./java_ee_sdk-5-linux.bin -javahome /usr/lib/j2re1.5-sun
    Checking available disk space...
    Checking Java(TM) 2 Runtime Environment...
    Launching Java(TM) 2 Runtime Environment...
    Error: There are no files requiring installation.
    Deleting temporary files...
    Any suggestions will be highly appreciated.
    Thanks,
    Vineet

    Hi,
    I have ubuntu installed on my system. I wanted to
    install the Sun Java System Application Server PE 9
    on it. I didn't see any debian package for it on
    Sun's downloads. I downloaded the linux version and
    tried to install it. I got the following result...
    root@vineet :/usr/src# ./java_ee_sdk-5-linux.bin
    Checking available disk space...
    Checking Java(TM) 2 Runtime Environment...
    Error: Could not find the required version of the
    Java(TM) 2 Runtime Environment.
    This application needs version 1.5 or higher of the
    Java(TM) 2 Runtime
    Environment. If the required Java(TM) 2 Runtime
    Environment is not installed,
    you can download it from the following website:
    http://java.sun.com/j2se
    f you already have the required Java(TM) 2 Runtime
    Environment
    installed, try rerunning this application with the
    following usage:
    'java_ee_sdk-5-linux.bin' -javahome <Java(TM)
    installation directory>
    oot@vineet:/usr/src# ./java_ee_sdk-5-linux.bin
    -javahome /usr/lib/j2re1.5-sun
    Checking available disk space...
    Checking Java(TM) 2 Runtime Environment...
    Launching Java(TM) 2 Runtime Environment...
    Error: There are no files requiring installation.
    Deleting temporary files...
    Any suggestions will be highly appreciated.
    Thanks,
    VineetDo you have java 5 sdk on your machine (Or at the very least java 5 re) ?
    Have you tried the command that they gave ?

  • How to make weblogic proxy to work on Sun Java system web server 7?

    Hi Every one,
    I am working on upgrade our Sun one 6.1 webserver to Sun Java system web server 7. Our website uses weblogic server to process jsp, web server only send static pages. I did all configurations as on Sun one. But somehow, the webserver does not forward "get jsp page" request to weblogic. The log record is:
    for host 10.78.124.118 trying to GET /home.jsp, send-file reports: HTTP4142: can't find /www/a/WebServer7/docs/bmd9i/home.jsp (File not found)
    home.jsp is at weblogic server.
    And redirect "NameTrans fn="redirect" from="/" url="/home.jsp"" seems does not work. when I type on IE http://32.69.253.131/ (32.69.253.131 is http listener IP), it always shows index.html page under the document root.
    Could some on can help? I am the first time to configurate web server. Thanks in advance.
    The configuration files are like:
    1. magnus.conf
    # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
    # Use is subject to license terms.
    Init fn="load-modules" funcs="wl_proxy,wl_init" shlib="/www/a/WebServer7/weblogic6.1sp6/libproxy.so"
    Init fn="wl_init"
    2. obj.conf
    # Copyright 2010 Sun Microsystems, Inc. All rights reserved.
    # Use is subject to license terms.
    # You can edit this file, but comments and formatting changes
    # might be lost when you use the administration GUI or CLI.
    #<Object name="weblogic">
    #Service fn="wl_proxy" WebLogicCluster="32.69.253.86:7210" ConnectTimeoutSecs="240" ConnectRetrySecs="60"
    #</Object>
    <Object name="default">
    <Client method="TRACE">
    AuthTrans fn="set-variable" remove-headers="transfer-encoding" set-headers="content-length: -1" error="501"
    </Client>
    #AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
    NameTrans fn="strip-params"
    NameTrans fn="redirect" from="/" url="/home.jsp"
    NameTrans fn="redirect" from="/index.jsp" url="/home.jsp"
    NameTrans fn="redirect" from="/index.html" url="/home.jsp"
    NameTrans fn="document-root" root="$docroot"
    NameTrans fn="pfx2dir" from="/mc-icons" dir="/www/a/WebServer7/lib/icons" name="es-internal"
    NameTrans fn="home-page" path="index.html"
    <If $uri =~ "/*.jsp">
    Service method="(GET|HEAD|POST|PUT)" fn="wl_proxy" WebLogicCluster="32.69.253.86:7210" ConnectTimeoutSecs="240" ConnectRetrySecs="60"
    #Service method="(GET|HEAD|POST|PUT)" type="text/jsp" fn="wl_proxy" WebLogicCluster="32.69.253.86:7210" ConnectTimeoutSecs="240" ConnectRetrySecs="60"
    </If>
    PathCheck fn="unix-uri-clean"
    PathCheck fn="check-acl" acl="default"
    PathCheck fn="find-pathinfo"
    PathCheck fn="find-compressed" check-age="off" vary="on"
    ObjectType fn="type-by-extension"
    ObjectType fn="force-type" type="text/plain" charset="iso_8859-1"
    ObjectType fn="set-default-type" charset="iso_8859-1"
    Service method="(GET|HEAD)" type="magnus-internal/directory" fn="send-error"
    Service method="(GET|HEAD)" type="*~magnus-internal/*" fn="send-file"
    AddLog fn="flex-log" name="access"
    </Object>
    <Object name="es-internal">
    PathCheck fn="check-acl" acl="es-internal"
    </Object>
    <Object name="send-precompressed">
    PathCheck fn="find-compressed"
    </Object>
    <Object name="compress-on-demand">
    Output fn="insert-filter" filter="http-compression"
    </Object>
    3.mime.types
    I add one line: type=text/jsp exts=jsp

    Quick obvious question - Are you positive you're editing the correct obj.conf? Check the config directory and see if there is a second one called something like <instance>.obj.conf (where <instance> is the name of your configured instance).
    Alternatively you can grep for object-file in the server.xml to see which obj.conf the server is using:
    # grep object-file server.xml
        <object-file>bare-php.obj.conf</object-file>Assuming that you are editing the correct obj.conf file, are you making certain to restart Web Server after making your changes?

  • How to disable non secure port on Sun Java System Directory Server 5.2

    Hi, can someone tell me how to disable the non secure port 389 on the SJS Directory Server 5.2? I only see two options for the directory server to listen on the non secure port or both secure and non secure ports. I see that someone mentioned to change the port the loopback ip address but the gui doesn't allow that.
    Any help is appreciated.
    Thanks,
    Mike

    Yep! You can add the loopback address to the listen host attr, directly to the dse.ldif (insntace stopped of course) or ldapmodify the config entry

  • Sun java system application server 8 custom realm lock the admin console up

    Hi:
    I implemented a custome realm. After I installed the custom realm to Sun App server 8 PE, I can get into the admin console any more. According to the log, the user is authenticated. However, this user isn't in write group to access the admin console. What would be the user group in a custom realm to access admin console?
    In version 7, even you set up custom realm the admin console still not affected by the custom realm. Why is the admin console in version 8 picking up custom realm?
    Thanks.

    Previous reply was quite misleading - there is no such thing as default admin password for standalone installation of Application Server. Default values only apply to Application Server installation installed through Creator or NetBeans installer.
    Otherwise, you have to specify admin user name and password at installation time. Admin username value is defaulted to "admin" so unless you changed it in your installation that should still apply. You had to enter explicit password values.
    If you forgot those, you can either uninstall and reinstall or you can take a look at Troubleshooting Guide for instructions on reseting admin authentication:
    http://docs.sun.com/source/817-6085/troubleshooting.html#1026910

  • Webservice deployed on Sun Java System Application Server PE 8.2 (b06-fcs)

    I have deployed a simple web service on Sun One AS PE 8.2 (Can see the WSDL file on URL invocation). I am getting the following server side runtime exception when a standalone client tries to invoke the web service endpoint.
    A similar exception is reported in the following : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4916266. The bug evaluation suggests that i use wscompile with -infix option. I did that but the same exception was raised. Can anybody throw light on this? Is there something which I missed out in the application. Thanks.
    java.lang.RuntimeException
    at com.sun.enterprise.webservice.ImplementorCacheDelegateImpl.getImplementorFor(Im plementorCacheDelegateImpl.java:77)
    at com.sun.xml.rpc.server.http.ImplementorCache.getImplementorFor(ImplementorCache .java:28)
    at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate. java:399)
    at com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterCha in.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.ja va:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:13 2)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask. java:604)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:475)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask .java:371)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
    Caused by: no serializer is registered for (class com.incivinci.application.webserviceendpoint.BookQuery_getBookCount_RequestStru ct, {urn:com.incivinci.myservice/wsdl/BookQuery}getBookCount) at com.sun.xml.rpc.encoding.TypeMappingUtil.getSerializer(TypeMappingUtil.java:51)
    at com.sun.xml.rpc.encoding.InternalTypeMappingRegistryImpl.getSerializer(Internal TypeMappingRegistryImpl.java:376)
    at com.incivinci.application.webserviceendpoint.BookQuery_Tie.initialize(BookQuery _Tie.java:500)
    at com.incivinci.application.webserviceendpoint.BookQuery_Tie.<init>(BookQue ry_Tie.java:35)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at com.sun.enterprise.webservice.ImplementorCacheDelegateImpl.createImplementor(Im plementorCacheDelegateImpl.java:106)
    at com.sun.enterprise.webservice.ImplementorCacheDelegateImpl.getImplementorFor(Im plementorCacheDelegateImpl.java:59)
    ... 36 more
    |#]

    SJSAS PE 8.1
    http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-21-119173-18-1

  • How to config  Sun Java System Application Server 9

    Hi
    I developed a small web application using Netbeans Visual Web and Sun java application
    Server 9. and it working fine. Now how can I access the application from another machine
    (Clint) through net work
    Can anyone please help?

    Huh? You'd have to go to some trouble to make it [bold]not[bold] accessible from another machine on the network! Just point your web browser at the machine, as you must have done during development and testing. If you pointed your browser at localhost before, replace localhost with either the host name or IP address of your web server

  • How to customize 404 error of Sun Java System Application Server Enterprise

    Hi,
    I want to customize the 404 error message in Sun Application Server Enterprise Edition8.2.
    If anyone knows the way, please help me out.
    Thanks
    Randhir

    Randhir,
    I think the documentation at the url below should help you out. If this isn't what you're looking for let me know and I'll try to dig deaper.
    http://docs.sun.com/app/docs/doc/819-4734/beagh?l=en&a=view
    Good Luck,
    John
    Edited by: m305653 on Jun 8, 2008 8:04 AM

  • How to start Sun Java System Application Server 9.0

    yesterday morning i downloaded the software from sun.java.com and installed it .but i failed in starting the application server on my system(windows). i read the quick start guide and followed the steps : <From the Start menu, choose Programs => Sun Microsystems => Application Server PE 9 => Start Default Server. > the first try the message appeared in the command window is <domain listens on at least following ports for connections:[8080 8181 4848 3700 3820 3920 8686 ]> . i tried it later for several times ,but i got a same answer [b]<the domain (domain1) is already running .cli156 could not start the domain domain1> . both of the two answers are different from the message shows in the Guide . finally i failed . i hope someone can help me , i will really appreciate it .
    sent by :
    meansun

    dear skgaju,thank you very much ! but i am still in the trouble. i failed in the step http://<IP>:port/ whether i typed the port number 4849 or 4848 . and then i try to open domain.xml. but it shows [the system can not find the appointed object and something wrong when system deals with the resource : of 'http://www.sun.com/software/appserver/dtds/sun-domain_1_2.dtd' . i puzzled. could you tell me what's wrong with my machine?

  • How can I run a servlet with Sun Java System Application Server PE 8?

    I've created a package with a TestServlet.class inside, used the deploytool to create a WAR and deployed this using the autodeploy folder.
    The filestructure has been generated and I find the TestServlet.class in
    [installdir]\domains\domain1\applications\j2ee-modules\testProject\WEB-INF\classes\[packagefolderstructure]\TestServlet.class.
    The context root is working fine, but I have no clue how I can run the servlet directly via the URL.
    I've tried many things like
    http://localhost:8080/testProject/TestServlet
    http://localhost:8080/testProject/servlet/TestServlet
    http://localhost:8080/testProject/servlet/[packagenamewithpoints]TestServlet
    http://localhost:8080/testProject/servlet/[packagenamewithslashes]TestServlet
    etc etc
    Can somebody tell me please how to write URLs to deployed servlets? Or send me an example url and xml descriptor files?
    Thanks a lot in advance!

    in web.xml use servlet mapping
    <servlet-mapping>
        <servlet-name>TestServlet</servlet-name>
        <url-pattern>/doit</url-pattern>
    </servlet-mapping>then use http://localhost:8080/testProject/doit

  • How to add Java Web Start MIME type to Sun Java SYstem Application Server?

    Hi,
    In the process of learning about Java Web Start,
    I read in the document that I had to add "application/x-java-jnlp-file JNLP " to a configuration file.
    Does anyone know where that file is for Sun Application web server( vesion 8, on WIndows)?
    Thanks,
    Sun

    I believe you can add it to default-web.xml file located in your server config dir.
    (i.e. /opt/SunAppServer8/domains/domain1/config/default-web.xml)

Maybe you are looking for

  • Why Due Date is necessary field

    Hi When i entering FI document via F-02, I had a problem with Due Date. First Style : (Next screen due date is must field) Document Type: KA Posting Key: 29 Special G/l : 0 Account: [Vendor Account] Second Style : (Next screen due date is hide) Docum

  • Deserialization error !!!Urgent help required!!!

    hi, I have a GUI screen developed by Java Swings. It has 5 checkboxes say A, B, C, D, E. Now depending on the users choice, the values of these checkboxes is sent as an xml file to the soapServer as shown below. <A="yes" B="no" C="yes" D="yes" E="no"

  • Smart actions not working since upgrade

    since installing the upgrade this weekend, why is my smartactions not working correctly?

  • WSR not coming as per requirement

    Hi gurus, i wish to create WSR as 0112233 say Weekly off 1st shift 2 nd shift and 3 rd shift in the pattern 0112233 when i am defninig the schedules it is creating but if i am assign to an employee then it will start the day with 2nd shift instead of

  • Problem using a Boolean variable

    Greetings; I'm writing a game in which the player and 'enemies' fall off the screen when they 'die'. The problem is that I also want to constrain their  movement to within the screen boundaries whenever they have not been killed. To start  I thought