Update war files during runtime....

The Weblogic Server takes a long time to start and stop. So, whenever we make any changes to our application, which is later bundled into a war file, we always have to stop and start the server, so that it loads the new war file. IS there any way to configure the weblogic server to automatically reload the new war file instead of restarting the server again ?
          Any help is appreciated ...
          Thanks
          Kuntal
          

          How about undeploy and "deploy" the war files using the console?
          

Similar Messages

  • How to update cgicmd.dat file during runtime?

    I'd like to know how do update cgicmd.dat file during runtime. For example, I run a report one.jsp as
    http://<machine>:<port>/reports/rwservlet?one.jsp&USERID=uid/pwd@db&DESTYPE=cache&mode=bitmap&desformat=htmlcss
    within this report there is a hyperlink to open another report named two.jsp.
    before creating this hyperlink, I'd like to update cgicmd.dat file with passed in userID, pwd, and connection, so two.jsp can use this key for userinfo
    so I can create hyperlink as follows
    srw.set_hyperlink('/reports/rwservlet?report=two.jsp'||
    '&cmdkey=userinfo&DESTYPE=cache&mode=bitmap&desformat=htmlcss');
    Thanks

    To my knowledge the cgicmd.dat is only read when the OC4J starts, so you would have to come up with another solution. Using Single-Sign-On (SSO) is quite a good idea, and it's there for cases like this.
    Regards,
    Martin Malmstrom

  • Updating War File for existing Application Issue

    I have a web application that is currently deployed and running on a linux SunOne WebServer 7.0 U2.
    I use the web admin interface to update the (running) web application with a new WAR file and using the "PreCompile JSP" option.
    Once the web application has been updated and deployed, I get a 500 server error on the web application. Here is a snippet from the log.
    [28/May/2008:07:19:59] info ( 2427): CORE3276: Installing a new configuration
    [28/May/2008:07:19:59] info ( 2427): WEB0100: Loading web module in virtual server [interakt] at [/ssl/onlineenroll]
    [28/May/2008:07:20:00] info ( 2427): PWC1412: WebModule[/ssl/onlineenroll] ServletContext.log():Initializing Spring root WebApplicationContext
    [28/May/2008:07:20:02] info ( 2427): CORE3280: A new configuration was successfully installed
    [28/May/2008:07:20:02] info ( 2427): PWC1412: WebModule[/ssl/onlineenroll] ServletContext.log():Destroying Spring FrameworkServlet 'onlineenroll'
    [28/May/2008:07:20:02] info ( 2427): PWC1412: WebModule[/ssl/onlineenroll] ServletContext.log():Closing Spring root WebApplicationContext
    [28/May/2008:07:20:46] info ( 2427): for host 127.0.0.1 trying to GET /ssl/onlineenroll/action/enroll;jsessionid=AC1B582906B8ECBD422B72634CFDE128, service-j2ee reports: PWC1412: WebModule[/ssl/onlineenroll] ServletContext.log():Initializing Spring FrameworkServlet 'onlineenroll'
    [28/May/2008:07:20:46] failure ( 2427): for host 127.0.0.1 trying to GET /ssl/onlineenroll/action/enroll;jsessionid=AC1B582906B8ECBD422B72634CFDE128, service-j2ee reports: WebModule[/ssl/onlineenroll]StandardWrapper.Throwable
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.apache.struts.tiles.DefinitionsFactoryException: IO Error while parsing file '/WEB-INF/tile-defs/definitions.xml'. */apps/SunWebsvr7/https-interakt/generated/interakt/ssl/onlineenroll/loader/org/apache/struts/resources/tiles-config_1_1.dtd (No such file or directory)*
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1302)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:463)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:260)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:184)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:430)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
         at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:354)
         at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:292)
         at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:262)
         at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1165)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:819)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:184)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
         at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
    Caused by: org.apache.struts.tiles.DefinitionsFactoryException: IO Error while parsing file '/WEB-INF/tile-defs/definitions.xml'. /apps/SunWebsvr7/https-interakt/generated/interakt/ssl/onlineenroll/loader/org/apache/struts/resources/tiles-config_1_1.dtd (No such file or directory)
         at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFile(I18nFactorySet.java:523)
         at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseFrom what I can tell, the following folder is deleted when a new deployment is made "/apps/SunWebsvr7/https-interakt/generated/interakt/ssl/onlineenroll/loader/org/apache/struts/"
    If I stop the server instance and start it back then the directory "/apps/SunWebsvr7/https-interakt/generated/interakt/ssl/onlineenroll/loader/org/apache/struts/" is created when the web application starts up and the web application runs as expected.
    Does anyone know what I can do to be able to hot deploy a web application and not get this error?
    Any help would be appreciated.
    Marty Jones

    after more research I have determined that the update process is deleting the loader folder when it completes the update process. The problem is that the web application needs this folder because the third party tag library definitions are stored underneath the loader folder. Here is where the loader folder is located.
    /<SunOneInstallDir>/<ServerName>/generated/<web-app-name>/<context>/loader
    When I stop the server instance and start it back up then the loader folder is created and sets the tab library definitions appropriately.
    So the problem seems to be with the update process.

  • Open Batch file during Runtime

    How Can i execute a batch file from java program.?
    my batch file only have this command """" java Server""""
    Server is the name of my java file application.

    Runtime.exec() is the thing you want.
    BUT before you use it, read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html
    and this:
    http://mindprod.com/jgloss/exec.html
    and, of course, this:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    -T-

  • Load file during runtime

    Is it possible to open a local file at runtime? If so, how?
    Ex: load "C:\myAnimation.swf" and display it.
    Thanks

    I have no lingo nor director experience but I tried your
    solution. However it returns a script error saying the filename
    property was not found.
    I dragged an swf to the stage, named it "DummySwfMember" and
    put the script in the frame.
    What went wrong?

  • How to run a Jar file during runtime

    Runtime.getRuntime().exec("javaw -jar MYJAR.jar");was what I used to run the jar originally, and it worked. Recently I created an installer for my program, where the user runs a batch-file shortcut which launches the main application. Because the main application is launched from the desktop, rather than directly, the "user.dir" property is different which makes the above code not work. How do I get the name of the folder that contains the running java application?
    Thanks

    You don't. You fix the installer so that it puts the correct working directory into the shortcut that it creates.

  • Deploying the new war file without stopping the server

    How can i deploy my updated application war file without stopping the server as the user sessions in my application and transactions as well as users request has to be carried out during the deploy process.
    Edited by: Kaywin on Jan 28, 2008 10:39 AM

    You can update web application via Administration GUI and then deploy the configuration. You don't have to restart the server for it. Assuming you are using 7.0 u2, follow the steps as below to update the web application:-
    - Login to Administration Console
    - Go to Virtual Servers tab under a Server Configuration, for deploying a web application (Configurations -> <config_name -> Virtual Servers -> <vs_name>)
    - Click on Web Applications tab and check the web application in the "Web Applications" table and then click on Update button.
    - Point to the updated war file in the pop up and click ok
    - Now just deploy the configuration by clicking on "Deployment Pending" link on the top right of the page
    Here is the docs page which has more information about web application deployment -
    http://docs.sun.com/app/docs/doc/820-2202/gbrmp?a=view
    Hope this helps

  • .WAR files-what r they?

    I came across .war file during the first day of servlets. I downloaded bookstore appl. from sun site and it contains a single .war file. How do i view the files & also what is a .jar file. Why are these exetnsions used?

    The java _AR files (.jar, .war, .ear, .rar) are just an ARchive file (as mentioned).  They use the same algorithim as WinZIP.
    The difference lies as to what is stored in each (implied by first letter of extension) and what/if the directory structure of the interal files is.
    A Java ARchive is a general purpose archive. APIs (J2EE.jar) or drivers (JDBC drivers such as Sybase's jconn2.jar) usually contain many classes in their package defined directory structure.
    A Web ARchive is an archive of one specific Web Application. Certain items must be in certain locations in the .war (/WEB-INF/web.xml MUST exist). The location and requirements for this type of archive are specific to a Web Application. The advantage of this is that you can take a .war file and deploy it in any J2EE compliant web server (Tomcat, WebLogic, WebSphere). As long as you have not used any vendor specific code, deployment should be easy as the structure of the .war is a standard.
    An Enterprise ARchive is an archive of one specific application that consist of many components, themselves other ARchives. Usually, an .ear will consist of a .jar (the Enterprise Java Bean classes) and a .war (A web application). The Web App will utilize the EJBs in the .jar, however the EJBs in the .jar do not know about the .war and can most likely be accessed by apps outside of the container (they are EJBs afterall).
    A Resource ARchive is an archive of classes used to implement the Connection Archetecture. I have not used this myself, so cannot really comment on anything other than it's purpose.
    In either case, the tool jar can be used to create, extract or view any of the ARchives listed above. It can also be used to extract a .zip file (and WinZIP can be used to extract/view a ARchive). The jar executable should be in the same directory as the java and javac executables. If your environment is configured correctly, typing jar at the command prompt will list the options available to you.

  • Set Classpath during runtime

    How can we set classpath to a .jar file during runtime. Is it possible to set classpath not other than editing a .bat file or by manually editing the global variables list????

    You need to implement you own Class Loader if you want to load a jar at runtime. Why would you like to do that in AS?

  • Any option to extract WAR file at the time of deployement?

              hi
              Is there any attribute to extract the WAR file at the time of deployment.Please
              Help me if any one know about this one.
              Regards
              Anand MOhan
              

    On Wed, 04 Dec 2002 00:30:57 +0000, Anand wrote:
              >
              > hi
              > Is there any attribute to extract the WAR file at the time of deployment.Please
              > Help me if any one know about this one.
              >
              > Regards
              > Anand MOhan
              Not quite sure what you are asking. Are you saying to extract the files
              inside the WAR file during deployment? To do deployment, either with
              packaged or exploited view deployment only.
              Thank you,
              Neo Gigs
              "Follow the white rabbit..."
              

  • War file generated in WinXPPro gives runtime error in Win2003Server

    Hi,
    I'm using Netbeans4.1 to compile my jsp application war file in windowsXP Pro environment.
    But when I try to deploy the war file to production server that is running Win2003Server, it gives the following error. At the end, I install NetBeans4.1 on the server and compile the war file in the win2003Server environment and everything works fine.
    So, I wonder if war file is depended on the OS environment. Anyone face this issue before? If yes, would appreciate your comments.
    Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection timed out: connect'.
    ** BEGIN NESTED EXCEPTION **
    java.net.ConnectException
    MESSAGE: Connection timed out: connect
    STACKTRACE:
    java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:124)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:225)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:1899)
         at com.mysql.jdbc.Connection.<init>(Connection.java:450)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
         at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
         at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
         at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
         at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
         at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
         at my.com.snt.util.DBUtil.getConnection(DBUtil.java:44)
         at org.apache.jsp.sysSignInTop_jsp._jspService(org.apache.jsp.sysSignInTop_jsp:71)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)
    ** END NESTED EXCEPTION **
    Attempted reconnect 3 times. Giving up.)

    Hey Evert-Jan,
    A small (but long :-)) question : I am facing the same issue with JHeadstart 10.1.3.3.85 (latest release I believe?).
    Current situation :
    A master - detail structure, where each detail is a tab page on the same page as the master table. 2 of the tab pages have a master-detail structure themselves. The contents of the tab pages were generated to regions, because otherwise the jspx would become too large. The 2 tab pages with a master-detail contained 2 regions, one for the master, and one for the detail group.
    My first problem (with JHS 10.1.3.3.53) with the 2 master detail tab pages was the following : when changing the master record on the tab, the detail record did not refresh, although the refresh condition was set to "Always". After a long search, I finally found that the partialTriggers were not set correctly by the JAG:
    <!-- Pseudo code for content of one tab page -->
    <!-- Region with master table (id : masterTableId) in it -->
    <region id="masterRegionId" .../>
    <!-- Region with detail table in it -->
    <panelGroup partialTriggers="masterTableId" ...>
    <region id="detailRegionId" .../>
    </panelGroup>
    Here, the partialTrigger of the detail panelGroup should ofcourse be "masterRegionId:masterTableId".
    After upgrading to version 10.1.3.3.85, this was resolved (partialTriggers were generated correctly), but then I was unable to switch tabs. I kept getting the Exception of the thread starter. For now, I solved this issue by disabling the "Generate Group In Region file" property for the 2 tabs that have a master detail on them, which works. But it would be a lot cleaner to be able to separate all tabs in a separate region.
    There are a few templates that I redefined, but none of them were changed in the upgrade from .53 to .85 I think. Could you tell me what template was changed to fix this? And if the fix was implemented in version .85?
    Thanks in advance!!
    Chris

  • Customizing AM Images & Facing Problem in Update & Deploy War files

    Hey Guys!
    This is Yash Bansal from Gurgaon, India. i am new to access manager. i am now customizing it and facing problem in customizing.
    I have customized images which is present in directory path:
    opt/SUNWam/web-src/services/images/
    and updated services.war file which is present in directory path:
    opt/SUNWam/war/
    with command
    jar -uvf services.war /opt/SUNWam/web-src/services/images/login-backimage.jpg
    then deployed configuration from the web server 7.0 admin console.
    after that when i open the url
    http://<hostname>/amserver/console
    then Page Not Found error comes in the browser.
    Just wanted to ask you guys am i doing the steps right. please help if someone know how to update and deploy war file on Sun Web server 7.0.
    Thanks & Regards,
    Yash Bansal

    Hi!
    Deploying the configuration does not (re)deploy the application. Webserver stores a copy of the deployed application and all configurations in the admin instance. When you change anything in the webserver console it is first written there and only applied to the productive instance when you deploy configuration.
    When you add images, jsps or something else to /opt/SUNWam/... and want it redeployed you have to use amconfig command. in /opt/SUNWam/bin there is a file called amsamplesilent. You have to fill the values in this file and then use
    ./amconfig -s amsamplesilent
    I believe for a redeploy you have to set DEPLOY_LEVEL to 21, not sure here, check documentation.
    I personally usually do not redeploy for images and such, I simply copy them directly the deployed location.
    Why http://.../amserver/console does not work anymore, I have no idea. But at least after a redeploy it should be there again.
    hth Chris

  • Dynamic Update of .war files or .ear files

    Hello,
    I don't see this ability in the current servlet spec. I was wondering if someone has come up with a way to implement the following idea.
    I'd like to dynamically update, add, and remove files from a .war file that is running in X servlet engine/application server. An example is adding new HTML files on the fly, or new Style Sheets. The files that I'm trying to add are not class files or any executable files.
    If you have any thoughts on how to do this or have done this, please let me know.
    Thanks for you help,
    d.bretenfeld

    It depends on what webserver you're using, and how you configure it.
    With Tomcat 4.0, each .war file on startup is extracted to it's own directory and from there any modifications have to be done with the actual files. the .war file is no longer used except as a backup.
    Now, with something like JBoss + Tomcat, the .war file is hot deployed anytime a new .war file is copied into the deploy folder. Personally I love this feature, as it forces you to actually "deploy" an application with updates all at once. And actually, you can get around this and modify individual files, but I wouldn't recomend it.
    So, as is the answer with so much of Java and J2EE, it all depends on your setup and configuration! =)
    I'd be happy to help you out more if you need anything else!

  • Change values in File physical schema during runtime?

    Is there any way to change the Directory in physical schema
    during runtime?
    This is needed so that we can dynamically get the files from
    different locations.
    Any help is highly appreciated.

    Hi,
    Yes there is:
    Create your physical schema to a parent directory and, at Physical Resourse (File Datastore) use a variable before the name of the file.
    Compose the variable with the "child" directory. I like to create the path on execution time.
    Does it help you?

  • How to update a war file safely

    Hi,
    I have a war file that has some files in it. I would like to update the war file to replace an existing web.xml file and add a new file in a different directory.
    I know that i can simply unzip the file and make the changes then zip it back again.
    I would like to do this using Ant but i was wondering if it is possible to do the update with only the updated files. I think the way ANT would work is it would check every file on the new directory and replace it if it is newer. The problem i have is i dont have copies of the existing files in the war file. I only have the files i want to replace in the war file. If i try it, will i end up with a new war file with just the new files and everything else deleted or will it just update the new file?

    Hi,
    Thank you for your response.
    A zip file is not really what i was querying about. I am working with a war file (Which is deployable on the application server) which is what i was asking about and probably why i didnt look at the zip task when i looked at the manual.
    I am using the war task to create the war file. When i looked at the manual (and googled it) i did find that i could use the update=true property on the war task to update the war file. Maybe i should have rephrased my question in another way. What i wanted to ask was if i use the update=true property will it:
    1. Update the war file with the new files and leave everything thing else unchanged.
    2. Replace the war file with a new one with just the new files.
    3. What happens if the new file i want to include has an older timestamp?
    As i mentioned earlier, i also know that i can rename the war file with .zip extension, unzip the war file using winzip, make the necessary changes and zip it back and rename it to a .war file. I dont really want to do this as it doesnt feel like its the right way to do it.
    Apologies if my initial post was not clear enough.

Maybe you are looking for