HelloWorld application does not work when deployed in Windows Azure - java

I am trying to deploy a HelloWorld Application using eclips. The program runs successfully in Windows Azure emulator but I cannot publish it in Windows Azure I get the following error message: Failed uploading deployment package. I found a question like mine on this site but no real solution was provided since it suggests to try to make the size smaller :
Microsoft azure deploy error 40 %
Pleased note that it only display a Hello World message I followed the following tutorial:
http://msdn.microsoft.com/en-us/library/windowsazure/hh690944(VS.103).aspx
Thanks

We have seen this problem in slow connection or large deployment packages. I suggest a couple of options:
1) Manually deploy the package using the Windows Azure management portal.
2) Download the latest eclipse plug-in, that now allows you to deploy supporting frameworks (JDK, Tomcat, etc) directly from BLOB storage, so they don't have to become part of the deployment package.
For option #2, you can update the plugin directly in Eclipse. Instructions can be found here: http://msdn.microsoft.com/en-us/library/windowsazure/hh690946.aspx.
The latest release notes are here: http://msdn.microsoft.com/en-us/library/windowsazure/hh694270.aspx
I hope this helps.

Related

AWSToolkit for Eclipse --- Deploy Serverless Project Hangs at 10%

I'm going through the AWS Serverless Tutorial using the Eclipse plugin found here...
https://docs.aws.amazon.com/toolkit-for-eclipse/v1/user-guide/serverless-projects.html
I simply used the HelloWorld blueprint and then selected to Deploy Serverless Project as the tutorial states. In the progress view I see..
Deploying Serverless template to AWS CloudFormation.
https://forums.aws.amazon.com/
Deploying Serverless template to AWS CloudFormation.: Uploading Lambda function to S3...
At the bottom right I see 10%
But it never gets past this point. There's no error and opening the AWS CloudFormation in the AWS Explorer shows nothing.
I left it running over night. No luck. I've tried changing the JDK and ensured it was on Java 8 (OpenJDK8). No help there. I've tried installing the latest eclipse (2021-09) and reinstalling the AWSTookKit. Same issue.
In the AWS Explorer view in Eclipse I can see my EC2 instances, My S3 buckets (including the one created for the HelloWorld project), My DynamoDB instances I have created in the past. So I believe it is all hooked up properly in terms of credentials etc.
I see that it has packaged up the project into a zip file which appears to be 8.3MB in size. I assume this is what it's trying to send to the S3 but something isn't happy?
Would be great to have a view to see what it's getting stuck on so I can resolve the issue. Any suggestions?
This may help you.
Instead of running the latest Eclipse IDE for Enterprise Java and Web Developers, Version: 2022-03 (4.23.0), Build id: 20220310-1457, I went and downloaded an older version:
https://www.eclipse.org/downloads/packages/release/oxygen/2
Then I installed AWS Toolkit for Eclipse, and I was able to deploy the hello-world serverless Lambda without problems. I'll see if I can develop much more complex Lambda with this environment instead.
Update
In fact, the underlying problem is the error:
"Unable to complete transfer: javax/xml/bind/JAXBException"
Which I discovered when I try to drag&drop a file into an S3 bucket via AWS Explorer.
And the fix is mentioned here: https://github.com/aws/aws-toolkit-eclipse/issues/123.
Essentially, get a copy of the JAXB API JAR, e.g. jaxb-api-2.3.1.jar, into the Eclipse plugins folder, e.g. C:\Users\XXX\eclipse\jee-2022-03\eclipse\plugins. Then add a -dev option after -startup and --launch.library in the Eclipse.ini file:
-startup
...
--launch.library
...
-dev
C:\Users\XXX\eclipse\jee-2022-03\eclipse\plugins\jaxb-api-2.3.1.jar
This fixed the problem for me.

How to deploy and access a Java WebSocket endpoint on Heroku without any additional frameworks

I have followed this very basic tutorial for setting up a WebSocket endpoint in Java: http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HomeWebsocket/WebsocketHome.html
Heroku, however, expects me to rely on Play Framework: https://devcenter.heroku.com/articles/play-java-websockets
My question is: how could I deploy the same without any additional frameworks and what procedure should I go through in order to make things work?
The problem you had was this:
The tutorial you followed was made for the GlassFish Application Server but Heroku only supports Tomcat 8 and Jetty. See here: https://devcenter.heroku.com/articles/war-deployment
But don't worry, I ported and tested the tutorial to run with Tomcat 8.
I also added the glassfish implementation of the javax.json specification.
(Make sure to download the implementation and not the spec interfaces only)
You can find it here: http://central.maven.org/maven2/org/glassfish/javax.json/1.0.4/
I also noticed why maybe your index.html didn't work locally: I think it was because the WebSocket URL was hardcoded in the websocket.js file.
I have taken the liberty to fix this by making it dynamic.
Here is the complete NetBeans 8.0.2 project:
http://ray.hulha.net/WebsocketHome.zip
Here is the best way to create a war file from inside NetBeans 7 or 8:
There is one catch however, the Tomcat 8 on Heroku is missing the websocket addon.
But no worries, you can added it manually to the war file.
Here are the steps:
Download the Tomcat websocket addon here:
http://central.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-websocket/8.0.29/tomcat-embed-websocket-8.0.29.jar
The war file is really just a zip file. So I used 7-zip to open the war file. Then navigate to the WEB-INF/lib folder inside the war file.
Copy the jar into the war. Drag and Drop the tomcat-embed-websocket-8.0.29.jar into the lib folder of the war file inside 7-Zip.
Z-Zip will ask if you really want to copy the jar into the war file.
Say Yes.
Here is the compiled war file complete with the tomcat-embed-websocket-8.0.29.jar ready to deploy on Heroku:
http://ray.hulha.net/WebsocketHome.war
I used this command to deploy it:
heroku war:deploy WebsocketHome.war --app websockethome
Make sure to replace the app name in the end with your app name.
And here is the working result:
http://websockethome.herokuapp.com/
Heroku does not require Play framework to use Websockets. That is just an example. As long as your app from the Oracle tutorial binds to $PORT it should work.

How i can use AccounterLive java Project on my Server Tomcat?

i want to know how to run AccounterLive java project on my server?
there are no documentation (yet!) and i already tried to run using tomcat but it is not working.
project URL is: https://github.com/vimukti/accounter
WebSite is: https://www.accounterlive.com/
i hope to get idea how to run this project on my tomcat.
the documentation says
May be you do not need a guide to run a java project :smiley: Though we will add a guide soon.

Deploy java-application on tomcat

I have developed a java webservice application that I have been running on my dev-computer and in the meanwhile been setting up a dedicated ubuntu based linux server.
I have installed oracle-jre, mysql and apache tomcat 7 on this linux server and
after reading documentation I understand that I can either copy the deployed project archive (.WAR) or I can simply copy the project folder, into the servers /webapps/ folder from my development computer. Then restart tomcat7 and it should automatically run the webapp.
On my dev-computer with Eclipse IDE the webservice works properly as expected, but I cannot access the POST URL methods at all on the server
e.g. localhost:8080/Webservice/rest/account/login
(The installation on the server seems to be O.K as the Apache examples all work properly.)
I cannot see any logs in the /logs/ directory, in fact the folder is completely empty, so I cannot debug whats actually happening. Why aren't logs writing to the Catalina.out file?
Am I deploying this correctly as explained above?
Do I need to configure Eclipse or any project settings to reflect the change from the eclipse IDE / dev-computer to the server? E.g Is there any real difference?
A lot of questions there, but I wanted to clarify as much as possible,
Cheers,
Oliver
I fixed this issue by reinstalling tomcat.

alfresco tomcat not getting started

I downloaded alfresco CMS for java and i installed it but the tomcat installed by alfresco is not getting started. and thats why i cant use alfresco.
in event viewer log it says "The alfrescoTomcat service terminated with service-specific error 0 (0x0).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."
anyone has solution for this ????
It seems that unfit memory settings on the Windows Service can cause the issue you describe. To configure it, open the configuration window for the Alfresco service using (adjust the path accordingly):
C:\Alfresco\tomcat\bin\timcat6w //ES//AlfrescoTomcat
then on the Java tab try to adjust the values to fit your machine (e.g. you should not give the process more memory than the available physical RAM)
Sometimes it best to break out tomcat from Alfresco and to install Tomcat separately with version that installs Tomcat as a service. There are .exe installers for this.
Apache Tomcat can be found
https://tomcat.apache.org/download-80.cgi
After Tomcat is installed start it up in Services.msc, then validate if the Tomcat console comes up. http://localhost:8080, then deploy your alfresco war file.
I like this approach better since I can verify tomcat before I deploy Alfresco.

Categories