Jump to content

Recommended Posts

Posted

Hi

 

I'm trying to deploy a war-file created with Spring Boot, and I read these instructions (from 2017) https://www.helionet.org/index/topic/27458-how-to-deploy-war-on-heliohost/ where it said to create a topic here to "request for it to be deployed".

 

If this is not the current procedure I am sorry, the wiki-link in the instruction was broken, and I could not find any other instructions in the wiki.

 

So, here is the info:

  • Username: slimsim
  • WAR-file: ava-0.0.1-SNAPSHOT.war
  • Path: /home/slimsim/
  • Server: johnny

 

 

I have just received Java support and I would like to not loose it by not using it. I hope I still have time?

 

Now, if this war works, and it is deployed correctly, I have a fiew questions if that is all right:

  • What URL will the web-app get?
  • When I want to update the war, do I have to post here again or will it be automatic?
  • And where / how can I see the logs from the Java code?
  • And last question; is there any resent instructions for working with war's and spring boot?

 

 

Thanks so much for your support, I appreciate very much what you do and this service!

 

Best regards!

/Slim Sim

Posted

We implemented a way for users to deploy their own .war files since that post was made. I checked and it looks like you already have java enabled, so to deploy a .war you just need to

  • Go to https://johnny.heliohost.org:2083/frontend/paper_lantern/java/index.live.php
  • Click the upload button
  • Select the .war file from your hard drive to upload to /home/slimsim/example.war
  • Select the .war file from the dropdown menu if there are more than 1 .war file uploaded to /home/slimsim/
  • Click the deploy button
  • Wait patiently and refresh the page. For a new deployment, or if you change the filename of your .war file it can take up to 2 hours to deploy. If you submit an updated file with the same name as before it only takes a few minutes to deploy. If it takes longer than 2 hours let us know because there might be something wrong.
  • When your .war file is deployed it will show a URL link to the deployed .war
  • If it fails to deploy it will let you know and you can contact us for detailed error logs. We aren't able to provide direct access to the error logs because they contain information for all of the users on your server, and might contain other people's private information
  • Like 1
Posted

I have a question regarding this topic. I also got Java support and made deployment of one Java web application as a war file. It was made in Eclipse and I was also using Hibernete for mapping the database. On my PC i used tomcat 9.x server to start it. And here everything is working just fine untill it comes to communicating with the database, then i get 500 server error. Could it be because you are using 8.24 tomcat or I just didn't put the right link in hibernate.cfg file to MySQL database that i made on heliohost?

Posted

The most common cause of java not being able to connect to a database on Johnny is java trying to open 10 million connections. Java is not meant to be run on a shared hosting environment. It expects to be the only thing on the entire server, and as such it tries to use all of the memory on the server and all of the database connections available. Johnny is limited to 4 connections per user, so if your java app is trying to open 10 million it's going to get errors. You can prevent these kinds of errors by limiting your .war to only 4 connections. Another option is you could move to Tommy which currently has unlimited mysql connections. An even better option is to get a VPS https://www.heliohost.org/vps/ where java will actually be the only thing on the entire server so it can use as much memory and database connections as it wants to.

Posted

Hi

 

I managed to upload my war-file following your instruction, thank you!

 

I then preceded to make a few changes to the app, and they all work fin on my localhost. But when I deployed it said "Java deployment failed with errors. For further information please contact support" with a link to this forum. 

 

 

One of the changes i made was to add the following to my application.properties-file:

server.servlet.context-path=/ava-0.0.1-SNAPSHOT

But I changed it back and I still could not deploy the .war-file.

 

 

Now I am lost for ideas on what I might have done to make my app deployment fail. 

 

 

Is there any way you can help me, with logs or ideas? 

 

 

So, here is the info:

  • Username: slimsim
  • WAR-file: ava-0.0.1-SNAPSHOT.war
  • Path: /home/slimsim/
  • Server: johnny
  • Time of deployment: 2020-10-16, 9:44 PM (according to the File Manager, so I'm guessing Swedish time and not server-time?) 

 

 

Thanks so much!

Posted

 

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.slimsimapps.ava.AvaApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'badLogController' for bean class [com.slimsimapps.ava.badlog.BadLogController] conflicts with existing, non-compatible bean definition of same name and class [com.slimsimapps.ava.BadLogController]
        at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:152) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:132) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:92) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) [spring-web-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196) [catalina.jar:8.5.24]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.5.24]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) [catalina.jar:8.5.24]
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) [catalina.jar:8.5.24]
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.24]
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986) [catalina.jar:8.5.24]
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) [catalina.jar:8.5.24]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_262]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_262]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_262]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_262]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_262]
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'badLogController' for bean class [com.slimsimapps.ava.badlog.BadLogController] conflicts with existing, non-compatible bean definition of same name and class [com.slimsimapps.ava.BadLogController]
        at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:349) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:287) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:132) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:295) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:249) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:206) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:174) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
        ... 26 common frames omitted

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...