Creating EJB 3.0 project using Eclipse - Urgent

Hi,
Im new to EJB 3.0 and i need a urgent help please. I have created a EJB Project that uses JPA to Fetch data from Oracle 10g DB. But the problem is how to i get this project connect to DB? where do i need to do the Datasource maping and what would be the params? an example would be of real help? (On Deployment i get jta-datasource not found error)
I have also created a Enterprise Application Project. Do i have to do the Datasource mapping here?
I also want to create a Axis Webservice for a class that i have in my EJB Project. Can i create it in Eclipse. If so how can I?
Please share any helpful link or tutorial or Example.
I have tried google search and tried many blogs but no luck.
[EJB 3.0 + Axis Web Services + Eclipse + Jboss ]
Regards
Prateek

Start by getting the Java EE tutorial at least v5 (it's free) and reading the sections that you are unclear about.
Basically you need to create a persistence.xml file that names a JDBC resuource. This is usually just the JNDI name of a resource that is configured on a server.
You then configure a datasource on your server that contains the actual DB connection settings and name it the same as the name in the persistence.xml.
The Java EE tutorial has sections that explain all of this.
Also, if you are starting out, I would not advise using tools to autogenerate projects/artifacts.
Doing it manually helps you understand how things work better.

Similar Messages

  • Not able to create a new Flex project in Eclipse

    I am trying to use Flex Builder 3 eclipse plug-in for
    development. But while creating a new Flex project in eclipse, I'm
    getting the following error:
    Template template.jst.web has not bee defined.
    I am using Eclipse 3.3, and have installed the latest WTP
    updates. Can someone point out what I'm missing here?
    Thanks!

    Hi clsung,
    Do you get this error on every Flex Project you are trying to
    create or just on Java/J2EE projects? Flex Builder beta doesn't
    support WTP 2.0 but this shouldn't affect the other kind of
    projects.
    -Gelu

  • Problem in project using Eclipse+Tomcat+Apache Beehive

    Hi,
    Software used
    Operating System : Red Hat Linux
    IDE : eclipse 3.1 M7
    Server : Tomcat 5.5.10
    Webservice Package : Apache Beehive Build 20050505
    Plugin for integrating Apache Beehive with eclipse is POLLINATE
    My Problem: when I created my first webservice project . In all the log4j.xml files in the project. It gave an error saying that log4j.dtd file not found inside /root/workspace/SampleProject1/webcontent/WEB-INF/src/log4j.dtd
    Please provide me some suggestions to clean this error
    Thank you
    Mike

    didi you set the right path to the jre?
    there's a goog mailing llist for tomcat issues. go to the jakarta/tomcat website to subscribe. they might help you.

  • Debuging ejb's on wls using eclipse

    Hi,
    I am curently trying to find out ways to debug ejb's on wls. I am hoping to
    use eclipse for this. Its has an option to connect to a remote vm via a port.
    Can you please tell me how thi can be done.
    PS: I am aware that WLS has to be setup so that a port may be open in debug mode.
    But all that I know.
    Thanks,
    Gavin

    You should modify the weblogic startup to use the following parameters
    (IntelliJ).
    -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=
    y,suspend=n,address=500.
    You might have to do something similar.
    "Gavin" <[email protected]> wrote in message
    news:3cba93f5$[email protected]..
    >
    Hi,
    I am curently trying to find out ways to debug ejb's on wls. I amhoping to
    use eclipse for this. Its has an option to connect to a remote vm via aport.
    Can you please tell me how thi can be done.
    PS: I am aware that WLS has to be setup so that a port may be open indebug mode.
    But all that I know.
    Thanks,
    Gavin

  • How to create a program in J2EE using eclipse

    Hello
    I am planning to start with J2EE. i have downloaded glassfish v3, maven, derby and JUnit and eclipse. But i am not getting how to start with it.
    please guide me.i am following apress publication's Antonio Goncalves. How to write a program , how to deploy with glassfish then.
    really confused..
    thanking in advance

    abhinav291988 wrote:
    Hello
    I am planning to start with J2EE. i have downloaded glassfish v3, maven, derby and JUnit and eclipse. But i am not getting how to start with it.
    please guide me.i am following apress publication's Antonio Goncalves. How to write a program , how to deploy with glassfish then.
    really confused..
    thanking in advanceIn terms of learning how to use Eclipse [http://eclipsetutorial.sourceforge.net/]
    In terms of learning how to use Java EE [http://java.sun.com/javaee/5/docs/tutorial/doc/]
    In terms of how to write a program [http://java.sun.com/docs/books/tutorial/]
    If you have a specific question to ask, then please repost. My suggestion would be to take the Eclipse tutorial to familiarize yourself, and then follow along in your book. If the book is too advanced, buy one aimed more at beginners. Online tutorials should also help you out.
    - Saish

  • How to create split development directory environment using Eclipse Galileo

    Hello there!
    Well my question is on the subject... i want to use my Eclipse Galileo IDE to develop applications but i don't know hoe to set the develop structure for that... how can i set the build path? Should i add al the *.jar on weblogic lib?
    I know about Workshop Studio but i don't understand it :_
    If any of you have a tutorial for this it would be great...
    Thanx in advance!

    Hi,
    You can start with this:
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/tasks.htm
    Cheers,
    Vlad

  • EJB Client JAR project produces empty JAR

    I've built an EJB module in WorkSpace Studio using the "WebLogic EJB Project" type, which is part of an EAR. I created a couple stateless session beans within this project, and then created an EJB Client JAR project using the "EJB Client JAR-->Create EJB Client Jar" menu item on the EJB project's hidden menu.
    According to the documentation, exporting an EAR file from the EAR project will cause the client JAR to be generated. I exported the EAR file from the EAR project, and sure enough, it included the client JAR (in /APP-INF/lib/). I extracted the client JAR from the EAR and opened it up to make sure it contained all of the client-side classes. I discovered that the client JAR was empty, the only contents being the MANIFEST.MF file. The interface classes were instead contained in the EJB JAR itself.
    How can I get the EJB client code to actually be included in the EJB client JAR?
    Thanks,
    Eric

    Well I have tried this with 6.1 and first
    1. One would expect the jar name to be the name in the ejb-jar.xml -
    ejb-client-jar section
    2. It outputs the file XXXEJB_Compiled.jar but it is same size as base jar
    this is 6.1 sp3
    whats up?
    Matthew Shinn wrote:
    Hi Sanjay,
    There is a bug in the documentation. The client-jar name should never be part of the
    ejbc command line. Step 3 below should be something like:
    java weblogic.ejbc xxxEJB.jar xxxEJB_Compiled.jar
    If you have an ejb-client-jar entry in your ejb-jar.xml, the client jar should be placed
    in the directory from which you ran ejbc. Make sure that the classes that you want to be
    put in the client-jar are not loaded from the classpath. This is very important or your
    client-jar won't be created correctly. The client-jar will only contain classes loaded
    from the input jar to ejbc. A bug for the incorrect documentation has already been filed
    and should be fixed soon.
    - Matt
    Sanjay Dwivedi wrote:
    Hi,
    I am trying to use the
    <ejb-client-jar> sub-element of the Sun's <ejb-jar> (EB 2.0 DTD) element of the
    ejb-jar.xml to generate the ejb-client.jar. I followed the step as documented
    by WebLogic but the files in EJB jars and ejb-client jars are identical. Here
    is what I am doing:
    1. Build the xxxEJB.jar for my EJB by running the WebLogic.ejbc on the standard
    EJB jar file.
    2. My ejb-jar.xml file has following line:
    <ejb-jar>
    <ejb-client-jar>xxxEJBClient.jar</ejb-client-jar>
    </ejb-jar>
    3. Next I used the following command to generate the ejb-client.jar file
    java weblogic.ejbc xxxEJB.jar xxxEJBClient.jar
    My xxxEJBClient.jar files consists of exactly same files (with same sizes) as
    the xxxEJB.jar file. Only difference is that the xxxEJB.jar file includes generated
    java source files for the bean implementation class and home/remote classes.
    In my opinion the xxxEJBClient.jar should not contain the EJB implementation classes.
    Any experience using the ejb-client-jar for generating the ejb-client.jar?
    Thanks,
    Sanjay.
    [att1.html]

  • Flex/Java project w/Eclipse Galileo

    Hi,
    I've recently installed Eclipse Galileo and am trying to get a test Flex app using BlazeDS up and running with the Flex Builder plugin.  I've got the exact same project and setup configured with Eclipse Ganymede and everything runs fine, but am completely stuck in getting it to work with Galileo.
    I initially created the Flex Project with the J2EE server option using remote object access with LiveCycle.  I also selected the create combined Java/Flex project using WTP.  I'm using a Glassfish v2.1 server and use the default context root and content folder, and am also pointing it to the blazeds.war file.  This is exactly the same way I set things up with Ganymede.
    When I try to run the project, I get a status 404.  If I go to the Flex Server properties for the project and ask it to validate the location, it says that it can't access the web server.  I know the server is running and has the application deployed and the root folder and URL seem to be correct.
    Is there anything that changed in this area between Ganymede and Galileo?  Can anyone give me any other pointers regarding what to look for to track down the problem?  I've looked at the .flexProperties files and they are exactly the same between the two, other than the workspace I'm using.  I'm really stuck on this and would very much appreciate any help.
    Thanks so much!
    Renee

    Is there no one who can help me. Or is this thread better suited for another topic (and which one)?

  • Load j2me project in eclipse

    Can anyone show me how to load a j2me project in eclipse, for example load a demo project in WLK folder? It seems to me that I am just able to load projects created by eclipse.
    Thanks in advance!

    I suggest that you use netbeans. Can you create a new J2ME project in eclipse?
    To run J2ME, you may need J2ME Toolkits too.

  • Best Practice for Creating a New WebHelp Project from an Existing One

    I'm currently working in WebHelp Pro (RH version is 9.0.2.271).
    I have a WebHelp project which currently supports the 2012 version of one of our projects. What I needed to do was to create a separate 2013 project, using the 2012 files as the starting point. I couldn't find a way in RH to create a new project by importing an existing WebHelp project, so I copied the 2012 files to a new directory, opened up the project, and renamed it.
    What prompts this question is that following this exercise, all seemed well, for a time. However, I have recently had to create new topics in the 2012 version. However, when I imported these topics to the 2013 project and compiled, they vanished--although the htm files still appear in the appropriate 2013 file folder (when viewed with Windows Explorer).
    After reading some forum postings, I thought that I might have corrupted my database by improperly creating the new project--but if what I did is the wrong way to go about it, I'm not sure what the correct way is. I will be grateful for any suggestions.

    The easy way to do this is create a copy using Windows Explorer.
    Open the project and go to File > Rename.
    Then you have your 2013 ready made project.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to develop web services in OSB using Eclipse OEPE

    Hello,
    We have some live web services developed in SOA ESB using JDeveloper.
    We are now forced to migrate to OSB because of the reason that sometime next year ESB will be de-supported by Oracle.
    I am looking for some good documentation which explains how to create web services in OSB using Eclipse. Please help.
    I am installed Web logic + OEPE + OSB in my local machine already. All I need is to know how to start development.
    Thanks,

    Hi,
    You can start with this:
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/tasks.htm
    Cheers,
    Vlad

  • How to create an EJB Module using Eclipse

    Hi,
    How do I create a single EJB module and make a deployable EJB jar? I already have a existing source directory that contains the java files and the deployment descriptor. I am using Eclipse Ganymede 3.4 and Weblogic 9.2.
    Thanks.
    Edited by: user10387019 on Dec 9, 2008 1:39 PM

    Start out by creating an empty EJB project using the EJB Project wizard. Make sure to specify your WebLogic 9.2 installation as target runtime on the first page of the wizard. If your EJB source code is plain spec-compliant EJB, then your project is ready. If you are using WLS EjbGen technology, then you will also need to enable that feature on the project. You can do that at project creation by clicking the Modify button next to the Configuration combo on the first page of the wizard and then selecting WebLogic EJB Gen Support facet.
    Once the project is created, you are ready to import your source. You have several choices here. You can either copy your source into the src directory created for you or you can delete that source directory and link to a source directory elsewhere on the file system. To do the latter, right click on the project and select properties. Go to Java Build Path and select the Source tab. Remove the existing source directory. Then click on Link Source button and point to your existing source directory.
    That should be all that's necessary. Hope that helps.
    - Konstantin

  • How to create project using JAX-ws 2.0 in My-eclipse

    Hi Friend,
    I want to create one application in which i want to use JAX-WS 2.0 by using IDE Myeclipse.
    I want to know wether myeclipse will support JAX-WS 2.0 Or not.
    If Yes then please guide me How can i go ahead .
    I tried to create WEB services project using Myeclipse but it is using XFire .
    Which i want to avoid . I want it without using XFire.

    I found out that deployment is specified in different JSR (109). I quickly browsed through that specification and found out that basically everything except @WebService annotation is optional. So should a Java EE 5 compliant server publish the service automatically, just by adding that @WebService annotation? That didn't seem to be the case at least in Geronimo 2.0.2.

  • EJB project in Eclipse 3.2

    Hi All,
    i am trying to develop a demo EJB project in Eclipse 3.2 so after it i can use it in some other demo project.....i am not developing a adapter module.....i am developing a simple EJB project by implementing SessionBean only.
    now i am facing a problem that     i am not able to see EJB Candidate   in  my EJB-Project, so i am not able to add my class file to ejb-jar xml file........i am also not able to see ejb-j2ee-engine.xml............
    So can anybody help me to rectify this situation.
    Thanks,
    Rajeev Gupta

    Hi Wang,
    i am not developing a adapter module......i am developing just a demo ejb project in Eclipse 3.2 for using it in another java prj.....well my above problem is resolved now...........
    now i am facing the below issue:
    i created a jar file for my ejb project...........then i imported that jar file in a new java prj, then i am able to instantiate that ejb class in the main method of the new java prj.........
    In the window i can also see all methods of the ejb class.........
    My ejb-jar xml file is having the below content:
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <description>Hello World EJB description</description>
    <display-name>prjHelloWorldEJB</display-name>
    <enterprise-beans>
    <ejb-name>HelloWorldEJB</ejb-name>
    <ejb-class>pkgHelloWorldEJB.HelloWorldEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </enterprise-beans>
    </ejb-jar>
    Like i declared a function:
    public String strReturn(){
    return "Hello JAVA EJB World";
    When i called this function by obj.strReturn() then no compilation error was there.
    <b>But when i run this JAVA prj application, it gave error java.lang.NoClassDefFoundError: pkgEJB/ClassEJB
    at pkg.class.main of JAVA prj application.</b>
    Can anybody suggest me what should i do to rectify this situation.
    Thanks,
    Rajeev Gupta

  • Eclipse web project using Glassfish 4.1 can not load some libraries in modules directory

    We installed latest "Glassfish Tools for Luna" (updated on 2 October 2013) and created a new Eclipse dynamic web project using Glassfish 4.1. When try to annotate a class with "javax.enterprise.context.ApplicationScoped", it complains as "ApplicationScoped cannot be resolved to a type" although imported as "import javax.enterprise.context.ApplicationScoped".
    Checking "glassfish-4.1/glassfish/modules/" directory and there is cdi-api.jar that contains ApplicationScoped class. But when checking from the project libraries in the eclipse, couldnt see such a jar.
    My configuration:
    Eclipse 4.4
    Glassfish runtime java development kit : java 1.8.0_20
    Project java development kit : java 1.8.0_20
    Project compiler level : 1.8
    Project facets : Dynamic web module 3.1, Java 1.8, Glassfish Web Extensions 4.0, Javascript 1.0
    How to solve this issue?
    Thanks.

    There are 274 jars in the Glassfish 4.0 modules directory, whereas there are 282 jars in the Glassfish 4.1 modules directory. So it is not only cdi-api.jar. Moreover there are some libraries, the names of which have been changed.
    Why not simply importing all libraries in the modules directory to Eclipse, like Tomcat plugin does for tomcat/lib directory? So when manually deploying a library(jar) to modules directory Eclipse will discover it automatically.
    Thanks.

Maybe you are looking for