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.
Related
I was wondering how can you deploy a Jar file that contains a self-contained app (grizzly) with Jersey framework to AWS Elestic Bean, I've been trying to deploying it by choosing the genereated jar file. But Beanstalk always throws an error. I haven't been able to make it work on AWS. I'm compiling the example that comes with the artifact jersey-quickstart-grlizzly. Any guide of how to do it will be more than welcome!
What i've done so far
Create an instance of AWS Beanstalk.
Set as platform JAVA.
Choose as source a JAR generated by maven build
Deploy.
Once it finishes, it says that the health has been changed to Degraded. That's all.
Update:
Looking for the error 502 I found a suggestion that says that I should run it by command prompt and see what happens. I have forgotten to add the main class attribute in POM. However, it's still showing the same message.
Perhaps, do you have any example of a working example with grizzly that I can deploy to AWS and use for getting started?
After some research I finaly found that the problem was the Port. Perhaps, someone else face this issue because the lack of experience with Java an those frameworks which is my case.
Build your jar as usual an then:
Go to beanstalk.
In the beanstalk intance where select the environment.
Click on the configuration section and edit "Software"
Add a property called SERVER_PORT with value 5000*.
This will redirect to the right port.
I have made a small maven based web application in VSCode and trying to deploy it on JBoss using the Redhat Server Connector Extension.
But the hot deployment of the class files does not work in simple running JBoss server.
But Hot deployment does work in debug mode as 'Hot Code Replace' by setting the property 'java.debug.settings.hotCodeReplace' to 'auto'.
My inputs are from below links:
https://devblogs.microsoft.com/visualstudio/hot-code-replacement-for-java-comes-to-visual-studio-code/
and other SO links like:
How do I get Java "hot code replacement" working in JBoss?
Hot deploy on JBoss - how do I make JBoss "see" the change?
But it couldn't help.
Can you suggest something more about how it is simply possible in running JBoss?
(PS: Auto Build feature in VSCode is already enabled.
And It works fine in eclipse).
Hot deployment of web applications in VSCode's integrated RedHat Server connector can occur in following ways:
Exploded war folder: A folder is extracted from the original war and deployed to JBoss using the Exploded option. Here, the static changes like change in jsps and HTML are automatically reflected in the running application.
Hot code Replacement: Hot code replacement (HCR) is a fast debugging technique in which the Java debugger transmits new class files over the debugging channel to another JVM.
HCR only works when the class signature does not change; you cannot remove or add fields to existing classes when using HCR. However, HCR can be used to change the body of a method.
(source: https://devblogs.microsoft.com/visualstudio/hot-code-replacement-for-java-comes-to-visual-studio-code/)
Maven Install/build: It is actually not a preferred technique which someone will want but it is useful also. In this technique, you run maven: install which builds the project again and install it onto the server again.
Currently, VSCode for java and the server connector extension are new as compared to already available IDEs like Eclipse. So, we might expect more powerful functionality in coming future.
Sorry if this is the wrong kind of question but currently I have an Apache server which is configured for Pyjamas. All I used to have to do was: pyjsbuild example.py and the GUI would appear in my browser.
I decided to switch to Java, so I picked Vaadin as my framework. How do I do the equivalent for Vaadin? All I want to do is compile the java and have Apache recognise it.
I'm using linux and I'm very new to building web applications, previously I only ever built the GUI side of things, I never had to touch the server.
You need Apache Tomcat to serve java pages. Install it separatly or see http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html for information on how to hook them together.
Vaadin projects work just as any web project. You have to crate a WAR file.
For example, if you are using Eclipse, right-click on the project, choose "Export..." and under "Web" choose "WAR file".
If you are using Netbeans or something else, google "create war in netbeans/intellij/..." to find out how to do this step.
This will generate a file with the extension .war, which you will have to copy in the "webbaps" folder of your Tomcat installation. Restart Tomcat and the application will be automatically deployed.
If you do not have access to the webapps folder, go to Tocatmcat's "Manager App" in the browser and
under the section "Fichier WAR à déployer"(WAR file to depploy) choose the generated file and click Deploy.
To start with, make sure that go through Getting Started chapter in Book of Vaadin. In this chapter you will find overview of the required toolchain and step-by-step installation instructions. Your Linux distribution might have more documentation about installing JDK (For example, see Ubuntu wiki for Oracle JDK installation).
It will be convenient for you to connect Tomcat to Eclipse IDE. This makes starting Tomcat and updating your application easy. For example, see this [blog] for some videos about connecting Eclipse to Tomcat.
Please note that using Eclipse is just one approach and later you might want to see if IntelliJ IDEA or command line works better for you.
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.
I'm trying to pack my Java Azure project in Mac and I cannot find the source code for cspack.exe. So far, I've managed to run Azure Eclipse plugin and successfully created a project but when trying to deploy it cannot run cspack.exe.
I've downloaded Windows Azure Tools and seen CsPack.cs up to the following lines
// Run CsPack to generate the package
ProcessHelper.StartAndWaitForProcess(
new ProcessStartInfo(Path.Combine(AzureSdkBinDirectory, Resources.CsPackExe),
args), out standardOutput, out standardError);
And I don't really know if this component it's open source or not.
If cspack.exe is proprietary, is there any way to simulate cspack.exe. I know it compresses the project to a zip file but I could use any documentation.
cspack.exe is not open source. It will is packed into the Azure SDK which can be downloaded and installed. There is something Open Source like jJack said, but this is only the API which can be used in a Java, .NET or whatever program, to get access to your configurations, mounting a cloud drive or something else.
The eclipse plugins is using a cspack.exe.jar, which is a commandline wrapper for the original cspack Application.
Azure SDK for Mac can be downloaded Azure SDK. Don't know if the Eclipse plugin is capable to work on Mac yet.
It looks like WindowsAzure4j is open source so if this is what you are using then you are in luck. I would try downloading This and look for the full CsPack.cs file, maybe you can glean the source of the problem from it?