JNDI lookup name in a standalone oc4j instance

Hi,
Could you please let me know how to create a JNDI lookup name for a database in a stanalone OC4j Instance?
Both OC4J and oracle 9i database are in the same server.
Thanks in advance,
Sukonya

Hi,
I have the oracle 9i database as well as the oc4j instance in my local machine.I am trying to deploy a J2ee Application on the OC4j instance,using eclipse IDE.I have not created any connection pool or datasource in the oc4j instance but after i build the application I see that the connection pool and datasource instance have been created in the OC4j instance.
following are the contents of the build.xml file(for the ant build tool)
<?xml version="1.0" encoding="UTF-8" ?>
- <project name="TicketLoggingSystem" default="bind-web-app" basedir="../">
<property name="app.server" value="D:/oc4j/j2ee/home" />
<property name="dest.dir" value="${basedir}/dest" />
<property name="war.file" value="${dest.dir}/TicketLoggingSystem.war" />
<property name="ear.file" value="${dest.dir}/TicketLoggingSystem.ear" />
<property name="web.inf" value="${basedir}/WEB-INF" />
<property name="web.classes" value="${dest.dir}/classes" />
<property name="app.xml" value="${basedir}/application.xml" />
<property name="src.dir" value="${basedir}/src" />
<property name="oc4j.host" value="localhost" />
<property name="oc4j.admin.port" value="23791" />
<property name="oracle.home" value="D:/oc4j" />
<property name="j2ee.home" value="${oracle.home}/j2ee/home" />
<property name="oc4j.admin.username" value="oc4jadmin" />
<property name="oc4j.admin.password" value="welcome" />
<property name="oc4j.ormi" value="ormi://${oc4j.host}:${oc4j.admin.port}" />
<property name="app.name" value="TicketLoggingSystem" />
<property name="jdbc.url" value="jdbc:oracle:thin:@localhost:1521:80" />
<property name="jdbc.username" value="scott" />
<property name="jdbc.password" value="tiger" />
<property name="connection.driver" value="oracle.jdbc.driver.OracleDriver" />
<property name="connection.datasource" value="oracle.jdbc.pool.OracleDataSource" />
<property name="xa.location" value="jdbc/xa/MpsiDS" />
- <!-- Delete dest folder
-->
- <target name="init">
<delete dir="${dest.dir}" includeemptydirs="true" />
<mkdir dir="${dest.dir}" />
<mkdir dir="${web.classes}" />
</target>
- <!-- Compile all Java files
-->
- <target name="wscompile">
- <javac srcdir="${src.dir}" destdir="${web.classes}" deprecation="on" debug="on">
<exclude name="**/*.properties,**/*.xml" />
- <classpath>
<fileset dir="${web.inf}/lib" includes="*.jar" />
<fileset dir="${app.server}/lib" includes="servlet.jar" />
</classpath>
</javac>
</target>
- <!-- Build Web archive file
-->
- <target name="buildWar" depends="init,wscompile">
- <war destfile="${war.file}" webxml="${web.inf}/web.xml">
- <fileset dir="${basedir}">
<include name="content*/**" />
</fileset>
<webinf dir="${web.inf}" includes="*.xml,*.tld" excludes="web.xml" />
<classes dir="${web.inf}/classes" />
<lib dir="${web.inf}/lib" includes="*.jar" />
</war>
</target>
- <!-- Build Enterprsie Archive
-->
- <target name="buildEar" depends="buildWar">
- <ear destfile="${ear.file}" appxml="${app.xml}">
<fileset dir="${dest.dir}" includes="*.war" />
</ear>
</target>
- <!-- Checking availability of oc4j
-->
- <target name="check-oc4j-available">
<echo message="------> Checking to see if OC4J is started ." />
<echo message="[checking oc4j on machine =${oc4j.host}]" />
<echo message="[port=${oc4j.admin.port}]" />
- <condition property="oc4j.started">
<socket server="${oc4j.host}" port="${oc4j.admin.port}" />
</condition>
</target>
- <!-- Remove data source
-->
- <target name="remove-data-source" depends="check-oc4j-available" if="oc4j.started">
<echo message="Removing DataSource" />
- <java jar="${j2ee.home}/admin.jar" fork="true">
<arg value="${oc4j.ormi}" />
<arg value="${oc4j.admin.username}" />
<arg value="${oc4j.admin.password}" />
<arg value="-application" />
<arg value="${app.name}" />
<arg value="-removeDataSource" />
<arg value="-location" />
<arg value="jdbc/TicketLoggingSystem" />
</java>
<echo message="Removed DataSource Successfully" />
</target>
- <!-- Undeploy
-->
- <target name="undeploy" depends="remove-data-source" description="Undeploying the application" if="oc4j.started">
<echo message="Undeploying the Application ${app.name}" />
- <java jar="${j2ee.home}/admin.jar" fork="true">
<arg value="${oc4j.ormi}" />
<arg value="${oc4j.admin.username}" />
<arg value="${oc4j.admin.password}" />
<arg value="-undeploy" />
<arg value="${app.name}" />
</java>
<echo message="Undeploying the Application ${app.name} is Successful" />
</target>
- <!-- Deploy
-->
- <target name="deploy" depends="undeploy,buildEar" if="oc4j.started">
<echo message="Deploying the Application ${app.name}" />
- <java jar="${j2ee.home}/admin.jar" fork="true">
<arg value="${oc4j.ormi}" />
<arg value="${oc4j.admin.username}" />
<arg value="${oc4j.admin.password}" />
<arg value="-deploy" />
<arg value="-file" />
<arg value="${ear.file}" />
<arg value="-deploymentName" />
<arg value="${app.name}" />
</java>
<echo message="Deploying the Application ${app.name} is Successful" />
</target>
- <!-- Create data source
-->
- <target name="create-data-source" depends="check-oc4j-available" if="oc4j.started">
<echo message="Creating DataSource for Application ${app.name}" />
- <java jar="${j2ee.home}/admin.jar" fork="true">
<arg value="${oc4j.ormi}" />
<arg value="${oc4j.admin.username}" />
<arg value="${oc4j.admin.password}" />
<arg value="-application" />
<arg value="${app.name}" />
<arg value="-installDataSource" />
<arg value="-jar" />
<arg value="${oracle.home}/jdbc/lib/ojdbc14dms.jar" />
<arg value="-url" />
<arg value="${jdbc.url}" />
<arg value="-connectionDriver" />
<arg value="${connection.driver}" />
<arg value="-location" />
<arg value="jdbc/TicketLoggingSystem" />
<arg value="-username" />
<arg value="${jdbc.username}" />
<arg value="-password" />
<arg value="${jdbc.password}" />
<arg value="-className" />
<arg value="${connection.datasource}" />
</java>
<echo message="Created DataSource Successfully for Application ${app.name}" />
</target>
- <!-- Binding web-app
-->
- <target name="bind-web-app" depends="deploy,create-data-source" if="oc4j.started">
<echo message="executing bind web app" />
- <java jar="${j2ee.home}/admin.jar" fork="true">
<arg value="${oc4j.ormi}" />
<arg value="${oc4j.admin.username}" />
<arg value="${oc4j.admin.password}" />
<arg value="-bindWebApp" />
<arg value="${app.name}" />
- <!-- app deployname
-->
<arg value="${app.name}" />
- <!-- web module name
-->
<arg value="default-web-site" />
- <!-- web site name
-->
<arg value="/${app.name}" />
- <!-- context root
-->
</java>
<echo message="Access the application using: http://${oc4j.host}:8888/${app.name}" />
</target>
</project>
Following are the contents of Oc4J home->services->jdbc resources:
Datasource:
Name jdbc/TicketLoggingSystem
Application TicketLoggingSystem
JNDI Location jdbc/TicketLoggingSystem
Connection Pool
Managed by OC4j
Test
when i click the datasource name,I see that its type is Native datasource with no related connection pool.
Whereas for the default datasource oracleDS,
Type     Managed Data Source
Connection Pool     Example Connection Pool
However on deployment a connection pool is also created along with the datasource
Name jdbc/TicketLoggingSystem_connectionPool
Application TicketLoggingSystem
ConnectionFactory class : oracle.jdbc.pool.OracleDataSource
Do we need to bind this connection pool to our datasource?If yes how is it done.And if that is not required,why is this connection pool created?Are the datasource and connection pool already bound to each other?
Also when I test either the datasource or connection pool,it says
Confirmation     
Connection to "jdbc/TicketLoggingSystem_connectionPool" established successfully
or
Connection to "jdbc/TicketLoggingSystem" established successfully.
and displays both the connection pool and datasource details together for both the tests.
In my java code,while trying to establish connection to the database what should I mention in lookup i.e,
InitialContext context = new InitialContext();
DataSource dataSource = (DataSource) context.lookup("     jdbc/TicketLoggingSystem or      jdbc/TicketLoggingSystem_connectionPool");
con = dataSource.getConnection();
Sorry if I am sounding novice.Thanks a lot in advance,
Sukanya

Similar Messages

  • Calling an EJB 3 SessionBean from a servlet in a Standalone oc4j instance.

    I think that this should be simple, but for some reason can't get it to work.
    Latest version of jDev and oc4j, running on Linux Fedora 5.
    In a jdev application I have ejb and web projects. **EJB 3.0**
    The ejb project is deployed first, then the web project -with the ejb project as its parent-.
    In the ejb project I have a FacadeBean (SLSB) that implements both remote and local as well as Serializable interfaces. (Do I need to implement Serializable?)
    Question:
    How do I get the handle on the FacadeBean from the servlet?
    I tried:
    ic = new InitialContext();
    facade = (Facade)ic.lookup("java:comp/env/ejb/Facade");
    as well as numerous other variations including remote/local stubs, long and short ejb names, facade.getClass().getName, but they all fail!
    This should be simple (if not genned automatically by jDev!) !
    Please advise.
    Thank you.
    nat

    One way of getting the code to do this is to right click on your session bean in JDeveloper and choose "New sample Java Client", then "Connect to a remote OC4J" etc...
    This will create a piece of code that you can then use in your servlet to locate the EJB and invoke it.
    Here is a sample Servlet code:
    public class Servlet1 extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>Servlet1</title></head>");
            out.println("<body>");
            out.println("<p>The servlet has received a GET. This is the reply.</p>");
            try {
                final Context context = getInitialContext();
                SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
                // No Remote methods found
            String a = sessionEJB.sayHi("joe");
            out.println(a);
            } catch (Exception ex) {
                ex.printStackTrace();
            out.println("</body></html>");
            out.close();
        private static Context getInitialContext() throws NamingException {
            Hashtable env = new Hashtable();
            //  Standalone OC4J connection details
            env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.naming.ApplicationClientInitialContextFactory" );
            env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
            env.put( Context.SECURITY_CREDENTIALS, "welcome" );
            env.put(Context.PROVIDER_URL, "ormi://localhost:23791/ejb1");
            return new InitialContext( env );
    }

  • Unable to deploy a simple WAR / EAR file on Standalone OC4J instance

    All,
    This issue is baffling me since yesterday and while I continue to look for options , would appreciate if anyone of you has run into something similar and give me some hints on how to proceed on this ..
    I downloaded the Standalone OC4J ( 10.1.3 ) from otn.oracle.com and also downloaded JDK 1.5 Update 12 from the Sun Website and installed it on my local
    Windows XP machine. Everything works well and the application gets deployed.
    I then copied the 10.1.3 Standalone OC4J to the Solaris 5.9 box which already
    has JDK 1.5 Update 12 installed. We extracted the OC4J to its own directory , set the Java_Home and the Oracle_Home environment variables and were able to
    startup the OC4J instance.
    However when trying to deploy even a simple HelloWorld.jsp file packaged as an EAR or WAR , we get these errors..
    [Aug 8, 2008 9:40:27 AM] Application Deployer for CISS STARTS.
    [Aug 8, 2008 9:40:27 AM] Copy the archive to /home/aplperdev1/ssp_java/oc4j/j2ee/home/applications/CISS.ear
    [Aug 8, 2008 9:40:28 AM] Initialize /home/aplperdev1/ssp_java/oc4j/j2ee/home/applications/CISS.ear begins...
    [Aug 8, 2008 9:40:28 AM] Unpacking CISS.ear
    [Aug 8, 2008 9:40:28 AM] Error while unpacking CISS.ear java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:203) at java.util.jar.JarFile.(JarFile.java:132) at java.util.jar.JarFile.(JarFile.java:97) at oracle.oc4j.util.FileUtils.unjar(FileUtils.java:309) at oracle.oc4j.util.FileUtils.autoUnpack(FileUtils.java:488) at com.evermind.server.deployment.EnterpriseArchive.(EnterpriseArchive.java:234) at oracle.oc4j.admin.internal.ApplicationDeployer.initArchive(ApplicationDeployer.java:412) at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:187) at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93) at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52) at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298) at java.lang.Thread.run(Thread.java:595)
    [Aug 8, 2008 9:40:28 AM] Operation failed with error: Unable to find/read file META-INF/application.xml in /home/aplperdev1/ssp_java/oc4j/j2ee/home/applications/CISS (META-INF/application.xml)
    Using the above error messages , I certainly do not find the CISS.ear file getting copied to /home/aplperdev1/ssp_java/oc4j/j2ee/home/applications/CISS.ear
    which explains the rest of the messages.
    I have tried placing the EAR file both remote and local on the Application Server box but the results remain the same. Assuming it might be a permissions issue , we have opened up all the permissions on this OC4J home ( recursively )
    to everyone ..
    Is there a specific version of tar / unzip / jar required to deploy EARs / WARs on Solaris 5.9 running JDK 1.5 Update 12.
    We had some issues when extracting OC4J to its directory but there were no errors displayed on the screen ... Only when we tried starting up the OC4J instance , it started complaining about missing XML files .. This was resolved by manually extracting the XML's from the corresponding jars and placing them in the proper directories ..
    Also looked at Bug:6330834 but am not very sure if this applies to our case because all these drives are local to the Sun box.
    Other than attempting a reinstall and opening an Service Request with Oracle , I am running out of ideas at this time ..
    So any ideas / hints would be gladly accepted :)
    Vishwa

    When you say:
    I then copied the 10.1.3 Standalone OC4J to the Solaris 5.9 box which already has JDK 1.5 Update 12 installed. We extracted the OC4J to its own directory , set the Java_Home and the Oracle_Home environment variables and were able to
    startup the OC4J instance.
    We had some issues when extracting OC4J to its directory but there were no errors displayed on the screen ... Only when we tried starting up the OC4J instance , it started complaining about missing XML files .. This was resolved by manually extracting the XML's from the corresponding jars and placing them in the proper directories ..
    It sounds like you have some funky issues there with those missing XML files -- that is not expected or normal.
    Do you mean you copied the same oc4j_extended.zip to the server and unzipped it, or you zipped up the directories you were using on the Windows box, copied that over, and unzipped it?
    I don't know of any problems with Solaris, JDK5, U12.
    What about if you do this to remove any issues with the remote copy aspect of the deployment.
    1. Stop OC4J.
    2. Manually copy CISS.ear to /home/aplperdev1/ssp_java/oc4j/j2ee/home/applications/
    3. Edit the j2ee/home/config/server.xml file and add the entry to deploy the application
    4. Edit the j2ee/home/config/default-web-site.xml and bind any web-modules you need.
    5. Start the server and see what happens -- the application should be deployed.
    Also, what happens if you use the $JAVA_HOME/bin/jar to try and view the contents of the CISS.ear file?
    -steve-

  • Ejb transaction management jndi lookup name problem

    Hi everyone
    i want to use usertransaction object.
    &#304; called it with jndi name like UserTransaction tran = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
    But there are many exception occur.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/modules/schema2beans/BaseBean
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at com.sun.enterprise.admin.event.AdminEventListenerRegistry.addEventListener(AdminEventListenerRegistry.java:262)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.<clinit>(J2EETransactionManagerImpl.java:1404)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.init(UserTransactionImpl.java:119)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.<init>(UserTransactionImpl.java:101)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.<init>(UserTransactionImpl.java:92)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:194)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at org.columbus.teien.entities.Deneme.main(Deneme.java:42)
    Caused by: java.lang.ClassNotFoundException: org.netbeans.modules.schema2beans.BaseBean
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    My session beans are stateless and i use container-managed transaction management(cmt)
    And my application server is glassfish 2.1
    How can i use this problem.
    Thanks for your reply.

    Do you have org.netbeans.modules.* classes referenced in your code?
    Those IDE classes are (correctly) not available on your container so you should consider not using them in your code.

  • Admin_client.jar - connect to a remote standalone oc4j instance

    Hi
    I have installed a standalone instance of OC4J on a remote linux box. I am trying to connect to that running instance on a windows box using the admin client jar supplied in the oc4j_admin_client_101310.zip file but get the following error -
    Failed at "Could not get DeploymentManager".
    I am able to connect to a remote OPMN managed instance and a local standalone instance but not to the remote standalone instance. I know the remote instance is ok as i have logged in and validated the URI using the admin_client.jar on that box. The URI format i am using is as follows -
    deployer:oc4j:host:23791
    Is it possible to connect to this instance remotely?
    Thanks
    George

    Hey George -- admin_client.jar can connect to local/remote OC4J standalone instances -- it connects to all sorts of things in 10.1.3.
    The "could not get deployment manager" message is very vague, I certainly appreciate that.
    What it usually comes down to is the deployer URI being incorrect in either the format being used or the host:port being incorrect.
    Sounds like you have validated the URL correctly.
    Just as a sanity check -- you can ping the remote server from the windows box?
    The oc4j standalone instance is up and running?
    The ORMI port is 23791?
    What you could do if you want to see if there is an underlying problem is to enable the client side logger for admin_client.jar.
    The doc describes it here:
    http://download.oracle.com/docs/cd/B31017_01/web.1013/b28950/adminclient.htm#CHDHIABJ
    Set it progressively to the FINE, FINER, FINEST levels and see if anything suspicious is identified in the log outputs that might be helpful.
    Let me know how it goes.
    -steve-

  • RMI tunneling: JNDI lookup fails with : Disconnected: Type code out of range, is -29

    9iAS Release 2
    When trying to tunnel through Apache to the OC4J_home instance using ...
    http:ormi://<host>:<HTTPport>/<application> <admin><password>
    and then looking up a JNDI name ...
    TopicConnectionFactory connectionFactory =
    (TopicConnectionFactory)new InitialContext(p).lookup("jms/myTopicConnectionFactory");
    I get a NamingException thrown, with the message: Disconnected: Type code out of range, is -29.
    The jms.xml file is correct. It works against a standalone OC4J instance (therefore no tunneling) ...
    ormi://<host>:23791/<application> <admin><password>
    I'm connecting from a standalone client and using the RMIInitialContextFactory, the tunneling is working (changing oc4j username/password gets a SecurityException). What's missing? Do you have to change the jndi name when tunneling? What does -29 mean in english?

    Tunneling through the Apache HTTP server to an OC4J instance from remote standalone clients works on Linux installations of 9iAS but not on NT installations, failing with a 'Type Code out of range, is -29' error, JVM versions on client and server are the same. Also works against a standalone version of oc4j on NT, what's happening?

  • Use HTTPS to access webservice on standalone OC4J

    I have followed the instructions in the Oracle Containers for J2EE Security Guide for setting up SSL (Chapter 15) on standalone OC4J. I have also looked at Tugs blog about using HTTPS with web services. I believe I have everything setup right but have a problem.
    BTW, I am using a standalone OC4J instance that is also an ESB server. Prior to doing the SSL setup I already had 2 test web services running that could be accessed via http just fine.
    Here is my default-web-site.xml file contents:
    <web-site xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd" port="8888" display-name="OC4J 10g (10.1.3) Default Web Site" schema-major-version="10" schema-minor-version="0" >
    <default-web-app application="default" name="defaultWebApp" />
    <web-app application="system" name="dms0" root="/dmsoc4j" />
    <web-app application="system" name="dms0" root="/dms0" />
    <web-app application="system" name="JMXSoapAdapter-web" root="/JMXSoapAdapter" />
    <web-app application="default" name="jmsrouter_web" load-on-startup="true" root="/jmsrouter" />
    <web-app application="javasso" name="javasso-web" root="/jsso" />
    <web-app application="ascontrol" name="ascontrol" load-on-startup="true" root="/em" ohs-routing="false" />
    <web-app application="esb-test" name="esb-test" load-on-startup="true" root="/esbtest" />
    <web-app application="esb-dt" name="esb_console" load-on-startup="true" root="/esb" />
    <web-app application="orainfra" name="orainfra" load-on-startup="true" root="/orainfra" />
    <web-app application="esb-rt" name="provider-war" load-on-startup="true" root="/event" />
    <web-app application="Test-elexnet_service-WS" name="WebServices" load-on-startup="true" root="/Test-elexnet_service-context-root" />
    <web-app application="Test-elexnet_service2-WS" name="WebServices" load-on-startup="true" root="/Test-elexnet_service2-context-root" />
    <access-log path="../log/default-web-access.log" split="day" />
    </web-site>
    Here is my secure-web-site.xml file contents:
    <web-site xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd" secure="true" port="4443" display-name="OC4J 10g (10.1.3) Secure Web Site" schema-major-version="10" schema-minor-version="0" >
    <default-web-app application="default" name="defaultWebApp" />
    <web-app application="Test-elexnet_service-WS" name="WebServices" load-on-startup="true" root="/Test-elexnet_service-context-root" />
    <web-app application="Test-elexnet_service2-WS" name="WebServices" load-on-startup="true" root="/Test-elexnet_service2-context-root" />
    <access-log path="../log/secure-web-access.log" split="day" />
    <ssl-config keystore="C:\OracleESB\j2ee\home\oc4jkeystore.jks" keystore-password="xxx" />
    </web-site>
    I also have the following in my server.xml file:
    <application name="javasso" path="../../home/applications/javasso.ear" parent="default" start="false" />
    <application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true" />
    <application name="esb-dt" path="../applications/oraesb-dt.ear" parent="default" start="true" />
    <application name="orainfra" path="../applications/orainfra.ear" parent="default" start="true" />
    <application name="esb-rt" path="../applications/oraesb-rt.ear" parent="esb-dt" start="true" />
    <application name="esb-test" path="../applications/oraesb-test.ear" parent="default" start="true" />
    <application name="Test-elexnet_service-WS" path="../applications\Test-elexnet_service-WS.ear" parent="default" start="true" />
    <application name="webapp" path="../applications\webapp.ear" parent="default" start="true" />
    <application name="Test-elexnet_service2-WS" path="../applications\Test-elexnet_service2-WS.ear" parent="default" start="true" />
    <global-web-app-config path="global-web-application.xml" />
    <transaction-manager-config path="transaction-manager.xml" />
    <web-site default="true" path="./default-web-site.xml" />
    <web-site path="./secure-web-site.xml" />
    <cluster id="31671846181898" />
    All I really want is to access the 2 web services via HTTPS. I can access the default applciation via https just fine but when I try to use https to access the web services I get a 404 Not found error (after first getting a security alert popup). I can still access the services via http though. In the log of the server I have the following errors that occured on startup of OC4J. They pertain to the secure web site and there is an error for each web service. I don't understand what they mean/what the problem is:
    <MSG_TEXT>Internal error raised tyring to instantiate web-application: WebServices defined in web site OC4J 10g (10.1.3) Secure Web Site. Error compiling :C:\OracleESB\j2ee\home\applications\Test-elexnet_service2-WS\WebServices: Error instantiating compiler: IO error writing cache: C:\OracleESB\j2ee\home\application-deployments\Test-elexnet_service2-WS\WebServices\deployment-cache.jar</MSG_TEXT>
    <MSG_TEXT>Internal error raised tyring to instantiate web-application: WebServices defined in web site OC4J 10g (10.1.3) Secure Web Site. Error compiling :C:\OracleESB\j2ee\home\applications\Test-elexnet_service-WS\WebServices: Error instantiating compiler: IO error writing cache: C:\OracleESB\j2ee\home\application-deployments\Test-elexnet_service-WS\WebServices\deployment-cache.jar</MSG_TEXT>
    Anyone know what is going on? TIA!
    Nick

    I found that when I REMOVED the following from the default-web-site.xml
    <web-app application="Test-elexnet_service-WS" name="WebServices" load-on-startup="true" root="/Test-elexnet_service-context-root" />
    <web-app application="Test-elexnet_service2-WS" name="WebServices" load-on-startup="true" root="/Test-elexnet_service2-context-root" />
    and restarted OC4J, then everything is ok and I don't get any errors. However I can only access the web services via HTTPS and not HTTP.
    Anybody got any ideas?

  • Standalone OC4J fails

    I have deployed my app to the standalone OC4J instance installed in Jdeveloper 9.0.3. I have done java -jar oc4j.jar -install and set my password. The deployment went without fail.
    I can enter http://<name>:8888 and I get the OC4J instance welcome page.
    When I enter http://<name>:8888/<app_dir>/<app_name).jsp
    I get a "Page cannot be displayed" and this is my application.log:
    5/13/03 12:42 PM Started
    5/13/03 12:42 PM Started
    5/13/03 12:42 PM cydcorweb: jsp: init
    5/13/03 12:42 PM cydcorweb: 9.0.3.0.0 Started
    5/13/03 12:43 PM cydcorweb: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException: Line # 2, <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
    Error: java.lang.ClassNotFoundException: oracle.cabo.ui.jsps.tags.RenderingContextTEI
    What does this mean?
    BTW, I have done this exact deployment procedure on my laptop and the app runs there.
    TIA,
    Ed.

    Never mind. I de-installed 9.0.3.1 and re-installed it and now the app runs fine. I must have messed up something in my preivous config.

  • JVM termination with standalone oc4j

    Hi,
    We have several (around 15) standalone oc4j instances running on a Sun machine, the details are as follows:
    Machine: SunFire V1280 with 8 processors (sun4u sparc) and 24 GB RAM
    OS: SunOS 5.9 Generic_117171-02
    oc4j version: 9.0.4.0.0
    There is also a 10g installation on this machine.
    We are finding that quite regularly one or more of the oc4j instances shuts down without warning. the only information in the log files (jms.log, rmi.log etc) is a "Stopped (JVM termination)" message. I cannot find any other logs on the machine which can help me with this error.
    I am after one of two things:
    1. Potential reasons for this happening (preferably with solutions!)
    2. A possible for a log file created by the JVM detailing why it is terminating.
    Can anyone help?
    Thanks

    http://blogs.oracle.com/shay/2005/10/24#a55

  • Error in File adapter Module.-- the whole lookup name is localejbs/localjbs

    Hi All,
    Iam just trying to do File to IDoc scenario using Seeburger Modules.File is picked and when it enters into modules , it is showing the below error.
    Success Channel CC_SND: Send binary file  "/sapint/testout/Input_Test". Size 2568 with QoS EO
    Error Attempt to process file failed with com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at localjbs, the whole lookup name is localejbs/localjbs/SeeClassifier.
    The Steps which i followed in Module are as follows.
    ModuleName                                       ModuleKey
    localjbs/SeeClassifier                             classifier
    localejbs/CallBicXIRaBean                      bic
    localejbs/Seeburger/MessageSplitter       splitter
    ModuleKey    ParamterName       ParameterValue
    bic  mappingName             AUTO
    bic  destSourceMsg           MainDocument
    bic  destTargetMsg            MainDocument
    bic  split                            true
    bic  classifierAttID              classifierAtt  
    classifier       destSourceMsg       MainDocument
    classifier       attID                       classifierAtt
    classifier       showInAuditLog       true
    If anyone has idea what might be wrong?? kinldy share the same.
    Its urgent for me.
    ThankYou
    Seema.

    Hi,
    I think you have done a typo error. is it not
    localejbs/SeeClassifier classifier*
    To find the correct JNDI lookup name, log in to Visual Administrator of the J2EE Engine and in server node look for the JNDI Registry Service.Spot your desired bean and fetch the whole JNDI name form there.
    Regards,
    Sudharshan N A

  • Best practice for jndi lookup

    I am in the process of cleaning up a rather large codebase and am looking for the best way (or good methodologies I can choose from) for specifying the jndi lookup name. Our current code base has the following methods for specifying the lookup name:
    1) hard-coded strings
    2) constant defined in the file making lookup
    3) constant defined in external interface
    4) constant defined in EJB Home interface
    My initial thought was to create a single interface and put all the constants within it and have any class that wants to perform a lookup implement that interface. But before I went and did that I wanted to see if there were any other methods out there.
    I searched the forums (EJB/JNDI) but could not find anything that specified any method that was preferred.
    TIA

    I am in the process of cleaning up a rather large
    codebase and am looking for the best way (or good
    methodologies I can choose from) for specifying the
    jndi lookup name. Our current code base has the
    following methods for specifying the lookup name:
    1) hard-coded strings
    2) constant defined in the file making lookup
    3) constant defined in external interface
    4) constant defined in EJB Home interface
    constant defined in external interface
    My initial thought was to create a single interface
    and put all the constants within it and have any
    class that wants to perform a lookup implement that
    interface.
    sounds great !

  • CommandButton action method invoked multiple times in standalone OC4J

    Hi,
    We've developed an application in JDeveloper 10.1.3.3.0 (ADF Business Components version 10.1.3.41.57). In one page we have a commandButton with an action method:
    <af:commandButton action="#{MyBean.myActionMethod}"
    blocking="false"
    textAndAccessKey="#{nls['MY_LABEL']}"
    id="myButtonId" >
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
    </af:commandButton>
    This method is defined in a managed bean:
    public String myActionMethod() {
    /* some code */
    return "indexPage";
    There is a navigation-rule for outcome "indexPage". When we run our application in the JDeveloper embedded OC4J instance and click on the commandButton, the action method is invoked once and then the .jspx in the navigation-rule is navigated to.
    We deployed our application to a standalone OC4J instance. Both embedded and standalone OC4J have version: Oracle Containers for J2EE 10g (10.1.3.3.0) (build 070610.1800.23513)
    When we run our application in the standalone OC4J and click on the commandButton, the action method is repeatedly invoked in a seemingly infinite loop.
    We'd appreciate it if someone could shed some light on the matter. Please note that we cannot use <redirect /> in our navigation-rule for "indexPage" because in production we have an Oracle webcache server upstream of our OC4J. Users can only submit HTTPS requests to the webcache, which in turn forwards these requests as HTTP requests.
    Kind regards,
    Ibrahim

    Dear All,
    We'd really appreciate it if somebody would suggest some possible causes even if these might seem fare-fetched. Perhaps compare certain .jar files or something to that effect.
    Anything ????
    Thanks and regards,
    Ibrahim

  • Problems deploying PL/SQL Web Service example to standalone OC4J

    I have built the PL/SQL Web Service example EMP_FETCHER in the tutorials that come with JDeveloper. When run with the embedded OC4J container, the web service works ok using the autogenerated client. However, while I can then successfully deploy the web service to a standalone OC4j instance running on a separate database server, when I point the client at it, a NoSuchMethodError exception is thrown by oc4j with the following stacktrace;
    at tutorial_jdbc_connection.Emp_fetcher.get_emp(Emp_fetcher.sqlj:43)
    at tutorial_jdbc_connection.__Emp_fetcherSPWrapper.invokeMethod(__Emp_fetcherSPWrapper.java:73)
    at oracle.j2ee.ws.InvocationWrapper.invoke(InvocationWrapper.java:98)
    at oracle.j2ee.ws.RpcWebService.doPost(RpcWebService.java:359)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:652)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Looks like I'm missing some support libraries but I'm unsure which ones they are, and why they wouldn't be part of a standard OC4J installation.
    I've tried including the SQLJ runtime and Oracle JDBC library support in the deployment and redeploying but the same error persists.
    Any assistance would be appreciated
    Regards
    Michael

    You have an old version of java installed. That is what "java.lang.UnsupportedClassVersionError" tells.

  • OPMN vs Standalone OC4j (memory leak)

    I run the same servlet application using standalone OC4J instance on solaris without any problem.
    Trying to run the same application deployed in oracle enterprise (opmn) console causes memory leak. I see a lot of new classes allocated on each servlet invocation related to oracle.xml.* package and org.apache.axis.* (servlet uses axis to download attachment).
    Did anybody see similar issues. Any thought are welcome.
    thanks
    Roman

    To answer myself in case somebody was interested how to resolve this issue :
    Using different xml parser (for ex. crimson, but most likely any other would be fine too) eleminated the problem.
    i.e. adding the followning java system property
    -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl

  • OC4J Instance crashes on Linux

    We have a standalone OC4J instance version 10.1.3.2 on Linux that we use to provide pdf print service for applications developed using APEX. Java version is 1.4.2. I have deployed the fop ear file to the instance, this is delivered with APEX. On several occasions, end users have reported that they can not open the pdf report. When I check the server, the OC4J instance is not running. There is nothing in the java logs or OC4J instance logs to indicate why the instance crashed. When I restart the OC4J instance, printing once again works. Has anyone else had stability problems with this product?
    Thanks,
    Don Morse

    Standalone OC4J runs quite stable on every platform.
    You should check the log files or the standard output (where you started OC4J). Also check the memory settings for the JDK. A common problem is that the JDK throws an OutOfMemoryException and won't respond anymore. You should also consider using JDK 1.5.0_x since it has a better memory management.
    If this doesn't help post the complete command line.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for