I am trying to use WebSphere v6.0 with Eclipse. When I try to add the runtime server for a Dynamic Web Project, I get the following error:
Missing classpath entry \your_server_root\was-6.0\properties
Why?
My thought? Add that entry to the CLASSPATH.
Another thought would be to ditch WebSphere and use Tomcat, JBOSS, or Glassfish.
Related
I am using weblogic 10.3.6.0 application server for deploying application . after
deploying one of the application which uses JDK8. at run time I got the following error.
java.lang.NoSuchMethodError: javax.servlet.http.Cookie.setHttpOnly(Z)V
contents of dependencies.gradle file are as follows
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
What would be the reason behind this error?
Cookie.setHttpOnly() is available since Servlet 3.0. You are deploying to WebLogic 10 which provides only Servlet 2.5.
Note that your project is compiling against an API dependency and not the actual runtime implementation. This is correct project setup, don't change it. However you must ensure that the APIs that you selected for compilation are provided in the runtime by deploying to the correct server.
As others have said, you are compiling against the wrong servlet jar for your version of weblogic. If you want to keep using weblogic 10 then you should change to
providedCompile 'javax.servlet:javax.servlet-api:2.5'
Once you do this I'm guessing you'll get a compilation error for Cookie.setHttpOnly().
Out of interest, why are you using weblogic? There's many free / open source servlet containers that are far better than weblogic. Weblogic doesn't conform to the same standards as the rest of the servlet containers.
I have a current install of Tomcat 8. I'd like to add EJB support to it. But when I searched online for how to embed OpenEJB into Tomcat, I only found TomEE results and nothing about plain Tomcat. I'd prefer not to have a dedicated EJB server running, but to instead run the EJBs on the same JVM as Tomcat and my application. How should I go about doing this?
The absolute best way to do that is just to download Apache TomEE, which nothing more than Tomcat with OpenEJB already embedded in it! :)
You can add tomee webapp into your tomcat (through server.xml is fine), ensure you have tomee-loader in common.loader through catalina.properties and add in server.xml org.apache.tomee.loader.OpenEJBListener in the server.xml Listeners.
I am trying to deploy a spring .war into jboss but am getting 404 errors. I know this has been asked before:
springBoot application on Jboss EAP, servlet context not lodaed
Spring Java Config vs Jboss 7
Cannot deploy Spring Boot on jBoss EAP 6.3.3
But I am very new (this week) to maven/spring/jboss, so may well have messed up. I tried what I understood from the various solutions above and none of them worked for me. Probably me messing up or missing something. So I thought I'd get the problem as simple as I can.
I took the code from:
https://github.com/spring-guides/gs-rest-service.git
And then work in the complete folder.
cd complete
mvn package
java -jar .\target\gs-rest-service-0.1.0.jar
And that all worked as you'd expect.
So then I followed the instructions here (http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file) to modify my code and pom.xml to produce a war file.
pom.xml http://pastebin.com/BiLWDskd
Application.java http://pastebin.com/par7rftz
I then mvn clean package and load the resulting .war file into EAP using the UI (http://i.stack.imgur.com/N7zxG.png).
So then in theory this should be the URL right
http://localhost:8080/gs-rest-service-0.1.0/greeting
I also tried
http://localhost:8080/greeting
But am getting the 404 error (http://i.stack.imgur.com/T6J6z.png) as described in the other questions. Nothing appears in the jboss console log at all after the .war is loaded.
So am I missing something? Do I need to write a jboss #WebServelet class to wrap around the spring stuff? Changes to my pom.xml? Should I not be using springboot, and just just pring framework modules directly? I note that in the EAP screen it does not show the class in the third column like it did with the jboss sample .war.
Remember I am new to this, so please explain stuff as if I'm a complete dummy (which I am).
Details of my setup:
OS Windows7 x64
java version "1.8.0_91"
Apache Maven 3.3.9
Springboot 1.3.3
JBOSS EAP 6.4.0
No IDE, using vim and command line
I encountered the same problem on JBoss EAP 6.4 / spring boot 1.5 and what fixed it was to add this property to application.properties
server.servlet-path=/*
as explained in this post : Deploying spring boot on JBOSS EAP 6.1
A simple tutorial you can follow (though he miswrote the property server.servlet.path )
http://code-adda.com/2018/06/how-to-deploy-spring-boot-war-in-jboss/
I am using Tomee plus as a server for my java ee project in eclipse. I am unable to create an ear project in eclipse as the option for target runtime does not have apache tomcat for option. The only runtime environments I see are:
Basic - which has J2ee runtime library
Jboss
Object Web
Just to clarify, I am able to create a dynamic web project with tomee runtime. The problem is creating an EAR project with tomee runtime. Any help would be appreciated.
I believe you need to install the JST Server Adapters Extensions. I believe this was only added recently (Mars?).
I am using IBM web-sphere 6.1 as a application server and eclipse as IDE. so i have one project name as MobileBank.ear which contain deployment descriptor file which has one module name as amsejb.jar which is ejb project and some jar files. so while adding MobileBank.ear into the server i am getting the following error " Web-Sphere v6.0 only supports J2EE 1.2, 1.3, and 1.4 Enterprise applications." due to this error i am not able to deploy my ear can anyone guide me please... also MobileBank.ear contains web project though i am not able to add the ear. Kindly Guide me...
Thanks in advance...
Vinod
I am using IBM web-sphere 6.1 ... Web-Sphere v6.0 only supports ... Are you sure you are using WAS 6.1 ?? May be this is what causing the problem
Well, 6.1 really doesn't support more than 1.4 and you're attempting to use newer versions.. You should
Edit the project facets in the project properties to utilize older versions
Not select 6.0 when generating the project as the target. That is used for the remote deployment etc. Eclipse does not really support 6.1/7.x deployment so please generate the generic projects instead.
i deleted the EAR folder ,created new Enterprise Application Project and added all project in that . error got resolved .
I am using WAS 7.0
U need to change the WebSphere Application Server version under Coniguration section while creating a project in Eclipse/RAD.
Then Dynamic Web module version will get changed from 3.0 to 2.5
While creating a dynamic web project,
-- On entering the "project name"
-- we have an option to check "Add project to EAR"
-- Enter the EAR name
-- choose the EAR version on of these - 1.2, 1.3, 1.4 and 5.0
On doing this, we would be able to add the EAR to WAS (I have been using v7)