I am using Jboss openshift tool to deploy my java web application on openshift 3 . I cannot find the solution. I am using Eclipse Oxygen.
Error while publishing server webapp (Service) at OpenShift 3 (console.starter-ca-central-1.openshift.com). Could not sync all pods to folder C:\Users\user\eclipse-workspace\.metadata\.plugins\org.jboss.ide.eclipse.as.core\webapp_(Service)_at_OpenShift_3_(console.starter-ca-central-1.openshift.com)\deploy
Syncing com.openshift.restclient.capability.resources.IRSyncable$PodPeer#5a251b05 to com.openshift.restclient.capability.resources.IRSyncable$LocalPeer#3f786c11 failed: WARNING: rsync command not found in path. Download cwRsync for Windows and add it to your PATH.
ERROR: Error extracting file "./.git/objects/pack/pack-349c37438963079e19219bb573c32ec43515bc59.idx": open C:\Users\user\eclipse-workspace\.metadata\.plugins\org.jboss.ide.eclipse.as.core\webapp_(Service)_at_OpenShift_3_(console.starter-ca-central-1.openshift.com)\deploy\.git\objects\pack\pack-349c37438963079e19219bb573c32ec43515bc59.idx: Access is denied.
ERROR: Error extracting tar stream
Ignoring the following flags because they only apply to rsync: --exclude, --no-perms
error: error extracting tar at destination directory: open C:\Users\user\eclipse-workspace\.metadata\.plugins\org.jboss.ide.eclipse.as.core\webapp_(Service)_at_OpenShift_3_(console.starter-ca-central-1.openshift.com)\deploy\.git\objects\pack\pack-349c37438963079e19219bb573c32ec43515bc59.idx: Access is denied.
Related
I finally reached the point where my Elastic Beanstalk Instance / Environment got launched. (Java Corretto 11 Platform) Now it fails starting up the provided .jar file.
In the eb-engine.log file, I am not able to find any more error than this:
2021/05/27 11:36:25.889735 [INFO] Executing instruction: StageJavaApplication
2021/05/27 11:36:25.889871 [ERROR] An error occurred during execution of command [app-deploy] - [StageJavaApplication]. Stop running the command. Error: staging java app failed due to invalid zip file
The jar file is a Spring Boot application built with mvn -B package.
Locally the whole thing starts, but crashes afterwards because of not given environment variables (Expected behaviour).
But it seems AWS is not even starting the application..
Any suggestions on this?
Spring Boot apps run nicely on Elastic Beanstalk. However, you do need to set some variables. For example, have you set server-port variable to 5000?
And as you stated, to successfully use a Service Client, you can set environment variables for your creds. Here is an end to end walkthrough that shows how to successfully put a Spring BOOT app that invokes several AWS Services on Elastic Beanstalk.
Creating your first AWS Java web application
PS - your log file mentions a ZIP file. Be sure to create the JAR properly as discussed in the above example.
Just in case someone arrive here looking for an answer about this guy:
Error: staging java app failed due to invalid zip file
I was renaming my service jar in Gradle, using:
tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootJar> {
archiveFileName.set("service.jar")
launchScript()
}
And ElasticBeanstalk was not happy about the renaming.
When I let it have the default name, then no zip issues and all worked like a charm.
Trying to deploy/run a springbok application (jar) on Azure App Service, but seeing an "Application Error".
Application
We built the application using Springboot and wanted to deploy the prebuilt jar file (from /target" folder.
Azure Setup
Created a new App Service using Java 11
Under "Deployment Center" linked with the Github repository that holds the code and jar file under /target
Under App service > Configuration > General Settings > Startup Command
java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar
Logs
2021-05-05T22:25:23.730536337Z STARTUP_FILE=
2021-05-05T22:25:23.737427449Z STARTUP_COMMAND=java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar
2021-05-05T22:25:23.738113651Z No STARTUP_FILE available.
2021-05-05T22:25:23.738719652Z Running STARTUP_COMMAND: java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar
2021-05-05T22:25:24.003600232Z Finished running startup command 'java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar'. Exiting with exit code 1.
2021-05-05T22:25:24.004755134Z Error: Unable to access jarfile /target/lead-processing-0.0.1-SNAPSHOT.jar
Are we missing anything?
The problem that app service cant find your jar file.
Unable to access jarfile /target/lead-processing-0.0.1-SNAPSHOT.jar
I think when you deployed from target then you jar is possible in root. Go to App Service Editor inside of your app and check location for your jar
Removing the "/" right before the target works for me
netbeans unable to copy context xml file from AppData\Local\Temp\ folder to tomee's conf\Catalina\localhost when deploy.
already tried:
deploy to tomee 7.0.X is fine but tomee 8.0.0 fail.
fatal error in stderr.log:
03-Oct-2019 16:31:22.358 fatal [http-nio-9200-exec-6]
org.apache.catalina.startup.ExpandWar.copy Error copying
[C:\Users\xxx\AppData\Local\Temp\context2716699461818377726.xml] to
[D:\Tomee\apache-tomee-plus-8.0.0\conf\Catalina\localhost\myApp.xml]
java.io.FileNotFoundException:
C:\Users\xxx\AppData\Local\Temp\context2716699461818377726.xml (Access
is denied.) at java.io.FileInputStream.open0(Native Method) at
java.io.FileInputStream.open(FileInputStream.java:195) at
java.io.FileInputStream.(FileInputStream.java:138) at
org.apache.catalina.startup.ExpandWar.copy(ExpandWar.java:276)
This problem only occurs when Tomee is running as a Windows service.
I tested version 7.0.4~8.0.0 to get the following conclusions.
The Tomee runs the service with the LocalSystem account before version 7.0.6.
Starting with version 7.0.6, the service is run with the LocalService account, so that the permissions are insufficient.
The following two ways can solve the issue:
- Give the LocalService account access to the directory AppData\Local\Temp\.
- Specifying the Tomee runs the service with the LocalSystem account when installing the service.
service install %serviceName% --service-user LocalSystem
I am trying to create a simple RESTful web service on IntelliJ IDEA and I am now encountering the following error:
The content of element 'application' is not complete. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":initialize-in-order, "http://java.sun.com/xml/ns/javaee":module}
I believe these elements were not needed inside my application.xml before, then suddenly I encountered this problem when deploying.
I have the javaEEApplication and Web facets enabled in my project, the deployment descriptors seem to be set up correctly as well. I am referencing Jersey-2.2 as a library to use the RESTful services. My project also has GlassFish 4.1.1 - RESTful Web Service as a dependency.
I am using a Exploded artifact autogenerated from modules, and the run configuration is set to build then build artifacts. The credentials for the glassfish admin are correct.
I'm wondering why I am suddenly encountering this problem, I though that IntelliJ would auto generate any necessary content inside the deployment descriptor (application.xml) that it needed. Does anyone have any idea what I am missing? Perhaps I have to reference Java EE 6 or 7 as a library itself? I'm lost here.
Full error log below just in case:
"C:\Program Files (x86)\glassfish4\glassfish\bin\asadmin.bat" start-domain domain1
"C:\Program Files\Java\jdk1.8.0_77\bin\java" -Dfile.encoding=windows-1252 -classpath "C:\Program Files (x86)\glassfish4\glassfish\modules\javax.ejb-api.jar;C:\Program Files.....
[2017-02-05 03:16:49,423] Artifact CapstoneIntelliJProject:war exploded: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 8080
Attempting to start domain1.... Please look at the server log for more details.....
Connected to server
[2017-02-05 03:16:52,358] Artifact CapstoneIntelliJProject:war exploded: Artifact is being deployed, please wait...
[2017-02-05 03:16:53,536] Artifact CapstoneIntelliJProject:war exploded: Error during artifact deployment. See server log for details.
[2017-02-05 03:16:53,537] Artifact CapstoneIntelliJProject:war exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while deploying the app [CapstoneIntelliJProject_war_exploded] : org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 15; Deployment descriptor file META-INF/application.xml in archive [CapstoneIntelliJProject_war_exploded]. cvc-complex-type.2.4.b: The content of element 'application' is not complete. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":initialize-in-order, "http://java.sun.com/xml/ns/javaee":module}' is expected.. Please see server.log for more details.
"C:\Program Files (x86)\glassfish4\glassfish\bin\asadmin.bat" stop-domain domain1
Process finished with exit code 0
Waiting for the domain to stop .
Command stop-domain executed successfully.
Disconnected from server
Edit: I have solved this particular issue, having the javaEEapplication facet enabled for the project was a mistake, as it is only a restful web service. Now I face a new problem where the output is telling me Application [CapstoneIntelliJProject_war_exploded] contains no valid components. . The server log doesn't contain any useful information. I'm not sure what is wrong with my war, it seems to be configured fine.
I have solved the war exploded issue by recreating the war
I´m trying to work with eclipse and export my web apps made in netbeans, i just add a new server, download glassfish tools, and shows me an error:
Unable to start server due following issues:
Launch process failed with exit code 1
Launching GlassFish on Felix platform
ERROR: Error creating bundle cache. (java.lang.Exception: Unable to create bundle cache lock file: java.io.FileNotFoundException: C:\Program Files (x86)\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix\cache.lock (Acceso denegado))
java.lang.Exception: Unable to create bundle cache lock file: java.io.FileNotFoundException: C:\Program Files (x86)\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix\cache.lock (Acceso denegado)
any help?
I guess this is a problem with the access rights.
If the file cache.lock is in the folder which is mentioned in the error message, you should check if it is in use by another process.
Even if you start Eclipse as Administrator, it may not start Glassfish as Administrator.
To fix the problem, you can move your Glassfish installation to a folder where you have write access without the Adminstrator account. Update the location of the Glassfish installation in Eclipse. This should make it work.
Check if cache.lock is being used/if it currently exists.
Check if glassfish is currently running.