I am after a all round installation and introduction to Glassfish.
(ie Your boss has told you need to develop your web applications for glassfish instead of tomcat)
Installing
Installing Glassfish onto your own PC for testing.
Download the installer file off the glassfish website
Move the installer jar to the location you wish the files to be installed. Once
installed, the install folder can not be moved. If you are not sure where to place it on OS/X or Linux, drop the installer jar into /usr/local/, this will result in your appserver being installed as /usr/local/glassfish
Run the installer with extra memory java -Xmx256m -jar glassfish-installer-xxx.jar
Run the configuration script: cd glassfish; lib/ant/bin/ant -f setup.xml
Starting the app server
To start glassfish with the default configuration type bin/asadmin start-domain domain1. This will result in the following URL's becoming available:
Admin website http://localhost:4848/
Application site http://localhost:8080/
The default administrator username and password are:
Username: admin
Password: adminadmin
IDE support
Eclipse support
The easiest way to get Glassfish working under Eclipse 3.5 is to use this software Update url (https://ajax.dev.java.net/eclipse) inside Eclipse.
Caveats and warnings
For those used to storing application settings and configuration in a context.xml file, glassfish does not support this.
Moving on from here
The following links are also very useful:
Guide to JMS in glassfish
Guide to JMS in glassfish in Netbeans
Related
Is it possible to develop a java application using jdbc on a windows laptop, and then deploy the jar to an ubuntu VM?
I have a small application that connects to a database on the VM (using IP address). This works fine on Windows in IntelliJ if I run it within the IDE. It also works fine if I move the project to Intellij on Ubuntu and run from within the IDE. But I want to deploy a JAR file to the Ubuntu platform. When I do this I get "No suitable driver found for jdbc..."
I have tried:
Installing jdbc on ubuntu using "sudo apt-get install libmysql-java".
Adding the Platform Independent current jdbc driver as a library.
Including this library in the jar artifact when building.
Adding the ubuntu jdbc to the CLASSPATH (export CLASSPATH=$CLASSPATH:/usr/share/java/mysql.jar)
I can't be the only person who wants to develop on Windows and deploy to Ubuntu?
I have a Windows virtual machine with OpenJDK 13 installed that I would like to setup as a Jenkins node/agent.
When I create the node configuration using the Jenkins UI and select Launch Method: Launch Agent by connecting it to the master it provides a link to download slave-agent.jnlp
On a system with the original jdk/jre older than version 9, which contains java web start, if I run that jnlp file, it brings up a window with a menu that includes an option File - Install as A Service
However, as OpenJDK (and I believe any JRE/JDK versions greater than 8) do NOT contain Java Web Start, I cannot seem to gain access to that option.
I am able to successfully run java -jar agent.jar -jnlpUrl https://jenkinsserver/blah/slave-agent.jnlp -secret blah -workDir "somedirectory" and have the node register with Jenkins, but it is not running as a service.
I had an older agent that was still using old version of JRE, so I looked at its Jenkins service configuration and unfortunately it seems to be relying on executable(s), .config file(s), and xml file(s), which I cannot determine the source of, beyond they must be created when running the "Install as a service" instructions from slave-agent.jnlp
I also attempted to use IcedTea-Web which is apparently supposed to be a Java Web Start replacement, but I've had no success.
Can anyone tell me how to setup a Windows machine running OpenJDK as a Jenkins node/agent with the Jenkins node/agent components running as a Windows service?
I had a similar issue and now I use NSSM.
Download NSSM
Open a cmd and install the service (I used JenkinsService as Servicename):
<path to nssm.exe>\nssm install <Servicename>
Insert the path to the jdk to the field Path
add the rest to the field Arguments:
-jar agent.jar -jnlpUrl https://jenkinsserver/blah/slave-agent.jnlp -secret blah -workDir "somedirectory"
Click on install the service
Now you can check the new service JenkinsService in the windows service manager. As soon as it's running you can check the connection to the master.
If you want to setup a Java base application as a service, I believe the best option would be to use Procrun from Apache. It is the exact method that Tomcat uses.
When I unzip the wildfly-10.1.0.Final.zip file on my computer at home. Then WildFly starts running automatically. I had verified this through going to localhost:8080. Because of this I can't run my Java EE project on Netbeans (I have added WildFly as server in Netbeans). In the logs I see:
Address localhost: 8080 is already in use
I also can't shutdown WildFly through the following command:
$ ./jboss-cli.sh --connect command=:shutdown
However I can shutdown WildFly by killing his process. But this still doesn't fixed my issue on Netbeans. Because I still get to see: Address localhost: 8080 is already in use.
At my work when I had unzipped the wildfly-10.1.0.Final.zip file. It didn't start automatically I also had no problems with running my project on WildFly. And I also can shutdown WildFly through the command line or Netbeans.
Anyone that maybe knows how I can fix my WildFly server problem on my computer at home?
Which version of NetBeans are you using ? Until 8.2 WildFly 10 isn't correctly identified.
You may try NetBeans 8.2 RC1 from https://netbeans.org/community/releases/82/ or a nightly build as this would fix your issue.
NetBeans checks if there the instance is already running before trying to start it, so you don't have to start it beforehand but you can :)
I am trying to install the Websphere Application Server (32bit) in Ubuntu 14.04.3 (64bit) using the IBM installation manager a silent install and a response file.
The commands I am using are:
sudo ./IBMIM --launcher.ini silent-install.ini -input
ibm_im_response_file.xml -acceptLicense
In the logs I see the following:
WARNING: /opt/IBM/WebSphere/AppServer/bin/iscdeploy.sh: 44:
/opt/IBM/WebSphere/AppServer/bin/iscdeploy.sh:
/opt/IBM/WebSphere/AppServer/java/bin/java: not found
although this file exists, but it's a link to /opt/IBM/WebSphere/AppServer/java/jre/java
EDIT: same happens when using the GUI
EDIT2: I tried doing the same under Ubuntu 12.04 and it worked. Apparently there is some problem regarding the 32bit version that is related to the ia32-libs package that is no longer available in 14.04.
If you are trying to Install Websphere Application Server through Installation Manager then you need to select IBM SDK provided with Websphere Application Server.
If you don't choose the IBM SDK you will be need to enter the JAVA Path in next steps.
my problem
i have a windows server 2003. I develop a java server. I want to run this java server on my windows server 2003. I downloaded apache tomcat 7 and i unzip it. then i start it from the bin folder. i put the war file of my server on the workapp folder of tomcat and finally my java server is working perfectly on my windows server 2003.
the problem is when i log of from my account on the windows server 2003, the apache tomcat stops and there is nothing wrong with this since i log off and all the process will stop.
i want to keep my java server running even when i log off (note that i log off not shut down the server) i searched the internet and i found that i have to install the apache service on my windows server 2003. i go and download the httpd-2.0.65-win32-x86-openssl-0.9.8y.msi file from the official apache website. i installed it. however i didn't find the apache service on my services.
Note that can be help
I already have IIS installed on my windows server 2003
any help will be appreciatted.
It's because you have to install an enable-it :
Go to your bin dir of your apache installation folder with the windows console
Install the service by executing this command in the console : httpd.exe -k install -n "Apache".
Then, start the service : httpd.exe -k start -n "Apache"
The service will start and auto-start :
The process is started under the LocalSystem account, so it will keep running if you logoff.
If you want more information : Using Apache on Microsoft Windows
I found the answer mysefl.
it is because the same port is running on IIS.
just change the listen second on the configuration file to another port and it will work.
If you want to run Java web application in war format (running on servlet container), then you should install Apache Tomcat (not httpd Apache!) as service. You can download latest tomcat from here.