Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Could not load resource "META-INF/ejb-jar.xml" in archive

 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear one and all,


We are getting below issue while building the code
We are using websphere 6.1 and Ant 1.8.1

Please help me.


o0748.02framework search path: c:\IBM\WebSphere\AppServer\deploytool\itp\pluginsorg.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceL
oadException: IWAE0007E Could not load resource "META-INF/ejb-jar.xml" in archive "C:\MNYL\build\ejbtemp.jar"
[exec] Stack trace of nested exception:
[exec] org.eclipse.emf.common.util.WrappedException: java.net.UnknownHostException: java.sun.com
[exec] at org.eclipse.wst.common.internal.emf.resource.EMF2SAXRenderer.doLoad(EMF2SAXRenderer.java:97)
[exec] at org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
[exec] at org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
[exec] at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1094)
[exec] at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:900)
[exec] at org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResourceImpl.load(CompatibilityXMIResourceImpl.java:259)
[exec] at org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl.load(TranslatorResourceImpl.java:388)
[exec] at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:249)
[exec] at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:264)
[exec] at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:390)
[exec] at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl.getMofResource(LoadStrategyImpl.java:347)
[exec] at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl.getMofResource(ArchiveImpl.java:731)
[exec] at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleFileImpl.getDeploymentDescriptorResource(ModuleFileImpl.java:61)
[exec] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.preprocessArchives(BatchExtension.java:3610)
[exec] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:295)
[exec] at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
[exec] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
[exec] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
[exec] at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[exec] at java.lang.reflect.Method.invoke(Method.java:618)
[exec] at com.ibm.etools.ejbdeploy.batch.impl.BootLoaderLoader.run(BootLoaderLoader.java:275)
[exec] at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute(BatchDeploy.java:99)
[exec] at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:83)
[exec] at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:313)
[exec] Caused by: java.net.UnknownHostException: java.sun.com
[exec] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:234)
[exec] at java.net.Socket.connect(Socket.java:543)
[exec] at java.net.Socket.connect(Socket.java:493)
[exec] at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
[exec] at sun.net.www.http.HttpClient.openServer(HttpClient.java:403)
[exec] at sun.net.www.http.HttpClient.openServer(HttpClient.java:521)
[exec] at sun.net.www.http.HttpClient.<init>(HttpClient.java:246)
[exec] at sun.net.www.http.HttpClient.New(HttpClient.java:320)
[exec] at sun.net.www.http.HttpClient.New(HttpClient.java:337)
[exec] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:822)
[exec] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:774)
[exec] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:699)
[exec] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:943)
[exec] at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
[exec] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
[exec] at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
[exec] at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
[exec] at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
[exec] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[exec] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[exec] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[exec] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[exec] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[exec] at org.eclipse.wst.common.internal.emf.resource.EMF2SAXRenderer.doLoad(EMF2SAXRenderer.java:93)
[exec] ... 26 more
[exec]
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could not load resource "META-INF/ejb-jar.xml" in archive "C:\MNYL\build\ejbtemp.jar"


And the obvious conclusion to be drawn from that is that (a) the JAR file "C:\MNYL\build\ejbtemp.jar" should contain a resource named "META-INF/ejb-jar.xml", and that (b) it does not contain that resource.

So I would look into the process which creates that JAR file (you mentioned Ant so maybe it has something to do with how you used Ant) and see why it fails to include that resource.
 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks paul.

I observed that jar file us creating and in jar file ejb-jar.xml is loading.
But I am not understanding where is the problem.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that error message can be misunderstood if you don't look at that stacktrace fully. What it's saying is:

Could not load resource "META-INF/ejb-jar.xml" in archive "C:\MNYL\build\ejbtemp.jar"
[exec] Stack trace of nested exception:
[exec] org.eclipse.emf.common.util.WrappedException: java.net.UnknownHostException: java.sun.com


So it could not load that ejb-jar.xml because (while reading that file contents) it couldn't connect to java.sun.com. This usually happens when the xml is being validated for its contents and the system where you are deploying this doesn't allow access to external sites. There are ways to fix this by having the xml validated against a local schema. You'll probably have to check the server's documentation to see how that can be done. Or if you are allowed to access the external sites then you'll have to check why this specific domain name isn't being resolved.

 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Jaikiran.

Jaikiran Pai wrote:I think that error message can be misunderstood if you don't look at that stacktrace fully.



Seriousli i didnot observed the stacktrace fully.
Now what is the problem with java.sun.com, is I have to configure any where this url.
Why its couldn't connect to java.sun.com because I type same url on browser but its working fine.


 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then that means your browser can connect to java.sun.com, but your process which is loading ejb-jar.xml cannot connect to it.

And that is likely because they are configured differently. For example, in my system my browser is configured to connect to the outside world (sucn as java.sun.com) via a proxy server. When I need other applications to connect to the outside world, then, I need to specifically configure them to use the same proxy server. This does not happen automatically.

You might need to talk to the people who manage your network, to help you figure out and solve that problem.
 
naga eswar
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really Thanks Paul ,

The problem resolved. Some jar files was missed in websphere lib folder.
Once again we installed websphere, now its working fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic