Where do I put classes shared between EJBs and WAR

I have written some ValueObject classes stored in their own jar, they are used by a number of ejbs and and a Web application WAR. I have packaged the thing up as a single EAR but neither the EJBs or the jsps can see these classes.
How do I share these classes at each end. is their a general deployment descriptor solution or is it application server specific.
I am deploying to IBM Websphere 6

verify .classpath file under your web folder for both options
Sorry, what do you mean is their a classpath value in the xml descriptors. I put my ValueObject into a jar within the WEB-INF\lib of the WAR but these arent seen by the EJBs which are within the EAR but not the WAR. Im not aware that there is a seperate WEB-INF directory for the EAR.
Structure as follows
app.ear
        testejb.jar
        META-INF
        testweb.war
               test.jsp
               META-INF
               WEB_INF
                     classes
                          testui.class
                     lib
                         valueobjects.jar

Similar Messages

  • Common JAR file between EJB and WAR inside an EAR

    Hi,
    I'm trying to deploy an EAR application outside the development environment and I have the following problem.
    My EAR has the following structure :
    application.ear
    |-- ejbs.jar
    |-- web.war
    Inside the WAR, in /WEB-INF/lib/, I have a set of JAR files that are used by the Web app and also, of course, by the EJB.
    During the deployment step, EJB module cannot be deployed because it miss some classes into the classpath.
    I think it is a common problem in J2EE development, so does someone has a solution for this problem ?
    Please note I'm using Macromedia JRun 4 SP1 on Windows XP.
    Regards,
    Damien.

    Ok,
    I have found a solution that seems elegant to me. I'm going to try and explain...
    My appli.jar EJB module and my appli.war Web module are using both two JAR, let's say common.jar and util.jar.
    The way to share those JAR between the two modules is to have the following structure for the EAR :
    appli.ear
      |-- appli.jar
      |-- appli.war
      |-- common.jar
      |-- util.jar
      |-- META-INF
           |-- application.xml
           |-- manifest.mfIn this structure :
    * the common.jar and the util.jar are not part of the WAR (/web-inf/lib)
    * the manifest.mf file has the following content :
    Manifest-Version: 1.0
    Created-By: My Application
    Class-Path: common.jar util.jarPlease note that space is used as separator for the classpath entry to allow independancy from OS.
    And you know what ? It works ! Well, on Macromedia JRun 4.0 SP1 and on Windows XP but I hope it works on other platforms.
    I hope it will help a lot of people because I spent a lot of time before to find a solution !
    Regards,
    Damien.

  • Persistence shared across EJB and WAR projects

    Hi,
    I have created an Enteprise Application in netbeans which has an EJB project and a web archive. This may be expanded further at a later time by having an application client as well. I am still fairly new to this so you'll have to forgive me if this is a simple problem. I have a persistence unit (persistence.xml) that I need to share across both WAR and EJB, but so far am not having much luck. I have read various responses and they say I should have the EAR constructed as the following:
    project.ear
    =======
    META-INF/MANIFEST.MF
    lib/persistence.jar
    ---> META-INF
    ---> META-INF/persistence.xml
    project-ejb.jar
    project-war.war
    When I try and compile it though I get the following messages from both EE modules:
    Note: The persistence xml file [META-INF/persistence.xml] was not found. NO GENERATION will occur!! Please ensure a persistence xml file is available either from the CLASS_OUTPUT directory [META-INF/persistence.xml] or using the eclipselink.persistencexml property to specify its location.
    I have tried copying the persistence.xml into the main META-INF directory in the EAR file and setting the eclipselink.persistencexml=META-INF/persistence.xml, but it still shows the same thing. Is this a classpath issue or is there something else wrong?
    Many thanks

    The EAR is a good idea, but you put the META-INF/persistence.xml in your ejb module. The EJB is where you want to do all your (container managed) transactional stuff, so make calls into your EJBs from the WAR in stead of trying to share a persistence unit across modules.

  • Where do I put in the iframe link and how?

    Where do I put in the iframe link and how?
    Thank you.

    You paste ALL custom code in a HTML Snippet.
    iWeb doesn't care about your code and will happily publish your stuff, whether it works or not. You are 100% responsible.
    Read this : Using the iWeb HTML Snippet
    And here's an alternative to the <iframe> HTML element :
         iWeb : iframe alternative in the HTML Snippet

  • Internet sharing between cellphone and computer us...

    I have watched some videos in youtube about internet sharing between cellphones and computer using "BLUETOOTH"... How do they do that? How can we do this? Anybody here can share to us how to do this??

    24-Aug-2008 12:28 PM
    monkeyboy85 wrote:
    I personally would not of thaught this is possible as bluetooth is essentially just a radio signal, obviously it can transmit data but i dont think it has the ability to stream a broadband connection. Could be completely wrong but thats what i think.
    You are wrong
    Most Nokia phones with a bluetooth interface can let you connect your computer to the Internet using your phone as a modem connected by bluetooth. So, BT definitely can support the data stream.
    Enabling a computer to use the phone's Internet connection over BT or via USB cable is possible with no additional software on the phone. Doing the opposite, allowing the phone to use the computer's Internet connection via BT, requires additional software. GNUBox does just that.
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

  • Differences between @EJB and @Resouce?

    Hi,
    I am confused about the differences between @EJB and @Resource?
    1.
    Can Session Beans be injected for both?
    If so what are the pro's / con's?
    2.
    Are the any difference between the type of components that cna be registered for one but not the other?
    3.
    Are they both equally usable with the ENC?
    Many thanks.

    @EJBs are 'special' resources. For example, @EJB (for a stateful session bean) results in
    1. Creation of the Stateful Session Bean,
    2. Other dependencies are injected into this newly created bean,
    3. If the bean has a @PostConstruct bean then that method is invoked (after invoking applicable interceptors)
    Hope this helps

  • Deploy EAR. Both ejb and war share classes?

    how do you package an ear that has both ejbs and wars that share a common set of classes.
    I have read through all the messages that state to add the Manifest entry Class-Path.
    I've added it to the war, ejb and ear Class-Path and I still get the same NoClassDefFoundError.
    Does anybody truely know how to get this to work? I've tried many things, and it sounds like this should work/.....?????

    Hi Madhav,
    You need to specify Class-Path in ejb-jar MANIFEST.MF,
    not in the ear.
    Regards,
    Slava Imeshev
    "Madhav Inamti" <[email protected]> wrote in message
    news:[email protected]..
    >
    I have tried the manifest classpath too and it just does not work. I had alibrary
    jar specified the ear's manifest classpath and the library jar in the earfile
    too. This should have made the ear classloader load the library jar.Didn't work.
    Does anybody on this newsgroup know about this .. ?
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Since ejb classloader is a parent of a webapp classloader, you should
    only
    add these jar's to your ejb-jar Class-Path Manifest entry. Make sure
    your dependencies
    hierarchy is ok - NoClassDefFoundError usually means that the class
    itself was found,
    but not it's dependent class(es).
    Michael <[email protected]> wrote:
    how do you package an ear that has both ejbs and wars that share acommon set of classes.
    I have read through all the messages that state to add the Manifestentry Class-Path.
    I've added it to the war, ejb and ear Class-Path and I still get thesame NoClassDefFoundError.
    Does anybody truely know how to get this to work? I've tried many
    things,
    and it sounds like this should work/.....?????
    Dimitri

  • Any issues with file sharing between Windows and latest Mac client?

    We're running Lync 2013. My Windows client is 15.0.4551.1005. Mac client is version 14.0.8.
    I open a conversation with a coworker on his Mac. I then try to share a png file. He clicks accept but then my client says the attempt timed out, and his client says that I canceled the file transfer. The coworker then boots the Mac into Windows and we try
    again, and the file share works fine. When I jump on my Mac, I can send files to his Mac without issue. When he tries to send from his Mac to my PC it fails, but when he tries to send from Windows on his Mac to my PC, it works.
    I can't find anything specific in the logs that would indicate a firewall issue. Is there a bug with file sharing between the Mac and PC clients?
    Thanks,
    Matt

    No, There isn't a bug with file sharing between Mac and Pc client.
    2941640 Desktop sharing session stops in Lync 2013 when all screen data is updated
    Also you can check below links
    http://support.microsoft.com/kb/2952672/en-us
    http://support.microsoft.com/kb/2880474/en-gb
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

  • Relation between EJB and CORBA

    Hi,
    I'm confused as to the relation between EJB and CORBA. Some books I've read say that CORBA is used to implement the underlying RMI protocol in EJB while others say it is an alternative to EJB.
    Could someone please clarify.
    Thanks

    Could you pleae restate your question.
    I'm assuming you want to bind a Corba object to a
    CosNaming service from within a j2ee component. JNDI
    supports this case fully via their CosNaming service provider
    (see http://java.sun.com/products/jndi/serviceproviders.html) JNDI is part of J2SE, so it's fully available to any J2EE component.
    Amlan on behalf of Kenneth Saks

  • Propagation of ctx between EJB and JSP

    Hello,
    Does anybody know how to propagate the Security
    Context between EJB and JSP so that when I login in my JSP page the user will be after recognized in my EJB system ?
    Thanks
    Francesco

    try this...as a test..
    take a simple Contact ejb (as simple as you can make it, just a name and email address). In the ejb-jar.xml set up a role, for example, user, and restrict the access to only this role for all methods.
    try to access the ejb from a jsp, and you should get the login form identified in your web.xml file.
    make sure that the ejb is noted in the web.xml file, also.
    this should work...
    no try this...identify a role in your web.xml file, (user, for example) and restrict the access to the a particular jsp which is not calling the ejb. IF you navigate to this jsp, you should get the login prompt...
    this should work....
    now the tough part
    in your application.xml create a role with the same name, user. By doing this, you have created a global role, and connect the two together.
    Now point your browser to the restricted jsp with no calls to the ejb...you should get the login, so login in.
    now navigate to your jsp which is unrestricted, but calls the restricted ejb...
    there should now be no login prompt.
    This should work.

  • ITunes sharing between Mac and PC is not working

    iTunes sharing between Mac and PC is not working. No shared music appears.
    PC = Win XP SP3; 192.168.1.101
    iTunes for Windows 6.0.4.2
    Sharing enabled / Look for shared music enabled / Share entire library
    Open and running on PC
    Windows firewall has exceptions set to allow traffic on TCP 3689, UDP 5353
    MAC = OS X 10.4.6; 192.168.1.100
    iTunes for OS X 6.0.4(3)
    Sharing enabled / Look for shared music enabled / Share entire library
    Open and running on Mac
    System Preferences | Sharing | Services
    Personal file sharing - ON
    Windows file sharing - ON
    Printer sharing - ON
    System Preferences | Sharing | Firewall
    Personal file sharing - ON
    Windows file sharing - ON
    Printer sharing - ON
    iTunes Music Sharing - ON (i.e., TCP 3689 open)
    iPhoto Bonjour Sharing - ON
    Network Time - ON
    ROUTER = Linksys BEFSR41v4; Firmware 1.04.01; 192.168.1.1
    Functioning as DHCP server
    File sharing between Mac & PC works OK
    BUT iTUNES MUSIC SHARING DOES NOT WORK IN EITHER DIRECTION
    Shared music is not visible
    Tried turning both firewalls OFF -- still nothing
    Tried installing Bonjour for Windows -- still nothing
    ANY suggestions? Please help. Thanks.
    1.8 GHz PowerPC G5   Mac OS X (10.4.6)  

    Hi cbafiero,
    It seems that the problem lies in your router. I'm not sure exactly what the issue is (I've just now discovered it myself), but after switching from a Linksys WRT54GX2 to a thrift store Netgear, my shared libraries appeared instantly. My gut is telling me that the Linksys routers are blocking the multicast traffic, which is stupid on Linksys's part, to filter traffic internally. I'll look more into the Netgear and see what it has that the Linksys doesn't (or vice versa).

  • What is the difference between JAR and WAR

    would u pls tell me how to answer the Diffrences between JAR and WAR, if interwiever asked

    I hope you know what a JAR file is. If not, you need to study the Deployment trail in The Java Tutorial.
    If you have basic knowledge about programming web applications in Java, you should also know what a WAR file is. It's a special kind of JAR file that contains a standard directory structure, which includes a WEB-INF directory with the deployment descriptor and other parts of the web application.

  • Home Sharing between pc and ipad. Where is the library and sharing icon on ipad?

    Hi, I have followed the exact Apple instructions on how to set up Home sharing on both Pc and ipad2. However when going to music app or videos app, I see no icon for the library or shared library as shown on the screen shots. Tried to see supports troubleshooting, but there is no indications on how , where and when these Libraries should show up. There is something saying you should immediately create a library on your ipad, but no instructions on how to do so. So for any of you with a successfull sharing setup between pc and ipad, any tips are appreciated. I.e. When and where will the shared library show up on the ipad if it ever will?

    When you turn on Home Sharing on your PC you will only see the Sharing option in the sidebar if other computers on your network also have iTunes running with Home Sharing turned on as well.
    As for how to get it to work on your iPhone go into Settings on your iPhone and scroll down to Music. Tap on the Music settings button. On the Music screen, in the Home Sharing section enter the Apple ID and password that you use on your PC.
    Now go back to your Home screen. Launch the Music app. Tab on the More button on the bottom of the screen. On the More screen tap on the Shared button. You should see a list of all available shared iTunes libraries on your network. Make sure iTunes is running on on your PC with home Sharing turned on. You should now see all the music on your PC's shared library. You will not however be able to wirelessly transfer the music from the shared library to your iPhone. You will only be able to play it.

  • Screen sharing between Lion and Snow Leopard

    Does anyone know whether it is possible to do Screen Sharing between two Macs where one is using lion and the other Snow Leopard?  I use this feature to help my father with his computer problems but am wary about upgrading my machine to Lion without an assurance that it will work across OS's.  He is in Europe where I believe Lion a) may not yet have been released and b) think it unlikely anyway that I will be able to encourage him to change something he is already finding difficult (aged 84) having never had to use a computer prior to 3 years ago at my behest.

    after reading your post, i thought i'd do the same on my lion machine -- toggle screen sharing off and back on -- only to discover that it was *already* off, although it was positively enabled on the same machine when running snow leopard.
    i never disabled it, as i use the feature quite regularly, which is why it never occurred to me to check the sharing settings, because i always leave screen sharing on. but apparently installing lion either caused the setting to revert, or it's possible lion simply installs with screen-sharing off by default. (who knows.)
    regardless -- a simple fix.
    thanks.

  • File sharing between windows7 and mac not working

    hi i have been having an issue with file sharing between my mac and pc. my pc running windows 7 can connect to my two macs running mavericks (mbp and mini) but i cannot connect to the pc from my macs. i have file sharing using smb setup on my macs as well as the workgroup setup. i can see the pc in my finder shared tab but when i enter the username and password it loads like its trying to connect and then says cannot connect or sometimes makes you re enter the password and still nothing. i also tired connecting through finder go tab and connect to server but when i type in my ip it asks to input the user and password but wont accept it it just shakes and deletes the text in the user and pass fields. on my pc i have file sharing enabled and like i said i can access my macs no problem. i will give a quick guide of how i try to connect
    Pc name is RAID-PC
    my admin account name is RAID
    pass is: dapice (not actual)
    ip address 192.168.2.20
    when I click on the raid pc under the shared tab in finder i put as the user RAID and pass dapice ....doesn't work
    under the finder go tab connect to server i put smb://192.168.2.20 then push the + and then connect enter RAID as user and dapice as pass... unsuccessful
    i have tired reinstalling windows 7 didn't help i tired installing windows vista and also didn't work
    i have reinstalled mavericks and that also didnt work
    i have spend HOURS looking for the answer and trying all different this with no success any help will be appreciated

    Information.
    SMB Shares - Mount
    SMB Shares - Mount (2)

Maybe you are looking for

  • Problem with Helve font in Adobe forms

    Hi Gurus, I am working on an Adobe form.It contains Helve Font size 10  and 14. But I am not able to find Helve Font in the font pallette while creating that form  in live cycle designer or in SAP. Is there any option to add fonts? How can I make Hel

  • Screen flicker with temporary lockups

    System: 1.4 G Athlon Asus A7M266 motherboard MSI 8831 Geforce2 Pro Video card Sound Blaster Live! I-Will SATA RAID controller card 2 x 120 Gig Maxtor Diamond Max Plus HD ethernet card I recently upgraded to the 2 maxtor hard drives.  And since my mot

  • Reminder Repeat

    I appologize if this is common knowledge or has been answered elsewhere but I've spent an hour trying to get the answer.  I am trying to understand how the repeat function works for reminders, and have read multiple different answers.  I'll layout th

  • IFM Octavis OPC server does not update

    I am trying to monitor values from an IFM Octivas system using OPC server. Variant data will only update once after every computer reboot. Can read from Labview OPC Demo server fine. Can read all Octavis data but no update with Labview while Octavis

  • IPad 2 shows no cell service

    A week or so after I upgraded my iPad 2 to IOS 8, it began showing no cell service, sometimes once per day, sometimes multiple times per day. I have found that the problem can be fixed by rebooting the iPad, but in the last couple of days, the iPad w