I'm tired by compiling and redeploying .ear file on web logic. could you please let me know how to do hot deployment. I'm using weblogice 10 as application server and ATG framework. my .ear file is withing ATG not in weblogic. I tried by changing the java file, compiled and merged updated .class file with .jar file and copied .jar file in .ear file but it is not reflected.
You should run your server via runDynamoOnWeblogic.bat which located in ATG_DIR\home\bin and use -run-in-place key when call this bat file.
But you should reslove issue with autobuilding in your IDE. For example I config my eclipse so that eclipse compile java classes after editing and put it directly to the ATG_DIR\My_module\classes.jar directory.
note: classes.jar should be exploded archive.
Hope this help you.
Related
I have a project which run in tomcat.
I have this error from tomcat.
java.lang.ClassNotFoundException: net.glxn.qrgen.javaase.QRCode.
I know that this error occur because I did not import my JAR file when I was building the WAR file but then I do not have the source code anymore which mean I cannot build a WAR file again.
Just wanna to know is there a way for me to put my JAR file into tomcat so the related function will call the JAR?
Thanks.
You should be able to copy the jar straight into $CATALINA_HOME/lib and it should work.
I am currently working on an EAR application which has a WEB project and EJB project in it.
To work on eclipse with local set up i do so many build path setups and all.
All these buildpaths show up in .classpath of the project.
Now when i export the EAR and deploy on Server everything works on server.
My doubt is how does server know about my local system paths which are present in .classpath of my project.
Does it mean .classpath has no significance at runtime?
Please explain.
.classpath file is eclipse specific, it will not be bundled with the EAR. Eclipse uses it to set the classpath for the project.
An EAR has a well defined structure and Servlet container understands that structure, using it's knowledge it prods around in the EAR file and extracts classes to load in the runtime.
Obviously server doesn't have any knowledge of your local environment. An EAR (or WAR or JAR) file is a simple archive file (with some specification or the file order and all). You can unzip it using any utility (something like 7zip). Check the structure of the packed EAR, that will give you a better understanding of what goes to your server.
I'm trying to run a simple Java EE app on jboss wildfly 8 server. I just by selecting Run on Server menu. but deployments folder is empty. browser shows error 404 not found by accessing address:http://127.0.0.1:8080/EjbTest/. Any idea?
Finally, I figured out what problem my ear file had. As EAR File Structure says, my ear file didn't follow the structure. after putting necessary files into .ear file, it worked with no problem.
I currently have a working servlet created in Eclipse. When running it from the Tomcat plugin, everything works, and my app shows up at localhost:8080/project_name/. However, when I package the project into a .war file and place it in the /webapps directory of Tomcat and start the server, the servlet cannot be accessed. In Terminal, I can see Tomcat loading my project, and a temporary folder of the unarchived project is also created in /webapps. However, I simply cannot access my servlet.
Note:
I'm using Tomcat 7 and I don't have a web.xml file in my project.
How are you creating the war file? Check if your war files contain jar files under WEB-INF/lib folder and if the class files are not missing. You can easily verify it under tomcat/webapps/[project name] folder.
I have made some changes to an existing Java web application. When I deploy this file to Apache, via WAR file, it regenerates the website as it appeared before my changes.
I delete the existing website directory before deployment, and I've moved out all existing WAR files. I have committed my changes to source control and recreated the WAR file, but still no effect. I even added a small text file to the solution and that was included in the WAR file and deployed to the server, but still my changes were not active.
I am using Spring as my IDE to create the WAR file, and Apache Tomcat to host the website.
Why aren't my changes being packed in the WAR file?
EDIT: I am very new to Java, but have plenty of experience in .NET. Please excuse stupid questions from me.
EDIT 2: As far as I can see, the changes are actually included in the WAR file and are deployed to the server (the class files contain certain strings that they never did before). But the code just isn't executing as it should with those changes (despite Tomcat and the machine itself being restarted).
Maybe try to add Maven to your project and then try to use mvn package to make a war file. Some time ago I had a similar problem. I tried to build a war file without Maven and changes on Tomcat weren't seen. Then Maven helped me out.
Edit:
Convert Existing Eclipse Project to Maven Project
http://www.mkyong.com/maven/how-to-convert-java-web-project-to-maven-project/
Maybe this could help you.