facebook

Oracle OC4J…

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #268560 Reply

    Hello,

    I have a few questions regarding the OC4J server support:

      1) Is there going to be any work done to make the usage of OC4J any easier? The issues with deployment to [OC4J_HOME]/j2ee/home/application-autodeploy by default is really unusable. It would be nice to be able, in the connector config, to define the deployment path of choice. The deployment should also make the necessary updates to the appropriate Oracle config files. Thoughts? Ideas? Questions?

      2) The OC4J connector configuration lacks some setup options that would be very beneficial. Most notable of these is Stop parameters. There currently is no way to set appropriate admin parmaters for proper shutdown of the OC4J instance. This leads to a “forced” shutdown of the container and always requires the container to recover upon restart. A proper OC4J shutdown should be: oc4j -shutdown -port 23791 -password [admin password]. It is not currently possible to configure this.

      3) I noticed that Eclipse already provides a connector for OC4J 10.1.3 but I do not see how to access this profile, either through the MyEclipse App Server connectors or through Eclipse. How do I enable/configure/evaluate this functionality? From the plugin particulars it appears that this connector may provide a more robust setup for usage of OC4J within Eclipse although this may not be the case.

    I do a lot of Oracle development and would love to be able to seamlessly deploy to OC4J while using the MyEclipse tools. At the present time (to save my sanity) I have been using Tomcat for development and then exporting WAR files to OC4J manually. Obviously this won’t work for EJB development and I will need to install or maintain yet another tool to handle the EJB container. I would rather be able to confine the working environment to a replica of the production environment (Oracle 10g AS), OC4J Standalone would normally allow me to do this.

    Your thoughts and feedback are greatly appreciated.

    Thanks,
    -Rod

    #268587 Reply

    Riyad Kalla
    Member

    The issues with deployment to [OC4J_HOME]/j2ee/home/application-autodeploy by default is really unusable.

    What is the issue exactly? As a temporary workaround, you can use a Custom Location deployment and place the deployment anywhere you like.

    The deployment should also make the necessary updates to the appropriate Oracle config files. Thoughts? Ideas? Questions?

    That won’t likely happen soon. We don’t do it with any other app servers right now and support over 30. If we did decide to go down that path of manipulating the app servers chances are it would be for the most frequently used app servers and decided by user demand.

    2) The OC4J connector configuration lacks some setup options that would be very beneficial. Most notable of these is Stop parameters. There currently is no way to set appropriate admin parmaters for proper shutdown of the OC4J instance.

    Do you get an exception on shutdown? I just looked through our issue tracker and saw an issue related to that with version 10.1.3 and I was wondering if it’s the same issue or if I should file another.

    3) I noticed that Eclipse already provides a connector for OC4J 10.1.3 but I do not see how to access this profile, either through the MyEclipse App Server connectors or through Eclipse.

    I’m not too clear here. Do you mean WTP provides a connector for it? If so, MyEclipse doesn’t build ontop of the WTP app server connectors so using it will not be hooked into MyEclipse’s debugger or deployment handling.

    #268769 Reply

    gkelley
    Member

    @support-rkalla wrote:

    2) The OC4J connector configuration lacks some setup options that would be very beneficial. Most notable of these is Stop parameters. There currently is no way to set appropriate admin parmaters for proper shutdown of the OC4J instance.

    Do you get an exception on shutdown? I just looked through our issue tracker and saw an issue related to that with version 10.1.3 and I was wondering if it’s the same issue or if I should file another.

    I get an exception on shutdown. The client JRE displays:

    Error: Unexpected error during lookup : Lookup error: javax.naming.AuthenticationException: Not authorized; nested exception is: 
        javax.naming.AuthenticationException: Not authorized

    While the server JRE displays:

    2007-04-12 16:25:35.747 NOTIFICATION J2EE RMI-00003 Invalid username or password for default (admin). Authentication failed.

    Manually stopping the container from a command prompt works fine though:

    C:\Program Files\oc4j10\bin>.\oc4j.cmd -shutdown -port 23791 -password welcome
    Shutdown OC4J instance...

    I do have the administration password set to “welcome” in Window – Preferences – MyEclipse – Application Servers – Oracle AS.

    The oc4j.cmd command I used to stop the container manually eventually ends up running:

    "%JAVA_HOME%\bin\java" -jar "%ORACLE_HOME%\j2ee\home\admin.jar" ormi://localhost:23791 oc4jadmin welcome -shutdown

    On a hunch, I tried running that command but with “admin” instead of “oc4jadmin” and, voila, I reproduced what happens when I try to stop the container using MyEclipse. It almost seems as if MyEclipse is assuming the administrator’s username is “admin”. Could this be possible?

    This problem has been extremely frustrating!!! Please help! My organization has a subscription to the product; our subscriber id is NSLC-UL16-EX2008-01-17.

    Here is the output of my “Installation Summary”:

    *** Date: 
    Thursday, April 12, 2007 4:37:47 PM EDT
    
    ** System properties:
    OS=Windows2000
    OS version=5.0
    Java version=1.5.0_01
    
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA
    
    
    *** Eclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA
    
    
    
    
    Eclipse Platform
    
    Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
    Build id: M20070212-1330
    
    
    Eclipse RCP
    
    Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
    Build id: M20070212-1330
    
    
    Eclipse Java Development Tools
    
    Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
    Build id: M20070212-1330
    
    
    Eclipse Plug-in Development Environment
    
    Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
    Build id: M20070212-1330
    
    
    Eclipse Project SDK
    
    Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
    Build id: M20070212-1330
    
    
    Eclipse Graphical Editing Framework
    
    Version: 3.2.2.v20070208
    Build id: 20070208-1315
    
    
    
    
    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\Program Files\eclipse3.2\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    a70_78
    -product
    com.genuitec.myeclipse.product.ide
    -vm
    C:\WINNT\system32\javaw.exe
    
    #268800 Reply

    Riyad Kalla
    Member

    gkelley,
    You need to start and stop the app server atleast once time from the command line to set the password for the ‘admin’ user. Then from that point on you can use the MyEclipse connector (After the password is set and stored)

    Could you try that?

    #268802 Reply

    gkelley
    Member

    Yeah I’ve done that already before I tried using the MyEclipse connector, but I just tried it again. I unzipped the zipfile I downloaded from Oracle, opened a command prompt, CD’d into the directory where I unzipped the file, CD’d into the bin directory, ran “.\oc4j.cmd -start”, entered “welcome” each time I was prompted, and then it displayed:

    The password for OC4J administrator "oc4jadmin" has been set.
    07/04/13 10:56:22 The OC4J administrator "oc4jadmin" account is activated.

    Then I opened another command prompt and ran “.\oc4j.cmd -shutdown -port 23791 -password welcome” and the server subsequently shut down. Then I started MyEclipse, configured the Oracle AS connector appropriately, clicked the down arrow next to the “Run/Stop/Restart MyEclipse Application Servers” button, selected “Oracle AS”, then selected “Start”. The server started fine, so then I again clicked the down arrow next to the “Run/Stop/Restart MyEclipse Application Servers” button, selected “Oracle AS”, and then selected “Stop”. And again I got the same results as in my previous post.

    #268856 Reply

    Hi Riyad,

    Quote:
    The issues with deployment to [OC4J_HOME]/j2ee/home/application-autodeploy by default is really unusable.

    What is the issue exactly? As a temporary workaround, you can use a Custom Location deployment and place the deployment anywhere you like.

    The issue/request is to be able to specify where to deploy an application on OC4J (a simple text entry field/browse button maybe?) as opposed to defaulting to the path listed above – which doesn’t work.

    I will try the workaround for now but a future enhancement to choose a location would be very helpful.

    Quote:

    2) The OC4J connector configuration lacks some setup options that would be very beneficial. Most notable of these is Stop parameters. There currently is no way to set appropriate admin parmaters for proper shutdown of the OC4J instance.

    Do you get an exception on shutdown? I just looked through our issue tracker and saw an issue related to that with version 10.1.3 and I was wondering if it’s the same issue or if I should file another.

    Yes, as gkelley pointed out, the container throws an exception on shutdown due to improper admin credentials. I won’t duplicate the errors or desired workaround here as gkelley has done an admirable job of enumerating both the steps needed to reproduce the issue and the necessary changes to correct it.

    Quote:

    3) I noticed that Eclipse already provides a connector for OC4J 10.1.3 but I do not see how to access this profile, either through the MyEclipse App Server connectors or through Eclipse.

    I’m not too clear here. Do you mean WTP provides a connector for it? If so, MyEclipse doesn’t build ontop of the WTP app server connectors so using it will not be hooked into MyEclipse’s debugger or deployment handling.

    Exactly. The WTP provides a connector for OC4J 10.1.3. I am able, via the standard Eclipse J2EE perspective, to set this connector up and connect to the server. However, I do not see any way in which to deploy to, or actively run in, that instance of OC4J from the IDE. This is most likely due to the fact that you are not using this connector as the basis for yours. Perhaps there would be some benefit in taking a look at combining the two into a more robust, usable connector.

    As Oracle is an active Eclipse member, I am sure that there are resources available within their Eclipse team that would be more than helpful to get a seamless build/deploy/run/debug scenario going in MyEclipse. Judging from the number of OC4J threads in this forum, this effort would be greatly appreciated by many.

    Thanks,
    -Rod

    #268863 Reply

    Riyad Kalla
    Member

    Hey guys, the connundrum here is that 3 of us tried this internally and we couldn’t reproduce the issue:

    1) Went to Oracle’s site, clicked on Downloads, Middleware, App Server, Downloaded “oc4j_extended_101320” and unzipped it
    2) Launched the app server once from the command line, set the password, was confirmed that the password was set for user ‘oc4jadmin’.
    3) Setup the connector to launch the app server, the home dir is <install dir>\j2ee\home BTW

    And for all three of us, starting up and shutting down the app server worked without incident. There is only 1 line of output during startup, and none during shutdown but we didn’t get any exception.

    So the developer working on this is at a stand still because *none* of us could reproduce the issue.

    Do you see where we might have gone wrong with our test setup?

    #268870 Reply

    Hi Riyad,

    I just did some experiments and this is what I’ve found:

    1) If you start and stop the server via the MyEclipse adapter it does “appear” to operate properly as you reported. However, if you look at the server.log and the jms.log files, for example, you will notice that the the stop command never gets logged – most probably because it never actually happens (at least not correctly). When you restart the server you will get two console messages about recovering the jms services. This is due to them not being stopped properly on the previous run. You can see this same type of behavior if you manually stop a running OC4J instance with the explicit -force flag. The server is forced to terminate all processes regardless of their state. Subsequent restarts of the server will run an internal recovery routine to reset the services back to a known state.

    2) If you start/stop the server from the WTP Oracle 10.1.3 connector. The start/stop will work correctly (the first time, of course, it will have to recover the failed jms processes from the previous run, but after that everything will start and stop smoothly). The server.log and jms.log file will have an appropriate entry such as the following:

    07/04/15 14:27:21.891 10.1.3.2.0 Started
    07/04/15 14:28:14.66 10.1.3.2.0 Stopped (Shutdown executed by oc4jadmin from 127.0.0.1 (localhost))

    The server.log actually has two Start entries and a single Stop entry. The example above is from the jms.log file. When the server is started/stopped from the MyEclipse connector, the stop entry in the example above never occurs (again, probably because the stop doesn’t actually complete properly).

    I don’t know if this helps or not. Please let me know if I can provide any further information that help.

    Thanks,
    -Rod

    #268873 Reply

    Riyad Kalla
    Member

    Rod,
    I just checked my log file and I see this:

    07/04/13 09:35:01.0 10.1.3.2.0 Started
    07/04/13 09:36:05.593 10.1.3.2.0 Stopped (Shutdown executed by oc4jadmin from 127.0.0.1 (localhost))

    … that looks like it’s working.

    I wonder if the combo of WTP + MyEclipse is causing an issue as none of us have that setup here, I’m using the 5.5M2 release to test this out using the all-in-one installer…

    #268886 Reply

    gkelley
    Member

    @support-rkalla wrote:

    Hey guys, the connundrum here is that 3 of us tried this internally and we couldn’t reproduce the issue:

    1) Went to Oracle’s site, clicked on Downloads, Middleware, App Server, Downloaded “oc4j_extended_101320” and unzipped it
    2) Launched the app server once from the command line, set the password, was confirmed that the password was set for user ‘oc4jadmin’.
    3) Setup the connector to launch the app server, the home dir is <install dir>\j2ee\home BTW

    And for all three of us, starting up and shutting down the app server worked without incident. There is only 1 line of output during startup, and none during shutdown but we didn’t get any exception.

    So the developer working on this is at a stand still because *none* of us could reproduce the issue.

    Do you see where we might have gone wrong with our test setup?

    As a developer myself, I can appreciate the frustration of not being able to reproduce a problem at the developer’s end.

    To ensure we’re using the same oc4j, here’s the md5 of the zip I downloaded: 7c6a162de70f56261f20811e5fa8c1a2.

    Also, when you guys are trying to reproduce this problem, are you using the version of MyEclipse I’m using–5.1.1 GA?

    I’m not sure if this is relevant, but I also just noticed that when I start the server manually the first time, after I set the password for the admin account, the server displays the following:

    07/04/16 09:34:02 WARNING: Could not set file permissions for wallet at C:\Program Files\oc4j10_new\j2ee\home\persistence\ascontrol\ascontrol\securestore\ewallet.p12
    07/04/16 09:34:02 WARNING: Could not set file permissions for wallet at C:\Program Files\oc4j10_new\j2ee\home\persistence\ascontrol\ascontrol\securestore\ewallet.p12
    

    Another thing that is strange is that when I try to stop the server through MyEclipse, although both the client and server JREs display error messages, the server JRE does, in fact, terminate (although not “gracefully” because the next time the server is started, it displays a bunch of messages about recovering transactions, etc.).

    Lastly, as I asked in a previous post, is it possible MyEclipse is assuming the administrator’s username is “admin”? Why else would the server JRE be displaying

    Invalid username or password for default (admin).
    #268889 Reply

    gkelley
    Member

    Just to follow up on my last post, it turns out my suspicions were correct: when I try to stop the oc4j server from within MyEclipse, MyEclipse is “executing” the JAR <install dir>\j2ee\home\admin.jar with the following arguments:

    ormi://localhost:23791 admin welcome -shutdown

    So I guess now I/we need to figure out why it’s using “admin” instead of “oc4jadmin”.

    #268896 Reply

    Riyad Kalla
    Member

    Ok so digging through some stuff with the connector dev:

    1) We are using 5.5M2 on our end to test, see if you can grab thta and install it using the all-in-one installer.
    2) The older Oracle 9 connector uses “admin” and is compat with Oracle 9 and 10 up to 10.1.2
    3) In 10.1.3 the name changed to “oc4jadmin” and the new Oracle 10 connector uses that.

    I wonder if the updated connectors in 5.5M2 is why it’s working for us and not you guys? Could you grab that and see if it works? (Just install to a new separate directory)

    #268902 Reply

    gkelley
    Member

    @support-rkalla wrote:

    So the developer working on this is at a stand still because *none* of us could reproduce the issue.

    Here’s a tip: you probably couldn’t reproduce the issue because you weren’t testing the same version I was using!

    I apologize for being blunt, but I feel annoyed because I took the time to post a detailed description of my problem, even including my “Installation Summary” as recommended in your guys’ posting guidelines, and it doesn’t seem like you guys even used that information. Didn’t it occur to you to try to reproduce my problem using the version of MyEclipse I was using?

    And instead of me downloading and installing 5.5M2, why don’t you try installing 5.1.1 and telling me if you can then reproduce the problem?

    #268903 Reply

    Riyad Kalla
    Member

    Yes the issue occurs on 5.1.1. In 5.5M2, the “Oracle AS” connector was renamed to “Oracle 9” and a new Oracle 10 connector that acts accordingly was added.

    Sorry for the lack of communication on my part as to what I was testing against. One other developer and I were so focused on getting the fix into M2 for this that all we cared about was “Did we get it fixed?” and not going back and retrying it with 5.1.1 to see what it was doing previously. In short, we had “release tunnel vision”.

    Anyhow, I hope it’s fixed now in 5.5M2, I appreciate your patience and detail with reporting this issue, all of your help in this regard made fixing it a much faster process.

    #268906 Reply

    Hi Riyad,

    Thanks for the follow-up. It appears my original thread has been hijacked so I will not be posting to this thread further. I do appreciate the feedback and will wait patiently for the 5.5GA release.

    -Rod

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: Oracle OC4J…

You must be logged in to post in the forum log in