Novice Question - When to use WAR files

Sorry I'm so thick, I just don't seem to grasp the concept of how to structure my web pages in tomcat (or any j2ee server I suppose). Any help, as always, is greatly appreciated.
Let's say I want to build a personal website that would have a default homepage and two fairly complex "applications", a photo album and a recipes collection.
Would I build my default page, let's call it index.jsp and then my applications in two sub-directories (say, "photos" and "recipes") and the wrap the whole thing up in a WAR file and upload it to my server.
Or would upload my index.jsp page by itself to my server then create two WAR files, one for photos and one for recipes and upload those to my server?
Thanks

Sorry I'm so thick, I just don't seem to grasp the concept of how to structure my web pages in tomcat (or any j2ee server I suppose). Any help, as always, is greatly appreciated.
Let's say I want to build a personal website that would have a default homepage and two fairly complex "applications", a photo album and a recipes collection.
Would I build my default page, let's call it index.jsp and then my applications in two sub-directories (say, "photos" and "recipes") and the wrap the whole thing up in a WAR file and upload it to my server.
Or would upload my index.jsp page by itself to my server then create two WAR files, one for photos and one for recipes and upload those to my server?
Thanks

Similar Messages

  • 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()

  • 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

  • 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

  • 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.

  • Default data adaptor error when deploying a war file in weblogic

    Hi All,
    Newbie here with a few questions regarding the deployment of OPA 10.1. Really hoping you guys can help...
    1) I'm attempting to deploy an unexploded web-determinations.war file on WebLogic. Thanks to this forum I've got past the issues of "rulebase directory not found" etc. However, i'm now faced with an issue which I can't find any info on. Please see below.
    3672074 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN com.or
    acle.determinations.web.platform.controller.actions.StartSessionAction - Could not instansate defau
    lt data adaptor
    java.lang.NullPointerException
    at java.io.File.<init>(File.java:194)
    at com.oracle.determinations.web.platform.plugins.data.XDSDataAdaptor.<init>(XDSDataAdaptor.
    java:55)
    at com.oracle.determinations.web.platform.controller.actions.StartSessionAction.createInterv
    iewSession(StartSessionAction.java:173)
    at com.oracle.determinations.web.platform.controller.actions.StartSessionAction.getResource(
    StartSessionAction.java:66)
    at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doGet(WebDetermin
    ationsServlet.java:67)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
    java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
    ontext.java:3393)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2
    140)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    I've got the following entry in the application.properties file too...
    # Default XDS data adaptor file path
    #xds.file.path =data
    From what we can see we believe the code is getting a null pointer because of the following method in the WebDeterminationsServletContext class.
    public String resolveFullPath(String path)
    File f = new File(path);
    return f.isAbsolute() ? f.getAbsolutePath() : this.servletContext.getRealPath(path);
    We believe the getRealPath(path), highlighted in red, is returning null. Any ideas how we can resolve this?
    2) The second issue I'm facing is with regards the plugins.libraries property in the application.properties file. I've got the entry as
    plugin.libraries =DataAdaptor.DA;
    which should point to our customised data adaptor. However I'm getting the following error.
    4242994 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN com.or
    acle.determinations.web.platform.servlet.WebDeterminationsServletContext - Can not find class: Data
    Adaptor.DA
    4243025 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN com.or
    acle.determinations.interview.engine.local.LocalInterviewEngine - Can not find class: DataAdaptor.D
    A
    3) Also, does anyone know if it's possible to deploy a web-determinations.war file containing additional internal application code? What we're attempting to do is deliver a single war file which not only holds the web determination code but also all the code for an application which wraps the OWD within it. At present this just isn't working. I'm not sure what the conflict is exactly. The only way i seem to be able to get this working is by deploying the code in two seperate war files.
    Any help on these issues would be greaty appreciated.
    Thanks,
    Taj

    (2) is being caused because your data adaptor plugin is not installed properly. The jar that contains your plugin needs to go in the WEB-INF/lib directory and you must specify the fully qualified class name in the plugin.libraries property of the application.properties file.
    If you haven't provided a custom data adaptor, Web Determinations will configure and attach the default one for use instead, which is file based. If you are deploying to WebLogic as an unxeploded war, you must configure the directory the default data directory the plugin will uses by specifying an absolute path that your instance of Web Determinations has read/write permissions to in the xds.file.path property of the application.properties file. In your case (1) is basically being caused by (2) since if the your data adaptor was loaded correctly the default one wouldn't load at all.
    As for (3) yes it's likely possible, provided you don't have library conflicts. How it's done really depends on what these additional customisations consist of.

  • Urgent - java.lang.NullPointerException when deploying a WAR file

    Hello
    I am trying to deploy a WAR file on 9iAS rel 2 using the Enterprise Manager. On the web page, I provide the .war file along with application name and url mapping. When I click on deploy, i get an error back which just says java.lang.NullPointerException. There is no stack trace.
    Until now, I have been working on my own PC using tomcat, and the war file works fine in tomcat.
    I am presuming that there will be a log file where more information will be available, but I do not know where the log file is kept. The Oracle 9iAS is installed on Solaris.
    Any help with this would be greatly appreciated.
    Thanks.
    Jay

    Problem Solved
    The problem was the web.xml file which contained some elements that are only valid for servlet 2.4 (used on tomcat) but not on 2.2(used in oracle).
    Jay.

  • Class not found error when jar in war file

    I am using Java Creator 2 and have a project. The required libraries have been added to the library manager and the "package" checkbox has been checked. This means they will be added to the deployment.
    After deployment, I check the war file and it contains the proper libraries. However, when I run it by using the "run main project" option from the menu there is ClassNotFound exception. The class that cannot be found is in one of the jars in the war file. As I said, I have checked this war file after deployment and it contains the jar.
    Only thing I can think of is that another classloader is being used. Incidentally, (I hope), the missing class file is related to hibernate. During the creation of the Hibernate session factory, it cannot find this file. But hibernate should have nothing to do with it. The fact is a class file cannot be found even though it is in a jar contained in the war file.
    Any ideas?

    Did you read the tutorial from Creator?
    David
    http://www.pricerunner.com/forum/viewtopic.php?t=1659

  • Classloader issue when deploying a war file

    Hello,
    Using Jdev 11.1.1.3 with WebLogic 10.3.2.0 when we deploy a new version of our war file we get a ClassCastException for an entity class that cannot be cast on itself ! We are using standalone JPA for persistence.
    Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: gouv.micc.intimm.pers.model.entite.Personne cannot be cast to gouv.micc.intimm.pers.model.entite.Personne
    It looks like a classloader cache issue. This happend even if we first delete the war file before we upload a new one. The only way to solve this is to restart WebLogic. Any idea?

    Seems like a WebLogic issue - try asking on that forum:
    http://forums.oracle.com/forums/category.jspa?categoryID=193

  • Special string in the deployment path when deploy a war file

    Hi,
    When I deploy a war file on a managed server using admin console, it always creates a special string as the sub-directory name. For example, the generated path is:
    $ORACLE_MIDDLEWARE_HOME/user_projects/domains/base_domain/servers/MyManagedServer/tmp/_WL_user/MyDeploymentName/4e5qtq/.
    Where is "4e5qtq" come from? Where to define? Can I give it a fixed name?
    Thanks,
    Richard

    It's an internally generated identifier, you can't change or control it in any manner AFAIK.
    Can you help me understand why it's important that you be able to control it, or even predict it?
    -steve-

  • IAs 6.0 Deployoment error when saving a war file: different size?

    Hi,
    Ever got a an error message about different sizes( aka "expected n bytes,
    got m")) when trying to save a war file in the iAS 6.0 GUI deployment tool?
    Thanks,
    Marian

    Once I experienced the same thing when I replaced files in the package using
    winzip.
    Repack the content using jar and it should work.
    Regards,
    Gyorgy
    Marian wrote:
    Hi,
    Ever got a an error message about different sizes( aka "expected n bytes,
    got m")) when trying to save a war file in the iAS 6.0 GUI deployment tool?
    Thanks,
    Marian

  • 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

  • ServerDeploymentException when deploying a war file

    Hi,
    I am trying to migrate a small Web application from Websphere to WebAS 6.40 (Release of KW 32).
    When I try to deploy the ear from the Developer Studio (2.06) to my local J2EE engine, the J2EE Server node regularly crashes and restarts. In the server.log, I see this message:
    #1.5#00061BCE1602001F00000106000010E80003E27824EB9DD1#1093430573503#com.sap.engine.services.deploy##com.sap.engine.services.deploy######4352acf0f68311d8aa6800061bce1602#SAPEngine_System_Thread[impl:5]_35##0#0#Error#1#/System/Server#Java#deploy_5099##A deploy callback threw an exception while processing event      Deploy Event:
    action : 3
    action type : 13
    component name : null
    from server : Server 0 0_97947
    message : null
    status unknown
    application components : none
    errors : warnings : .#1#     Deploy Event:
    action : 3
    action type : 13
    component name : null
    from server : Server 0 0_97947
    message : null
    status unknown
    application components : none
    errors : warnings : #
    #1.5#00061BCE1602001F00000107000010E80003E27824EBA234#1093430573503#com.sap.engine.services.deploy##com.sap.engine.services.deploy######4352acf0f68311d8aa6800061bce1602#SAPEngine_System_Thread[impl:5]_35##0#0#Error#1#/System/Audit#Java###Exception #1#com.sap.engine.services.deploy.exceptions.ServerDeploymentException: A deploy callback threw an exception while processing event      Deploy Event:
    action : 3
    action type : 13
    component name : null
    from server : Server 0 0_97947
    message : null
    status unknown
    application components : none
    errors : warnings : .
         at com.sap.engine.services.deploy.server.DeployEventSystem.fireDeployEvent(DeployEventSystem.java:185)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationsInitially(DeployServiceImpl.java:2488)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.clusterElementReady(DeployServiceImpl.java:2338)
         at com.sap.engine.services.deploy.server.ClusterServicesAdapter.containerStarted(ClusterServicesAdapter.java:41)
         at com.sap.engine.core.service630.container.ContainerEventListenerWrapper.processEvent(ContainerEventListenerWrapper.java:141)
         at com.sap.engine.core.service630.container.AdminContainerEventListenerWrapper.processEvent(AdminContainerEventListenerWrapper.java:19)
         at com.sap.engine.core.service630.container.ContainerEventListenerWrapper.run(ContainerEventListenerWrapper.java:101)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:73)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:145)
    Caused by: java.lang.NullPointerException
         at com.sap.bcb.support.DeployEventListener.logEvent(DeployEventListener.java:131)
         at com.sap.bcb.support.DeployEventListener.processApplicationEvent(DeployEventListener.java:94)
         at com.sap.engine.services.deploy.DeployCallbackImpl.processApplicationEvent(DeployCallbackImpl.java:41)
         at com.sap.engine.services.deploy.DeployCallback_Stub.processApplicationEvent(DeployCallback_Stub.java:131)
         at com.sap.engine.services.deploy.server.DeployEventSystem.fireDeployEvent(DeployEventSystem.java:156)
         ... 9 more
    What can cause this NullpointerException?
    I doubt that there is anything wrong in the application itself, since I have no problems deploying the very same war file (there is no vendor specific descriptor) in Weblogic 8.1.
    Is the CSN the right place to post a question like this? Does anybody know to which system and component id to post a CSN message?
    Kind regards,
    Andreas Zehrt

    > Is the CSN the right place to post a question like
    > this? Does anybody know to which system and component
    > id to post a CSN message?
    Definitely yes! Your System is something with 630 or 640 and the component is BC-JAS- something (support will classify it further if possible)
    Regards,
    Benny

  • How to Redeploy application in OC4J using war file

    Hi
    Am new in area of 9ias and OC4J.
    I have deployed and application in OC4J of 9ias 902. using enterprise manager web interface.
    now i have change the contents of current jsp and added more jsp files.
    do i have to recreate war file and redeploy it in oc4j? or just copy the new version of current jsp and copy new jsp in application forlder.
    in case of redeploying , exterprise manager web interface asks for .ear file.
    can anyone give some hint to me... it will great help
    thanks
    samir
    [email protected]

    Yes you have to rebuild the WAR file. You can deploy WAR from EMWebsite by using the deploy WAR link. If you are in development and your WAR/EAR file is constantly changing you can use standalone OC4J.
    regards
    Debu

  • Web Service cannot be Started when we deploy war file in Tomcat

    Hello every one,
    We made a webservice in Netbeans 6. and we created the war file
    and ist is workign fine with netbeans. when we tried to deploy to tomcat
    it is showing error as given below:
    **FAIL - Application at context path /WebApplication3 could not be started**
    please help me to sort out this problem as early as possible.
    Thanks in advance
    Vishnu

    Any one has any idea on this. I am stuck up with this. Help!
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by pragashj:
    OS : Windows NT 4.0 SP 5
    OAS : 4.0.8.2
    Issue : Listner failed to start asking me to start OAS service first. But the OAS service is already started. When I tried starting the Listner service from Windows - Services (In control panel) still it failed. OAS Service though active does not show as active in the Service Control(This issue is listed in the Release note). The svwww.err gives oracle_adp_init returned ADI_FATALINIT.
    Any one had the same issue? How do I work around to get my Web Listner started?
    Thanks<HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • Photoshop Elements 10 Mac crashes when opening images

    As the title says Photoshop Elements 10 Mac crashes when opening images! I cannot understand why this is happening as i've never had any issues with it before. Below I have copied and pasted the crash report in the hope someone can decypher it and te

  • Document not Posted Trip cannot be changed Error

    Hi all,         I have an issue where user is facing problem while creating Expense report for his expenses. when he tries to create he gets this Error message   "Accounting Status not 'Document posted' Trip cannot be changed". But user was creating

  • How to arrange albums in alphabetical order?

    iTunes was bad enough before; I had to work hard to get my music sorted on it.  Now the updated programme is utterly dreadful. Albums are not listed alphabetically any more, and I can't see the individual pieces of music within an album.  Can someone

  • Talent Management- Calibration grid error in Talent Review Meeting

    Hi all, I'm getting errors when running the calibration grid in Talent Review Meeting: No entry for BAdI field RISK in table T77TMCAESFIELD No entry for BAdI field CHANGE_NEED in table  T77TMCAESFIELD No entry for BAdI field RISK in table T77TMCAESFI

  • Updating the ipod nano

    when i connect my ipod in to my windows comp. itunes opens and my ipod starts to update. The updating is inturupted by a message saying The Ipod "Vinces Ipod" cannon be updated. File needed to update cannot be found. Any help on this one>? Please rep