TomEE Intellij Idea: Remote deploy - java

I trying to deply my webapp on the remote server (VPS) using IDEA.
I done the following:
export JAVA_OPTS="-Dcom.sun.management.jmxremote=
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"
And now it's fine, "Connected to server"
But then I got exception:
[2014-11-10 03:00:44,431] Artifact MavenChat:war:
javax.ejb.EJBException: The bean encountered a non-application
exception; nested exception is:
org.apache.openejb.OpenEJBRuntimeException:
java.io.FileNotFoundException:
/home/denis/apache-tomee-webprofile-1.7.1/bin/C:\Users\Denis\IdeaProjects\MavenChat\target\MavenChat.war
(No such file or directory)
How can I fix it?
When I manually deploy my app, I
Built MavenChat.war
Rename it to ROOT.war
Upload it to /home/denis/apache-tomee-webprofile-1.7.1/webapps
IDEA configuration screen:
I'm sure I done it wrong "Staging"

Ok, I could not configure it, but I can deploy my app to my remote server using maven!
I followed this manual and it works!

Related

Error when running WAR file on Tomcat server

I built the WAR file of my application https://github.com/JonkiPro/REST-Web-Services. I put it on the Tomcat server and clicked START. Then he threw the error https://zapodaj.net/44f410f8abc74.png.html
FAIL - Application at context path [/WebApplication] could not be started
FAIL - Encountered exception [org.apache.catalina.LifecycleException: start: ]
java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:h2:mem:database
and wrote in the logs https://pastebin.com/7rWhPFLt.
I will mention that the application after compilation in IntelliJ works without a problem.
My application works on port 8443. I do not know if it matters. It seems to me that Tomcat has a database problem?

Problems with GlassFish using IntelliJ, deploy is not available

I've started using GlassFish 4.1.1 with IntelliJ and tried created a new J2EE project. The only thing I modified was the output message written out by the facelet.
Now deploying and thus connecting to the server doesn't seem to work.
The message:
Detected server admin port: 4848
Detected server http port: 8080
[2016-04-18 10:30:58,648] Artifact FirstEE:war exploded: Server is not connected. Deploy is not available.
java.nio.file.AccessDeniedException: C:\Program Files\Java\glassfish4\glassfish\domains\domain1\logs\server.log.lck
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:115)
at java.nio.channels.FileChannel.open(FileChannel.java:287)
at java.nio.channels.FileChannel.open(FileChannel.java:335)
at java.util.logging.FileHandler.openFiles(FileHandler.java:459)
at java.util.logging.FileHandler.<init>(FileHandler.java:326)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:99)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:192)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:228)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:124)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:322)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:366)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:300)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)
Attempting to start domain1.... Please look at the server log for more details.....
"C:\Program Files\Java\glassfish4\glassfish\bin\asadmin.bat" stop-domain --domaindir "C:\Program Files\Java\glassfish4\glassfish\
What I tried out:
Checking for any process listening to port 4848, there's none
deleted the standard domain domain1 and tried to create a new one, failed because the command asadmin is unknown.
added "asadmin" file from glassfish's directory to the PATH variable, still unknown.
Reinstalling GlassFish
GlassFish's and IntelliJ's version are are up to date
Has anyone an idea?
Problem was pretty trivial... Just had to run my IDE as an administrator because elseway IntelliJ had no access to the server log file and thus couldn't make neccessary changes in it.
Be sure to check out the other solutions I named in my questions though...
Have you tried to start IntelliJ with sudo permission?

Deploy war to JBOSS

I tried to deploy a Vaadin hello world application in JBOSS. The application is as simple as it can be.
My development environment is eclipse for java EE + tomcat
java.lang.RuntimeException: Error configuring property: includeWebInfInClasspath for WarClassLoaderDeployer
at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:112)
at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:85)
(...)
Caused by: java.lang.IllegalArgumentException: No such property includeWebInfInClasspath for bean org.jboss.web.tomcat.service.deployers.WarClassLoaderDeployer available [java2ClassLoadingCompliance, parentFirst, requiredInputs, filteredPackages, allInputs, deploymentRegistry, class, stage, wantComponents, componentsOnly, input, inputs, relativeOrder, output, useUnitName, outputs, topLevelOnly]
I have tried to google this error with no success.
Does anyone have any clues?
Is it a web server configuration or my *.war is missing something?
EDIT:
This error occur when I start the server after placing my *.war in the folder.
My JBOSS version is 5
I guess, you're using an old JBoss 5.
The WarClassLoaderDeployer is configured in the file server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml. (The 'default' directory should be changed to whatever you passed as -c parameter) Open the file, find the WarClassLoaderDeployer bean and drop the line defining the property with name includeWebInfInClasspath.

Unable in running Project from Tomcat to Glassfish server in Netbeans

I made a Java web project using Tomcat server.Now I am opening the same project in another PC where only Glassfish is installed(Due to some reasons I don't wanna run the project using Tomcat anymore).But it gives this exception now.
Exception during lifecycle processing
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unable to add listener of type: com.chat.listeners.ChatAppListener, because it does not implement any of the required ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener interfaces
Is there any warning when you opening the project in netbeans.Right click on the project , select resolve server missing problem.Choose Glassfish server.Run once again.
You have apache specific relations in your web.xml file (like file handler servlets).
That is why glassfish can't start your application.

FAIL - Failed to deploy application at context path /ROOT. Deploy plugin of jenkins failling to deploy

Attempting to set up jenkins and its container deploy plugin.
However, I am receiving the following stacktrace :
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to deploy [/myHome/jenkins/jobs/myAPP/workspace/target/ROOT.war]
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:187)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
at hudson.FilePath.act(FilePath.java:784)
at hudson.FilePath.act(FilePath.java:766)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:998)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622)
at hudson.model.Run.run(Run.java:1429)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Failed to deploy application at context path /ROOT
Which isn't really that helpful, I can deploy manually using tomcat manager, and also copying the war file across using command line options works. But i can not get the automated deploy to work.
I am using a tomcat url of http://localhost:8080/ and the deploy fails when their is no app currently deployed.
Any help gratefully received, thanks.
Just a wild guess but the ROOT context is not: /ROOT but rather / maybe there is something wrong in your config
Its a ContainerExc not fileNotFound; therefore the war file has been located.
URL should be http://localhost:8080
Is userName and Password provided?
Is this userName assigned a role of manager-script?
is the tomcat webapp cleared down once for work and temp folder?
If YES to above all, now run the tomcat without any war fiel present in the webapps folder and open a web broswer to see http://localhost:8080 is accessible.
Now whilst this tomcat running, build the jenkins job and deployment should be fine.

Categories