Compatibility Glassfish and Eclipse for WebApplications - java

I tried some tutorials for creating Web Applications using Eclipse Neon 3, Hibernate, Spring and Glassfish server 4.1. I downloaded Glassfish Tools via Eclipse Marketplace, but I don't know how to solve my error about not publishing via Glassfish server the project. Could you tell me what is the compatibility between them? Glassfish tools don't refer to the Glassfish server 4.1, just 4.
I read another questions and tried the solutions found there but it didn't work.
The error is: Could not publish to the server.
java.lang.NullPointerException
cannot Deploy [project_name]
deploy is failling = java.util.concurrent.TimeoutException

In Eclipse Project---> Clean --> Clean all projects---> ok.
Try to run the project Run as server.

Right click on the Glassfish Server -> Properties -> GlassFish -> Tick on the Use JAR Archives for deployment. (at the bottom)
This might work.
And also if you get any domain related errors, just change the location of the installed Glassfish server from C: drive to other drives as Glassfish needs administrative access if placed in C: drive. So better place in other drives.

Related

Eclipse Java EE IDE for Web Developers. Mars.2 Release (4.5.2) and application server IBM WebSphere issues

I am using windows 7, an old version of Eclipse, Eclipse Java EE IDE for Web Developers. Mars.2 Release (4.5.2) and WebSphere Application Server Version 8.5.5.9 Liberty.
I am working on a pretty old codebase. Java 1.7 and configuration/library management tools like Maven or Ant is not used here. I used neither eclipse nor WebSphere before. So it is very confusing to me.
The issue is that whatever code, I update it doesn't reflect when try to debug my code. I tried clan build by eclipse as well as manually delete the build directory to make sure it is really clean. Still, my latest code change is not visible after deployed to the WebSphere Application Server. How can I see my latest code changed in the IDE?
UPDATED Question
In the WebSphere Application Server installation location there are following directory:-
bin,
clients,
dev,
lafiles,
lib,
templates,
usr
usr dir has subdirectory:-
.settings,
servers,
shared,
.project
Inside the servers directory:-
.classCache,
.logs,
myserver
This myserver directory is copied from one of my colleagues. I was told it is kind of WebSphere Application Server profile.
This myserver has the following subdirectory:-
apps,
config,
dropins,
logs,
resources,
tranlog,
workarea,
jvm.options,
server.env,
server.xml
I deployed the application from eclipse as Run As:-
Run on Server
The application is deployed at apps directory as Application-HEAD.ear.xml
If I open Application-HEAD.ear.xml file I can read
All my application submodule path is given there.
If I delete this Application-HEAD.ear.xml, it is generated as soon as I deploy from eclipse. But the problem still exists my code change is not reflected.

Connecting IntelliJ to weblogic server

I have a server that it has weblogic on its own. I develop my program with intelliJ. Can I connect intelliJ to the weblogic server and just run and deploy the project from intelliJ (just like when we use Tomcat application server on our local and start/stop that with intelliJ)?
You indeed can. You can create a Run/Debug configuration for WebLogic same way as for Tomcat, but you might see it as an option only after you click N items more (irrelevant), which is at the very bottom of the list.
Also, this is supported only in Ultimate edition. If you're using community edition, you can't do that from the IDE.
The process of configuration is also described in Intellij IDEA's guides

Eclipse Java EE and tomcat6 server

I installed Eclipse and tomcat6 service on windows 8
i get the tomcat front page at localhost:8080 and in server tab in eclipse it says "Tomcat v6.0 at localhost Started, Syncronized" however im unable to run any of my imported projects on server.
Right click on server -> add and remove... -> There are no resources that can be added
Right click on project -> Properties -> Facets, Dynamic web module is checked
in project properties, in targeted runtimes i only get option for tomcat7
and if i click show all runtimes it will show 6.0 but it's diabled and cannot be selected.
Does this mean i have to uninstall 6 and install 7 instead or what?
all the project files are from school so i dont know about them but i dont remember anyone saying that i need to install newer version...
Trying to run on server just brings up server selection without possibility to use existing server...
It has to do with the Dynamic Web Module Version. Tomcat 6 supports upto version 2.5 if I am right. So upgrade to use a newer tomcat (By the way tomcat 6 is very old and you should use at least 8) or use an older Dynamic Web Module Version.
I had some troubles to install Eclipse with tomcat 6. The problem was that the server was not compatible with the Dynamic Web.
For that reason download a new version of the server. Just change the parameters and you will run your app. Also be sure about you have the JDK that you need installed.
Last version of Apache Tomcat:
https://tomcat.apache.org/download-90.cgi

running spring mvc openshift application locally

I have created an Java app on openshift platform with JBoss Application Server 7 and MySQL 5.5 using eclipse and Jboss Openshift Tools. Now I wannt to run this application on localhost but I am unable to find any option to do so.
I googled and followed some links and was able to create jboss-as-7.1.1 server but cannot figure out how to run the application using this server as there is not option to select a server in Run As window of eclipse. Do i need to modify anything in project settings?
Did you create a server adapter for your jboss-as-7.1.1 in Eclipse? I assume you did so it looks like your project is missing the required Eclipse WTP nature. Maven project (like any OpenShift Java app) get those for free if you have m2e-wtp installed. To me it looks like you're missing that one (and eventually possibly Eclipse m2e) and need to install it.
Either use the Eclipse marketplace or point Eclipse to the following update site:
http://download.eclipse.org/m2e-wtp/releases/luna/

Can I use Eclipse and GlassFish together?

I use Eclipse as IDE. I use Eclipse to test my Java apps.
But now I want to make website with Spring, Hibernate. Can I do it through Eclipse only or I need to install GlassFish.
After installing GlassFish can I see some button on Eclipse which put required files automatically in required folders, I mean I don't want to manually copy the files in diff directories.
Do I add Spring, Hibernate in Eclipse or GlassFish?
Something like click on create web app.
You should install Oracle Enterprise Pack for Eclipse, which includes GlassFish tools. You can get it from here:
http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html
Alternative, if you have Eclipse IDE for Java EE Developers, got to Window -> Preferences -> Server -> Runtime Environments -> Add. Then click on "Download additional server adapters. That will show you a list of server adapters that Eclipse knows about, including GF Tools from OEPE. The wizard will guide you through the process of installing it.
Beyond that, if you need help using Java EE facilities of Eclipse, google "Eclipse WTP tutorial" or similar. There are many articles written on the topic.
No, you don't require Glassfish. You can use any Java web-app container like Jetty, Tomcat, Weblogic etc. Tomcat is the easiest to integrate with Eclipse.
I have used Glassfish previously, but much like stand-alone. I have never integrated Glassfish with Eclipse, but it seems like as easy as Tomcat integration. See here.
http://dlc.sun.com.edgesuite.net/glassfish/eclipse/
and
here
http://dlc.sun.com.edgesuite.net/glassfish/eclipse/GF-Tools-for-Eclipse-Guide12.pdf
As quoted in the guide
To publish Projects
To publish applications to the GlassFish Server, use the following procedure:
Select Servers view.
Select GlassFish Server.
Right click and select Publish fromServer popup menu.
The selected applications are published to the GlassFish Server.

Categories