cancel
Showing results for 
Search instead for 
Did you mean: 

Error in deploying, EAR file does not contain SAP_MANIFEST.MF

Former Member
0 Kudos

I just upgraded to SAP Netweaver Developer Studio 7.1 from 7.0, and the process of creating and deploying an EJB archive seems to be quite different. Here are the steps I am following:

(1) I create and build an EJB Project called foo.

(2) Export the EJB Project foo as an EJB JAR (not sure if this is necessary)

(3) Create an Enterprise Applications project called fooEAR, with target runtime set to SAP server. When I am prompted for J2EE Modules to add, I select foo (created in step (1)).

(4) Export the EAR project fooEAR as an EAR file. When I am prompted for which EAR application I choose fooEAR.

(5) Try to deploy the EAR created in (4) using Deploy View -> External Deployable Archives -> Add, then choose the fooEAR.ear as the target. But I get an error message:

Wrong SDA/SCA archive

Error while loading archive ...

Archive has no entry META-INF/SAP_MANIFEST.MF

I looked inside fooEAR.ear, and there is no SAP_MANIFEST.MF file. How can I create an EAR that has such a file ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Colm,

actually, this is not the typical way of developing and deploying J2EE applications with the new version of the developer studio. As you might have heard, this version of developer studio adopts the Eclipse's WTP (Web Tools Project) for J2EE development. So, the procedure you should follow is:

1. Create an EJB project and develop your beans.

2. Then create an Enterprise application project, and add your EJB project to that.

3. To deploy it, you should open the Servers view (Window -> Show View -> Servers).

4. Right-click on SAP Server and choose Add and Remove Projects.

5. Select your Enterprise application project.

6. then right-click on SAP Server and choose Publish.

The latter action triggers first build of all projects (i.e. your EJB and EAR), and then deploys it on the server. Going through this build procedure, the SAP_MANIFEST.MF, as well as other metadata files (things you should not care about explicitly) will be generated.

For more details about the WTP tools, as well as deployment, you can open the Welcome page of the developer studio and find the docs on the topic.

Hope that helps!

Former Member
0 Kudos

Hi Ivaylo,

thanks for this very helpful answer, I tried the steps

you suggested, and they work perfectly, except for one

detail; in step 6, the jar file does not get put into the

EAR, and the deployment aborts with an exception,

stating that :

Caused by: java.io.IOException:
The following archives that are
described in the ear descriptor are not found in the ear: 
     foo.jar,
Please check the ear content.

Earlier on in the log, there is a message which suggets

that the publish step was not actually able to create the

ear:

Caught exception during access of 
archive "C:tempFoo.ear":
java.lang.RuntimeException: 
ERROR: Cannot initialize EARReader: 
com.sap.engine.services.deploy.exceptions.BaseIOException:
 Cannot convert EAR tempFooEAR.ear to J2EE 1.3.

When I manually create the EAR file by doing an export on

the EJB project, that creates an EAR file that does

include the jar. Am I better off using SDM to deploy that

EAR (the one created via export)?

Many thanks,

Colm.

Former Member
0 Kudos

Hi Colm,

really strange behavior...

One thing I could see in the error log looks strange to me:

"...Cannot convert EAR tempFooEAR.ear to J2EE 1.3."

What kind of EAR do you deploy (i.e. J2EE version compliancy)? This version of the developer studio (with the WTP toolset) is intended for J2EE 1.4 development...

Errors aside, let's try an alternative way to deploy. Are you successful in exporting either the EJB Jar, or the EAR files as a result of the steps you perform? If yes, you could load this EAR, or EJB JAR, file in the Deploy View, and deploy it. To do this, you should use the "Import J2EE Archive" button of the Deploy view. This allows you to load any J2EE 1.4 compatible archive and deploy it on the server.

Note here, that this is different than the "Add element" button you used at first place, where the system expects that the archive you loaded is an SAP deployable unit (i.e. has some SAP metadata as the SAP-MANIFEST.MF for example).

Let's see if it works this way.

P.S. You cannot use SDM tool as this one is not available in the new release. It is completely replaced by the Deploy View tool.

Message was edited by: Ivaylo Ivanov

Former Member
0 Kudos

Hi Ivaylo,

to answer your first question, the EAR that I am trying

to deploy gets created as part of the publish step. When

I look in the application.xml file of this EAR I see a

version attribute with value of 1.4 in the application

tag, can we assume that this implies J2EE 1.4 compliancy?

One thing about this generated EAR is that it does not

include any java code (VM or otherwise). When I generate

the EAR by hand (by exporting the EJB project as an EAR

file there is a JAR for the actual java code put in

there, but when generating the EAR via publish there is

only some xml and manifest stuff put in the EAR, with the

result that it's only 2KB or so in size. I have specified

a J2EE module dependency from the Enterprise Application

project to the EJB project, but is there something else I

need to do to ensure that the java code (jar) gets

included in the EAR of the Enterprise Application when

attempting to deploy via publish?

Thanks for the other suggest, "Import J2EE Archive".

However, I am having difficulty locating this button.

When I look at the "Deploy View" window I see on the left

the Workspace and External Deployable Archives trees,

and on the right there are "Setting for Updating

SCAs/SDAs" radio buttons, as well as "Error Strategy"

radio buttons, but no "Import J2EE Archive" button.

Thanks for the info about SDM by the way, I was wondering

why I was not able to launch it (there is still a remote

gui shortcut, which should probably go away).

Former Member
0 Kudos

Hi Colm,

the button in question should appear right <b>above</b> the the Workspace and External Deployable Archives trees.

regards,

Ivaylo

p.s. starting today, I'll be away for 3 weeks, and will not be able to answer if you have further questions. Hope anyone out there can jump in as well.