I have a multi-module java / maven application that I'd like to run on openliberty in dev mode (mvn liberty:dev). The application is structured as follows:
root
\ejb
\ear
OpenLiberty is looking for dependencies in the \ejb\target\classes folder on application startup but not finding the dependencies because they are not there. However, they do exist in the \ear\target\classes folder.
I think liberty should be looking in \ear\target\classes for its dependencies. This is because the maven build compiles them into the ear, not the ejb jar.
I assume the correct fix for this is to tell liberty (somehow) where to find the application dependencies (that live in \ear\target\classes not \ejb\target\classes).
Does this sound like the correct fix and does anyone know how to tell liberty to look for the dependencies in the correct location?
As a side note, I am getting the message
[WARNING] CWWKM2179W: The application is not defined in the server configuration but the POM configuration indicates it should be installed in the apps folder. Application configuration is being added to the target server configuration dropins folder by the plug-in.
On openliberty startup.
This is even though the absolute path to the ear file is specified in server.xml in the ear file like so:
<enterpriseApplication id="my-app"
type="ear" location="C:\Users\ absolute path to my app"
name="my-app" contextRoot="/" />
I am additionally wondering if this log warning might be related to the trouble I'm having.
Here is an example of the messages I am getting on startup:
[INFO] [WARNING ] SRVE9967W: The manifest class path myjar-SNAPSHOT.jar can not be found in jar file file:/c:/my-app/ejb/target/classes/ or its parent.
If it looked in
file:/c:/my-app/ear/
I think I'd be good.
Related
My jenkins job is building successfully but while deploying i need to take it from the custom path. I tried various version for providing the custom path but it always gives either "No wars found. Deploy aborted" or "java.io.IOException: Expecting Ant GLOB pattern, but saw '{$jenkinsHome}\customwar\mytest.war'."
I am using Deploy to Container plugin but tried with below fileset as well but it is also giving no wars found error.
{$jenkinsHome} - replaced with absolute path of jenkins home directory
Can you guys let me know how to pick war file from custom path in jenkins deploy to container plugin.
Repository - https://github.com/wso2/product-apim
Branch - 2.x-dependency-upgrade
Recently, While working with WSO2 API Manager, I found that some war files are generated and deployed.
To experiment with the war files, I deployed them on tomcat server. Deployment doesn't work and gives Error creating bean with name 'cxf' defined in class path resource META-INF/cxf/cxf.xml.
Detailed Error Log : https://gist.github.com/anonymous/4c2378967ffcc1bb7a9bb475507120e9
.war file location: \product-apim\modules\distribution\product\target\wso2am-2.2.0-SNAPSHOT\repository\deployment\server\webapps
I tried to play with dependencies but with no change in error status.
Why does these war files work well with the WSO2 standalone server, but not with the tomcat server ?
How could we resolve the dependency issue ?
First of all, don't use 2.x-dependency-upgrade branch, which is a temporary one. Use 2.x branch instead.
Those war files need dependencies coming from carbon platform. (You can see lots of NoClassDefFoundError errors in the log) So, without those, they won't be working properly.
I'm using IntelliJ IDEA Ultimate 14 and I want to deploy a web project to a tomcat server within IntelliJ.
In the Project Settings -> Artifacts, I defined a "Web Application: Exploded" from my web project. In the output panel of this artifact I get META-INF folder of my web project along with other web resources.
When I started the tomcat server the first time, IntelliJ built and deployed the exploded war to tomcat and my web application worked just fine. But if I restart the server, I get an exception
java.io.IOException: invalid header field
I looked at the output of the exploded war and I found that IntelliJ generated somehow a MANIFEST.MF in META-INF that overrided the original file of my project. Moreover this generated MANIFEST was truncated which caused the invalid header field exception.
How can I prevent IntelliJ from generating the MANIFEST.MF or is there any way to make the generated MANIFEST valid?
In fact the MANIFEST.MF is generated by the maven-war-plugin in a parent pom.
I can override the value of the generated MANIFEST.MF by configuring the archive of the war. documentation of the configuration: http://maven.apache.org/shared/maven-archiver/index.html.
Good morning,
I'm trying to deploy a spring application on a local tomcat, using generated jaxb classes. The classes are contained in the build directory build/jaxb/archifant/wsdl in a subproject.
When I try to run the application on server, I get the following error:
error reading file D:\eclipse_rio_workspace\rio\06_Development\archifant-communication-for-spring\build\classes\jaxb
D:\eclipse_rio_workspace\rio\06_Development\archifant-communication-for-spring\build\classes\jaxb (access denied)
I followed the getting started guide: https://spring.io/guides/gs/consuming-web-service/ and use gradle as build tool. The subproject is set up as a dependency. How do I solve this? I checked file permissions and classpath of tomcat.
To me this looks like tomcat is trying to read a directory as file?
"Solved" it by moving the generated classes into a package in the source folder.
I've build a spring-based web project in Eclipse using Maven. Dependencies and class path are correct and the deployment assembly also lists spring-web*.jar correctly. However, when I deploy it using WebSphere 8 from within Eclipse the mentioned JAR file is missing from the created libs folder under .metadata.plugins\org.eclipse.wst.server.core\tmp2*\WEB-INF\lib . This JAR however is listed under the module section as a submodule for the container. I wasn't able to find out, why this JAR is listed there and why it is not copied to the LIB folder.
It works with a Tomcat server, it works when I export the WAR and deploy it manually and it also works when I manually copy the JAR to the lib folder.
Q1: Is this specific to Websphere?
Q2: Why is SPRING-WEB listed as submodule and what effect has this?
Q3: How can I automatically deploy it correctly?
This seems to be a bug in WAS as reported here
You can either copy the missing JARs manually or you can use the "Run server with resources on server" option in the "Publishing settings for WebSphere Application Server" server settings.