How to use ClassPath defined in META-INF/MANIFEST.MF in an EAR
Hi,
We have an EAR Shared Library (Name = AA) deployed in Weblogic. EAR contents are like ->
APP-INF/lib/directoryA/<<50 JAR Files>>
META-INF/MANIFEST.MF --->> Has Class Path to above JAR files, Spec Version, Impl Version etc
META-INF/application.xml
META-INF/weblogic.application.xml
This EAR is deployed as Shared Library, and our EJB (name = BB) refers to this EAR. Now the problem we are facing is that the JARs are not reachable by EJB BB. If we restructure the Shared Library project so that all the JARS are under APP-INf/lib/ directory, we are able to access the JARS from EJB BB. (This means that we are referring the shared library correctly, using "library-ref" tag correctly.
Is there a way we can specify EJB BB to look for CLASS PATH as present in the MANIFEST.MF file of the Shared Library ??
Thanks,
WebLogic specifies a separate classloader for the APP-INF/lib directory that is why it gets loaded
When you have some.jar file placed in an arbitrary directory, for example, somewhere. You can either
use application.xml, for example,
<application ...>
<module>
<ejb>EJB.jar</ejb>
</module>
<module>
<web>
<web-uri>Web.war</web-uri>
<context-root>MiddlewareMagic</context-root>
</web>
</module>
<library-directory>somewhere</library-directory>
</application> Or by using the manifest Class-Path entry option which requires adding a META-INF/MANIFEST.MF file with the following contents:
Manifest-Version: 1.0
Class-Path: somewhere/some.jarMore information on class loading and application packaging can be found here: http://middlewaremagic.com/weblogic/?p=6725
Similar Messages
-
WEB-INF/lib (.war) Vs META-INF/MANIFEST.MF (.ear)
What are the Class loading differences between libraries that are in a web application web-inf/lib and that are in class-path entry of META-INF/manifest.mf of a ear.
I recently developed a web services application with a ejb endpoint.Then
packaged it in a ear file with the classpath entry .The problem occured when I placed the weblogic.jar(and other third party jars) in the ear file which my ejb.jar uses as utility jar's. Jboss starts behaving weird.Some of the classes of jboss are overwritten and class cast exception errors started coming up.
Overnight I changed the application to a servlet end point and placed all my jars in the WEB-INF/lib then everything started working smooth.
Can any body help me , understand what is happening. Why doesn't j2ee have something like META-INF/libWhat did you do to resolve this issue .. I'm having the exact same problem.
What a nightmare.
I found approximately 40 forums on this topic (and
there are probably more), but noone has the definitive
answer!
Here's the problem....
My servlet uses a utility class that resides in some
other jar. That jar is then placed into the
WEB-INF\lib directory of the WAR which in turn goes
into the EAR. This is supposed to be all that is
needed in order for the utility class to be found on
the classpath.
In fact, if you run the war in Tomcat as a standalone
WAR it does in fact find it.... its when in an EAR
deloployed to app server that the problem arises.
I have had no luck with using any combination of
putting the jar ANYWHERE in the EAR or WAR no matter
if I specify the Class-Path: in the manifest(s) or
not.
I thought maybe that I was missing some config in the
application.xml or web.xml but I couldn't find
anything to support that.
Maybe its dependent on the app server? I am using
Orion, but the same problem can be found on J2EE RI
release 1.3
Work arounds:
1. Simply put the utility jar in the lib directory of
the server you're using
2. Add an ejb module to the application.xml naming the
utility jar as the ejb jar. Of course this is NOT an
EJB jar and error messages/warnings will appear
accordingly, but on Orion at least, it will load the
classes needed... hooray!!
Anyone got a definitive answer? -
How to use user-defined packages in JAX-RPC web service
I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
package supercomputer;
import Hello.*;
public class SuperImpl implements SuperIF
public String sendParam(String data)
Temp ob=new Temp();
int i=ob.get1(10000);
return data+"returned by supercomputer";
Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
[echo] Running the supercomputer.SuperClient program....
[java] java.rmi.ServerException: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
[java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
[java] at supercomputer.SuperClient.main(Unknown Source)
I dont know if it deploys why it gives error on client side.
Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
Please guide me in doing that.
Thanks,
FarrukhFarrukh,
I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
As I already said, I have doubts that your error should be originated from a missing class from your package, but:
-try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
-try to see if you can access your endpoint through your browser to see if there is a online status
-display your config/WSDL file, and the steps you did to build your web service.
regards,
Pedro Salazar. -
WAR meta-inf/manifest Class-Path jars use which classloader ?
If using an expanded EAR structure, my Web App requires some utility classes. I
can either put these in my :-
meta-inf/manifest.mf
Class-Path : utility.jar
OR
web-inf/lib
can contain the utility.jar
Is there any difference in terms of which classloader is used to load these classes,
the EAR/EJB classloader or the Web App child classloader ?
What is recommended ?If have found out the answer myself by testing it :-
A jar in the meta-inf/manifest.mf e.g. Class-Path : utility.jar
will be loaded by the EAR/EJB level classloader
whereas
web-inf/lib containing utility.jar
will be loaded by the Web App level child classloader.
Dimitri Rakitine <[email protected]> wrote:
I have this question too - it appears that 6.1sp2 attempts to use Class-Path
in jars in WEB-INF/lib - what this Class-Path: is supposed to do ???
Pete <[email protected]> wrote:
If using an expanded EAR structure, my Web App requires some utilityclasses. I
can either put these in my :-
meta-inf/manifest.mf
Class-Path : utility.jar
OR
web-inf/lib
can contain the utility.jar
Is there any difference in terms of which classloader is used to loadthese classes,
the EAR/EJB classloader or the Web App child classloader ?
What is recommended ?--
Dimitri -
How to package log configuration into META-INF folder of an SDA
Hi all,
I work with Developer Studio 2.0.20. After some struggle I managed to configure my DCs by a a deployed log-configuration.xml.
I use a "Portal Application Standalone (Packed in SDA)" DC to package and deploy. The created SDA contains a META-INF folder and a PAR file. If I copy the log-configuration.xml file manually into the META-INF folder of the SDA then the log-configuration.xml is used by the server.
Now, my problem is, that I did not manage to have the log-configuration.xml automatically included in the META-INF folder of the SDA. Does anyone now how this can be accomplished with Dev Studio 2.0.20?
Thanks for your attention,
--StefanYou may add any .txt file as add manifest file or you click the "edit manifest" toolbar button to add comtent for manifest file...
it will create meta-inf folder automatically.
At least the tool can save lot of your time. -
How to use user defined object with linked button
Hi experts
Can I use user defined table data with linked button. If yes then how. plz give me sample examples.
Regards
GorgeIf you have an UDO in your form, or any other, the FormDataLoad eventhandler should be used.
Take care, it is not inside the eventhandler.
for VB:
Select SBO_APPLICATION in the classes, and select FormDataLoad event
Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
in C#
Add a new eventhandler as
// declaration
SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(ref SBO_Application_FormDataEvent);
// eventhandler:
public void SBO_Application_FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent) -
How to use custom defined Alerts of 5.0 system in CRM 2007
Hi there,
does any body know how to modify the custrom alerts that are there in CRM 5.0 version into CRM 2007 version. If so, please advice me.
Thanks,
Sreekanth
Edited by: Sreekantha Gorla on Feb 22, 2008 4:40 PM
Edited by: Sreekantha Gorla on Feb 22, 2008 4:45 PMHi
It appears that you are using winClient and based on what I read I figure you're almost there, but you must still update the CIC Framework accessed via the following transaction, CRMC_CIC_FW_MAINTAIN . In order to complete the settings you must add the alert modeler component ID to the Hidden Framework. Finally, since you create a custom class you must
assign that class to your defined meta model. Scroll all the way to the bottom under the Function section and add your class to this list. See example below.
</function>
<crbcomp>cl_crm_cic_crb_ia_scripting</crbcomp>
<crbcomp>cl_crm_cic_crb_am_test</crbcomp>
<crbcomp>cl_crm_cic_crb_wsm</crbcomp>
<crbcomp>cl_crm_cic_crb_1o_maintain</crbcomp>
<crbcomp>cl_crm_cic_crb_ib_nav</crbcomp>
<crbcomp>cl_crm_cic_crb_locator</crbcomp>
<crbcomp>ZCLASSNAME</crbcomp>
</content>
Regards
Manohar -
How to use self-defined class in a jsp page
Hello:
I defined a class for displaying purpose, which is in the different folder(WEB-INF/classes) from my JSP page.
In my JSP page, I want to create an instance of my class and display something, while I get the following error: "
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 12 in the jsp file: /htmls/templateIntro.jsp
Generated servlet error:
[javac] Compiling 1 source file
/home/jiao/jsp_webserver/tomcat/work/Standalone/localhost/syllabus/htmls/templateIntro_jsp.java:72: cannot resolve symbol
symbol : class Display
location: class org.apache.jsp.templateIntro_jsp
Display display=new Display(out);"
How can I solve this problem? Should I redefine my classpath or there are some other actions I should take.
T.I.A.
Oriental SpiritHere is what I have done:
1) in Display.java, add one line "package tools;" on the top, and compile it to
create Display.class.
2) create a new folder at
/home/jiao/jsp_webserver/tomcat/webapps/syllabus/WEB-INF/classes
named tools and then put the Display.class into the newly created folder.
3) in my jsp page, add " import="tools.*"
But it still doesn't work.
Any ideas? T.I.A. -
How to use pre-defined scenarios for RosettaNet with XI 3.0
Hi all.
I am working in Comgroup Shanghai co. ltd. which is partner of SAP China.
We have a potential customer who use RosettaNet as their Supply Chain EDI system.
I would like to make a demo for demostrate the pre-defined scenarios for RosettaNet RNIF 2.0 packages.
Where can I find such guideline ? I have checked the article: implementing RosettaNet with XI 3.0, but it cannot help me.
Another question is how I can develop my own scenarios for the RNIF standards which are not included in XI RosettaNet business package ?Hi Andy,
See the instructions below after you installed the RosettaNet STK.
Below given is the sample config for PIP3B2 Scenario. Part I is using STK and Part II is using 2 XI systems.
<b>Part I. Test Using STK</b>
In your XI ID:
1) Define both the parties 1) Shipper(Your Partner) 2) Receiver(Your company) with identifiers like DUNS Number.
2) In ID goto>Tools>Transfer Integration Scenarios from IR-->select the scenario "PIP3B2_Receiver" from the drop down list.
3) Follow the 4 steps in the config wizard.
4) While creating your CC, create it from the channel template delivered with the RosettaNet BP.
4.1) Specify the URL for STK which should be in the following format
http://<STK Server>:<port>/rosettanet/servlet/listenerServlet?userId=<Party Name>
4.2)In the location fields, enter your location and your partner location.
In your STK
1) Start the RosettaNet STK.
2) enter the UserID<Partner Name in XI>
3) Select the Test Scenario, 3B2V01.01-AdvanceShipmentNotification-0001-Scenario-Shipper
4) Enter Global Business ID(DUNS Number) and Location ID for both the partners. These fields should be same as in your R/3 Party configuration.
5) Enter the URL as follows:
http://<XI Server:<J2EE_Port>/MessagingSystem/receive/RNIFAdapter/RNIF
If everything is configured correctly as mentioned, you should be able to test your single-action scenario.
<b>Part II Test using another XI System</b>
For these follow the steps above for XI Config.
Configure one XI System as PIP3B2 Shipper using the Scenario "PIP3B2_Shipper" and config wizard as mentioned above.
Configure the other XI as PIP3B2 Receiver using the scenario "PIP3B2_Receiver" and config wizard.
In the Url field, specify the URL as follows:
http://<XI host>:<J2EE_Port>/MessagingSystem/receive/RNIFAdapter/RNIF
Hope this helps.
Regards,
Sam Raju -
How to use globally defined variable in SQ01
Hi,
I have created one InfoSet using SQ02. In that I have declared some Additional Fields. These Additional Fields are of type String , so I have declared thses fields in DATA Section of Code of Infoset as it is not possible to define a custom field of type string.
Now I have to add these fields to Field Groups, so that I can use them in queries (SQ01).
Can anyone plz tell me how to add these fields in Field Groups?
Thanks.
Edited by: hrishi_k126 on Sep 23, 2010 9:46 AMHello,
Please, ask this kind of questions in the e-business forum.
Francois -
How to use custom defined tags in uix in jdevloper 10g production
can any one give me sample application for how to work with custom defined tags in uix with jedevloper 10g production
thanks VenkatHi Venkat,
Maybe the reason for no one answering is because of lack of information in your post? What are you trying to do? Are you using JSP or UIX XML? Have you checked the online jdeveloper documentation? Have you checked the doc available in the JDeveloper release? Before we have more information we can't help you. Sorry
Thanks,
Jonas
JDev Team -
How to use user defined exception class
Hi all
I just need som help with creating a user defined exception class.
Im writing a small/simple text editor.
My exception class looks like this:
public class myExcp extends Throwable
private String message;
public myExcep(String message)
this.message = message;
public void display()
System.out.println(message);
I would like to use it when a user tries to open a exe-file instead of a txt file.
Here is some code from the editor:
if (e.getSource() == open)
saveOld();
if (fc.showOpenDialog(null)== JFileChooser.APPROVE_OPTION)
readFile(fc.getSelectedFile().getAbsolutePath());
saveas.setEnabled(true);
So, should I use exception here or at the readFile method?
readfile:
private void readFile(String fileName)
try
String tmp = fileName.substring(fileName.length() -4, fileName.length());
if (!tmp.equals(".exe"))
FileReader r = new FileReader(fileName);
textarea.read(r, null);
r.close();
currentFile = fileName;
label.setText(currentFile);
changed = false;
catch (IOException e)
JOptionPane.showMessageDialog (this, "Cannot find the file " + fileName);
Where and how do I use my exception class.
Do I need to create an instance? Where?
Should the exception class extend Exception instead?
Thank you in advance /Extend Exception, not Throwable. It's a checked exception that way.
Follow the Sun coding standards and make that exception class name start with a capital letter.
When you extend Exception, override all four ctors.
What's that display method you added? Isn't getMessage() good enough?
You need to create a new instance just before you throw the exception, of course.
Sounds like a terrible design, by the way. Exceptions shouldn't be used like "go to" for app logic. They should signal unrecoverable conditions. You can easily recover from the situation you've described simply by displaying a pop-up that tells the user to open only text-readable file types. I think that's a better solution.
% -
How to use classpath in appletviewer????
i need to pass
c:\jdk 1.41\lib\tools.jar
as classpath to appletviewer, there is a space char after jdk in path above.
how?????????????????????????????This should be fine (doesn't mean it is)
Why do you have an applet which uses this library? -
How to use user defined function in select query using Toplink
Hi Friends
I am little bit of new in Toplink stuff... so please help me...
I have to database functions 1. encrypt and 2. decrypt.
I want to exceute the following sql query using toplink
select port, database, user_name, decrypt(encrypt('String which is to be encrypt ','password'),'password') from CONFIGURATION
can anyone tell me , how to write code in toplink which will give the about sql output.
thanks .....The "Specifying a Custom SQL String in a DatabaseQuery" section in the TopLink Developer's Guide may help... http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b28218/qrybas.htm#BCFHDHBG
-
How to use user defined contact fields in the intelligent group builder
In Apple Contacts it seems not being possible to build an intelligent contact group using an user defined, additional field. The builder seems to work exclusively with a system defined selection of the basic database fields. Please, tell me, that there is a way ...
Please, can sombody out there help?
Maybe you are looking for
-
Quick question. Im thinking about upgrading to the new ilife 09 mainly for garageband. I was wondering if i will have a problem importing projects ive been working on in garageband4.1 to garageband 09. i just have a concern as far as any effects i ha
-
Itunes 11.2.2.3 registry settings used by itunes drivers are missing?
Already uninstalled and reinstalled. Added upper and lower filters but still CANNOT burn cds.
-
Oracle workflow notification mailer configuration error
hi, i am trying to setup oracle wf notification mailer and trying to put a test email address so that all the emails go to that email address. but getting following message, FAILURE: javax.mail.SendFailedException: Sending failed; nested exception is
-
After migrating Data from one 11g server to a new one, restart SOA EM, error persists background: background server is still reporting: "<Warning> <oracle.integration.platform.blocks.event.saq> <SOA-31013> <Error handling message (rolling back). java
-
[SOLVED] No sound after installing/uninstalling gnome
I thought I'd give Gnome a try again after a year or so away from it using bspwm, just to remind myself of it. Once it was installed though my sound no longer worked within bspwm. Uninstalling it with pacman -Runs left me with no sound still. I then