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.
Related
As of Payara version 5.2021.7 I can deploy my application automatically in docker on container start but it errors with Invalid ejb jar [my application]: it contains zero ejb.
However, I can log into the UI and deploy the application manually without any errors.
I'm pretty new to the java/payara world. Does anyone know why deploying it automatically requires an .ejb file but doing it manually doesn't?
The solution was to have the war file in the top level deployment directory ($DEPLOY_DIR) instead of having it nested inside another folder.
Background-I am trying to deploy a custom jar to the Tomcat 8.x lib("${catalina.home}/lib") folder. Per Tomcat documentation, it should be picked up when the server starts(via common classloader), and classes(from the jar) are made available to Tomcat and other apps deployed on it. However, I have an app deployed on Tomcat which is looking for the classes from this jar, but it fails with NoClassDef found error.
What I have done so far- I have tried to look at the classes deployed by using -verbose:class but am unable to find the class(es) from the jar. It appears that tomcat ignored the custom jar(yes- I understand all the classes are not loaded at the startup rather they can be 'found' using delegation pattern at runtime). To test that tomcat is working per documentation ie autoload from 'lib' folder, I threw in the ojdbc.jar in the same lib folder. Voila- I could see it loading some classes from the ojdbc jar(at this stage,my code doesn't need ojdbc.jar or classes from it).
Need help -- I am unable to understand why tomcat is ignoring my custom jar, while it deploys ojdbc.jar(at a theoretical level it is also custom as it is not bundled with tomcat) ?
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'm trying to run a simple Java EE app on jboss wildfly 8 server. I just by selecting Run on Server menu. but deployments folder is empty. browser shows error 404 not found by accessing address:http://127.0.0.1:8080/EjbTest/. Any idea?
Finally, I figured out what problem my ear file had. As EAR File Structure says, my ear file didn't follow the structure. after putting necessary files into .ear file, it worked with no problem.
I am trying run a Spring MVC based project via eclipse, but each time I try to access the app, getting following error:
WARN PageNotFound:947 - No mapping found for HTTP request with URI [] in DispatcherServlet with name ''
The strange part is, if I manually generate the WAR and copy over to the SAME tomcat installation and start the server manually, it works without any problem.
I have tried to "clean", "publish" again, change the tomcat webapps directory in "Servers" configuration, but no luck.
Any suggestion/idea in this regard highly appreciated.
Thanks!
properties -> deployment assembly -> make sure you have declared all the dependencies here to be included in the deployment war.
If you use maven, choose to include all maven dependencies.
And you need to add all projects you have in your workspace and used by your web project if any.