OC4J vs Tomcat

i have tomcat 4.0.1 and oc4j 9.0.3.0.0 and have found that tomcat is much too forgiving. simple coding errors, like example 1, compile without error on tomcat, but oc4j complains. Tomcat also allows code such as example 2, while oc4j complains unless you make the SQLException be "java.sql.SQLException".
Just be aware of these (and potentially other) subtle differences when deploying...
example 1:
<%! int foo = 3; // the script-end tag is apparently seen by tomcat but not oc4j %>
example 2:
<%! public int logSQLError( SQLException ex )
     // your code goes here
%>

i get the following errors
D:\PROGRAMME\02_SPICE_DEVELOPMENTS\OC4J\OC4J_11\j2ee\home>rem java -Doc4j.jmx.se
curity.proxy.off=true -Djava.util.logging.config.file=logging.properties -jar ad
min_client.jar deployer:oc4j:localhost oc4jadmin trustno1 -deploy -file D:\ipc.e
ar -deploymentName ipc -bindAllWebApps
D:\PROGRAMME\02_SPICE_DEVELOPMENTS\OC4J\OC4J_11\j2ee\home>java -Doc4j.jmx.securi
ty.proxy.off=true -Djava.util.logging.config.file=logging.properties -jar admin.
jar ormi://localhost:23791 oc4jadmin trustno1 -deploy -file D:\ipc.ear -deployme
ntName ipc
Deploy error: deploy failed!: ; nested exception is:
oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationExc
eption: Application: ipc is in failed state as initialization failed
D:\PROGRAMME\02_SPICE_DEVELOPMENTS\OC4J\OC4J_11\j2ee\home>pause
Press any key to continue . . .

Similar Messages

  • How to set up trust relationship between oc4j an tomcat

    Howdy
    According to the EJB 2.0 spec., section 19.8.1.1, second paragraph: "EJB containers are required to provide deployers or administrators with the tools to configure trust relationships with intermediate web or EJB containers."
    What tools/methods are available for OC4J?
    To give my question some context:
    I'm trying to set up things so that I have Tomcat (4.1.x) as a servlet container and OC4J (9.0.3) as an EJB container. I wan't Tomcat to authenticate users (using it's JDNI (LDAP) realm, and then have it forward a javax.security.Principal representing the user, when invoking EJB's on OC4J from servlets. One task in that is to make the OC4J instance trust the Tomcat instance, so that OC4J accepts a principal sent from Tomcat as already authenticated.
    I've been unable to find any docs on this subject.
    Any help appreciated.
    best regards Christian Surlykke

    Christian -- Setting up the trust relationship is described in interoperability section of the OC4J v903 Services Guide. I would probably start there.
    Thanks -- Jeff

  • JNDI Lookup in OC4J *AND* Tomcat 5 (not either/or)

    I've been struggling to get a web application to deploy and run correctly on Tomcat 5.x. I couldn't ADF to look up the Datasource I'd set up in the Tomcat configs. After reading this forum post:
    Problem deploying BC4J Toy Store app on Tomcat 4
    I was able to run my test app successfully on Tomcat by prepending 'java:comp/env/' to the JNDI name of my Datasource in bc4j.xcfg. Unfortunately, specifying the JNDI name in this way breaks the JNDI lookup in the embedded OC4J container. The impression I got from the above forum post was that OC4J should be able to look up the data source when the name is specified as either jndi/myDataSource or java:comp/env/jndi/myDataSource. I can only get it to work with the former.
    Is there a way to specify the JNDI name of a datasource in bc4j.xcfg such that both Tomcat AND the embedded OC4J container within JDeveloper will be able to look it up?
    Thanks,
    -Matt

    To answer my own question, a fairly straight-forward way of achieving this is to use two configurations for the application module: one for testing locally (the supplied configuration), and another one for deployment that is a copy of the first except for the JNDI name. I can switch between the configurations via the Databindings depending on whether I want to test locally or deploy to Tomcat.
    This is certainly a useable solution, but I'm bothered by the fact that I need to reference the JNDI name in two different ways. Shouldn't this be container-independent?
    -Matt

  • Deploying from OC4J to Tomcat 6

    When I run the application in OC4j it works as it is expected. When I deploy it to Tomcat 6 I am getting this error message. Does anyone have suggestions to troubleshooting this error?
    Error Message:
    JBO-26031: Assocation end RequestTypes of assoc FkAcrqRqtpAssoc invalid for entity base RequestTypes in view object AccessRequestsView.
    oracle.jbo.PersistenceException: JBO-26031: Assocation end RequestTypes of assoc FkAcrqRqtpAssoc invalid for entity base RequestTypes in view object AccessRequestsView.
         at oracle.jbo.server.ViewDefImpl.processEntityAssociations(ViewDefImpl.java:3627)
         at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:797)
         at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:340)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:357)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:2862)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1307)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:1870)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1911)
         at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1892)
         at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6676)
         at gov.mt.dphhs.safari.model.services.SAFARIServiceImpl.createNewAccessRequest(SAFARIServiceImpl.java:1619)
         at gov.mt.dphhs.safari.view.strutsactions.AccessRequestHandlerAction.findForward(AccessRequestHandlerAction.java:110)
         at oracle.adf.controller.struts.actions.DataAction.findForward(DataAction.java:565)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:165)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:222)
         at gov.mt.dphhs.safari.view.strutsactions.AccessRequestHandlerAction.handleLifecycle(AccessRequestHandlerAction.java:237)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:153)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at gov.mt.dphhs.safari.view.controller.DynamicJDBCBindingFilter.doFilter(DynamicJDBCBindingFilter.java:375)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
         at java.lang.Thread.run(Unknown Source)

    I reinstalled the ADF libraries on Tomcat with ADF installer. I am getting the same error.

  • Oc4j and tomcat problem ....very urgent..pl respond

    Hi.Avi and all
    here we r working with oc4j as ejb container and tomcat as webcontainer.as of now we r in oc4j as both webserver and appsrver.in this case my application is running successfully.but just week days we have decide to use tomcat as webserver and 0c4j as appserver.this is my client requirement.when we r working with thses two iam keeping my web files in tomcat and iamtrying to acess ejb's deployed on oc4j.in this scenarion iam struggling with ejb handle of stateful session bean.
    here is the exact prob iam facing:
    We have got the EJBHandle for EjboBJECT. We have placed the Handle in session and while retrieving EJBObject from it the container is throwing OrionRemoteException.
    -----THIS IS STACK TRACE OF MY ERROR----$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    $$$$$$$$$$$$$$$$$$$$$$$$$ BEFORE ezc.client.EzcPurchaseUtilManager$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    FW >>>>> In the prepareParams.....[Session handle EzUserHome: 1]
    09/05/2002 - 22:12:15 :: ******************** session test in the utilmanager ***********
    09/05/2002 - 22:12:15 :: EzSession: ezc.session.EzSession@2942da handle is: [Session handle EzUserHome: 1]
    ****************** Exception com.evermind.server.rmi.OrionRemoteException: The EJBHome could not be found at location 'EzUserHome'class com.evermind.server.rmi.OrionRemoteException
    Exception com.evermind.server.rmi.OrionRemoteException: The EJBHome could not be found at location 'EzUserHome'class com.evermind.server.rmi.OrionRemoteException
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    $$$$$$$$$$$$$$$$$$$$$$$$$ BEFORE ezc.client.EzcPurchaseUtilManager$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    FW >>>>> In the prepareParams.....[Session handle EzUserHome: 1]
    09/05/2002 - 22:12:15 :: ******************** session test in the utilmanager ***********
    09/05/2002 - 22:12:15 :: EzSession: ezc.session.EzSession@2942da handle is: [Session handle EzUserHome: 1]
    ****************** Exception com.evermind.server.rmi.OrionRemoteException: The EJBHome could not be found at location 'EzUserHome'class com.evermind.server.rmi.OrionRemoteException
    Exception com.evermind.server.rmi.OrionRemoteException: The EJBHome could not be found at location 'EzUserHome'class com.evermind.server.rmi.OrionRemoteException
    Can anyone write to me on this.
    thx..
    Vasu

    Hi,
    I tried this on OC4J 9.0.3 production ( http://otn.oracle.com ) and Tomcat 4.0.1 (Catalina). I have a SF session bean deployed on OC4J, a web app deployed on tomcat. web.xml has ejb references added.
    The code in first JSP is like this..
    java.util.Properties prop = System.getProperties();
    prop.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.evermind.server.rmi.RMIInitialContextFactory");
    prop.put(Context.PROVIDER_URL, "ormi://localhost:23891/current-workspace-app");
    prop.put(Context.SECURITY_PRINCIPAL, "admin");
    prop.put(Context.SECURITY_CREDENTIALS, "welcome");
    Context ctx = new InitialContext(prop);
    HealthCareServiceHome h = HealthCareServiceHome)PortableRemoteObject.narrow(ctx.lookup("HealthCareService"),HealthCareServiceHome.class);;
    HealthCareService js = h.create();
    Handle eh = js.getHandle();
    session.setAttribute("Eh",eh);
    and in a second JSP, I access this stateful session bean like this...
    Handle eh= (Handle)session.getAttribute("Eh");
    HealthCareService s = (HealthCareService)eh.getEJBObject();
    // do something on this instance. Everything works fine
    I dont know what versions of tomcat/oc4j you are using, may be an upgrade will help?
    Thanks,
    Neelesh
    OTN Team @ IDC

  • Deploying BIBeansOBE (from oc4j) to tomcat

    i use the example that otn publishes in http://otn.oracle.com/obe/obe9051jdev/BIBeansOBE/BIBeansOBE.htm
    I tried to deploying my application to tomcat, when i run my application , it generates the following error :
    javax.servlet.jsp.JspException: data attribute evaluates to null
         oracle.jbo.html.jsp.graph.GraphTag.doStartTag(GraphTag.java:212)
         org.apache.jsp.ResTituMen_jsp._jspService(ResTituMen_jsp.java:193)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
    please, do you tell me , what is the solution?
    Thanks

    Did you copy all your persentations, calculations and saved selections to the remote BI Beans catalog? If not, from JDeveloper you need to take all the objects you created within the BIDesigner and copy them to the BI Beans remote catalog that should have been installed in your database instance. There is documentation on the BI Beans OTN home page that explains how to install the BI Beans catalog and how to copy objects to the catalog.
    Keith
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Beans http://www.oracle.com/technology/products/bib/index.html
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
    BI Samples: http://www.oracle.com/technology/products/bi/samples/
    Blog: http://oraclebi.blogspot.com/

  • Deploying BIBeansOBE (from oc4j) to tomcat 5

    i tried to deploying my application to tomcat 5
    i use the example that otn publishes in http://otn.oracle.com/obe/obe9051jdev/BIBeansOBE/BIBeansOBE.htm - and when i tried to run my application , it generates the following error :
    javax.servlet.jsp.JspException: data attribute evaluates to null
         oracle.jbo.html.jsp.graph.GraphTag.doStartTag(GraphTag.java:212)
         org.apache.jsp.ResTituMen_jsp._jspService(ResTituMen_jsp.java:193)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
    please, Do you tell me wath is the solution?
    thanks

    Did you copy all your persentations, calculations and saved selections to the remote BI Beans catalog? If not, from JDeveloper you need to take all the objects you created within the BIDesigner and copy them to the BI Beans remote catalog that should have been installed in your database instance. There is documentation on the BI Beans OTN home page that explains how to install the BI Beans catalog and how to copy objects to the catalog.
    Keith
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Beans http://www.oracle.com/technology/products/bib/index.html
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
    BI Samples: http://www.oracle.com/technology/products/bi/samples/
    Blog: http://oraclebi.blogspot.com/

  • 10.1.3 Production - Strange migration issues with OC4J

    Hi,
    first of all my congrats on another great release of my favorite Java IDE. Bad thing is I can't enjoy it as much as I want currently because of the following issue:
    I'm working on a large project based on Struts, Tiles and Spring. The thing was born under 9.0.3 and happily survived several migrations since. It is running perfectly in 10.1.3 EA (OC4J and Tomcat 5.5). So I didn't expect any issues when switching to the production release. As I expected, everything worked without any errors. Fine. But then, when expectingly starting it in OC4J, things suddenly looked a bit different, for the login page came up somewhat naked. In fact, that is no wonder, as the app didn't find its CSS files, images, whatever. I import those resources (JSP 2.0) via the follówing line:
    ${pageContext.request.contextPath}/path_to_css.css
    As it turned out, the pageContext thing wasn't resolved and so contextPath stays blank. Furthermore, the JSPs generated can't get access to session objects via expression language (eg. ${myBean.myAttribute}. JSTL <fmt:>, on the other hand, works wonderfully. Now for the odd part: if I change the JSP while the app is running and
    then hit 'reload' to get it recompiled, the problem is gone. Looking at the .jsps sources, JDev generates something quite different from what OC4J does (the latter is the working version). I've spend the whole day now trying to find out why, including two fresh installs and setting up a test project, for I expected Tiles to be the culprit, but it's not; in fact, the issue also happens with a no-frills JSP page. Now I'm rather at the end of my knowledge. Has anyone had similar problems or knows how to resolve this issue? Any hint would be deeply appreciated :-)
    -- Chris.
    NB. My version is 10.1.3 J2EE (not Studio); I tried both the base one and later the complete version which comes with its own JDK.

    Alas, talking to myself is fun, so I'll proceed. Today, I set up another simple test project (Servlets 2.4/JSP 2.0) with a JSP that just issues the following:
    Context path: ${pageContext.request.contextPath}
    Upon comparing what gets generated, I noticed the following differences:
    1. What JDev generates and what does not work correctly:
    javax.servlet.jsp.el.VariableResolver __ojsp_varRes = (VariableResolver)new OracleVariableResolverImpl(pageContext);
    try {
    out.write(__oracle_jsp_text[0]);
    out.write(__oracle_jsp_text[1]);
    catch( Throwable e) { .. }
    2. The same fragment recompiled in OC4J:
    javax.servlet.jsp.el.VariableResolver __ojsp_varRes = (VariableResolver)new OracleVariableResolverImpl(pageContext);
    com.evermind.server.http.JspCommonExtraWriter __ojsp_s_out = (com.evermind.server.http.JspCommonExtraWriter) out;
    try {
    __ojsp_s_out.write(__oracle_jsp_text[0]);
    out.write( (java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate("${pageContext.request.contextPath}",java.lang.String.class, __ojsp_varRes, null));
    __ojsp_s_out.write(__oracle_jsp_text[1]);
    catch( Throwable e) { .. }
    As you can see, only the latter version contains code to evaluate the EL expression (the italic parts) at all! How on earth does this come from? Is there any switch in JDev to explicitly tell it to generate 2.0-compliant, EL-aware stuff apart from specifying 2.4 in the wizard?
    -- Chris.

  • Deployment of 10.1.3.2 application on weblogic 10.3

    Hi
    I have deployed an 10.1.3.2 built application on weblogic 10.3 Deployment is successful. I have even configured SQLAuthenticator as part of Default myrealm on the server. But still i get Unauthorised access error while login. Can anyone direct me what i wrong i am doing. This application works well with OC4J and Tomcat.
    regards
    Amit

    Yes it does use container managed security. Same as it is done in SRDEMO but the only difference is that i have used DBTableLoginmodule on tomcat and OC4j. Can u pls tell me what i need to check.
    regards
    amit

  • Problem w/ InitialContext

    Here is my issue:
    1. I have and stateless session EJB deploy to OC4J (the preview release).
    2. I have a servlet that access the the EJB using the "RMInitialContextFactory" factory.
    3. When I deploy the servlet to Tomcat on a different box it works fine.
    4. When I deploy the servlet to the OC4J server that is is holding the ejb (two different ear files/packages) the servlet will error out w/ a class cast exception when I attempt to
    narrow the return from context lookup.
    I have noticed that the class that is returned by the context lookup (to get the ejb) is DIFFERENT when the servlet is run on tomcat vs OC4J.
    Tomcat returns a "__Proxy0" object on the context lookup
    OC4J returns a "TxGetHome_StatelessSessionHomeWrapper"
    So how can I deploy a servlet to OC4J that uses an EJB that previously deployed to the server (ie they are not in the same application). What factory/context magic is required here?
    And what is the difference between "RMInitialContextFactory" and "ApplicationClientContextFactory" they are both used when the client is comming from a different VM right?

    First, thanks for helping!
    However,
    I am not trying to get at an EJB in the same application as the servlet(that does work). The EJB is in a different application than the servelt.
    I can access the EJB from a remote container , on the same box (ie Tomcat) with tht following code:
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, SECURITY_PRINCIPAL);
    env.put(Context.SECURITY_CREDENTIALS, SECURITY_CREDENTIALS);
    env.put(Context.PROVIDER_URL,"ormi://localhost/ParametricData");
    Context ctx = new InitialContext(env);
    TxGetHome pHome = (TxGetHome)ctx.lookup("TxGet");
    However if I deploy servlet with this code to OC4J it will throw a class cast excpetion on the last line (work fine in Tomcat). Looks like a classloader issue.
    So how would I access the EJB "TxGet" in application "ParametricData" from a servelt NOT in the "ParametricData" application?
    Are you telling me that I can use "Context ctx = new InitialContext()" to get at an EJB in a different application than the servlet? When I try this is does not work.
    Page 2-31 in the servlet developers guide has an section entitled "EJB Lookup Outside the Application" { see I have read the docs :-) } gives an example of lookuping up an EJB using
    HelloHome hh = (HelloHome) (new InitialContext().lookup("ormi://host:port/appname/env/ejb/HELLOEJB"); This does not work either. I have tried the following and it can not find the EJB:
    TxGetHome pHome = (TxGetHome)new InitialContext().lookup("ormi://localhost:23971/ParametricData/env/ejb/TxGet");
    I know my servlet and ejb work because I can use the ejb from the servlet when I deploy the servlet Tomcat and connect w/ RMIInitialContextFactory.

  • Iplanet to Oracle 10g AS

    Hi Folks,
    I am trying to upgrade an application in iPlanet 6.0 to Oracle 10g Application server.
    can anyone provide some pointers or past experiences on the same.
    esp regarding version incompatibilities of various technologies
    and the regarding any tools for bulk migration

    Not a bulls eye but these are few things I found useful.
    (If anyone can add their thoughts that would be great )
    My hunch is that will have to use
    First, ASMT (Application Migration Assistant from Sun)
    to upgrade the application to latest J2ee version
    and then use
    Application Migration Assistant from Jdeveloper
    to port to Oracle 10gAS
    References
    Metalink Notes
    1.     Note: 157770.1 Java APIs Supported in OracleAS 10g and Oracle9iAS
    2.     Note:122826.1 How to Migrate OAS Applications to 9iAS Release 1
    3.     NOTE:135101.1 Java API's supported in the Jdeveloper, IAS, and RDBMS product components
    4.     Note:177543.1 Advantages of Oracle Containers for J2EE (OC4J) Over Tomcat With Oracle9iAS?
    Note:262550.1
    Subject:      Statement of Direction - JDBC Driver Support within Oracle
    5.     
    Application Migration Assistant from Jdeveloper
    6.     http://www.oracle.com/technology/tech/migration/ama/docs/ama_searchrules.pdf
    7.     http://www.oracle.com/technology/tech/migration/ama/index.html
    8.     http://download-uk.oracle.com/docs/cd/B12428_03/migrate.904/b10426/comparis.htm#1014551
    ASMT (Application Migration Assistant from Sun)
    9.     http://java.sun.com/j2ee/tools/migration/
    Migrations to Web Sphere
    10.     http://www-128.ibm.com/developerworks/websphere/zones/was/migration.html

  • Bug in the Oracle JSP parser..?

    Hi,
    I seem to have run into a problem with double quotes inside attributes of a custom tag. For example, on Tomcat the following line is valid in a JSP:
    <mylib:person label="<%="Mr " + surname%>" />
    Tomcat treats the "Mr " in the expression as a Java string, but OC4J seems to treat the first quote inside the expression as the end of the label attribute. It then complains because Mr is not a valid attribute of the tag.
    Surely this is a bug?!
    There are workarounds:
    <mylib:person label='<%="Mr " + surname%>' />
    i.e. use single quotes for the attribute value, but what if the JSP expression actually contains a single quote as well?!
    <mylib:button action='<%="location.href='" + url + "'"%>' />
    It's starts to get silly, and I end up having to create scriplet variables just to go inside the attribute. I'm migrating from Tomcat, and have numerous instances of this.
    Is this a bug? (I'm using OC4J 9.03) Is there a setting I've missed?
    Thanks,
    Phil

    That doesn't seem to work. On the login page we have the line (uses our own custom tag called "form"):
    <html:form method="post" action="<%=response.encodeURL("j_security_check")%>" >
    OC4J complains about this (Tomcat is happy enough). If I change this to:
    <html:form method="post" action="<%=response.encodeURL(\""j_security_check\"")%>" >
    then it won't compile in either OC4J or Tomcat... which to be honest is what I expected. The quotes is inside a JSP expression; it's not really part of the attribute.
    Or did you mean something else?
    Thanks,
    Phil

  • Mixed HTTP/HTTPS in one Struts-Application?

    Hello!
    I need to mix SSL (HTTPS)-Connection for Login and a few admin-pages and "normal" HTTP-Connections for most of my pages in my Struts-bases Webapplication.
    How can i handle this issue?
    Where can i get a detailled description of configuration an OC4J or Tomcat and Struts?
    regards
    Harald.

    Hello Frank!
    I tested sslstruts-example on standalone - tomcat and standalone - oc4j with ssl and it worked using http- and https-port defined in tomcat or oc4j.
    My problem is, that my environment is a tomcat with apache webserver (mod_jk) or ias (apache with oc4j mod_oc4j).
    What Port-Numbers do you usein struts-config.xml in this scenario (HTTP/HTTPS-Port from Apache Webserver)?
    regards
    Harald.

  • Error in AXIS2 when i try publish ODI web services

    Hi people,
    I&acute;m configured AXIS2 into OC4J (SOA Suite 10.1.3.1) and when i try to publish ODI web services using a odi-public-ws.aar file on AXIS2, show me a "Faulty Services" message and when i click on details link show me a Java message (below):
    {color:#ff0000}*This Web axisService has deployment faults*{color}
    Error: java.lang.NoSuchMethodError: javax.wsdl.Operation.getExtensionAttributes()Ljava/util/Map;
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateOperations(WSDL11ToAxisServiceBuilder.java:1295) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populatePortType(WSDL11ToAxisServiceBuilder.java:592) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:469) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:363) at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(ArchiveReader.java:248) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:356) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:67) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:330) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:227) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:131) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:284) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:82) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436) at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2361) at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4810) at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4734) at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4922) at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1134) at com.evermind.server.http.HttpApplication.(HttpApplication.java:738) at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414) at com.evermind.server.Application.getHttpApplication(Application.java:545) at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990) at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.(HttpSite.java:1909) at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:645) at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:290) at com.evermind.server.http.HttpServer.setSites(HttpServer.java:270) at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:177) at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2450) at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:998) at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131) at java.lang.Thread.run(Thread.java:595)
    Wow, a lot of lines ! No problem, i can identify problem when try generate a WSDL file ... it&acute;s correct ? (Please correct me if i have a incorrect reasoning).
    Can a JDK Version too ? I&acute;m using a JDK 1.5.0_06. According by manual instructions version of JDK can be 1.4.2 or later version....
    Help me ! :-)
    Thanks for your attention !!

    Roberto and all,
    I installed Tomcat and published ODI web service and it was done sucessfully.
    Why OC4J this simple activity doesn´t have any success ? I'm still curious what's difference between OC4J and Tomcat and why it does not allow this simple task when is completed in a such simple way... Oracle support analyst recommended that I use the OC4J but did not explain the reason, what are the advantages and benefits compared to Tomcat...
    Sincerelly, i´m not too sure if i should go ahead with OC4J.
    Thanks for your attention !
    Best Regards,
    João.

  • Web services as a sources for ODI

    Hi All,
    I am facing a problem related to ODI. I want to use web service as source for ODI.
    Basically I have build one simple web service which gives system date through Jdeveloper and with OC4J connection. Now I want to use this web service as a source and want to insert this system date (which I will get through this web service) in oracle database. Could you please guide me.
    I tell you what I did till now.
    1. Developed simple web service through Jdeveloper.
    2. Deploy it using OCJ4 connection using Jdeveloper only.
    I did some research and came to know about axis2. I installed it but not able to start it properly. As per best of my knowledge we have to use axis2 as web service container and we can take OC4J or Tomcat.
    So I want to know how can I install (configure) Axis2 properly and can use my webservice developed through Jdeveloper as a source of ODI.
    I gone through documentation of ODI but as I am completely new for JAVA I can not figure it out properly.
    Request you to explain each step thoroughly as I am new to Java.
    Thanks and Regards
    -Pallav

    The below link gives detailed information about installing axis2. I used this for installing axis2 on my oracle app server.
    http://ws.apache.org/axis2/1_3/installationguide.html#servlet_container

Maybe you are looking for

  • How do i sync my notes from my mac to iCloud?

    Hi there, I've been trying to sync my notes between my iphone, ipad and macbook.  I'm able to sync them between my ipad, iphone and icloud, but I can't do it from my macbook.  That's really what the whole point of this exercise is - there are a lot o

  • Is this a bug in oracle 9i

    How come I do not get an error msg when i do this in oracle 9i select last_day(to_date('2010-01'|| '01', 'YYYY-MM-DD')) from dualtechincally, this should be the right way to do it select last_day(to_date('2010-01'|| '-01', 'YYYY-MM-DD')) from dual

  • Tab key used as the shortcut key when using a text entry box

    When I use the Tab key as my shortcut key for a text entry box, it works fine in preview mode but does not work in the web browser preview mode.  I have tried to understand how I can take an existing project that is built for web browser application

  • When I open a new windows in IE doesn't appear maximized

    Hello When I click in a link to open a new windows in Internet Explorer I use this code: on (press) {getURL("http://www.google.com", blank); Everything is fine but the new windows is NOT maximized, I would like that new windows appears maximized in I

  • It happened again!!!

    I am about to be sick. I spent last week (untold hours) manually rebuilding my iphoto library only to be faced with the same thing today when I went back to finish a project that has taken me way too long to complete because of this recurring problem