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
Similar Messages
-
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,
SandeshHi 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,
SandeshHi 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 -
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() -
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. -
Application Viewer Deployment Problem - War File Path Error
Hello all!
I just installed a new CC&B demo environment (2.2SP6 on Apache/Windows) and the application viewer is not working at all. The first thing it does is throw a bunch of errors, such as
source file does not exist data/tables/updated.xml
source file does not exist data/maintobj/updated.xml
source file does not exist data/alg/updated.xml
source file does not exist data/batchContro/updated.xml
Then the App Viewer shows the following:
Data Dictionary Not built - submit F1-AVTBL
Maint. Object Not built - submit F1-AVMO
Algorithm Not built - submit F1-AVALG
Batch Control Not built - submit F1-AVBT
To Do Type Not built - submit F1-AVTD
Service XML Built 2008-04-14 (15:40)
Java Docs Built 2008-04-16 (08:43)
Cobol Source Built 2008-04-14 (10:22)
Manually submitting one of those throws this error:
File path to WAR file and location to expand WAR file are required if Use War File is switched.
Anyone seen anything like this?
Edited by: Adam D. on May 25, 2010 1:43 PMThat worked! Thank you so much. App viewer loads now and all the F1-* items show as built. Only problem now is all the CM xml files seem to be missing. Every time you click something in app viewer it throws an error such as:
Source file does not exist data/maintobj/ENG/CM/ext_BATCHCNTL.xml
This is just one of them. There are many, and they all exist in that same CM directory... which doesnt exist haha
Thanks again for the advice! -
OC4J - Undeploy war file problem
I have an application, and deploy the war file, I make a new war and when I go to deploy the next error appaers:
Error while de-serializing the information concerning the J2EE application from the PersistentObject named: inv with description: J2EE application: inv Root Cause:
oracle.ias.sysmgmt,common,Init.Parameters; is no Serializable.
In the web server the only change was modify the IP number.
What can I do?
Thanks,
MIGUEL ANGEL CARO
[email protected]Given your war file looks like this:
jspapp.war
|___ META-INF
| |___ Manifest.MF
|___ WEB-INF
| |___ web.xml
|
|___whatever.jspYou should copy the jspapp.war file to the webapps directory of your Tomcat (I'm assuming your using Tomcat).
Then your context would look like:
<Context path="/jspapp" docBase="jspapp" debug="0" reloadable="true"/>
You don't need the c:\. There is no c:\ in your war file. -
i want to add an application like winrar useing rar file so i can auto download it all thet i have is a zip fill but i want a rar file too the option to auto download it is gray so i cant use it plz help me.
== This happened ==
Every time Firefox opened
== all the timeHere is the answer: Not an add on or plug-in! In fact you can get rid of all those useless plugins and add-ons! Go and get it. Im using the Alpha version right now and it works great. Works better then anything else .......add multiple links for all files sit back and relax. Its all done for you with no more intervention on your part! Check it out!
http://wordrider.net/freerapid/
Only one downside to this. No proper installer. You will have to copy the files to your respective programs folder.
C:\Program Files\FreeRapid or C:\Program Files (x86)\FreeRapid
Then create shortcuts to your desktop from FRD app. Thats it then start downloading!
By the way this not an add. I just spent the whole night looking for the solution to this problem because I was so frustrated with the whole thing. I download tons of files and I have lots of other projects going and I dont have time for all this nonsense with RapidShare and Firefox. Hope this helps some other poor souls out there! -
Deploying ADF Application to OC4J Using Jdeveloper
I tried to deploy an application to standalone OC4J using Jdeveloper, through a process similar to this:
Deploying a Web Application
http://www.oracle.com/technology/obe/obe1013jdev/10131/deployment/deployment.htm
[making WAR for view-controller, JAR for model, and EAR in a new project]
First I got some errors relating to Apache Log4J jars (org/apache/log4j/Category). The problems are talked over in this forum and oc4j forum. I had to download apache-log4j-1.2.15.zip and add the jar file manually to the project and remove the checks in the WAR file descriptor.
The application was deployed after some attempts successfully, but, now the first page that appears after launching the application is my Home.jspx which is not the same page which comes up when I use embedded OC4J to run the application. The Home.jspx is blank and when I enter a link manually:
http://farbod:8888/TestApp/faces/pages/Employees.jspx
instead of http://farbod:8888/TestApp/faces/pages/Home.jspx
I receive this error:
500 Internal Server Error
Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
Is there anything wrong with my deployment?
(I just mentioned my initial problem with deployment to know if that gives a clue.
I am using JDeveloper 10.1.3.3, OC4J 10.1.3.3)
Thank you in advance.
FarbodHi,
hard to say from the error message. What if you create a EAR file that includes the WAR file and then deploy it through Enterprise Manager in OC4J ? Also, having a separate deployment project bears the risk fo missing dependencies. Ensure that the project has the project's dependency property set to all contributing projects
Frank -
Help !! how to redeploy only an ejb using weblogic.Deployer ?
Hi everyone, how to redeploy only one ejb (not the entire application) using weblogic.Deployer ? I executed the following command and getting wiered error !!! :
java weblogic.Deployer -adminurl http://myadmin:7000 -username system -password weblogic -name myApp.ear -activate -targets testEJB.jar@jytServer -source myApp.ear
I am getting the following error :
weblogic.management.ApplicationException:
[J2EE:160043]Missing deployment descriptor "META-INF/application.xml" at myApp.ear".
The ear file very much contains the application.xml under META-INF directory and in the application.xml, there is an entry for myBean.jar.
However if i try the following command, it will redeploy the EJB but it will deploy it as a separate application :
java weblogic.Deployer -adminurl http://myadmin:10720 -username system -password weblogic -targets jytServer deploy testEJB.jar
But I want to redeploly it as a part of .ear application.
I would highly appreicate your help. (assume that admin console access is denied and i will have to use weblogic.Deployer to redeploy).
thanks,
jyothiWhere do I specify the order of deployment? I have 2 EJB jar files and Web module, the order need to be Web module first, 2 EJB then EAR. In WebSphere it is defined in Deployment.xml file, where do I define Deployment.xml in WebLogic
-
I have created a .wsdl file using XMLSpy and I want to deploy the service on tomcat. I have been unsuccessful in using the "wscompile -import" option.
Does anyone know how to cross-compile a .wsdl file into a .war so it can be deployed on tomcat? If there is another way other than a .war file, that is fine too...
Currently, I am using WSDL2Java tool by Apache Axis. I take my .wsdl file use the WSDL2Java tool to get the java files, Then I run the java files through wscompile, wsdeploy etc.... the problem with this approach is that the .wsdl file produced by the wsdeploy does not support the document encoding (everything switched to rpc) and no literal either (I think).
If anyone has figured out a better way of going from .wsdl to java or .war or tomcat.. please let me know.. I'm running out of options...
Thank you !The link worked correctly for me. You can also refer to a recently published whitepaper at
https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html. Scenario 5 in second part (https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario5) of the whitepaper describes how to achieve your scenario.
Post your JAX-RPC related questions to [email protected] for a quicker resolution.
Send an email to [email protected] to subscribe to the alias.
Send an mail to [email protected] for a complete list of help commands.
Thanks for your interest in JAX-RPC.
Regards,
-Arun -
JDeveloper 10g, ADF, ANT:How to define ant task for EAR & WAR file creation
I am trying to automate the deployment process of our ADF Faces & BC application. I have reviewed this doc:
http://download.oracle.com/docs/cd/B31017_01/web.1013/b28951/anttasks.htm
and followed the procedure for integrating ant onto the server. I can build the project and also successfully deploy the ear file. Howerver, I did not find any instruction on how to generate the EAR file. Can anyone point me to the right place for this task definition?
Here is my current build.xml file.
<?xml version="1.0" encoding="windows-1252" ?>
<!--Ant buildfile generated by Oracle JDeveloper-->
<!--Generated Jul 16, 2007 12:20:13 PM-->
<project name="CRDBApps" default="build-all" basedir="." xmlns:oracle="antlib:oracle">
<property file="build.properties"/>
<property file="ant-oracle.properties"/>
<target name="clean-all" depends="">
<ant antfile="build.xml" dir="CRDBView" target="clean"/>
<ant antfile="build.xml" dir="CRDBLib" target="clean"/>
<ant antfile="build.xml" dir="CRDBModel" target="clean"/>
</target>
<target name="build-all" depends="clean-all">
<ant antfile="build.xml" dir="CRDBView" target="compile"/>
<ant antfile="build.xml" dir="CRDBLib" target="compile"/>
<ant antfile="build.xml" dir="CRDBModel" target="compile"/>
</target>
<target name="deployear" depends="">
<echo message="-----> Deploying the application module deployment (ear) file"/>
<oracle:deploy deployerUri="deployer:oc4j:opmn://myserver/home"
userid="oc4jadmin"
password="password"
file="CRDBView/deploy/CRDBApps.ear"
deploymentName="CRDBApps"
bindAllWebApps="default-web-site"/>
</target>
</project>
thanks!
WesThanks all for the tips. After reading up a bit today on ear/war files and ant. I ended up just creating a task to mimic the ear/war file structure. My script isnt pretty but I'll work on refining that later. Here is what I have if anyone ever is interested:
<target name="war" depends="">
<echo message="Executing target war..."/>
<mkdir dir="war"/>
<copydir src="CRDBView\public_html" dest="war\"/>
<copydir src="CRDBView\classes" dest="war\WEB-INF\classes"/>
<copydir src="CRDBModel\classes" dest="war\WEB-INF\classes"/>
<copydir src="CRDBLib\classes" dest="war\WEB-INF\classes"/>
<echo message="Creating war file..."/>
<jar basedir ="war" destfile="CRDBApps.war"/>
<echo message="Done executing target war..."/>
</target>
<target name="ear" depends="war">
<echo message="Executing target ear..."/>
<mkdir dir="ear\META-INF"/>
<copydir src="CRDBView\deploy\META-INF" dest="ear\META-INF"/>
<copy file="CRDBApps.war" todir="ear\"/>
<jar basedir ="ear" destfile="CRDBApps.ear"/>
<echo message="Done executing target ear..."/>
</target>
<target name="cleanAndDeployCRDBApps" depends="build-all,deployear">
<echo message="Executing target cleanAndDeployCRDBApps..."/>
<delete dir="war"/>
<delete dir="ear"/>
<echo message="Done executing target cleanAndDeployCRDBApps..."/>
</target>
<target name="deployear" depends="ear">
<echo message="Executing target deployear"/>
<oracle:deploy deployerUri="deployer:oc4j:opmn://myserver:6003/home"
userid="oc4jadmin"
password="password"
file="CRDBApps.ear"
deploymentName="CRDBApps"
bindAllWebApps="default-web-site"/>
<delete file="CRDBApps.ear"/>
<delete file="CRDBApps.war"/>
<echo message="Done executing target deployear"/>
</target>
... -
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 -
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?
ThanksSorry 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 -
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.45Thanks, 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
Maybe you are looking for
-
Downloading the file from URL directly
Hi, I need to download the documents directly that are stored in table. I have table: FileID, File_content 1 fruits.pdf 2 vegetables.docx something like this. I need to sent an URL to the users so that they can directly access the file with the filei
-
Still having problems with palm tx
I'm getting really tired of this palm tx. I have done a hard reset like 6 times. I even created a new user on it and deleted all the programs and data from the old user. I even took of the security lock from it. It turns on and everything but it neve
-
Handling Recursive include in XSD
Hi Experts, I 'am trying to create a java client proxy for my WSDL. My XSD "includes" 3 other xsds that have recursive imports among them due to which the client proxy generation results in an infinite loop eventually leading to a StackOverFlowE
-
I've got Creative Cloud registered but Photoshop CC keeps on asking to start a trial
Hello, Everytime I start Photoshop CC, it asks me to start a trial version instead or become a member. But I'm a paying Creative Cloud member at the moment. I'm logged in to Creative Cloud when I start Photoshop. Adobe CC does work on another new com
-
TS2664 Migration Assistant crashing my home BT Broadband network
I'm trying to transfer files from my Windows 7 based PC to my new Mac Air using Migration Assistant and my home BT Broadband network. On three occassions now my PC has lost it's B'B network connection during the file transfer process. The only way I'