Deploying a third party API in a J2EE application.

Hi there
I have a small J2EE applicaion made up of EJBs, servlets and JSPs
packaged and deployed as an EAR file in WebLogic 6.1.
I'd like to make use of a third-party API (that is packaged as a JAR
file) from the servlet and EJB components within the application, but
am a little confused as to where to place the JAR file.
I've tried placing it in the WEB-INF/lib directory of the WAR file,
the servlets found the library successfully but the EJB components
threw ClassNotFoundExceptions.
I've tried placing it in the EAR file at the same level as the WAR and
EJB JAR file, ie:
App.EAR
/application.xml
/EJB.JAR
/WEB.WAR
/LIB.JAR
but then the servlets were unable to find it.
Finally, I tried placing one copy in the WEB-INF\lib and one copy as
described above in the EAR file, but still - the EJBs were unable to
find the library.
Unfortunately, the API needs to be configured on a per-application
basis, so placing a reference to the JAR file in the CLASSPATH when
starting WebLogic is not an option.
Any one encountered or solved this kind of problem before ?
Kind regards
Eea

Hi Eea,
There are many articles in the Internet talking about
packaging of j2ee compenents, for example:
http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html
And, you may try to put your 3rd party API into weblogic
classpath in your startserver command file...
Regards,
Slava Imeshev
"Eea" <[email protected]> wrote in message
news:[email protected]..
Hi there
I have a small J2EE applicaion made up of EJBs, servlets and JSPs
packaged and deployed as an EAR file in WebLogic 6.1.
I'd like to make use of a third-party API (that is packaged as a JAR
file) from the servlet and EJB components within the application, but
am a little confused as to where to place the JAR file.
I've tried placing it in the WEB-INF/lib directory of the WAR file,
the servlets found the library successfully but the EJB components
threw ClassNotFoundExceptions.
I've tried placing it in the EAR file at the same level as the WAR and
EJB JAR file, ie:
App.EAR
/application.xml
/EJB.JAR
/WEB.WAR
/LIB.JAR
but then the servlets were unable to find it.
Finally, I tried placing one copy in the WEB-INF\lib and one copy as
described above in the EAR file, but still - the EJBs were unable to
find the library.
Unfortunately, the API needs to be configured on a per-application
basis, so placing a reference to the JAR file in the CLASSPATH when
starting WebLogic is not an option.
Any one encountered or solved this kind of problem before ?
Kind regards
Eea

Similar Messages

  • Third Party API with Tomcat and Axis

    I'm experimenting with creating web services in Java. I'm using tomcat and axis for this. I have successfully created and deployed some basic web services and now I want to create one using a 3rd party API. I follow the same exact procedure and when I deploy the service I check my list of deployed services through the axis page, but all my services have disappearred. Commenting out all 3rd party related methods does successfully deploy the service. Is there anything special/extra I have to do to get 3rd Party classes to function correctly in a web service?
    Thanks in advance

    what kind of third party API are using ?

  • Third Party APIs in Java Language which doesnot use JavaMail APIs

    Hi Pals,
    Is there any third party java mail APIs available which doesnot using Sun JavaMail APIs? The third party would have its own APIs which does not use javax.mail. I have to code in Java Platform so if the APIs are java based its nice and useful to me.....
    Thanks & Regards,
    Prakash

    ksp wrote:
    Hi,
    I am using Javamail APIs to send mails. Sometimes Mcafee blocks the mails and its not allowing javax.mail package. Thats why i would like to go for some other third pary which uses their own APIs......What makes you think a third party API would be less prone to interference by McAfee?
    Edited by: sabre150 on Jun 18, 2009 10:39 AM
    :-)

  • Third party API within DC project

    Hi,
    We are using a JSF web project for online account management for CRM.
    We need to use a payment gateway API for which I have created a new external library DC project and a corresponding EAR.
    I am able to build the project successfully.
    It also recognizes the API classes however it fails at one particular call where the API internally calls a class from an embedding jar/package XMlLabel ?
    If I comment out that call it does not result in any exceptions.
    This API works just fine in a Java application.
    I came across this forum and it looks like a similar issue. But I am unable to figure out how to fix this in a DC project.
    Please let me know if anyone has any idea.
    Thanks,
    Veena.

    I was referring to this forum
    Unable to call third party API within Spring- Spring Forum

  • Design Approach For Integrating Third Party API's

    Our application requires a lot of third party API's to be integrated with the application.
    What would be a good design approach for the same
    Ritesh.

    I think maybe you should post a little bit more info: What kind of APIs? C++? java?

  • How to use third party APIs with Sun J2ME Toolkit

    I've installed Sun J2ME Toolkit 2.1. If I intend to use other third party APIs with my existing toolkit, how do I do that. I can manage to get the jar file of the associated API classes, but how to integrate the same with the toolkit. Thanks in advance to all who support.

    if I remember right, it is enough, if you put the .jar of the api in the lib/ directory of your project (<WTK>/apps/<yourProject>/lib/ )
    hth
    Kay

  • Precompiled third party API usage

    Hi,
    I have a question related to the compile and run time behavior of the java objects.
    I have written a class which is using third party API classes. The third party API is compiled using the older version (say JDK1.2) version of java. Now I compile my developed class with JDK 1.6.
    When we compile a java file which is using the third party API classes, does the byte code hence generated contains the references of the API classes used or somehow it include the byte code of these classes in the newly compiled classes' bytecode? If the byte code of the API classes gets inserted into the newly generated class, does the third party class will also be compiled with the JDK1.6.
    Actually I am trying to migrate my application from weblogic 8.1 to weblogic 10.0. The higher version of weblogic require the java files compiled using JDK 1.5 or higher versions. Since the third party APIs are compiled using the previous versions of JDK so I am getting a bit skeptical whether this will work or not. If at all, this will work (with the old API classes) than how?
    Thanks in advance,
    Amit Singhal

    I would say to (at least attempt) to get new versions of the librarires.
    In any case, the only byte code that shows up in a classfile is created from the code in that class definition (excpet for some references to static final variables, but that can be overlooked for now). Nothing from those "libraries" will be inserted into your newly compiled classes.
    Now, as far as those libraries functioning under a new JVM (with such a large version disparity) is questionable. Technically they should, but I would neither count on this, nor expect them to be effecient even if they do function.

  • OATS OTM Third-Party API/Interface?

    Hello,
    I am an Oracle employee and an automation tools developer in a large testing group and we are investigating if OATS OTM has the internal/public interfaces that allow us to update/create test cases and/or update/create test results for test execution that are not wui/gui type applications. Essentially, testing outside of OATS OTM and the OATS integrated testing facilities. I have scoured the available documentation but there is no indication or it is not clear that any such third-party API/Interface exists to perform such tasks.
    We are VERY interested in using the OATS OTM as a central testing repository but nearly all of our testing do not include wui/gui application testing, mostly cli/custom/firmware/non-OS/cross-platform testing. We are interested in transitioning from our existing test repository software, which is not an Oracle product, and moving to OATS.
    Any help in this area would be greatly appreciated.
    Thank you in advance,
    Robert

    Hello everyone,
    I'm also looking for a API that is exposed from the OATS.
    Thanks,

  • Is it a third party API for creating table in J2ME?

    I am a newbie to J2ME and i would like to know that whther is there any third party API for creating table in J2ME beside using Canvas to draw the table? Please help...

    its not the "L shape" that holds it better rather the higher GAUSS rating on the older connector.
    Apple redesigned the NEW magsafe to be weaker AND of a diff. design with lower neodymium magnetic gauss rating for a reason
    people at coffee shops etc were getting their macbooks yanked to the ground when someone tripped over the cord.
    The new neodymium is a N35 gauss and the older Lshape was N40 or N45 gauss (too tight)
    I know what youre talking about, but Apple redesigned it that way for several good reasons, despite it "coming out easier" on the bed for which ,
    as Apple Inc. states, it is "not intended to be used" (nor in laps, couches...etc.)

  • How to add third-party jar in CRM ISA application?

    Hello SDN!
    I need to add third-party jar in CRM ISA application. I know how to add such jars in common case and for local DCs. But for CRM I can't determine which DC should contain this third-party jar.
    Please tell me ASAP which DC (e.g. crm/isa/home/ext) I should use.
    Help will be appreciated.
    Regards, Lev.

    Hi,
    To add third party jar you need to create new DC which contain your third party Jar. Once you have new DC with your Jar file you can add as Used DC in required DC.
    Please refer [Using External Libraries for Development with NWDI|http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/3ce3e4df201d63e10000000a11466f/content.htm] for more infromation to create DC with Jar File.
    eCommerce Developer.

  • Using Third Party APIs with Tomcat and Axis

    I'm experimenting with creating web services in Java. I'm using tomcat and axis for this. I have successfully created and deployed some basic web services and now I want to create one using a 3rd party API. I follow the same exact procedure and when I deploy the service I check my list of deployed services through the axis page, but all my services have disappearred. Commenting out all 3rd party related methods does successfully deploy the service. Is there anything special/extra I have to do to get 3rd Party classes to function correctly in a web service?
    Thanks in advance

    If you're using Tomcat, JARs in the /common/lib directory are available to all applications deployed on that instance of Tomcat.
    I prefer putting them in the WEB-INF/lib of my web app, even if that means duplication. That way my app doesn't depend on having the server set up a certain way. I deploy them as a WAR file with everything they need enclosed within,no more and no less. They're completely portable to any servlet/J2EE engine that way.
    %

  • How to Deploy the third party EJB 3.0 jar in web application

    I have a web application which calls services provided by EJB 3.0 beans packaged in third party jar. How do a configure the ViewController project to deploy the beans to the weblogic server when I run the application rather than deploy the EJB ear as a stand application to the server?
    The jar file has already referenced by the project. In the "EJB Module" of project properties I've set the EJB Version property to 3.0, but the Annotated EJB 3.0 Bean Classes list remains empty, presumably because I have no beans defined in the sources of the application. When running the project the EJB jar did not deploy automatically. Is there something wrong? How can I achive this goal?
    Best Wishes~
    ELeven.Xu
    IDE: JDeveloper 11g (11.1.1.2.0)
    OS: Linux

    I don't think this technique will work. I added a META-INF/ejb-jar.xml file to the application, and added a <session> section for one of the EJB 3.0 beans from my third party jar. I specified values for <ejb-name>, <ejb-class>, and <session-type> hoping the rest of the configuration would be determined from the annotations in the class. When the server starts, this warning message is displayed:
    Oct 30, 2009 12:06:41 PM com.evermind.server.ejb.logging.EJBDeploymentMessages warningSessionBizInterfaceNotDefined
    WARNING: \[current-workspace-app: ... \] - The session bean does not has at least one business interface defined for client access. The bean is not accessiable and usable at runtime.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 11042 ms.
    \[sic\]
    EJB 3.0 beans are not required to define business interfaces, as they are supposed to be generated by the container.
    Good idea, but still cannot deploy beans from the third party EJB 3.0 jar referenced by my project to the embedded OC4J container. Still investigating.
    Thanks,
    Steve
    By the way, I have been able to use your technique to deploy EJB 2.1 beans from third party jars in other projects, just not EJB 3.0 beans that do not provide ejb-jar.xml deployment descriptors, nor business interfaces.
    Edited by: user10375549 on Oct 30, 2009 9:51 AM - Added relevant comment regarding technique described for solving problem. It works for EJB 2.1 beans but not EJB 3.0 beans.

  • *urgent* importing third party API

    hi,
    To import the third party *.jar we bought,
    I click on
    Project->Project Properties->library->add->new
    Then I give the APi a name in a the box
    Then I click on ... Classpath ->add ZIP/JAR and browse to choose the Jar file to be added to our project.
    but then when we expilictely import the
    package it is redded highlight
    import abc.*;
    this line is highlighted and the error message say
    Error reading directory D:\thirdparty\JAAdapter.jar bad entry
    did I do anything wrong...please help

    Hi,
    This sounds like your jar file might be corrupt.
    Try the following: rename the jar file to JAAdapter.zip and try opening it with a zip utility (e.g. WinZip). If the zip utility reports errors, the Jar file is corrupt.

  • Presence deployment on 'third party specs-based' VM platform & integration with other UC apps on MCS hw

    I have a client who's currently running UCM ver 9.1.1 on MCS hw .. each for Call Mgr., UCxn, CCX.. they want to add Presence & IM on their own VM hardware and infrastructure.. on 'third party specs-based' platform.  Besides complying with VM hw compatibility list and supported CPU..Would full Presence features be available or only chat/ IM?  Has anyone had deployment experience with hybrid integration of  UCM apps on separate MCS hw and introducing Presence on VM platform ?  Client just purchased new MCS hw 2-yrs ago.  I'm assuming ISO file for Presence available for download without additional cost for actual media/ software; is that also true?

    As long as the HW is supported, there is no limitation on what you get out of the product.
    If they have verified their VM infrastructure complies to the Cisco requirements, and it does, whether the other apps are on MCS, UCS, 3rd party specs, etc. makes no difference at all.

  • Coldfusion with third party API's?

    We've just signed up to Constant Contact's Mailing list
    services, and not that they can provide an API to link their
    services to your own web application.
    I'm in the early stages of learning coldfusion, and plan to
    convert our site to Coldfusion in the near future.
    I vaguely what an API is meant to do, but can anyone give me
    some basic guidance as to whether using API's should be
    straightforward with Coldfusion (and therefore worth building into
    our web application from scratch) or is it a difficult/complex area
    worth avoiding until fully experienced with using
    Coldfusion?

    It depends on the application that is providing the API. As
    you are probably aware that CF is all java under the hood so if the
    "Contant Contact" is build in Java/Groovy, it can be easily
    utilized by CF. Othewise in CF8, you can call .Net assemblies. Web
    Services are always an option to access any third party
    applications. Essentially CF is very ready to integrate with most
    third party applications.

Maybe you are looking for