Unable to deploy a simple servlet using WAR file on Oracle9iAS v9.0.3

Hi All,
I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
I have installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
It includes:
     - Oracle HTTP Server
     - Oracle9iAS Containers for J2EE
     - Oracle9iAS Web Cache
     - Oracle Enterprise Manager
The release of installed Oracle9iAS is Release 2 (9.0.3)      
I referred following link to Deploy Applications Using WAR file:
     http://otn.oracle.com/products/ias/daily/sept12.html
As mentioned in this documentation I have followed following steps to deploy WAR file:
1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
     <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
3] To make this module accessible from over the web, I have modified file
     <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
     <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
4] I saved both the files and started Oracle HTTP Server and accessed page as below:
          http://<server>:7777/SimpleServlet/Simple
where Simple is servlet in SimpleServlet.war file.          
In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
What else could be the problem? Am I placing the war file in wrong place or modifying application.xml or default-web-site.xml in a wrong directory?
This is very urgent. Please help me with your valuable comments on this.
Thanks in advance.
Regards,
Sandesh

Hi All,
I am facing problem while deploying a simple servlet
using WAR file on Oracle 9i App Server.
I have installed Oracle9iAS J2EE and Web Cache v9.0.3
on Windows 2000 server.
It includes:
     - Oracle HTTP Server
     - Oracle9iAS Containers for J2EE
     - Oracle9iAS Web Cache
     - Oracle Enterprise Manager
The release of installed Oracle9iAS is Release 2
(9.0.3)      
I referred following link to Deploy Applications
Using WAR file:
     http://otn.oracle.com/products/ias/daily/sept12.html
As mentioned in this documentation I have followed
following steps to deploy WAR file:
1] I have created a war file by name
SimpleServlet.war. In SimpleServlet.war, there is a
servlet by name Simple which prints time at which
servlet was accessed.
2] I have modified
<ora9ias_home>\j2ee\home\config\application.xml and
added following web module entry:
<web-module id="SimpleServlet"
path="../../home/applications/SimpleServlet.war" />
3] To make this module accessible from over the web,
I have modified file
<ora9ias_home>\j2ee\home\config\default-web-site.xml
and added following entry:
<web-app application="SimpleServlet"
name="SimpleServlet" root="/SimpleServlet"/>
4] I saved both the files and started Oracle HTTP
Server and accessed page as below:
          http://<server>:7777/SimpleServlet/Simple
where Simple is servlet in SimpleServlet.war file.          
In the browser, The page cannot be found is shown to
user. I have verified that SimpleServlet.war is
extracted to SimpleServlet folder under
<ora9ias_home>\j2ee\home\applications folder. I found
that Simple.class is stored under WEB-INF/classes
folder and web.xml contains correct entry for url
pattern for servlet Simple.
What else could be the problem? Am I placing the war
file in wrong place or modifying application.xml or
default-web-site.xml in a wrong directory?
This is very urgent. Please help me with your
valuable comments on this.
Thanks in advance.
Regards,
SandeshHave you restarted you http server and then tried to load it again? Are you using the right port; maybe you have to use port 7778? Check you server settings in the http server instance. Also check your url binding of you application at Farm > Application Server: infrastructurehost > OC4J_instance > Application: appname > Web Module: modulename
Good luck!
rgds Thomas

Similar Messages

  • Unable to deploy a simple servlet using WAR file

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle 9i App Server. I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modfiying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi Juliana,
    Thanks a lot for your suggestion.
    I am sorry if I have posted this message to a wrong forum. This is first time I am posting a message to OTN. I will resend message to J2EE forum as per you suggestion.
    Meanwhile, please note information you asked for is as below:
    I installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    Please do reply at the earliest.
    Once again thanks and look forward to hear from you.
    Regards,
    Sandesh

  • Deploy servlet with WAR file

    Has anyone successfully deployed servlets using WAR file?I think I did everything right. The WAR file was deployed. But I can't accesss it.
              

    I use .war files for deploying servlets in WLS 6.0 - they are much easier
              than exploded dirs...
              Usually, when I have a problem accessing the servlet once deployed, it's
              almost always the deployment descriptor.
              "Randy" <[email protected]> wrote in message
              news:3b311258$[email protected]..
              > Has anyone successfully deployed servlets using WAR file?I think I did
              everything right. The WAR file was deployed. But I can't accesss it.
              

  • Cannot deploy using .war file

    im using ant to build my war file.
    the application works when i copy the build/web to %catalina%\webapps folder but when i use war file there is error.
    i check the directory and the files of the working and not working source files but nothing seems to be different.
    can anyone help?
    java.lang.NullPointerException
         at com.saw.Media.UserAccessBean.closeConnection(UserAccessBean.java:262)
         at com.saw.Media.UserAccessBean.addUser(UserAccessBean.java:177)
         at org.apache.jsp.addUser1_jsp._jspService(addUser1_jsp.java:176)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
         at com.saw.Media.SVLDispatcherServlet.doPost(SVLDispatcherServlet.java:143)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
         at java.lang.Thread.run(Thread.java:534)

    Thanks for replying.
    i used the example at this web site http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    everything worked.
    jakarta-tomcat-4.1.29
    jakarta-ant-1.5-bin
    mysql-4.0.16-win
    mysql-connector-java-3.0.9-stable
    I suspect its my .java code. I tried to change the .java code but more errors which i dont understand comes up.
    public void addUser() throws Exception
    Connection dbConnection = null;
    try {
    dbConnection = getConnection();
    add(dbConnection);
    } catch (SQLException e) {
    System.out.println(e.getMessage());
    // Print any other nested exceptions
    while ((e = e.getNextException()) != null) {
    System.out.println(" next " + e.getMessage());
    throw e; // Re-throw the SQLException
    } finally {
    closeConnection(dbConnection);
    } // addUser()
    // PRIVATE METHODS
    // ===============
    // Add an user to the database
    private void add(Connection conn) throws Exception
    PreparedStatement ps = null;
    // Build the SQL statement
    StringBuffer sql = new StringBuffer();
    sql.append("INSERT INTO USERS ");
    sql.append("(user_name, user_pass, user_full_name) " ); // Leave a space at the end
    sql.append("VALUES (?, ?, ?) ");
    // Execute SQL statement
    try {
    ps = conn.prepareStatement(sql.toString());
    ps.setString(1, userName); // Set the missing values in the prepared statement
    ps.setString(2, userPass);
    ps.setString(3, userFullName);
    count = ps.executeUpdate();
    } catch (SQLException e) {
    count = 0; // So we know the operation was not successful
    // Here we are catching exceptions to reset a counter and optionally
    // for debugging purposes
    // May be we could log them to a file
    // Once caught, we are re-throwing them once again to a higher level
    // So, we need the catch block even if we are not debugging
    System.out.println(e.getMessage());
    // Print any other nested exceptions
    while ((e = e.getNextException()) != null) {
    System.out.println(" next " + e.getMessage());
    throw e; // Re-throw the SQLException
    // will be caught at a higher level
    } finally {
    ps.close();
    } // add()
    * Gets a datasource connection
    * Different from getting a databse connection using DriverManager
    * @param jndiName Name of datasource
    Connection getConnection()
    throws NamingException, SQLException {
    Context initCtx = null;
    try {
    // Obtain the initial JNDI context
    initCtx = new InitialContext();
    // Perform JNDI lookup to obtain resource manager connection factory
    DataSource ds =
    (javax.sql.DataSource)
    initCtx.lookup("java:comp/env/jdbc/" + jndiName);
    // Invoke factory to obtain a connection
    return ds.getConnection();
    } finally {
    // Don't forget to close the naming context
    if (initCtx != null) {
    initCtx.close();
    } // getConnection()
    // Close a datasource connection
    // Similar to closing a database connection
    private void closeConnection (Connection conn) throws Exception {
    conn.close();
    } // closeConnection()

  • How to deploy a simple servlet in EP?

    Hi,
    I am new to this portal.
    Is it possible to deploy a simple servlet which extends a HttpServlet?if yes what modification i need to make for the portalapp.xml?
    Thanks
    Deepak

    hi deepak,
       it is possible to deploy servlets in AbstratPortalComponent.
      check this link ..
      http://help.sap.com/saphelp_nw2004s/helpdata/en/0a/fd2c41cf358839e10000000a1550b0/frameset.htm
       you will find example in this thread .
    thanks..
    rajesh

  • Help! web.xml security without using WAR files

    I'm currently using the RDBMSRealm and URL ACL security for my app. I would like to use the web.xml descriptor for security so that I can specify login pages and such. We currently are not using WAR files. I've been having alot of trouble setting this up. Is there a way to use the RDBMS realm along with the web.xml security? It looks like it should work, but I can't seem to get it to function. How do I specify the regular document root as a webapp? I'm currently running WLS 5.1 with SP4. Thanks.

    The RDBMSRealm is just the authentication mechanism underneath WLS versus the
    web.xml of the WebApplication which describes all the access control for that WebApp.
    the later being scoped only to that WebApp.
    you don't need to deploy in a war file, you can expand the archive into an identical
    directory structure and then just point us towards the top level of that structure.
    see: http://www.weblogic.com/docs51/classdocs/webappguide.html
    .paul
    chris wrote:
    I'm currently using the RDBMSRealm and URL ACL security for my app. I would like to use the web.xml descriptor for security so that I can specify login pages and such. We currently are not using WAR files. I've been having alot of trouble setting this up. Is there a way to use the RDBMS realm along with the web.xml security? It looks like it should work, but I can't seem to get it to function. How do I specify the regular document root as a webapp? I'm currently running WLS 5.1 with SP4. Thanks.

  • Deploying a simple servlet with creator 2...

    i need to generate a simple war file around the below servlet:
    import javax.servlet.*;
    import java.io.IOException;
    public class PrimitiveServlet implements Servlet {
    public void init(ServletConfig config) throws ServletException {
    System.out.println("init");
    public void service(ServletRequest request, ServletResponse response)
    throws ServletException, IOException {
    System.out.println("service");
    public void destroy() {
    System.out.println("destroy");
    public String getServletInfo() {
    return null;
    public ServletConfig getServletConfig() {
    return null;
    i am trying to learn java so a lot of my coding is going to be simple stuff... Is JavaStudio too much program... i generated a war file for this that had 10+ components... plus the server.xml did not look correct - when i deployed the war to glass fish it did not work... all help is appreciated...
    Message was edited by:
    huggy77

    I've got a few servlets running alongside my JSC app without problems. They are small basic utilities that do things like fetch file attachments from the database or fetch reports from my report server.
    (If the search facility is now working) you could search the forum for "fileupload" and have a look. Somewhere there's a sample servlet that retrieves an uploaded file.
    That said, the main focus of JSC is to isolate developers from the nitty gritty side of J2EE and you'll most likely find better tools available in, for example, NetBeans and better skilled people to ask on one of the J2EE forums. I think there's even one called "Servlets." I'm not trying to be rude here -- just pointing out that you may be using the wrong tool for the job and may be asking the wrong people about it ;)

  • Unable to deploy single SERVERCORE component using telnet?

    Hi,
       As continued to the discussion of  "
    Undeploying .SCA/ .SDA / .EAR / .WAR files on J2EE servers on Netweaver release 7.1 and higher"
    I am trying to deploy one of the CORE component "SERVERCORE" using "TELNET" on my SAP NW7.3 EHP1 System but getting error that " SCA's aborted"
    and unable to deploy the component. Please help me to get out of this.

    Hi Chandra,
    Sorry i did not understand your last reply. When you load all the core SCAs (put them into and folder) and then trigger the telnet option, the tool itself will take care of the dependencies and deploy the SCAs in the correct manner.
    What was the error you were getting when you tried this?
    You mentioned:
    Did same using telnet as mentioned you and didn't update SPS to latest.
    still they showing same as previous.
    Does that mean that the deployment went fine, but still system info etc. shows old values? This is VERY strange. You can get the latest list from the configtool. Just check the attached screenshot for an example.
    If this still shows old version, please run the force bootstrap once:
    1)
    Stop the j2ee server. Under cluster directory (/usr/sap/<SID>/J<nr>/cluster) rename server0 and subsequent nodes to ".old" respectively. The intention here is to create a backup of the existing files. Do not rename  the bootstrap folder as this is needed for the sync process.
    2)
    Change bootstrap.properties file to ensure it has element.resynch=force as per SAP note 710663.
    3)
    Restart the J2EE Engine. The new server folders should be created during the bootstrapping and this is a time consuming process as all the contents of the server nodes will be syched with the DB content.
    4)
    Remove the element.resynch=force property or change it to element.resynch=detect which is the default setting.
    Regards,
    Hemanth

  • Unable  to deploy a web application in war format

    Hello,
    I have created a chat application containing jsps and beans, and deployed it first
    in the exploded directory format.
    It works fine and I was able to run and test it.
    Since all the tests are done and the module is over,now i want to package it in
    war file and deploy it.Here comes the problem :-
    I have packaged the application in a war file using jar command and copied it
    under applications directory but when i restarted the server(wls 6.0 sp1) ,i found
    in console the application is deployed under applications node and not under web
    applications node-why?
    Agian unpacked the war file and deployed it in exploded directory format now the
    console shows it under web app node then why does not it deploy it as web application
    when deployed in war format.
    Any body faced the same situation,Plz help.
    rds
    rashmi

    In 6.0, if a web app is showing up under the "applications" node instead of
    the "web applications" node, I suspect you have either omitted or
    mis-configured the WEB-INF/web.xml deployment descriptor.
    Check out
    <http://e-docs.bea.com/wls/docs60/programming/webappdeployment.html> for
    help on writing the deployment descriptor, or upgrade to WebLogic Server 6.1
    where WLS creates a default web.xml for you if you don't supply one.
    "Rashmi" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hello,
    I have created a chat application containing jsps and beans, and deployedit first
    in the exploded directory format.
    It works fine and I was able to run and test it.
    Since all the tests are done and the module is over,now i want to packageit in
    war file and deploy it.Here comes the problem :-
    I have packaged the application in a war file using jar command and copiedit
    under applications directory but when i restarted the server(wls 6.0 sp1),i found
    in console the application is deployed under applications node and notunder web
    applications node-why?
    Agian unpacked the war file and deployed it in exploded directory formatnow the
    console shows it under web app node then why does not it deploy it as webapplication
    when deployed in war format.
    Any body faced the same situation,Plz help.
    rds
    rashmi

  • Servlet - unable to compile my simple servlet

    I downdloaded the servlet api, I changed the classpath to point to the directory that I extracted to. However, I still cannot compile a simple servlet. I am sure I did not install the servlet api the right way. Can somebody help?
    Thanks

    This may sound silly, but you did UNZIP the servlet API, right?
    Where did you set the classpath? Through an environment variable? Through a command line?
    Best,
    brumalis

  • Deploying a CF app as WAR file

    I'd like to package an existing ColdFusion application as a
    WAR file and deploy it on a J2EE server. I've been trying to test
    this out locally without success. If you have a magic bullet,
    you're disco-superfly. If you just have a suggestion for further
    troubleshooting, you're still double cherry pie. Gruesome details
    follow... (Thanks!)
    PACKAGING:
    I've got a developer version of MX7 running on Windows XP. I
    threw together a demo CF app, "SimpleApp". In the administrator, I
    go to "Packaging & Deployment" > "J2EE Archives (.ear/.war)"
    and create an archive (SimpleApp.war).
    DEPLOYMENT:
    I've tried this on both JRun and several versions of Tomcat
    without success. On each server, I have been able to deploy a WAR
    file from a previous project created straight from Java/JSP - just
    not the one created in the CF administrator.
    JRun4:
    In the administrator, I "add" the web applications in the
    "J2EE Components" section and everything looks okay. When I browse
    to the webapp created in native Java/JSP, everything looks
    beautiful; but when I browse to
    http://127.0.0.1:8100/SimpleApp/
    I see a "403 Forbidden" error. Server log default-event.log is at:
    http://www.google.com/base_media?q=hand3802261193274630671&size=8
    Tomcat 4.1 running on J2SDK1.4.2_12:
    Native Java WAR deploys and runs fine.
    I copy SimpleApp.war to the Tomcat webapps\ folder and the
    archive is extracted successfully; but Tomcat fails to start the
    application.
    Server logs:
    localhost_log.2006-09-22.txt:
    http://www.google.com/base_media?q=hand-2475548630705385852&size=8
    stdout_20060922.log:
    http://www.google.com/base_media?q=hand-6363724281182167089&size=8
    I notice an error mentioning "Invalid <url-pattern>
    *.cfml/* in servlet mapping" so I go into the extracted webapp,
    comment out the Search Engine Safe URL mappings in web.xml and try
    again. Now get an error about not being able to find a
    configuration file flex-config.xml... Tomcat still can't start the
    webapp.
    Server logs:
    localhost_log.2006-09-22.txt:
    http://www.google.com/base_media?q=hand301238759104060090&size=8
    stdout_20060922.log:
    http://www.google.com/base_media?q=hand-8426419238544575272&size=8
    I heard that MX7 only works with Java versions through 1.4.2
    and Tomcat has it's own compatibility requirements; but I thought
    I'd try other versions of Tomcat...
    Tomcat 5.5 running on JRE1.5.0_06 and bundled SDK:
    Native Java WAR deploys and runs fine.
    SimpleApp won't start (problems similar to above).
    Tomcat 5.5 running on JRE1.4.2_12 (with compatibility patch)
    and bundled SDK:
    Native Java WAR deploys and runs fine.
    SimpleApp won't start (problems similar to above).

    Dear jarviswabi,
    Could you believe I just ran into the same problem you had in 2008, and STILL there are no documented solution to this issue.
    I am trying to deploy a simple CF code using Tomcat 7.0.20, and it just does not work!
    How did you ever resolve this error in Tomcat?  It is supposed to be pretty staright forward, but it just does not work.
    Any ideas?  been looking for days...
    Appeciate any  insight yo may have into this problem.
    Thanks!

  • Deploying MBean with ear/jar/war files

    Hi!
    I'm working on a project where we plan to use jmx to manage our web(servlet) application.
    I have created a simple test MBean, and try to create the MBean with MBeanServer.
    When i try this, i got a ReflectionException(ClassNotFoundException).
    I have try to deploy the MBean together with the war file(inside ear), create
    a jar file and put it into myserver classpath(web console)...
    Nothing works...
    Audun

    On 30 Aug 2001 05:17:27 -0800, Audun <[email protected]> wrote:
    >
    I'm working on a project where we plan to use jmx to manage our web(servlet) application.
    I have created a simple test MBean, and try to create the MBean with MBeanServer.
    When i try this, i got a ReflectionException(ClassNotFoundException).
    I have try to deploy the MBean together with the war file(inside ear), create
    a jar file and put it into myserver classpath(web console)...It seems like if you want the MBeanServer to instantiate the MBean,
    then you have to put the MBean classes in the server classpath. This
    is probably the best approach, if you want a centralized admin MBean
    to do management from the WLS admin server across a domain.
    If you want an MBean instance per managed server, then you can have
    your application (during initialization) instantiate the MBean and
    register it with the MBeanServer. This approach lets you package your
    MBean classes with your application ear/war/jar.
    You might want a combination of both approaches. An admin MBean
    manages across the domain, and an MBean on each managed server listens
    for attribute change notifications from the admin MBean to deal with
    propagating configuration changes to the application running across
    the cluster. Unfortunately, I have not found any examples or
    documentation on how to get MBean invocations and notifications to
    work remotely. (You know it's possible because the WLS MBeans do it!)
    <hack> <hack> <hack>
    Ben

  • How to deploy the .ear and the .war file

    Hi all,
    I am using Jdev 11.1.1.0 and weblogic 10.3.1 and I want to deploy a very simple application.
    I have successfully deployed it to an ear file, so I have in my folders two file: a .war file and a .ear file.
    Now, what steps have I to do to deploying my application on WebLogic Server?
    I have searched in the forum and in the manual, and this link ( http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/deployment_topics.htm#CHDFJADJ ) but I can't find nothing that help me
    Thanks
    Edited by: user10799119 on 25-ago-2009 7.45

    Thanks, I have just read http://radalcove.com/blog/?p=34 and http://radalcove.com/blog/?p=48.
    I am in my weblogic console, I have clicked Install --> I have choose my ear file --> activate changes, but I had this error: No credential mapper entry found for password indirection user=myUser for data source myConnection.
    I have read some post in the blog and I have unchecked Auto generate and sinchronize weblogic-jdbc.xml descriptors during deployment.
    Clicking in activate changes, it works, and the deployment is in the state "prepared".
    When I click on start I have this error: No credential mapper entry found for password indirection user=myUser for data source myConnection (without the final DS).
    I have seen that in myJDBCConnection --> configuration --> connection pool, I have not the user name and the password. I have inserted them, but I have the same error.
    Any ideas?
    Thanks again

  • Connecting to multiple clusters using WAR file

    I am trying to connect to multiple clusters by creating separate WAR(web archive) files through Apache tomcat.
    My intention is to have each 'war' act as a node to a separate cluster. I started with the 'jmx-console' example available on the Tangosol website.
    So, my understanding is that even though all the war files are loaded in the same JVM (tomcat), since each of these war's has its own classloader, we can have multiple tangosol ndoes from the same JVM.
    So I have two basic questions:
    *) If I use system.setProperty("tangosol.coherence.override", myOverrideFile-x) in the class loader of each WAR, can I have the nodes connect to different clusters. is'nt the System.setProperty() setting the property on the JVM? If so, how can multiple classloaders running in the same JVM connect to different clusters?
    *) Where should I place config/override xml files under the tomcat directory structure for it to be accesible to the class loader.

    Hi sumax,
    Thanks for your response Robert,
    Maybe I did not understand your solution fully, I
    thought your idea mostly talks about how to configure
    the override files, and not how to configure the
    individual nodes to use different override files.
    That part is taken care of by the fact, that each war file loads the tangosol-coherence-override.xml from its own WEB-INF/classes directory.
    Classloading from a web app in Tomcat resolves classpath classes/resources in the following order:
    1. java.* and javax.* and com.sun.* packages are loaded from the system classloader. This, I believe, cannot be circumvented on a Sun JVM with a classloader extending a JDK classloader class.
    2. Reloadable JSP classloader (loads servlet classes generated from JSP pages). This is webapp specific, each webapp sees its own generated servlet classes.
    3. Reloadable Webapp classloader (loads from WEB-INF/classes and WEB-INF/lib of the war). This is webapp specific, each webapp sees its own WEB-INF/classes and WEB-INF/lib.
    4. Common classloader (loads from ${TOMCAT_HOME}/common/classes and ${TOMCAT_HOME}/common/lib). This is used by all webapps and the Tomcat container itself. You should not put anything here, except for libraries for resource drivers, etc. JDBC drivers or anything which needs to be published in the JNDI server in a non-application-specific way.
    5. Shared classloader (loads from ${TOMCAT_HOME}/shared/classes and ${TOMCAT_HOME}/shared/lib). This is shared between all webapps but not by the Tomcat container. You can put libraries here with which you want to communicate between webapps. Any singletons in classes in this classloader will be shared between webapps. A place for configuration files which are shared or if they have the application name in their filenames (so that they are not accidentally used by another application).
    The question still lingering in my mind is:
    How do I tell the classloader which override file to
    load.
    A tangosol-coherence-override.xml with different content should be put in the WEB-INF/classes directory of each war file. Each of those files will be loaded only by its containing webapp. This filename is defined in the deployment-mode-specific override files in coherence.jar or tangosol.jar (I don't remember which, off my head) which all chain to this same tangosol-coherence-override.xml file.
    That override file can contain all your overrides, if you do not want to change those between restarts, or it can chain with its xml-override attribute (as shown in the example) to another file with the application name in its filename.
    This chaining allows each webapp to refer to a differently named override file, so all those override files can be put into shared/classes folder. The uniquely named override file in shared/classes allows you to change the override configuration between restarts.
    As for cluster address and port, you can specify those in any of the override files.
    The full chaining path is the following (if you used the tangosol-coherence-override.xml example in my first reply):
    tangosol-coherence.xml -> tangosol-coherence-prod.xml -> tangosol-coherence.xml (you provide this file in your webapp WEB-INF/classes) -> tangosol-coherence-override-warfilename.xml (you provide this file in the ${TOMCAT_HOME}/shared/classes)
    I hope this makes it clear.
    Best regards,
    Robert

  • Unable to load impl class error after WAR file rebuilt

    Hi
    I have the source code for a working WAR file. I wanted to make a small change to the code and rebuilt the WAR. Now the previous WAR version works but even when I rebuild the WAR from the unedited code I get the error "unable to load impl class"
    and ClassNotFoundException: Class bytes found but defineClass() failed for ...
    Does anyone know what kind of changes in my environment would cause this problem?
    Thanks
    J Armstrong

    This was caused by using jdk1.6.0_02 to compile the java files where jdk1.50_06 was required

Maybe you are looking for