Remote deployment hangs with Netbean/Glassfish - java

I have two fairly simple maven project on my netbeans. Both are configured to run on a remote glassfish server.
I can easily deploy the first one using the "run" button, however, if I try to "run" the second, the deploying action hangs indefinitely and doesn't do anything. No error, even on the remote glassfish logs.
Both have the same dependancies and the same configuration on Netbean. The second just have more web page and Java classes.
Any idea what would be causing this ? I can't make any sense of that.
Thanks !
Edit : If I delete all the Java classes, the deployment is working, this doesn't make any sense.
Edit² : If I manually deploy both application using the Glassfish web interface, it's working fine.

Related

How do I restart Jetty Server in Eclipse?

Jetty server was running fine. I made little changes in my code and now I want to restart it. With Tomcat it was easy because you have GUI interface to restart it. Any help will be appreciated.
There are a number of ways you can accomplish this, we have a page in the docs on Hot Deployment: https://www.eclipse.org/jetty/documentation/current/hot-deployment.html
Basically if you are using a webapp you can set it up to restart by touching a deployment descriptor or through jmx.

War file on Win Server Tomcat 8.0

I export my maven java project in Eclipse to War file.
On the server, I open the manager of tomact and add the war application, but when I run the application it seems the application isn't running (or some problem with the resources).
From the other hand, when I start the tomcat by the startup.bat in the tomcat folder and add the War to the webapps folder, it is working. But if I logoff the server , I cannot connect the application remotly. The server is shut down. Why?
What can be the problems?
Thanks!
Me
Why is your application not running? Well - if there's a specific reason for it (and the manager application works) you will see it in the logfile - e.g. tomcat's log/catalina.out. Check it or give us a snippet of the error messages in there if you don't understand them.
I like to recommend not to use the manager application, rather deploy through the OS or any other maintenance tool (e.g. scripted). This typically results in a better maintainable system. As it already works well for you when you just add your WAR file to the webapps directory, everything seems well. Introducing a manager application in production just provides another means to attack your site - and I frequently see those applications poorly maintained (and the passwords poorly chosen & protected)
When you start tomcat with startup.bat, it will run the server process in a console window. This console process will be shut down when you log out. In order to have tomcat running even when you're not logged in (and in order for it to start automatically), you'll have to install it as a service. There's plenty of information on the internet on how to do this - should be extremely easy to find.

how do i determine the order of startup of 2 projects in one eclipse workspace?

I am working on java 6, eclipse and tomcat .
I have 2 projects in a workspace , 1 is a webservices client and the other is a webservices server.
both projects are deployed under tomcat instance, so when I run the tomcat server it starts up both projects.
when the client project starts up before the server project service is available , the client gets stuck in the following function and dosent finish to startup:
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {
delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
serviceName,this.getClass());}
so I need the server project to start first and have the client project start only after the server finishes.
is that possible?
The short answer - you need to write your client application so that it can detect if the server application is down and act accordingly. If the dependencies run both ways, then you have to ensure that the failure conditions are handled in both.
Also, ensure they don't depend on each other during container startup; the dependency can be established later, when the applications have all started. This in part because, Eclipse does not determine the startup order. Tomcat does, and it will not allow you to dictate which application should start first. You can read this related question.

What are the Steps for Debugging Java Web Application?

I joined a project which has been already developed and its an Web Application deployed on Tomcat Server.
I have configured the Web Application on my local Tomcat Server and it is running fine. I want to start debugging the Application but I am not sure where to start from and how to debug an Java Web Application from Eclipse and so my question is
Q: How to Debug Java Web Application which is running on Tomcat Server on Local Machine in Eclipse Environment {Pointers to useful resources or other steps would be highly appreciated}?
There are at least a couple of ways to do this:
A quick search turned up a tutorial to use remote debugging in eclipse with tomcat to connect eclipse to the java process running tomcat.
If you create your project as a Dynamic Web Project using eclipses Web Tools Platform plugin then you can deploy to and debug tomcat from within eclipse easily.
Just stop your server from normal start mode and click on debug mode. Soon, after the server shows debugging,synchronised, continue using the web apps as you do normally. But before that, you must provide breakpoints and you can see the results that you need.
Works for me.
I have had to do this a few times. Often it is not convenient to create a Dynamic web project to debug a web application in tomcat. This technique is fairly simple but requires some configuration in tomcat and then using Elcipse (or netbeans) to attach to tomcat when its running.
http://wiki.apache.org/tomcat/FAQ/Developing, in particular
How do I configure Tomcat to support remote debugging? and
How do I remotely debug Tomcat using Eclipse?
First get the Java EE edition of Eclipse
You then need to have the Eclipse project containing the WEB-INF folder be a Dynamic Web Project. Then the full tooling becomes available and allow you to work with your projects inside any server including Tomcat. The trick is to locate the Server view pane, and right click to add a new Tomcat server adapter.

Deploy Java EE Project in Weblogic

I have WebLogic installed in my computer. I already added it as a server in my Eclipse IDE. How do I configure my Web application to run or for it to be deployed on the WebLogic server. I found a sample project and found a weblogic.xml in it. Where do I start? Do I need to add something, etc.
If your web application is already a "Dynamic Web Application", then you should be able to deploy it just by right clicking on it, then Run As > Run on Server and choose the WebLogic Server runtime.
If this doesn't work, maybe you need to add the right facet to your project. Right click on your project and go to Properties > Project Facets and check that Dynamic Web Module is checked.
If this still doesn't work, maybe recreate a "Dynamic Web Application" from scratch and move (or copy) your sources to this newly created project.
Many tutorials are actually available at the WTP Community Resources page. See for example Using the Eclipse Web Tools Platform with Apache Tomcat. It is not specific to WebLogic but if you already have it setup in Eclipse, it should be easy to adapt the specific parts.
PS: It's hard to say anything about your sample project and the weblogic.xml as you didn't provide any detail about them. Maybe try to follow the advices above and, if you still have problems, update your question with more information.
There are a number of resources on using Eclipse with WebLogic, including Oracl'es Enterprise Pack for Eclipse. It's hard to tell without more information, but you need a WebLogic Domain configured with at least an Admin Server to deploy the web application to. When doing local development, it's acceptable to deploy applications to the Admin Server, but beyond this you typically want an Admin Server and a managed server where the application will get deployed to.
Here's some info on Eclipse and WebLogic - http://www.oracle.com/technetwork/developer-tools/eclipse/learnmore/index.html
Question is missing much details. You can find some detailed help here
http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs90/deployment/index.html

Categories