FAQ Database Discussion Community


BeanCreationException: Error creating bean with name: Injection of autowired dependencies failed;

java,spring,java-ee,jetty,war
I am getting the following error stack when trying to deploy a war using a jetty server I have written. INFO : jetty.StartJetty - starting jetty using war file ..\serialisation-preview-service\target\serialisation-preview-service-1.3.0-SNAPSHOT.war SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/username/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in...

Java Debug won't unfold the WAR file On windows with netbeans

java,file,netbeans,war,tomcat8
I have a little complicated problem to explain; I have a project that I write on Netbeans that will be used as intranet application. It was a dynamic web application. And it has some File.IO operations in it . My aim is create some files on the directory where index.html...

Is there a maven property for the exploded war directory?

java,maven,war
Is it possible to get the directory ${project.build.directory}/test-1.0-SNAPSHOT for my project? I have to exclude certain files from this directory for a fortify scan and I just realized that when the version changes so does this directory. Is there a property I could use to replace the name of this...

Deploy multiple WARs on Tomcat

spring-mvc,tomcat,war
How to make it possible to deploy deploy multiple WARs on Tomcat one of which is ROOT and how to passed the requests to corresponding application. like: / - main app /appA - app A /appB - app B How to make the main app skip urls /appA and /appB...

Editing Folder content in tomcat manually?

java,html,apache,tomcat,war
I have a WAR file called ROOT.war where I uploaded into Tomcat few days back. There I have few "public" HTML pages like index.html, about.html etc. These pages has no connection with the programatic part of the application, instead containing a link for login.jsp. Now, I need to change the...

How to Shuffle/Deal a deck of cards in GUI

java,user-interface,war,shuffle
Hello everyone I am currently making a GUI. It is going to be the card game called war what I am trying to do is split the deck randomly between the user and the computer. I have made three arrays one for you computer and the full deck and I...

how to generate a checksum for a war file in maven

java,maven,war
I have inherited a project which uses a maven pom file to build the .war file and we have a request to generate a checksum of the .war file, so my question is, can this be done in the maven pom file? and what plugin if any is needed and...

How to deploy tika-server-1.7.jar on tomcat

apache,tomcat,war,tika
How to deploy tika-server as WAR file, under a servlet container Tomcat? I prefer to deploy without using in maven.

How to load properties files dynamically when using servlet with war file?

java,properties,jboss,resources,war
I'm using JBoss AS 7. How can I use properties files which I download everytime(with translations) from an external folder? I'm deploying the servlet as a .WAR file and I want to use these properties files from a random temp folder from the disk. How do I that ? The...

How to deploy (and access) SpringBoot war with Tomcat? (using Getting started guide)

tomcat,spring-boot,war
How can I create (and access) a deployable war based on the Serving Web Content with Spring MVC guide? It feels like the steps have all succeeded but then when trying to view the page, a 404 error is returned... possibly I am just trying to access the wrong url?...

Ant: Unable to get Ant to copy properties file to classes directory

java,ant,build,war
I have a project which I can build and deploy correctly using Ant I want to build a war file to deploy the project. I can get everything working except I cannot get the properties file to appear in the classes directory. My properties file is located here: /h/a/A/I/S/src/Serv/log4j.properties This...

Grails war command: what happens behind the scene

java,grails,war
I know that in Grails framework, you can build a war file using grails war(builds a production war) or you can build a environment-specific war file using grails test war Now, what I am having trouble understanding is, if I build a war file using grails war but deploy it...

spring-boot war fails on startup

java,gradle,spring-boot,war,gretty
I am trying to make a web-service using spring-boot with gretty. It works well when calling appStart in gradle, but it would show error when calling appStartWar. This is the error: Exception in thread "main" java.lang.ClassNotFoundException: com.example.server.Application at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at...

Log4j external file loading - multiple war

java,log4j,war,wildfly
i have multiple web applications (multiple war) in one instance of wildfly. Each web application read its log4j.properties file called webapp1.log4j.properties stored in WILDFLY_HOME/standalone/configuration directory when start with servlet called by: <servlet> <servlet-name>LoadPropertiesServlet</servlet-name> <display-name>LoadPropertiesServlet</display-name> <servlet-class>it.h2h.smart.identity.servlet.LoadPropertiesServlet</servlet-class>...

Is war file equivalent to executable or object file like in c?

jboss,war
Is war file generated after linking or before linking? Does it undergo linking at the deployment phase on the server?

Concise way to include a file in a war with a different name

java,build,gradle,war
Right now, to include a developer dependent file in a war, I copy it in a temp directory, rename it and then include it in the war : war { copy { from "run_"+System.getProperty('user.name')+".properties" into "build/tmp" rename ("run_"+System.getProperty('user.name')+".properties", "run.properties") } webInf { from('build/tmp') { include "run.properties" } } } It...

How can I specify “Context path” on Tomcat 8 inside META-INF/context.xml in java war file?

java,tomcat,war,tomcat8
How can I deploy mywebapp-1.0.0.war to $TOMCAT_HOME/webapps directory with context path /mywebapp using context.xml inside the war file on Tomcat 8? I'm getting back to Tomcat since version 5. I'm used to create META-INF/context.xml inside my war file: <?xml version="1.0" encoding="UTF-8"?> <Context path="/mywebapp"> ... </Context> Maven creates a war file...

Starting .war file from another war in Tomcat 8

java,tomcat,war
Is there a way to start/stop .war file from inside another .war? I'm running SymmetricDS server using Tomcat 8 (it deploys it's own .war) and I need to start it, when a button is pressed and Stop likewise. Can I do that? ...

Where is a proper place to add class files for maven war project?

java,eclipse,maven,war
The class files I want to add are given as a library, and I don't have the source codes. I tried put them in WEB-INF/classes but it doesn't seem to work in my eclipse maven environment. If possible, I want the class files left as they are, without packaging them...

Only generate one war during package

maven,war,jhipster
By default JHipster generate 2 wars during the package phase (your_project_version.war & your_project_version.war.original). The first one is the executable jar and the second is the war you can use in a servlet container. Is there a way to only generate the 'original' war. The executable is not required for my...

JBoss REST WS application doesn't work when deployed as WAR file but works when expanded to a folder

web-services,jboss,war,web-deployment,resteasy
I am deploying an application on JBoss server (EAP-6.4.0, JBoss Web/7.5.7.Final-redhat-1). I get a very strange behavior. Let's say the application is called Engine.war. The application implements a REST Web service server. When I deploy the application by copying the WAR file to c:\EAP-6.4.0\standalone\deployments\Engine.war file, it is successfully deployed, but...

Deploy vaadin 7 war file in EC2

amazon-ec2,tomcat7,vaadin,war,vaadin7
I'm trying to deploy a Vaadin 7 example.war file in tomcat 7, using an EC2 server. I upload the file to /var/lib/tomcat7/webapps but then when I go to myIp:8080/example it doesn't find the resource. Any idea why? Thanks!...

Wildfly not starting a deployable war file

gradle,spring-boot,war,wildfly
I have a Spring Boot application that uses Spring Integration to do some SFTP polling... I am trying to follow this guide to package a jar file and deploy it as a war file to a wildfly 8.2 application server. I am using a gradle plugin that only allows the...

(Java)How to change picture(War Card Game)

java,swing,user-interface,war,playing-cards
Ok what im trying to do is make a image called hidden and it will be a card face down. Now I want to make it so the image will change to a face up card and what i tried to do was make a image for six cards three...

Spring Boot war file works with embedded but not with standalone Tomcat

spring,tomcat,spring-boot,war
I want to create a war file from a Spring Boot application, which I can deploy to a standalone Tomcat container, not using the embedded one. I can create the war file and run it on its own using "java -jar pdfjs-annotator.war" and it works fine. I built the application...

How can I create and deploy Spring Batch jobs in Spring Batch Admin UI

spring,war,spring-batch,web-deployment,spring-batch-admin
I have back end Spring experience however, I don't have great experience deploying applications on web containers (for e.g Tomcat). I was able to run Spring Batch Admin using Eclipse STS tools. However, after following this I was somehow confused on how to create my own spring batch application and...

Using War plugin but without creating an archive

gradle,war,build.gradle
I'm trying to get Gradle to handle the deployment of a very large Web application. In the past when we used Ant, instead of creating a very large .war file, we would simply assemble all the code in one folder--libraries, .jsp's etc--and then scp them to the deployment destination. This...

Visual VM for profiling an application running on Tomcat

java,tomcat,war,visualvm
I have apache tomcat 7 running on local and a web application deployed as .war file to this server. I am trying to use visual vm to profile the application but so far I am only able to profile tomcat itself. I am able to see everything about tomcat in...

Is there a way to get a deployed war from a running Liferay?

liferay,war,portlet
A version of a portlet I'm working on is already deployed to liferay. Is there any way to get that originally deployed war from a running liferay instance? This is so I could hot-deploy my version and shortly deploy the old version. The original was deployed by Jenkins. Liferay 6.1...

Benefits over using an EAR vs. WAR?

java,java-ee,war,wildfly,ear
We're deploying our JavaEE 7 application on Wildfly 8. Previously, we've packaged all of our enterprise applications (WAR, multiple EJB JAR files) as an EAR. However, with JavaEE now allowing you to package EJBs in a WAR file (or as a JAR within the WAR's WEB-INF/lib) we're wondering if there...

Proper folders structure for web application

java,maven,intellij-idea,war
I have a question - I created a war-package of the web-application (using Maven). The archive includes everything excepting jsp-files and resources. I know that Maven tracks only src/main/resorces and the proper solution is to keep jsp/css/xml in this directory. I develop in IntellijIdea and it has another folders structure...

Missing libraries in side jars

java,maven,jar,build,war
I have 2 maven projects: 1 a jar with different dependencies and a war that include all that jar. When I look inside the created Jar I dont see any library folder. And when I look in to the War I only see the libs that the war is using...

Tomcat won't deploy an application due low java heap memory

java,tomcat,java-ee,deployment,war
I want to deploy my .war (cca 55MB) application to apache tomcat 7 application server, nevertheless the deployment fails. When I try to deploy some smaller .war archive (cca 4MB), it finishes without any problem. I've tried to increase java heap space and now it should be quite enough. Moreover...

How to copy folder contents recursively in gradle zipTree?

file,build,gradle,war
copy { from zipTree(rootDir.getPath() + "/archive.war") include 'dirAbc/subdir/' into 'src/dirEfg/subdir/' includeEmptyDirs = false } I am trying to copy a folder and its contents (including subfolders and their contents), from a war file to a local location. I have almost got what I want. The problem is the above leaves...

Deploy war file in a grizzly server

java,war,grizzly,java-war
I have spent a few days on this and I still did not find an answer (i did find questions asking for this) I am coding with java, using a grizzly server (2.3 version) and I've managed to work with many kind of resources (restful classes, java servlets etc). URI...

Upload WAR file to an FTP server

java,web,war,filezilla
I've just finished a web project, working with Struts2, and now I want to add this project to my FTP site. The site runs smoothly on Tomcat 8, but I am not sure how to deploy it to an actual site. How do I add this .WAR file that has...

Cannot Find Application Mobilefirst

war,mobilefirst
I have deployed the war file project in context path /example . Also i have uploaded the .wlapp and adapter in worklight console. Where do point my application Build path to work in different server? Should i point to /example war file path? This is my reference on: http://www-01.ibm.com/support/knowledgecenter/SSHSCD_6.3.0/com.ibm.worklight.deploy.doc/devref/t_transporting_the_app.html...

Package Java classes under WEB-INF folder in WAR file

java,ant,war
I am using the following to package war file in ANT script <target name="war" depends="compile"> <war destfile="${deploy.dir}/vms_war.war" webxml="${web.dir}/WEB-INF/web.xml"> <fileset dir="${classes.dir}"> <include name="**/*.class"/> <exclude name="test/**/*.class"/> </fileset> <fileset dir="${src.dir}"> <include name="**/*.xml"/> </fileset> <fileset dir="${web.dir}"> <include name="**/*.jspx"/> <include name="**/*.jsp"/> <include name="**/*.html"/>...

Openshift context path

java,tomcat,openshift,war
I have deployed the war into tomcat 7 Openshift . Everything is fine and its running .Myappp Here is my mapped web application. I am storing images in the dir webapps->docs->images But When I upload the image (with UI) it doesnt appear on site and I cant even find where...

Deploy war file fails

ruby-on-rails,war
I am working on a system with two servers. When updating a site i deploy a war file to each server. It worked on one but on the other when i go through the process the war file creates the ROOT folder but its owner and group is root whereas...

log4j2 does not work with tomcat

java,tomcat,log4j,war,log4j2
I have a Web Application delpoyed to the Tomcat Server. It has to log something to a file. When I do the same from a standalone application, it works (logs to file, to console, whatever), but nothing happens from Tomcat. Here's my configuration file: <?xml version="1.0" encoding="UTF-8"?> <Configuration status="info"> <Properties>...

Spring boot war file deploy on Tomcat

tomcat,deployment,spring-boot,war
I use Spring Boot 1.2.4.RELEASE with gs-rest-service source file. I got: 127.0.0.1 - - [18/Jun/2015:09:59:25 +0300] "GET /gs-rest-service-0.1.0/ HTTP/1.1" 404 1021 There are no other exceptions in Tomcat logs. I have read related questions, but my test doesn't run. Spring Boot War deployed to Tomcat I have read howto-create-a-deployable-war and...

Cannot start a war with a tomcat

tomcat,war
does anyone could start that war with a tomcat? https://docs.google.com/file/d/0B5FiAsl5yGbZcV9rZDBrVS1IcDA/edit I put the war in webapps, startup.bat, http://localhost:8080/org.cap.editor.jsp/edit.html in browser but I get an "NetworkError: 404 Not Found - http://localhost:8080/org.cap.editor.jsp/edit.html" it's missing the edit.html? If anyone can start this, please tell me how, thanks!...

Making a java project, using MongoDB, run on remote server (ssh)

java,mongodb,ssh,jar,war
I'm trying to make a java project run on a remote server. I've used Maven and the project uses a Mongo database. I've got access to a home directory on a remote web server. MongoDB, Tomcat and java are installed so the only thing I have to do is to...

Missing dependencies in war. Gradle build project

java,gradle,war
I've a war project build by gradle. And I've a string in gradle.build file: compile 'log4j:log4j:1.2.17' But thereis no any log4j.jar in resulting WEB-INF/lib directory in myproject.war file. But all other libs defined in "compile" configuration are there. Why so strange behaviour, is it a bug or some kind of...

Tomcat or JBoss hosting 1 webapp with multiple websites

spring-mvc,tomcat,amazon-web-services,war
I want to have 3 websites, all with distinct public domain names but they all share a common java back-end SpringMVC server and use common static web resources like js and css files. Rather than maintaining the UI code in 3 places, I'd rather run 1 server and deploy 1...

How to read an internal file in a web project

java,servlets,war,web-deployment,dom4j
All, Forgive me I am still learning the Java development right row. Say we have the structure of web project like below. The src and config is under the Java Resources folder of web project. src ... |- a.b.c.package |-test.java ... config |-1.xml |-2.xml ... configfolder |-1.properties |-2.properties testfolder |-test.properties...

JPA functionality in a deployed WAR on Tomcat

java,eclipse,tomcat,jpa,war
I'm working on a project which aims to allow a user to add some film details to a database and displays the list of existing films. I have created a Dynamic Web Project in Eclipse using JPA to communicate with a remote database. All of this works fine when I...

Intellij and Apache Tomcat not updating

intellij-idea,war,tomcat8,intellij-14,intellij-idea-14
I have a project going on for a couple of months now using a Spring MVC framework. For developing I am using an Apache Tomcat 8.0.17 with an exploded war file. Everything worked well since yesterday. Now when I change my Java Files the changes are no longer visible. I...

bean creator function not called when packaging into war in spring application

java,spring,war
I have a spring REST application, which works fine if ran using mvn exec with embedded tomcat (beans get created fine, @Autowired works as expected, etc.). If, however, I create a WAR using mvn package and deploy it into an existing tomcat, some bean creator functions do not get called....

Displaying version and date of build in the xhtml page from manifest in run time

maven,glassfish,manifest,war
Enumeration<URL> resources = getClass().getClassLoader() .getResources("META-INF/MANIFEST.MF"); //Can't find resource name META-INF/MANIFEST.MF ?...