Deploying J2EE Apps in WL9.0 using Maven2

Hi All,
Has any one using Maven2.0 to Deploy the J2EE Apps on WL9.0.
I don't think medrac sample app is deployed using Maven. If any of you tried it could you pls post the maven scripts..
Thanks
Kumar

Hi,
Maven was originally started as an attempt to simplify the build processes in the Jakarta Turbine project. There were several projects each with their own Ant build files that were all slightly different and JARs were checked into CVS.
What resulted is a tool that can now be used for building and managing any Java-based project. We hope that we have created something that will make the day-to-day work of Java developers easier and generally help with the comprehension of any Java-based project.
System requirements
JDK     1.4 or above (this is to execute Maven - it still allows you to build against 1.3 and prior JDK's)
Memory     No minimum requirement
Disk     No minimum requirement. Approximately 100MB will be used for your local repository, however this will vary depending on usage and can be removed and redownloaded at any time.
Operating System     No minimum requirement. On Windows, Windows NT and above or Cygwin is required for the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X.
Regards
Prasanna Yalam

Similar Messages

  • Building and deploying J2EE apps ?  Now there is a solution for production root cause analysis.

    Is your organization building and deploying J2EE apps? If so, Halo
    can help solve one of the toughest issues facing enterprises today:
    Finding the root cause of software faults.
    "Halo monitors, pinpoints, reports on and provides a source-code level
    root cause of software faults in deployed J2EE apps. Halo is unique
    because it's the only technology that can give you a root cause
    diagnosis in a fully deployed, live production application. Halo has
    such low performance overhead that customers deploy their final,
    production versions of their applications with Halo enabled.
    Used with Web Application Servers like WebLogic, Halo helps ensure
    that deployed code is reliable and able to be quickly fixed if
    problems turn up. Most important, because Halo is an "always on"
    technology, you get all the information you need to rapidly solve a
    problem on the first fault. Problem replication and bug reports are
    obsolete with Halo
    "Halo has a unique ability to provide a root cause diagonosis and
    understanding
    of software problems in production systems, without needing to
    replicate the
    issue.
    Test on WebLogic proved that Halo runs with extremely low overhead and
    is suitable for use in deployed production systems"
    Andrew Sliwkowski, Software Engineer
    BEA Systems, Inc.
    The key is Halo's high performance, low overhead TraceBack
    instrumentation technology. Based on technology out of MIT and proven
    in the field, TraceBack enables you to instrument JARs, EARs and WARs
    within minutes, without touching source code.
    Halo is useful throughout the entire application life cycle, from
    development through test, beta and deployment.
    If you have interest in learning more visit our website at
    www.incer.com or email me directly at [email protected] (Rick Martin)

    I have two questions. We have just started developing apps using jdev9i, 9iAS v2 and are new to the j2ee environment so my questions may be very easy ones.
    Question 1: We have set up Oracle pooling connection to our databases. We have a development, test and production database. When I deploy my application, it includes the connections. This is preventing me from moving the EAR files from dev to test to prod without modification and re deploying to my EAR file. Is there a way or a place that I can put my database connections that will not be included in my EAR files and the application still find them?datasources.xml is where the info regradings connection to databases is licated. If you're using 9iAS
    you can use EM to create datasource entry at the global level. In OC4J standalone you could use admin.jar
    or edit the file. Check out the standalone user's guide at http://otn.oracle.com/tech/java/oc4j/pdf/oc4j_so_usersguide_r2.pdf.
    Also, you will othe OC4J docs on OTN.
    Question 2: I have a stand alone oc4j set up for our developers to use while testing their applications. The applications include libraries supplied in jdev such as xml parser v2. I do not want to deploy those lib files with the app because I will have to redeploy all my apps if I upgrade jdev. I just want to be able to upgrade the libraries, test the apps and not have to redeploy everything. I can do this by coping the jdev lib to 9iAS but I can't seem to find the right place to put the lib for the stand alone oc4j instance. You can use the library tag within application.xml for server wide availability. Check out the article
    http://otn.oracle.com/oramag/oracle/02-sep/o52oc4j_2.html specifically class loading in OC4J section
    Any help would be greatly appreciated. Thanks in advance.

  • How to profile a pre-deployed J2EE app. using JSE8?

    I would like to profile a J2EE application that is already deployed on Sun Appserver. I do not have the source structure with me to start the profiling directly from the tool by the usual documented steps of JSE8.
    In JSE7, once I enabled the profiler feature for the appserver instance, I was able to get stats for the app. How do i achieve something similar using JSE8?
    -Girix

    This is possible, but is not a use case that the profiler supports directly. You will have to trick the profiler into profiling this predeployed app.
    First, deploy the application you wish to profile. Next comes the trick. Create a ghost enterprise project for the sole purpose of getting the profiler setup and running. While creating the ghost project, just accept all the defaults from the wizard. Since this project in an Enterprise Application project, when it is set as the main project, the J2EE Profiler menu item will be enabled.
    Enable the collection as if you were going to profile this ghost project. With the appserver started (you have already deployed the application you really want to profile), open the profiler.
    You will not be able to see data in the Transactions tab, because this relies on a filter place in the web component of the application. Since you did not do this, you will not get this data.
    You will be able to get method level, EJB container stats, and memory monitoring. Select the MEthods tab and notice that the application that was deployed appears in the tree. The profiler is designed to create this tree from whatever is deployed indiscriminately. You can select the methods in your application for instrumentation and then run the application.
    After running the application the profile data will be ready for viewing. In the Methods tab select the "Get MEthod Trace" button. You will see the all the profile data for your application.

  • What are best practice for packaging and deploying j2EE apps to iAS?

    We've been running a set of J2EE applications on a pair of iAS SP1b for about a year and it has been quite stable.
    Recently however we have had a number of LDAP issues, particularly when registering and unregistering applications (registering ear files sometimes fails 1st time but may work 2nd time). Also We've noticed very occasionally that old versions of classes sometimes find their way onto our machines.
    What is considered to be best practice in terms of packaging and deployment, specifically:
    1) Packaging - using the deployTool that comes with iAS6 SP1b to package is a big manual task, especially when you have 200+ jsp files. Are people out there using this or are they scripting it with a build tool such as Ant?
    2) Deploying an existing application to multiple iAS's. Are you guys unregistering old application then reregistering new application? Are you shutting down iAS whilst doing the deployment?
    3) Deploying ear files can take 5 to 10 mins, is this normal?
    4) In a clustered scenario where HTTPSession is shared what are the consequences of doing deployments to data stored in session?
    thanks in asvance for your replies
    Owen

    You may want to consider upgrading your application server environment to a newer service pack. There are numerous enhancements involving the deployment tool and run time layout of your application that make clear where you're application is loading its files from.
    If you've at a long running application server environment, with lots of deployments under your belt, you might start to notice slow downs in deployment and kjs start time. Generally this is due to garbage collecting in your iAS registry.
    You can do several things to resolve this. The most complete solution is to reinstall the application server. This will guarantee a clean ldap registry. Of course you've got to restablish your configurations and redeploy your applications. When done, backup your application server install space with the application server and directory server off. You can use this backup to return to a known configuation at some future time.
    For the second method: <B>BE CAREFUL - BACKUP FIRST</B>
    There is a more exhaustive solution that involves examining your deployed components to determine the active GUIDS. You then search the NameTrans section of the registry searching for Applogic Servlet *, and Bean * entries that represent your previously deployed components but are represented in the set of deployed GUIDs. Record these older GUIDs, remove them from ClassImp and ClassDef. Finally remove the older entries from NameTrans.
    Best practices for deployment depend on your particular environmental needs. Many people utilize ANT as a build tool. In later versions of the application server, complete ANT scripts are included that address compiling, assembly and deployment. Ant 1.4 includes iAS specific targets and general J2EE targets. There are iAS specific targets that can be utilized with the 1.3 version. Specialized build targets are not required however to deploy to iAS.
    Newer versions of the deployment tool allow you to specify that JSPs are not to be registered automatically. This can be significant if deployment times lag. Registered JSP's however benefit more fully from the services that iAS offers.
    2) In general it is better to undeploy then redeploy. However, if you know that you're not changing GUIDs, recreating an existing application with new GUIDs, or removing registered components, you may avoid the undeploy phase.
    If you shut down the KJS processes during deployment you can eliminate some addition workload on the LDAP server which really gets pounded during deployment. This is because the KJS processes detect changes and do registry loads to repopulate their caches. This can happen many times during a deployment and does not provide any benefit.
    3) Deploying can be a lengthy process. There have been improvements in that performance from service pack to service pack but unfortunately you wont see dramatic drops in deployment times.
    One thing you can do to reduce deployment times is to understand the type of deployment. If you have not manipulated your deployment descriptors in any way, then there is no need to deploy. Simply drop your newer bits in to the run time space of the application server. In later service packs this means exploding the package (ear,war, or jar) in to the appropriate subdirectory of the APPS directory.
    4) If you've changed the classes of objects that have been placed in HTTPSession, you may find that you can no longer utilize those objects. For that reason, it is suggested that objects placed in session be kept as simple as possible in order to minimize this effect. In general however, is not a good idea to change a web application during the life span of a session.

  • Can't deploy j2ee app with EJBs

    Hi;
    I have installed Web Logic and have successfully deployed a servlet based app
    and a jsp based app. However, when I go to deploy an EJB based app (with servlets
    & JSPs too), I get the following error:
    ####<Apr 2, 2004 5:06:03 PM MST> <Notice> <Security> <belle> <myserver> <main>
    <<WLS Kernel>> <> <BEA-090082> <Security initializing using security realm myrealm.>
    ####<Apr 2, 2004 5:06:04 PM MST> <Notice> <WebLogicServer> <belle> <myserver>
    <main> <<WLS Kernel>> <> <BEA-000327> <Starting WebLogic Admin Server "myserver"
    for domain "mydomain">
    ####<Apr 2, 2004 5:06:11 PM MST> <Notice> <WebLogicServer> <belle> <myserver>
    <ListenThread.Default> <<WLS Kernel>> <> <BEA-000355> <Thread "ListenThread.Default"
    listening on port 7001, ip address *.*>
    ####<Apr 2, 2004 5:06:11 PM MST> <Notice> <WebLogicServer> <belle> <myserver>
    <main> <<WLS Kernel>> <> <BEA-000360> <Server started in RUNNING mode>
    ####<Apr 2, 2004 5:06:59 PM MST> <Warning> <Deployer> <belle> <myserver> <ExecuteThread:
    '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <> <BEA-149004> <Failures
    were detected while initiating Deploy task for application store.>
    ####<Apr 2, 2004 5:06:59 PM MST> <Error> <Deployer> <belle> <myserver> <ExecuteThread:
    '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <> <BEA-149201> <Failed
    to complete the deployment task with ID 0 for the application store.
    java.lang.ArrayIndexOutOfBoundsException: 6
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:222)
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:97)
         at weblogic.ejb20.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:802)
         at weblogic.ejb20.deployer.EJBModule.loadDescriptor(EJBModule.java:423)
         at weblogic.j2ee.J2EEApplicationContainer.loadDescriptors(J2EEApplicationContainer.java:1359)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1184)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2634)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2584)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2506)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    --------------- nested within: ------------------
    weblogic.management.ManagementException: - with nested exception:
    [java.lang.ArrayIndexOutOfBoundsException: 6]
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2523)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    any ideas?
    thanks - dave

    Hi;
    I have installed Web Logic and have successfully deployed a servlet based app
    and a jsp based app. However, when I go to deploy an EJB based app (with servlets
    & JSPs too), I get the following error:
    ####<Apr 2, 2004 5:06:03 PM MST> <Notice> <Security> <belle> <myserver> <main>
    <<WLS Kernel>> <> <BEA-090082> <Security initializing using security realm myrealm.>
    ####<Apr 2, 2004 5:06:04 PM MST> <Notice> <WebLogicServer> <belle> <myserver>
    <main> <<WLS Kernel>> <> <BEA-000327> <Starting WebLogic Admin Server "myserver"
    for domain "mydomain">
    ####<Apr 2, 2004 5:06:11 PM MST> <Notice> <WebLogicServer> <belle> <myserver>
    <ListenThread.Default> <<WLS Kernel>> <> <BEA-000355> <Thread "ListenThread.Default"
    listening on port 7001, ip address *.*>
    ####<Apr 2, 2004 5:06:11 PM MST> <Notice> <WebLogicServer> <belle> <myserver>
    <main> <<WLS Kernel>> <> <BEA-000360> <Server started in RUNNING mode>
    ####<Apr 2, 2004 5:06:59 PM MST> <Warning> <Deployer> <belle> <myserver> <ExecuteThread:
    '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <> <BEA-149004> <Failures
    were detected while initiating Deploy task for application store.>
    ####<Apr 2, 2004 5:06:59 PM MST> <Error> <Deployer> <belle> <myserver> <ExecuteThread:
    '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <> <BEA-149201> <Failed
    to complete the deployment task with ID 0 for the application store.
    java.lang.ArrayIndexOutOfBoundsException: 6
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:222)
         at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:97)
         at weblogic.ejb20.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:802)
         at weblogic.ejb20.deployer.EJBModule.loadDescriptor(EJBModule.java:423)
         at weblogic.j2ee.J2EEApplicationContainer.loadDescriptors(J2EEApplicationContainer.java:1359)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1184)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2634)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2584)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2506)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    --------------- nested within: ------------------
    weblogic.management.ManagementException: - with nested exception:
    [java.lang.ArrayIndexOutOfBoundsException: 6]
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2523)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    any ideas?
    thanks - dave

  • Problem with deploying j2ee app to weblogic server

    I would like to deploy a j2ee application, that was successfully deploy on the iAS version 10.1.3, on to the web logic server.
    It deploy successfully, but when I try to run it, I get a 404 error. I can see in the web center, the application is up.
    What should I look for to trouble shoot this?
    Thanks.

    1. Check the context root of the webapplication to make sure you are accessing that webresources like html or jsp file with correct context root.
    2. If you have a single server domain of WLS, then check access.log file located at: user_projects\domains\yourDomain\servers\yourServer\logs. This file should should show the resource you are accessing and the response status.
    3. From Weblogic Console, after the application is Deployed, make sure that your application is in Active Mode. From Weblogic Console, under Deployments tab, select your app, and see that it is Active. If it is in Prepared state, then click Lock and Edit, and select your App, and click on Start button.
    4. Check for CASE Sensitivity also for the resource you are accessing and context-root value etc for ex: like any JSPs or htmls.
    Ravi Jegga

  • HowTo: deploy an j2ee app using "/" as context root on iAS 6.5

    Hi all iAS expert
    It is highly appreciated one can teach me how to get around below problem
    l deployed an app using "/" as context root. But the iAS could respond to any HTTP request.
    However, as l changed the context root to sth other than root. iAS responded properly.
    Can someone help me get around this problem ?
    thank you a lot
    fox

    I deployed the same EJB on WLS 6.1+sp3 and WLS 7.0.
    These both work. Looks like there is some problem with WLS6.0+sp2. I have opened
    a case with BEA customer support.
    --Latha

  • EJB Deployment in J2EE Apps Server

    Hi,
    Can any one please help me in deploying EJB in J2EE Apps server?I have installed J2EE Apps Server 9 in my machine.Can any one please suggest me a document regarding EJB deployment in J2EE apps server or help me regarding this?
    Thanks in advance,
    Aravindhan.C

    Go to https://j2ee-sdk.dev.java.net/ and checkout "Methods of deploying applications" under the recent articles section; The tutorial link present in this page (under the references section) will also be useful. The samples bundle has reference samples which will also be useful

  • MMS J2ee app made with JBOSS want to use it with JRUN

    Hello fellow developers,
    I am very interested in creating a small website for uploading photos from my cell phone to a j2ee app running on a JRUN 4 server.
    I've downloaded the J2, JSR-212 SAMS Messaging API EJB Reference Implementation, from the nokia site. II also down load an MMSC and SMSC simulator from NOkia, which I believe developers can use in conjunction with testing the above ejb web application.
    Briefly this is what I think is happening so far from reading tid bits here and there like the aritcle in Java Boutique.
    It seems todescribe the SAMS api as being generic enough to accept all clients that supply SPI, which I believe is the interface that verizon, cingular, or that some other cell phone service might provide. This interface allows the forwarding of a text message or media message to another operation ( like yahoo mobile). Thus, when I send my photo to a [email protected], it goes to the MMSC that communicates through SPI say a SAMS J2EE applicaiton running on yahoo, which presents my recently snapped cell phone photo in my yahoo phone album.
    I would like to test this J2ee app I download from nokia. However, in part of the instructions it claims that a person must down load JBOSS 4.0.
    Does any one know if this Nokia J2ee app for JBoss can be used on a JRUN 4?
    Can the NOKIA SMSC/MMSC simulator I downloaded work as well with JRUN4, as I notice the word JBOSS when I was installing this Simulator?
    Does anyone know where, I can get anymore information on SAMS and how to implement it in a simple J2ee app?
    When we can upload a cell phone photofrom the web browser of our phone than we will have arrived!.

    Hello fellow developers,
    I am very interested in creating a small website for uploading photos from my cell phone to a j2ee app running on a JRUN 4 server.
    I've downloaded the J2, JSR-212 SAMS Messaging API EJB Reference Implementation, from the nokia site. II also down load an MMSC and SMSC simulator from NOkia, which I believe developers can use in conjunction with testing the above ejb web application.
    Briefly this is what I think is happening so far from reading tid bits here and there like the aritcle in Java Boutique.
    It seems todescribe the SAMS api as being generic enough to accept all clients that supply SPI, which I believe is the interface that verizon, cingular, or that some other cell phone service might provide. This interface allows the forwarding of a text message or media message to another operation ( like yahoo mobile). Thus, when I send my photo to a myphone#@photo.yahoo.com, it goes to the MMSC that communicates through SPI say a SAMS J2EE applicaiton running on yahoo, which presents my recently snapped cell phone photo in my yahoo phone album.
    I would like to test this J2ee app I download from nokia. However, in part of the instructions it claims that a person must down load JBOSS 4.0.
    Does any one know if this Nokia J2ee app for JBoss can be used on a JRUN 4?
    Can the NOKIA SMSC/MMSC simulator I downloaded work as well with JRUN4, as I notice the word JBOSS when I was installing this Simulator?
    Does anyone know where, I can get anymore information on SAMS and how to implement it in a simple J2ee app?
    When we can upload a cell phone photofrom the web browser of our phone than we will have arrived!.

  • How coud i do to deploy a app to the website that shiped by j2ee sdk

    i want deploy a app to the website that shiped by j2ee sdk.
    i found the "conf" folder under the J2EE_HOME.but the website is have nothing with the file "server.xml" in this folder.
    how could i do?
    thx

    The J2EE 1.4 Tutorial describes how to deploy applications:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

  • Using JNDI to access config file located outsite j2ee app

    Hi I'm wanting to store a config file for my J2ee app, somewhere on a tomcat server possibly inside the
    conf/ directory so that I can update this config file without having to redeploy the j2ee app every time a change is made.
    I've been told I can use JNDI to access this file, but I can't seem to find any examples or documentation on how I can do this.
    I'm new to JNDI and would appreciate any help, or suggestions.
    Thanks,
    Tim
    EDIT:
    So far I can access the file with this code:
    Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
              try {
                   Context ctx = new InitialContext(prop);
                   // look up context for name
                   //env.put(Context.PROVIDER_URL, "file:C:\\confluence\\confluence-2.5.1-std\\conf");
                   File f = (File)ctx.lookup("/confluence/confluence-2.5.1-std/conf/test.txt");My new problems are:
    1. The commented line env.put(Context.PROVIDER_URL, "file:C:\\confluence\\confluence-2.5.1-std\\conf"); it says in examples that this should set the dir to look in to the conf dir but if i change the lookup value to just test.txt it cannot find it.
    2. Can I somehow set the context to look into the conf directory of Tomcat without hard coding the path, as the path could change or be different on different machines??
    Edited by: Timothyja on Jan 15, 2008 7:00 PM

    Hi Kiran,
    Looking at the code you sent and the error, it looks like you should be casting the ds object to a javax.sql.DataSource object not a weblogic.jdbc.common.internal.RmiDataSource object.
    You may find some useful info at the following URL:
    http://edocs.bea.com/wls/docs81/jdbc/rmidriver.html#1026007

  • Concurrent Deployment of Multiple Releases of a J2EE App to WLS 7.0

    Is it possible to concurrently deploy multiple releases of the same
    J2EE app to WLS? If so, what was the process and your experience with
    it?

    Is it possible to concurrently deploy multiple releases of the same
    J2EE app to WLS? If so, what was the process and your experience with
    it?

  • Help using JMX to Get Context of Deployed Web Apps

    I think this question is more of a JMX question that anything else (like a JNDI question), so I am posting here. If anyone feels this should be posted elsewhere, please let me know.
    I want to be able to get a handle to each deployed web app's context, so that I may get a BasicDataSource from it, then look at the connection attributes inside of that BasicDataSource, i.e., Number of active connections, number of idle connections, etc. for each deployed web app.
    This is the path I am heading down (if there is another way, please let me know). The code below is inside of a JSP running inside of a web app within my Tomcat 5.0.16 server, running JDK 1.4.2.
    Here is the entire JSP...
    <%@ page import="org.apache.commons.dbcp.BasicDataSource,
                     javax.naming.InitialContext,
                     javax.naming.Context,
                     javax.management.ObjectName,
                     javax.management.MBeanServer,
                     java.util.Set,
                     org.apache.catalina.mbeans.MBeanUtils,
                     java.util.Iterator,
                     javax.management.ObjectInstance,
                     org.apache.catalina.core.StandardContext"%>
    <html>
        <head>
            <meta http-equiv="refresh" content="3"> <!-- refresh every 3 seconds -->
        </head>
        <body>
    <%
        //InitialContext ctx = new InitialContext();
        //Context envCtx = (Context) ctx.lookup("java:comp/env");
        String dsName = "";//"jdbc/raptor";
        String appName = "";//(String) envCtx.lookup("appName");
        BasicDataSource ds = null;//(BasicDataSource) envCtx.lookup(dsName);
        MBeanServer mBeanServer = MBeanUtils.createServer();
        ObjectName oname = new ObjectName("*:j2eeType=WebModule,*");
        Set contexts = mBeanServer.queryMBeans(oname, null);
        Iterator it = contexts.iterator();
        while(it.hasNext()) {
            ObjectInstance oi = (ObjectInstance)it.next();
            ObjectName cname = oi.getObjectName();
            System.out.println(">>> cname = " + cname.toString()); // this prints something like this: Catalina:j2eeType=WebModule,name=//localhost/accesstracker,J2EEApplication=none,J2EEServer=none
                Is this the right way to do this??? I seem to be getting the web app, I just want to be able to
                get a handle to that web app's context, get a BasicDataSource from it, then look at the connection
                attributes inside of that BasicDataSource, i.e., Number of active connections, number of idle
                connections, etc. for each deployed web app
            //javax.naming.Context iCtx = (javax.naming.Context) mBeanServer.invoke(cname, "findStaticResources", null, null); // will this do it???
            Object obj = new InitialContext().lookup("java:comp/env"); // this only gets the current context (the web app I'm currently in)
            if(obj != null){
                Context envCtx = (Context) obj;
                appName = (String) envCtx.lookup("appName");
                ds = (BasicDataSource) envCtx.lookup("jdbc/raptor");
            }else{
                System.out.println("obj is null");
    %>      <%=cname.toString()%><br/>
            Application name: <%=appName%><br/>
              Number of Active Connections = <%=ds.getNumActive()%>
            <br/>
              Number of Idle Connections = <%=ds.getNumIdle()%>
            <br/>
              Initial Size of Pool = <%=ds.getInitialSize()%>
            <br/>
              Maximum Number of Active Connections = <%=ds.getMaxActive()%>
            <br/>
    <%
    %>
        </body>
    </html>The above JSP will output all of the info for each deployed web app, however, when it gets to getting the Context of the web app, it simply outputs information repeatedly for the web app this JSP is in (which makes sense since I'm using InitialContext).
    I appreciate any help anyone could provide.
    Thank you

    If you want your application to work only with specific JRE version, you should use static versioning. I installed JRE 1.3.1_15 and JRE 5.0U5 , both of them works successfully. I used the below syntax to load applets:
    for 1.3.1_15:
    <object
        classid = "clsid:CAFEEFAC-0013-0001-0015-ABCDEFFEDCBA"
        codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_3_1_15-windows-i586.cab#Version=1,3,1,15"
        WIDTH = 150 HEIGHT = 25 >
        <PARAM NAME = CODE VALUE = "HelloWorld.class" >
        <param name = "type" value = "application/x-java-applet;jpi-version=1.3.1_15">
        <param name = "scriptable" value = "false">
        <comment>
         <embed
                type = "application/x-java-applet;jpi-version=1.3.1_15" \
                CODE = "HelloWorld.class" \
                WIDTH = 150 \
                HEIGHT = 25
             scriptable = false
             pluginspage = "http://java.sun.com/products/plugin/index.html#download">
             <noembed>
                </noembed>
         </embed>
        </comment>
    </object>for 5.0U5
    <object
        classid = "clsid:CAFEEFAC-0015-0000-0005-ABCDEFFEDCBA"
        codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,5"
        WIDTH = 150 HEIGHT = 25 >
        <PARAM NAME = CODE VALUE = "HelloWorld.class" >
        <param name = "type" value = "application/x-java-applet;jpi-version=1.5.0_05">
        <param name = "scriptable" value = "false">
        <comment>
         <embed
                type = "application/x-java-applet;jpi-version=1.5.0_05" \
                CODE = "HelloWorld.class" \
                WIDTH = 150 \
                HEIGHT = 25
             scriptable = false
             pluginspage = "http://java.sun.com/products/plugin/index.html#download">
             <noembed>
                </noembed>
         </embed>
        </comment>
    </object>- Mike

  • Unable to deploy Web App in Exploded format

    Using WLS 6.1 sp2, I am unable to deploy a web application successfully using the
    web app "ora" from http://www.thejspbook.com/examples.jspbook.zip. I've moved
    the /ora directory under the /WEB-INF/applications directory.
    The error I am getting is:
    java.lang.reflect.InvocationTargetException: weblogic.management.DistributedManagementException:
    Distributed Management [1 exceptions]
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:543)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy9.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1516)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:895)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:295)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy18.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2503)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Distributed update exception
    - remote object: efs-developer3:Location=efsserver,Name=efsserver,Type=ServerConfig
    - remote server: weblogic.management.internal.RemoteMBeanServerImpl@5420eb
    - actionName: addDeployment
    - params: [Ljava.lang.Object;@10c03e
    - signature: [Ljava.lang.String;@3d4a20
    Distributed update exception
    - remote object: efs-developer3:Location=efsserver,Name=efsserver,Type=ServerConfig
    - remote server: weblogic.management.internal.RemoteMBeanServerImpl@5420eb
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1525)
         at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:476)
         at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:232)
         at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3415)
         at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3384)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
         at weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:815)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
         at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
         at weblogic.j2ee.Application.addComponent(Application.java:163)
         at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy34.addWebDeployment(Unknown Source)
         at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:491)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy9.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1516)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:895)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:295)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy18.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2503)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.j2ee.DeploymentException: Could not load ora - with nested exception:
    [java.lang.StringIndexOutOfBoundsException: String index out of range: -1]
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:431)
         at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
         at weblogic.j2ee.Application.addComponent(Application.java:163)
         at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy34.addWebDeployment(Unknown Source)
         at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:491)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy9.--------------- nested within: ------------------
    weblogic.management.console.utils.SetException: An error occurred while updating
    Targets-Server on Proxy for efs-developer3:Application=ora,Name=ora,Type=WebAppComponent
    - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [weblogic.management.DistributedManagementException: Distributed Management [1
    exceptions]]]
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:151)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2503)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Any help is appreciated.
    Thanks,
    Dennis

    you are probably using a older version of 6.1. please use the latest service pack. Service Packs are mostly bug fix releases and they are safe to be upgraded even on production systems. Please note - we always recommend using the latest service pack
    http://www.sun.com/download/products.xml?id=47d5d3eb

  • Unable to deploy ADF app from Jdev 10.1.3.3 to OAS 10.1.3.1

    Dear colleagues,
    I'm deploying my app from JDev 10.1.3.3 to OAS 10.1.3.1. And it is driving me crazy, my application is a J2EE ADF application. When I try to deploy I'm getting the following errors: I've tried everything during days, but still I'm not able to run it :(. The application is working fine in Jdeveloper
    This first error, I could solved adding the jhsadfrt-10.1.3.jar in the OracleAS_1\j2ee\home\applib directory. See the error solved:
    Operation failed with error:
    ******************** FIRST ERROR (SOLVED)********************************************
         Missing class: oracle.jheadstart.model.adfbc.v2.JhsApplicationModule
         Dependent class: amaos.model.common.AmaosModule
         Loader: amaos.root:0.0.1
         Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/amaos/ejb2.jar
         Configuration: <ejb> in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\amaos
    (Failure analysis caught java.lang.IllegalStateException: ClassLoader "amaos.root:0.0.1" (from <application> in /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/amaos/): This loader has been closed and should not be in use.)
    ******************* CURRENT ERROR AFTER SOLVING THE FIRST ****************
    The missing class is available from the following locations:
    1. Code-Source: /E:/product/10.1.3.1/OracleAS_2/BC4J/lib/bc4jct.jar (from <code-source> in /E:/product/10.1.3.1/OracleAS_2/j2ee/home/config/server.xml)
    This code-source is available in loader adf.generic.domain:10.1.3.1.
    This code-source is available in loader adf.oracle.domain:10.1.3.1
    2. Code-Source: /E:/product/10.1.3.1/OracleAS_2/BC4J/lib/bc4jmt.jar (from <code-source> in /E:/product/10.1.3.1/OracleAS_2/j2ee/home/config/server.xml)
    This code-source is available in loader adf.generic.domain:10.1.3.1.
    This code-source is available in loader adf.oracle.domain:10.1.3.1
    3. Code-Source: /E:/product/10.1.3.1/OracleAS_2/BC4J/lib/adfm.jar (from <code-source> in /E:/product/10.1.3.1/OracleAS_2/j2ee/home/config/server.xml)
    This code-source is available in loader adf.generic.domain:10.1.3.1.
    This code-source is available in loader adf.oracle.domain:10.1.3.1
    Any ideas?
    Thanks
    Message was edited by:
    Benalúa

    Benalua,
    (sorry, I don't know how to type the "u" with the diacritic mark above it in your name)
    Did you deploy the ADF 10.1.3.3 libraries to the 10.1.3.1 app server? An alternative might be to apply the 10.1.3.3 patch to the 10.1.3.3 app server.
    John

Maybe you are looking for