Java ee: Can't create ear project in eclipse using Tomee - java

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?).

Related

How to setup Struts 2 within existing Eclipse by maintaining other configuration?

I am a novice programmer in using Apache Struts 2 MVC Framework. I want to setup Struts 2 within my existing Eclipse IDE and I don't want to harm other different works I do in Eclipse. Here is a list of things I do in Eclipse and other related works:
I am currently using eclipse ide for Java SE developers.
Already using PDT: Eclipse PHP Development within existing eclipse for php projects.
Also using Eclipse CDT:C/C++ Development Tool within existing eclipse.
My computer contains LAMP installed with Apache2 server for web development purpose.
So, I want keep all of these things intact while setting up Struts 2 within existing eclipse. I've seen many installation guidelines for Struts 2, but they didn't clarify well about situation similar to mine.Therefore, before full installation, i want answers of these questions below:
Can I install Struts 2 in eclipse IDE for java SE (not EE) developers ?
Installing Struts 2 requires Apache Tomcat installation, will this installation create any conflict with my existing Apache 2 server (which comes with LAMP)?
Yeah, you need Eclipse for Java EE and Tomcat web server installed. There you can create a dynamic web project and use Maven to manage artifacts and download dependencies. See how to Create Struts 2 Web Application With Artifacts In WEB-INF lib and Use Ant To Build The Application
Tomcat server by default uses port 8080, but Apache uses 80, unless you use the same port for both they won't conflict.

Multiple applications with different grails versions on Tomcat

I am developing a new web application to be deployed on a tomcat server. There is another application running on that server with an older grails version (2.2.4). I don't want to upgrade it. Is there any issues to take into account while developing / deploying the new application (with grails version 2.4.4). They will run side by side.
Thanks for any help.
It depends where you have your grails libraries. If they are part of another application WAR file you will not have issues as you can pack your own libraries in your application WAR. Each application will use it's own copy of grail libraries.
But if you have your grial libraries as a part of system libraries of tomcat (eg. tomcat/lib ) you can have issues as those libraries are added in classpath for all applications.

Where to put property file in JBOSS 7 or Glassflish? (Best practice)

I have developed applications for JBOSS EAP 5 with eclipse. I placed property files under server-conf/conf/...
I am now developing in Netbeans (7.2). The bundled glassfish server is used for easier development. The target environment is JBOSS EAP 6. What is the best place to place property files? A common place for both environments would be great.
If you want to have them external to the application you'll probably have to write a custom module. This isn't as bad as it sounds, check out HowToPutAnExternalFileInTheClasspath.
See also migration-issues-to-jboss-7-1
The most practical solution is creating a custom folder outside both JBOSS and Glassfish (i.e C:\PropertiesFolder) then add this folder to the classpath of each server.
Please read my postfor more details about classpath in JBoss

Problem whille adding project into the websephere 6.1

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)

Resolving axis2 and OC4J library conflicts

I'm trying to deploy an Axis2 web service to an OC4J 10.1.3 app server.
I was using axis 1.4 before and had just created my own shared library with all of the files. There was an issue with 1.4 that was patched with 1.5 so now I'm using that but it does not include all of the libraries. This time I deployed the axis2.war to the OC4J server and I'm using the axis2 admin page to attempt to deploy my web service.
If I deploy a web service through axis2 then I'll get a java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude()Z but I cannot find the conflicting library. Axis2 has the new jax-ws libraries in it but I think it's an issue on the OC4J app server. I excluded xml.jar (since it has old JAXB 1.0 libs) and this resolves the issue on my local machine but not on the linux box.
I tried editing the deployment plan to search local folders first and this allows me to deploy the service, but when I try to access it, or the WSDL, then I get an error regarding a class cast exception and JXDocumentBuilderFactory (I don't have the exact error at this moment).
I compared the shared libraries on the linux box with the ones on my local machine and I used the same ones on each (I didn't verify the versions of each jar, though). If axis2 is deployed to OC4J and I deploy my service to axis2 then wouldn't I inherit the axis2 libraries (jax-ws, etc)?
Try removing the inherited library in conflict by adding this to your orion-application.xml:
<orion-application>
<imported-shared-libraries>
<remove-inherited name="PUT_HERE_THE_NAME_OF_THE_LIBRARY"/>
</imported-shared-libraries>
</orion-application>
More here: Removing and/or Replacing an Oracle Shared Library Imported by Default
Edit:
I searched the shared libraries and found that is not there, jws-api.jar is loaded at boot time and can't be removed easily:
Replace the OC4J JAX-WS Libraries
OC4J has preliminary support for JAX-WS, unfortunately this means that during OC4J boot it loads outdated JAX-WS APIs and implementation by Oracle. This occurs even before shared libraries comes into action, at a very early stage of OC4J boot.
Boot-time OC4J libraries are configured in boot.xml file in $ORACLE_HOME/j2ee/home/oc4j.jar bootstrap jar. To get rid of this:
1-Copy the jar file to ${oracle.home}/webservices/lib/jaxws
2-Unpack the OC4J.jar file
3-Locate META-INF/boot.xml
4-Replace path in this line with your jar:
<code-source
path="${oracle.home}/webservices/lib/jws-api.jar"
if="java.specification.version == /1\.[5-6]/"
/>
5-Repackage oc4j.jar (don't forget about MANIFEST.MF - use jar -m META-INF/MANIFEST.MF)
Original article: OC4J Configuration for Web Services

Categories