I have no experience setting up java applications and no experience with Heroku but I have this java application I would like to know if I can easily run on Heroku.
https://github.com/difi/oxalis is the github repo and here is some install instructions for a standalone server:
make sure that Maven is installed.
make sure that Tomcat 7 and Metro 2.1.1 are installed
make sure that the Tomcat manager is available on port 8080 with user manager/manager
make sure that Tomcat is also up
and running on SSL at localhost:8443
make sure that keystore.jks is
installed in a known directory (separate instructions for
constructing the keystore)
change
oxalis-commons/src/main/filters/soc.properties to reflect your local
preferences
Is this possible to set up on Heroku?
It seems like it should run on Heroku but a few changes might be necessary. You will not need to run Tomcat with SSL since Heroku provides the HTTPS in front of the Tomcat app. You will probably have to update the Maven build to pull in Tomcat via webapp-runner. The properties file should probably be replaced with Config Vars. The only part that seems like it might be tricky is the Metro piece. It's not clear how Metro is being pulled into the system and used.
Related
First thing's first: I'm trying to develop an web service that is integrated with third party JCE(using Security.addProvider to use that jar which is packed into my WAR), but somehow when I deploy the WAR on my Websphere 8(with Java 1.8), it keep telling me that it cannot find the specified algorithm(AES) that I need unless I drag the JCE into Websphere's JRE and change its java security configurations.
Since I have no idea about the root cause, so I installed light-weighted websphere using the Eclipse's plugin install manager. Then I start the light-weighted server, select my web project and set it to debug on this server. But the Next screen I saw is "Context Root Not Found", even I changed the URL to the servlet.
I'm not familiar with WAS and it's liberty plugin, but isn't it suppose to run my project on it? like the Tomcat? Can anyone tell me how to run my WAR in it, so I can debug it? please?
First off, it looks like there is a misunderstanding on what Liberty is. When you say "light-weighted server" I'm assuming you mean Liberty, which is accurate -- Liberty is indeed a light-weight server.
However, WebSphere traditional and Liberty are two different products/servers. Liberty is not a plugin for WebSphere traditional.
A Java EE application running on WAS should behave very similarly to an application running on Liberty, because they are both Java EE compliant application servers. Since debugging and developing an application on Liberty will be easier/faster than on WAS, I would recommend using Liberty.
To debug your application on Liberty using the Eclipse WDT plugin:
Open eclipse with the WebSphere Developer Tools (WDT) plugin installed (you can get WDT here).
Follow this article to create a server using WDT. You can skip the parts about creating a sample application since you already have one.
Open the "Servers" view (using Window->Show View->Other...->Servers) and find your server:
Right click the server and do Add and remove... then add your application to the server
Set a breakpoint in your application code in Eclipse
Start the server in debug mode (by pressing the bug icon shown in step 3)
In the Eclipse menu, select Debug->Debug As->Debug on Server:
I am new very much new to maven and spring technologies. I want to know how can we auto deploy the java server code without rebuilding the maven or without restarting the glass fish server? Currently I have to restart the server if any change I do in java code. I have also use one option in Eclipse to "Automatically publish when resources change" but no use.
You may want to take a look at JRebel, it reloads changes made to your code instantly without having to restart your application server.
The recent version of HotSwap Agent works very well for me with Eclipse and Payara Server (server derived from and compatible with GlasFish).
It's free and opensource and supports Java 8, including lambdas. It supports reloading of resources in a webapp running on GlassFish/Payara, including JAX-RS annotations, CDI bean definitions etc., without restarting whole application.
The only drawback is that you need to install the DCEVM plugin into the JDK, which has to be activated by a command line argument -XXaltjvm=dcevm. But this isn't intrusive and doesn't affect your JDK if you avoid the argument - you can activate it just for GlassFish/Payara Server when you add it to the JVM options in the domain configuration. When adding the -XXaltjvm=dcevm option, you also have to remove -client and -server option, because they take precedence.
So, essentially these steps are needed with the recent version of HotSwap agent and practically with any version of GlassFish and Payara Server:
install DCEVM as altvm into the JDK (run the installer with admin rights)
copy the hotswap-agent.jar into lib/ext in your domain directory
add the following arguments as JVM options in your domain configuration: -XXaltjvm=dcevm -javaagent:/path/to/hotswap-agent.jar
run the server in debug mode from your IDE
in Eclipse, all works out of the box, just avoid using the Publish button for the server. Check that "Never Publish automatically" is checked in the server Overview, when you double click on the server in the Servers view
in Netbeans, you need to disable "Deploy on save" in project configuration and enable "Apply code changes after save" in global Java Debugger options
There is some information in this Payara issue, although it isn't an easy to follow guide. Some more info in this HotSwap issue.
I've been developing on and off with Appengine for a while now. I use Intellij for my IDE and I have a Java instance of Appengine.
When running the dev server locally, the database is lost between each restart of the server. This is because Intellij rebuilds the WAR each time and the datastore which is located in the WAR is lost. I know in the documentation that it says the datastore will be persisted; but the documentation implies that you are using the Eclipse plugin.
It used to be that I didn't have this problem because there was a startup param that would specify a different location for the datastore which I setup outside the WAR. I've lost this param and can't find any documentation on it.
Please help
The following VM param allowed me to change the datastore directory.
-Ddatastore.backing_store=PATH_TO_DATASTORE/local_db.bin
The plugins are just calling the local development server. For Java, the command line equivalent is calling dev_appserver.sh (or .cmd for Windows folks). If you call:
./dev_appserver.sh --help
you can see an option --generated_dir=DIR that should work for you. Just include this in your IntelliJ run configuration (borrowing Eclipse terminology) and you should be good to go.
I have Tomcat 6.0 installation on my Win7 PC. I used 64/32bit windows installation.
In Eclipse I was able to set paths and set server to use my Tomcat installation. Everything seems working fine until I run server from inside Eclipse.
I noticed that http://localhost:8080/index.html page is not available (Tomcat default home page). I also can't access http://localhost:8080/axis2. I have Axis2 installed too.
Since I am struggling to make simple axix2 web service for long time, I am thinking maybe this Eclipse instance of Tomcat is adding to my issues?
When I start Tomcat from windows GUI everything works as I expect.
Any ideas?
Thanks.
Eclipse does by default not take control over the Tomcat installation and all of its pre-deployed webapps, instead it just uses its sole server engine and uses the workspace metadata as deploy space. When you start such a server configuration from inside Eclipse, all of the pre-deployed webapps will just be plain ignored, including Tomcat's default homepage.
To let Eclipse take control over the Tomcat installation, you need to doubleclick the Tomcat server entry in Servers view to get its configuration, then at the left column, under Server Locations, you need to select Use Tomcat installation (note, when it is grayed out, read the section leading text! It needs to be published without any projects).
Yes, this is normal. In the Package Explorer, you can click the Servers folder and view the configuration files that the Eclipse instance is using, specifically server.xml and context.xml. You can edit this configuration to match your specific requirements.
You may also want to check out the section titled Tomcat Publishing Options in this link here: http://www.eclipse.org/webtools/releases/2.0/newandnoteworthy/server.php
I favor this approach because when WTP inevitably corrupts my configuration once every two weeks, I don't have to reinstall Tomcat, I can just delete the server and reconfigure it.
In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6.
Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm not sure that creating a .zip file with the Tomcat folder would work! It certainly wouldn't install the service.
Suggestions welcome!
I should note that - at the moment - all apps are deployed on Windows servers.
Thanks,
Phill
We use Ant Installer to deploy our application, app server and install it as a service. We embed Java Service Wrapper in the installer to install the Windows service.
One option would be to use embedded Winstone servlet container instead of Tomcat as described here:
http://winstone.sourceforge.net/#embedding
Then you would have executable jar file running your application.
You could probably modify the installer that Tomcat itself uses.
Simply zipping up the directory is a valid solution, but as you note, it will not install the service.
I would probably (a) zip up the directory (b) use one of the open-source service registry programs to install the server and maybe (c) uses NSIS to build an installer.
Depending on the installation environment, your installer may also need to ask the user for a server port, since your application may not be able to use the default HTTP port.
It's commercial, but install4j will do this for you, including installing the service.
You could use BitRock crossplatform installer. You can take a look at BitNami for a number of Java applications like Alfresco, JRoller, and Liferay that have been packaged using BitRock. The BitNami stacks are completely free, though Bitrock itself is a commercial tool (we have free licenses for open source projects)