Using embedded oc4j in jdeveloper 10.1.3. EA failed

Hallo
i have the following problem, and hope somebody can help me.
i installed the jdev 10.1.3.EA 3412 on notebook with suse linux 9.2 and made a simple hallo world jsp.
compilation was ok with no errors.
when i run the jsp in jdev i get the following message:
[Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
**** Unable to obtain password from principals.xml. Using default.
/home/wilhetho/jdevhome/system/oracle.j2ee.10.1.3.34.12/embedded-oc4j/config>
/usr/share/jdk1.5.0_06/bin/java -server -classpath /opt/oracle/jdev/j2ee/home/oc4j.jar:/opt/oracle/jdev/jdev/lib/jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Xrs -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config /home/wilhetho/jdevhome/system/oracle.j2ee.10.1.3.34.12/embedded-oc4j/config/server.xml
[waiting for the server to complete its initialization...]
24.01.2006 19:15:34 com.evermind.server.XMLDataSourcesConfig parseRootNode
INFO: Legacy datasource detected...attempting to convert to new syntax.
06/01/24 19:15:43 java.net.NoRouteToHostException: No route to host
06/01/24 19:15:43      at java.net.PlainSocketImpl.socketConnect(Native Method)
06/01/24 19:15:43      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
06/01/24 19:15:43      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
06/01/24 19:15:43      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
06/01/24 19:15:43      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
06/01/24 19:15:43      at java.net.Socket.connect(Socket.java:507)
06/01/24 19:15:43      at java.net.Socket.connect(Socket.java:457)
06/01/24 19:15:43      at java.net.Socket.<init>(Socket.java:365)
06/01/24 19:15:43      at java.net.Socket.<init>(Socket.java:207)
06/01/24 19:15:43      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.sendMessage(Oc4jNotifier.java:98)
06/01/24 19:15:43      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.postInitApplicationServer(Oc4jNotifier.java:55)
06/01/24 19:15:43      at com.evermind.server.ApplicationServer.serverExtensionPostInit(ApplicationServer.java:1041)
06/01/24 19:15:43      at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:927)
06/01/24 19:15:43      at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:98)
06/01/24 19:15:43      at java.lang.Thread.run(Thread.java:595)
06/01/24 19:15:43 Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview initialized
After this, the oc4j container is up an running, because i can reach it over the adress localhost:8988.
So now my two questions:
-> there is no browser starting (i tried different entries under tools-preferences-webproxy). what can be the reason?
-> where does the error message no route to host come from?
thank you

Hi, here Re: java.net.ConnectException: Connection timed out: connect i post my workaround.
bye
Antonio.

Similar Messages

  • Mail Session configuration with embedded oc4j in jdeveloper 10g 10.1.3.1

    Hello all:
    I'd tried to use javamail in a j2ee application. I´d defined an resource reference with the EJB Module Editor but when i run the application it throws:
    java.lang.InstantiationException: Error initializing ejb-modules: No Mail Session configured for the resource MailSession
    How can i configure a Mail Session with the embedded oc4j of jdeveloper 10g 10.1.3.1?
    Thanks a lot.

    Hi,
    You need to add following configuration in $ORACLE_HOME/j2ee/home/config/application.xml & restart your OC4J :-
    <mail-session location="EMailSession" smtp-host="mail.cdsc.com">       <property name="mail.transport.protocol" value="smtp"/>       <property name="mail.debug" value="true"/>    </mail-session>Regards,
    Sandeep

  • Process exited with exit code 128 using embedded OC4J (jdevsetudio1013)

    I've just downloaded Oracle JDeveloper (10.1.3) - Production JAN 2006 version (Studio Edition), installied and configure as the install guide, downladed SU5 (Studio Edition version 10.1.3.0.4 Build JDEVADF_10.1.3_NT_060125.0900.3673) and JUnit extensions and SR. When I tried to run Oracle ADF SRDEMO Application, I´ve just got this error message:
    [EJB 3.0]: Assigning default-data-source=jdbc/SRDemoDS, specified in projects EJB 3.0 properties
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    **** Unable to obtain password from principals.xml. Using default.
    E:\mywork\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config>
    "C:\Program Files\Java\jdk1.5.0_08\bin\javaw.exe" -ojvm -classpath E:\jdevstudio1013\j2ee\home\oc4j.jar;E:\jdevstudio1013\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config E:\mywork\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    Process exited with exit code 128.
    I'm using a Microsoft Windows Server 2003 Standard Edition Service Pack 1 inside a VMware workstation (version 5.5.2.build-29772) with 1.4GB of RAM with an Oracle 10gR2 for windows (10.2.0.1.0)
    I don´t know if it is a configuration problem or that Windows Server 2003 SP1 is not supported or any other problem.
    Any help you can give on this would be much appreciated.
    Thanks,
    Orlando

    thanks for your idea...but in my environment there no JAVA_OPTIONS defined. This is a copy of my console after running set:
    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    ANT_HOME=C:\apache-ant-1.6.5
    APPDATA=C:\Documents and Settings\Administrator\Application Data
    APR_ICONV_PATH=C:\Program Files\Subversion\iconv
    CATALINA_HOME=C:\ASF\Tomcat 5.5
    ClusterLog=C:\WINDOWS\Cluster\cluster.log
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=OGJEE
    ComSpec=C:\WINDOWS\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Documents and Settings\Administrator
    JAVA_HOME=C:\Program Files\Java\jdk1.5.0_08
    JBOSS_HOME=C:\jboss-4.0.4.GA-Patch1
    LOGONSERVER=\\OGJEE
    M2_HOME=C:\ASF\maven-2.0.4
    M2_REPO=C:\Documents and Settings\Administrator\.m2\repository
    MAVEN_OPTS=-XX:MaxPermSize=128m -Xmx512m
    NUMBER_OF_PROCESSORS=1
    OS=Windows_NT
    Path=E:\oracle\product\10.2.0\db_1\bin;C:\Program Files\Support Tools\;c:\Progra
    m Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\S
    ystem32\Wbem;;C:\Program Files\Subversion\bin;C:\Program Files\Java\jdk1.5.0_08\
    bin;C:\ASF\maven-2.0.4\bin;C:\Program Files\MySQL\MySQLServer5.0\bin;C:\apache-a
    nt-1.6.5\bin;;C:\Program Files\STI\bin\pc-win95
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PERL5LIB=E:\oracle\product\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x86;E:\oracle\prod
    uct\10.2.0\db_1\perl\5.8.3\lib;E:\oracle\product\10.2.0\db_1\perl\5.8.3\lib\MSWi
    n32-x86;E:\oracle\product\10.2.0\db_1\perl\site\5.8.3;E:\oracle\product\10.2.0\d
    b_1\perl\site\5.8.3\lib;E:\oracle\product\10.2.0\db_1\sysman\admin\scripts;
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 8, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0d08
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
    TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
    USERDOMAIN=OGJEE
    USERNAME=localadmin
    USERPROFILE=C:\Documents and Settings\Administrator
    windir=C:\WINDOWS
    tthanks anyway

  • How to reload embedded oc4j in JDeveloper without terminating it?

    To the experienced:
    Using JDeveloper (10.1.3.4), when I need to see the effect of my changes in the application code (in the backing beans), the only way I know is to terminate the embedded oc4j by clicking the red square button (or Run > Terminate > Embedded OC4J Server), and then run a .jspx page to restart the oc4j. All these steps are just for the changes in the code to be loaded into the oc4j.
    That is a bit too cumbersome because such reloading is frequent. To test the changed application I need to use an outside page that sends a request to that .jspx page, with some information that the .jspx page needs. That won't work because the oc4j has been terminated. So I have to Run that .jspx page inside JDeveloper just to start the oc4j, knowing that this will spill error in the browser window because the information from the outside page is missing.
    Is there a way to have the application in the running oc4j updated without terminating and restarting the oc4j?
    Thanks for helping!
    Newman

    It kind of depends on the type of changes you did - some changes can be picked up automatically just by saving the new file and reloading in the browser.
    In any case you don't need to first stop the server and then run, you can just hit the run button again and JDeveloper will re-deploy your new page.
    You can have the HTML file be part of your project and run it from inside JDeveloper - this will also re-deploy your new JSPX.

  • Problem running embeded OC4J from JDeveloper 11g TP 3

    I've just downloaded JDeveloper 11g Technical Preview 3. Unzipped it and ran.
    IDE runs ok, but when I try to run Web project on embedded OC4J, I got exceptions and the server never starts (exception text included on the bottom).
    Here is the way to reproduce the error:
    1. Create new Web Project with New Gallery wizard:
    a. New Gallery->general->projects->web project
    b. on Web Application page (step 3 of 7) choose Servlet 2.5/JSP 21.
    c. on Page Flow technology page (4 of 7) choose none
    d. don't include available libraries (5 of 7)
    e. on Web Project Profile (6 of 7) check Add JSP Page
    f. finish
    e. choose jsp name (after clicking finish a dialog pops up)
    2. Run the page
    a. select the page in Application Navigator
    b. right click on it and choose Run option
    In my case I got the following exception:
    [Starting Embedded OC4J Server using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\Documents and Settings\kazelot\Application data\JDeveloper\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\config>
    D:\work\jdev1111\jdk\bin\javaw.exe -client -classpath D:\work\jdev1111\j2ee\home\oc4j.jar;D:\work\jdev1111\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -XX:MaxPermSize=512m -Ddisable.checkForUpdate=true -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false "-Djava.security.policy=C:\Documents and Settings\kazelot\Application data\JDeveloper\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\config\java2.policy" oracle.oc4j.loader.boot.BootStrap -config "C:\Documents and Settings\kazelot\Application data\JDeveloper\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\config\server.xml"
    [waiting for the server to complete its initialization...]
    2008-01-30 13:19:09 oracle.j2ee.xml.XMLMessages warningException
    WARNING: Exception Encountered
    2008-01-30 13:19:10 oracle.oc4j.util.SystemLog log
    SEVERE: Server start failed processing configuration
    java.security.AccessControlException: access denied ( CredentialAccessPermission credstoressp.credstore.default.systemuser read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$3.checkPermission(JpsAuth.java:256)
         at oracle.security.jps.util.JpsAuth$Diagnostic.checkPermission(JpsAuth.java:180)
         at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$6.checkPermission(JpsAuth.java:280)
         at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:315)
         at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:338)
         at oracle.security.jps.internal.credstore.util.CsfUtil.checkPermission(CsfUtil.java:527)
         at oracle.security.jps.internal.credstore.ssp.SspCredentialStore.getCredential(SspCredentialStore.java:412)
         at oracle.security.jps.fmw.util.JpsFmwUtil.findSystemUser(JpsFmwUtil.java:218)
         at oracle.security.jps.fmw.JpsUserManager.init(JpsUserManager.java:235)
         at oracle.security.jps.fmw.JpsUserManager.<init>(JpsUserManager.java:247)
         at oracle.security.jps.fmw.JpsUserManagerFactory$JpsUserManagerFactoryI.create(JpsUserManagerFactory.java:252)
         at com.evermind.server.deployment.UserManagerConfig$JAZN.construct(UserManagerConfig.java:635)
         at com.evermind.server.deployment.UserManagerConfig.delegatee(UserManagerConfig.java:253)
         at com.evermind.security.IndirectUserManager.getAdminUser(IndirectUserManager.java:126)
         at com.evermind.security.IndirectUserManager.getAdminUser(IndirectUserManager.java:126)
         at com.evermind.server.XMLApplicationServerConfig.setPassword(XMLApplicationServerConfig.java:3157)
         at com.evermind.server.XMLApplicationServerConfig.<init>(XMLApplicationServerConfig.java:244)
         at com.evermind.server.ApplicationServer.createConfig(ApplicationServer.java:648)
         at oracle.oc4j.server.ServerFactory$Worker.prepareConfig(ApplicationServerFactory.java:201)
         at oracle.oc4j.server.ServerFactory$Worker.start(ApplicationServerFactory.java:220)
         at oracle.oc4j.server.ServerFactory$Worker.run(ApplicationServerFactory.java:235)
         at java.lang.Thread.run(Thread.java:595)
    2008-01-30 13:19:10 oracle.oc4j.util.SystemLog logNoStack
    SEVERE: Server exiting: ApplicationServer entered state EXITING
    Process exited with exit code 1.
    Is it something with my configuration. My environment is:
    ADF Business Components     11.1.1.47.96
    Java(TM) Platform     1.5.0_11
    Oracle IDE     11.1.1.0.22.47.96
    SOA Composite Editor     11.1.1.0.0 (Build 071219.1424)
    Versioning Support     11.1.1.0.22.47.96
    Thanks for any suggestions,
    kazelot

    change the file to just (DIRTY way, but works)
    grant {
         permission java.security.AllPermission;
    };Really dirty as these permissions are not Java EE compliant.
    --olaf                                                                                                                                                                                                                                                                                                                                                                           

  • The embedded oc4j in JDeveloper returned a wrong data from the SOAP message

    Greetings,
    I made a webservice in .NET to send simply the current time of the server. then, I developed another client in JDeveloper to receive the time.
    and the object declared in j2ee as Calendar object.
    everythings went fine, but what I have noticed when I print the Calendar object, the time came plus 3 hours later as the .NET time.
    FYI, I had checked the soap message that was received by embedded OC4J ,it was correct time, but the problem when you print it. and both .NET and Jdeveloper in the same machine
    example:
    <?xml version = '1.0' encoding = 'utf-8'?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <HelloWorldResponse xmlns="http://tempuri.org/">
    <HelloWorldResult>2008-10-14T10:40:21.12</HelloWorldResult>
    </HelloWorldResponse>
    </soap:Body>
    </soap:Envelope>
    when I printed the data, I got 2008-10-14T13:40:21.12
    so, does anyone have an idea about what is going on ??
    thanks in advance.

    ANY HELP :(

  • Embedded OC4J (Jdeveloper 10.1.3.2) HTTP switch HTTPS

    I need to debug some web application that switches between HTTP and HTTPS and back again. I have done all the required configuarion of the embedded OC4J to support this namely:
    1. create self signed certificate
    2. created a second web-site (secure-web-site.xml) that listens for https connections on another port e.g. 4443
    3. added relevant <ssl-config> entry to secure-web-site.xml
    4. Marked the relevant <web-app> element as shared in the secure-web-site.xml and default-web-site.xml files
    I now start the embedded OC4J in jdeveloper and all is well, https and http work fine. However a different session is created for each of the web-sites the secure and the default (i.e one for the http and one for the https). I understand why since the browser treats http://www.mydomain.com:8988 and https://www.mydomain.com:4443 as separate web sites.
    One Solution
    ~~~~~~~~~~
    If my understanding is correct if I use the standard ports 80 and 443 then the browser would treat these as the same web site and only one cookie jsessionid cookie gets created and so only one session
    2nd Solution
    ~~~~~~~~~~
    If I use non-default ports like 8888 and 4443 then I can set the cookie domain in the orion-web.xml file <session-tracking cookie-domain=".mydomain.com" /> and this ensures one jsessionid cookie is shared for the whole domain and so again only one session
    Unfortunately I cannot implement either solution in the embedded OC4J since for solution one no matter what I do I cannot get the embedded OC4J to listen on port 80. It always finds a conflict and chooses a different port like 1024 even though no other process is using port 80
    The second solution does not work since the orion-web.xml file gets overwritten everytime I start the embedded OC4J and so I lose any updates I make.
    Does anybody have any ideas how to overcome these problems? I know I could use a standalone container but then I will lose all the convenience of testing within Jdeveloper.
    Many thanks.

    Hi,
    I'll file an ER to allow developers in JDeveloper to test http and https. What I usually do - as a work around - is to open files that are change on each start of the embedded OC4J in TextPad. TextPad asks if an opened file should be reloaded when it has been changed on the filesystem. I then say "no" and safe the opened file gain, overriding the JDeveloper changes.
    Its not perfect, but much better than re-editing all the files.
    Frank

  • JDeveloper 10.1.3.1 - injection works partiin embedded OC4J

    Hi,
    there are a few simple examples which do not work under embedded OC4J:
    Example #1:
    public class ContextListener implements ServletContextListener {
    @PersistenceUnit(unitName="myUnitName")
    private EntityManagerFactory emf;
    public ContextListener() {
    System.out.println( "constructor" );
    public void contextInitialized(ServletContextEvent event) {
    System.out.println( "init: emf = " + emf );
    When I run using embedded OC4J (testing servlet) - I see message 'constructor',
    but then hothing happens - no message from contextInitialized(), no response
    from servlet - IE displays 'page not found' message.
    Example 2:
    public class CatalogServlet extends HttpServlet {
    @PersistenceUnit(unitName="myUnitName")
    private EntityManagerFactory emf;
    public CatalogServlet( ) {
    System.out.println( "constructor" );
    public void init() throws ServletException {
    System.out.println( "Servlet init, emf = " + emf );
    Here results are a bit different: I see 'contrustor' message, then exception
    stack trace - and init() method of servlet did not get called.
    Note that:
    1) If instead of injecting EntityManagerFactory I try to inject session facade
    bean (using @EJB) - this works both in listener and in servlet.
    2) Injecting EntityManagerFactory works in my session facade bean,
    using the same @PersistenceUnit(unitName="myUnitName").
    3) Both examples above work well if I deploy application to WAR file
    and then deploy that WAR file to GlassFish application server.
    Is there something wrong with my code, or is there something wrong with
    embedded OC4J? May be some settings for OC4J that I missed?
    Regards, Leonid.

    Hello,
    It is a bug in the way the embedded OC4J is initializing the application.
    You can deploy successfuly deploy/run in the stand alone OC4J, so could you please for this purpose use the standalone version.
    Regards
    Tugdual Grall

  • How to use mapviewer extension for jdevelop?

    I am working on the mapviewer. But my problem is that I can not connect mapviewer, or I can not start mapviewer using the embedded oc4j by jdeveloper. In mapviewer faq I read that:
    "How do I view the mapping metadata through JDeveloper's Connections Navigator?
    We have developed an Oracle JDeveloper extension that lets you browse the available list of styles, themes and basemaps defined in a datasource through JDeveloper's Connections Navigator. To do this, you will first need to download the mvconnection.jar file from OTN's MapViewer site. This jar contains the code that defines a MapViewer connection type for JDeveloper. To install, simply drop this jar file to the JDeveloper extension directory, normally $JDEV_HOME/jdev/lib/ext. Then restart JDeveloper, and you are all set.
    But when I restart jdeveloper, I got the message:
    "H:\Programme\jdev\jdev\lib\ext\mvpalette.jar!\META-INF\jdev-ext.xml
    Error: jar:file:/H:/Programme/jdev/jdev/lib/ext/mvpalette.jar!/META-INF/jdev-ext.xml<Line 105, Column 18>: XSD-2021: (Error) Element not completed: 'jsplibrary'
    H:\Programme\jdev\jdev\lib\ext\mvconnection.jar!\META-INF\jdev-ext.xml
    Error: jar:file:/H:/Programme/jdev/jdev/lib/ext/mvconnection.jar!/META-INF/jdev-ext.xml<Line 25, Column 20>: XSD-2034: (Error) Element 'description' not expected.
    Error: jar:file:/H:/Programme/jdev/jdev/lib/ext/mvconnection.jar!/META-INF/jdev-ext.xml<Line 26, Column 13>: XSD-2034: (Error) Element 'help' not expected.
    I use Jdeveloper 10g. Have you ever met the same problem?
    Thanks in advance

    The Map Viewer extension is still not available for JDeveloper 10g. It works with JDeveloper 9.
    The Mapping group is currently working on an upgrade.

  • EJB lookup works in embedded OC4J but not stand-alone

    I use JDeveloper 9.0.3.1 to develop a combined web & EJB application. The EJBs are deployed on a 9.0.3 iAS server on a different machine.
    The EJB lookup is in a helper class that's called by the servlet. For EJB lookup, I use the class "com.evermind.server.rmi.RMIInitialContextFactory" as described by the OC4J servlet guide (http://download-uk.oracle.com/docs/cd/A97688_10/generic.903/a97680/develop.htm#1003973). So my code looks like this:
    Hashtable map = new Hashtable();
    map.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    map.put(Context.PROVIDER_URL, "ormi://server:port/app-business");
    map.put(Context.SECURITY_PRINCIPAL, "admin");
    map.put(Context.SECURITY_CREDENTIALS, "password");
    map.put("dedicated.rmicontext", "true");
    InitialContext context = new InitialContext(map);
    Object thing = context.lookup("MyEjb");
    EJBHome feedback = (EJBHome)PortableRemoteObject.narrow(thing, "com.company.ejb.MyEjbHome");
    The last insert into the map (map.put("dedicated.rmicontext", "true");) wasn't mentioned neither in the servlet guide nor the EJB one. But without it, I'd always get some "domain is null" error.
    Now this code above works flawlessly in the embedded OC4J of JDeveloper. But it always hangs in the "Object thing = context.lookup("MyEjb");" line when executed either in a stand-alone OC4J (the one from JDeveloper launched through the batch file in [JDeveloper directory]\jdev\bin\start_oc4j.bat) or in the OC4J in iAS.
    Does anybody know why this happens or how to fix it? I know that there are other ways of EJB lookup in servlets but since we also have plain Java classes for testing purposes that access EJBs, this seemed like the simplest thing to do for both Java classes and servlets.

    I was referring to the java client case where this optoin is not required. In general for web clients one doesn't use the rmi initial context to find the bean. This is because the bean and the webclient are both packaged in the same application. One defines the ejb-ref in the web.xml for the bean and then looks it using the default initial context. Something like
    Context ctx = new InitialCOntext();
    ctx.lookup("bean ejb-ref-name");
    However if you must use rmi for accessing the bean from the web client then the dedicated connection property is required.
    For java clients you would setup the rmi context environment.
    Since you are trying to use a common utility class for both java and webclient I would recommend that you look into packaging the java client as a j2ee application client. Basically in that case you would be able to define a ejb-ref in the aplication-client.xml and use the default initial context in code for both the cases.
    Hope that helps
    Dhiraj

  • Ajax functionality works in embedded OC4J, but not on iAS 10.1.2

    Hi,
    For a customer, we made an ADF application using JDeveloper 10.1.2. Using instructions from http://www.oracle.com/technology/pub/articles/vohra-ajax.html we coded a servlet, to find a description from a code the user entered in the application, and show this on the webpage without page refresh (the application uses JSP and Struts). This works fine in the embedded oc4j server JDeveloper provides, and also works fine on the Standalone OC4J server. However, when the application is deployed to the iAS from the customer, everything works fine, except the ajax functionality, the description fields simply are not shown.
    Does anyone have a clue what could be the problem? We also runned the application on the iAS server itself, and this gives the same error (no ajax functionality).
    Thanks in advance,
    Remco

    Hi dvohra,
    Thanks for your reply. I'm afraid I overlooked something, which is the reason of the ajax functionality not working. The Servlet that made the Ajax functionality used a datasource, and the same was in the Embedded OC4J Preferences. The ADF Business Components part was changed to use the datasource declared on the iAS. The Servlet however was not...
    So, all works now.

  • XML validation errors in embedded OC4J jazn.xml

    hi
    If I open the jazn.xml of the embedded OC4J in JDeveloper 10.1.3.3.0 and select "Validate XML" from the context-menu on that file, I get these messages in the "XML Validation Errors - Log" :
    D:\oracle\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\jazn.xml
        Error(10,28): <Line 10, Column 28>: XML-24535: (Error) Attribute 'schema-major-version' not expected.
        Error(10,28): <Line 10, Column 28>: XML-24535: (Error) Attribute 'schema-minor-version' not expected.
        Error(10,28): <Line 10, Column 28>: XML-24536: (Error) Missing Attribute 'filepath'
        Error(10,28): <Line 10, Column 28>: XML-24536: (Error) Missing Attribute 'OC4J_INSTANCE_ID'Strange, because I'm not aware of any changes I've made to this file.
    Could someone (from Oracle) please confirm that this is "intended", so I can exclude it as possible cause for the "security configuration issue" that I'm having.
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    If "the content seems to be correct" then the XML schema jazn-10_0.xsd might not be what it should be.
    For the attributes "filepath" and "OC4J_INSTANCE_ID" it says they are "required", just like the validation by JDeveloper says, but they are not in the documentation.
    For the attributes "schema-major-version" and "schema-minor-version" the documentation says:
    "This attribute is not defined directly in the XSD for jazn.xml. It is according to the attributeGroup specification in the top-level OC4J XSD."
    Although there is no exact reference in that documentation, and also not in jazn-10_0.xsd, that XSD could be oc4j-10_0.xsd because it defines this:
        <xsd:attributeGroup name="oc4j-schemaVersionAttributeType">
            <xsd:annotation>
                <xsd:documentation>This type defines two different attributes which are intended to be used in the
                    root element of a schema document to define version 10.0 of the schema document.
                </xsd:documentation>
            </xsd:annotation>
            <xsd:attribute name="schema-major-version" type="xsd:integer" fixed="10"/>
            <xsd:attribute name="schema-minor-version" type="xsd:integer" default="0"/>
        </xsd:attributeGroup>I'm not sure if it is the validation by JDeveloper that went wrong here, or the XML schema jazn-10_0.xsd that is incomplete about these "schema version" attributes.
    Anyway, it seems OK to exclude it as possible cause for the "security configuration issue" that I'm having.
    regards
    Jan

  • How to turn off the warning message when re-compiling jsp in embedded OC4J?

    Members,
    I would like to remove the annoying warning messages whenever we re-compile a jsp file using embedded OC4J.
    Steps:
    1. create an web project
    2. create a test jsp file (say, test.jsp)
    3. run the jsp file.
    4. on the jsp visual editor, modify the jsp file.
    5. go to the browser, reload the page. the following warning messages are displayed:
    06/03/03 08:09:13 Warning: directory C:\Projects\TestAgain\UserInterface\public_html\WEB-INF\classes doesn't exist on classpath
    06/03/03 08:09:14 C:\Projects\TestAgain\UserInterface\classes\.jsps\_test.java:31: warning #556: variable session assigned to but never used
    06/03/03 08:09:14 HttpSession session = pageContext.getSession();
    06/03/03 08:09:14 ^
    06/03/03 08:09:14 C:\Projects\TestAgain\UserInterface\classes\.jsps\_test.java:32: warning #559: variable __jsp_tag_starteval declared but never used
    06/03/03 08:09:14 int __jsp_tag_starteval;
    06/03/03 08:09:14 ^
    06/03/03 08:09:14 C:\Projects\TestAgain\UserInterface\classes\.jsps\_test.java:33: warning #556: variable application assigned to but never used
    06/03/03 08:09:14 ServletContext application = pageContext.getServletContext();
    06/03/03 08:09:14 ^
    06/03/03 08:09:14 C:\Projects\TestAgain\UserInterface\classes\.jsps\_test.java:35: warning #556: variable page assigned to but never used
    06/03/03 08:09:14 _test page = this;
    06/03/03 08:09:14 ^
    06/03/03 08:09:14 C:\Projects\TestAgain\UserInterface\classes\.jsps\_test.java:36: warning #556: variable config assigned to but never used
    06/03/03 08:09:14 ServletConfig config = pageContext.getServletConfig();
    06/03/03 08:09:14 ^
    06/03/03 08:09:14 C:\Projects\TestAgain\UserInterface\classes\.jsps\_test.java:37: warning #556: variable __ojsp_varRes assigned to but never used
    06/03/03 08:09:14 javax.servlet.jsp.el.VariableResolver __ojsp_varRes = (VariableResolver)new OracleVariableResolverImpl(pageContext);
    06/03/03 08:09:14
    I'm so much glad to see JDeveloper giving out all the details and warnings, but sometimes they spit out too much warning messages that simply annoys and distracts my programming.
    There seems to be no parameters for me to shut those up, maybe I should do it manually?
    thanks.

    Ronald,
    I've already tried setting up the j2ee-config.xml file, but
    it seems that the warning message does not come from the oc4j, but is generated when jsp file is being compiled, so no matter what you do with the j2ee-config.xml, it would not work to remove the warnings.
    I was thinking maybe I could setup the java compiler option found in server.xml, by adding -nowarn option in javac options attribute, but it seems that the file server.xml gets overwritten automatically whenever the oc4j restarts (so, no avail).
    So... any other ideas?

  • OC4J under JDeveloper

    I'm trying to run OC4J under JDeveloper. I'm using JDeveloper v.10.1.3.1 and OC4J v.10.1.3 . There is a Wizard in JDeveloper that's used to define an App Server connection. The problem I'm having is on Step 3 of 4 of the Wizard. There are 3 entries here. They are:
    1. Host Name (default value is 'localhost').
    2. RMI Port (default value is 23791)
    3. URL Path (NO DEFAULT VALUE).
    I have no idea what the URL path should be or the RMI Port. How does one go about finding out what these entries are and defining an App server connection?
    I can run the App server outside of JDeveloper but would prefer to have it inside if possible.
    Thanks,
    Bill

    If you are using the embedded oc4j of JDeveloper, you do not use this Wizard. You just run your application, servlet, jsp and etc.
    If you would like JDeveloper to connect to an oc4j standalone, by default, you do not have to enter anything into that URL Path. Just hit "finish" or "next" in that step of the Wizard once you enter that value for "Host Name" and "RMI Port".

  • JDeveloper 10.1.3.2 - Nullpointer in Embedded OC4J Preferences

    When I want to have a look at the jazn-data file holding the users and policies I'm getting the followin error in the dialog-screen:
    java.lang.NullPointerException
         at oracle.jdevimpl.xml.oc4j.jazn.PolicyPanel.onEntry(PolicyPanel.java:38)
         at oracle.ide.panels.MDDPanel.enterTraversableImpl(MDDPanel.java:926)
         at oracle.ide.panels.MDDPanel.enterTraversable(MDDPanel.java:899)
         at oracle.ide.panels.MDDPanel.mav$enterTraversable(MDDPanel.java:106)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1348)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1216)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1210)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.Dialog.show(Dialog.java:536)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
         at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:276)
         at oracle.jdevimpl.xml.ModalEditor.showDialog(ModalEditor.java:112)
         at oracle.jdevimpl.xml.ModalEditor.showDialog(ModalEditor.java:88)
         at oracle.jdevimpl.runner.oc4j.EmbeddedServerAdminCommand.doit(EmbeddedServerAdminCommand.java:68)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:259)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:541)
         at oracle.ide.controller.IdeAction$1.run(IdeAction.java:772)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:789)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:498)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    The only changes I've made in my application was unchecking the Extensions I'm not using in my application. After changing these Extensions (this is a tip regarding memory-consumption of jdeveloper) I'm getting these errors in the realm-dialog.
    Regards,
    Nathalie
    PS: I've unchecked the following extensions:
    - ADF Security 10.1.3.40.66
    - BI Beans Graph 10.1.3
    - Oracle Webcenter Preconfigured OC4J 10.1.3.2.0
    - Portlet Creation Extension 10.1.3.40.66
    - Versioning Support 10.1.3.40.66

    Hi,
    OC4J needs to be configured to support HTTP and HTTPS sessions. Because the embedded OC4J uses the default-web-app configuration during testing I am not so sure about configuring it for HTTPS. However, in this case I suggest you test it as a stand alone container in which case HTTPS configuration happen as described in the OC4J security guide.
    "How do I make the Embedded OC4J redirect http requests for secure web content to https automatically as required in the servlet 2.4 spec ?"
    I don't find this statement in my version of the Servet 2.4 spec. Can you point me to the line in the document?
    If you mean transport guarantee, then this is not exactly what you say:
    "The transport-guarantee element specifies that the communication between client and server should be NONE, INTEGRAL, or CONFIDENTIAL. NONE means that the application does not require any transport guarantees. A value of INTEGRAL means that the application requires that the data sent between the client and server be sent in
    such a way that it can’t be changed in transit. CONFIDENTIAL means that the application requires that the data be transmitted in a fashion that prevents other entities from observing the contents of the transmission. In most cases, the presence of the INTEGRAL or CONFIDENTIAL flag will indicate that the use of SSL is required."
    Servlet 2.4 spec
    This however doesn't mean automated redirect to https but says that this requires SSL, which means that a http error is thrown if https isn't used
    Frank

Maybe you are looking for