Compile EJB files

I download the tutorial of EJB from Sun and try to compile the source files. After I create a New Application, then I open a terminal and enter "ant converter". I got a error message.
My system is Linux.
ant converter
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/java/jdk1.3.1/bin/java -Xmx128m -Djavax.net.ssl.trustStore=
/usr/java/j2sdkee1.3/lib/security/cacerts.jks -Djava.security.auth.policy=/usr/java/
j2sdkee1.3/lib/security/jaas.policyI'm sure the JAVA_HOME is correct because I can compile other java and JavaBean files.
thanks.

Thanks .
I solve the previous problem by use ant 1.3 instead of ant 1.4.
All the paths are correct, but only ant 1.3 work fine.
Now, I have another problem . After I finished the deployment process, I open a terminal and enter runclient -client ConverterApp.ear -name ConverterClient -textauth. There is a error message
Error:
Blinding name'java:comp/env/ejb/SimpleConverter'
Caught an unexpected exception!
javax.naming.NameNotFoundException . Root exception is org.omg.CosNaming.NamingContextPackage.NotFound.
Please, help me !!
Thanks !

Similar Messages

  • Compiling EJB files and Deployment Discriptor

    Hi,
    Could any body tell me step by step process of compiling EJB files and building deployment descriptor. I want to learn from scrap. I search on web but not found material that I need.
    Actually I've made a simple EJB example now I want to compile and want to write a deployment descriptor for that using ant or javac.
    You can also refer me tutorial describing the process form scrap.
    Looking forward,
    Regards,
    Abbasi

    Although you could deploy each bean in a different .jar file , deploying them
    together in an jar file produces a classloader arrangement that allows one ejb
    class to refer to another ejb class. Packaging ejb jar files in a ear file produces
    a common classloader for the ejb jar files.
    "Gary Gu" <[email protected]> wrote:
    >
    Hi,
    To build ejb jar files, we can include all beans (including bean class,
    home,
    inteface, and other java classes) of the application into one jar file.
    Or we
    can make ONE jar file for EACH bean (including only bean class, home
    and interface.
    NOT other dependent classes that will sit in weblogic server classpath).
    I would like to know any disadvantage for second method in terms of memory,
    class
    loading, etc. Or any advantage for the second method
    Thanks

  • How to compile .ejb files

    Hi,
    I want to compile .ejb files generated through weblogic workshop 8.1, jar it and need to deploy it through Ant scripts(all three tasks). Can anyone help me in doing that?
    Thanks,
    Adwitiya Nigam...

    Compile with javac task.
    <javac classpath="" destdir="" includes="" srcdir=""/>
    Create a jar file with the jar task.
    <jar basedir="${build}" includes="" jarfile="ejb.jar"/>
    Copy jar file to the deploy directoy applications.
    <copy file="${dist}/ejb.jar" todir="${weblogic.deploy.dir}"/>

  • Compile error for .ejb file

    I have one .ejb file calling another .ejb. I do this using typical lookup("ejb.xxxHome");
    Everything seems to resolve in workshop. But when I compile, I get can NOT resolve
    error.
    Appearently, .ejb does not recognize Bean and Home .java files. Any alternative?

    Hi.
    The problem is that DragManager.acceptDragDrop expects a
    UIComponent but Event.target is typed as Object. You need to cast
    the target as a UIComponent. Try this:
    DragManager.acceptDragDrop(UIComponent(event.target));

  • Error compiling EJB.jar  + cannot resolve symbol+while deploying

    I am getting following
    Error compiling EJB.jar , cannot resolve symbol ,Syntax error in source, am getting around 17 errors while deploying EAR generated using Jdev905 into standalone oc4jContainers(10g).
    Can anyone please help me out where is the problem.
    Regards,
    Anup

    cannot resolve symbol ,Syntax error in source
    indicates some jar file is not in the Classpath. Is j2ee.jar in the Classpath?

  • Problem compiling idl files

    I compiled several rmi-iiop examples from Weblogic 6.0 distribution (smaples\examples\rmi_iiop\ejb). Then I ran idlj on generated idl files and then javac to compile java files (both idlj and javac are part of Weblogic 6.0 distribution).In all cases compiler complained about generated javax.ejb.CreateEx, javax.ejb.RemoveEx and javax.io.IOEx that they didn't have all methods implemented (like toString(), message(), localizedMessage() and so on).Could anybody tell me if he or she managed to create working CORBA client using JDK 1.3 ORB and _EJB server object__?Thank you,Yuri

    Hello Eduardo,
    Thank you very much for your reply! This is a very good suggestion and I
    will try to use it!
    However, I would like to mention that it is possible to start with simple
    RMI model (using only primitive java types) and run weblogic.rmic on RMI
    class to generate IDL files. I tested RMI-IIOP examples that come with WLS
    5.1 and WLS 6.0 using Java 1.3 ORB and they worked in both cases.
    Thank once again for suggestion!
    Yuri
    "Eduardo Ceballos" <[email protected]> wrote in message
    news:[email protected]..
    A Java (JDK 1.3 ORB) client is not possible because the Java to IDLmapping creates conflicts with existing classes, in this case
    java.lang.Throwable. The problem is that you can not start with an RMI
    interface (the EJB in this case) and there after use the CORBA programming
    model. If you want to use the CORBA programming model, you must derive your
    java classes from the IDL to Java mapping.
    >
    Yuri Rychikhin wrote:
    I compiled several rmi-iiop examples from Weblogic 6.0 distribution
    (smaples\examples\rmi_iiop\ejb). Then I ran idlj on generated idl files and
    then javac to compile java files (both idlj and javac are part of Weblogic
    6.0 distribution).In all cases compiler complained about generated
    javax.ejb.CreateEx, javax.ejb.RemoveEx and javax.io.IOEx that they didn't
    have all methods implemented (like _toString(), message(),
    localizedMessage() and so on).Could anybody tell me if he or she managed to
    create working CORBA client using JDK 1.3 ORB and __EJB server
    object__?Thank you,Yuri
    >

  • Compiling EJB's

    I am having a problem compiling Servlets and EJB'S java files. I tried following the instructions in the "Writing Enterprise Applications" tutorial. I have my path variables setup in Windows. I just cant get the file to compile. Im getting errors and cant generate class files. Someone please help me.

    C:\j2sdkee1.3.1\Beans>javac -classpath %CPATH% Calc.java CalcHome.java CalcBean.
    java
    Calc.java:3: package javax.ejb does not exist
    import javax.ejb.EJBObject;
    ^
    Calc.java:6: cannot resolve symbol
    symbol : class EJBObject
    location: interface Beans.Calc
    public interface Calc extends EJBObject {
    ^
    CalcHome.java:4: package javax.ejb does not exist
    import javax.ejb.CreateException;
    ^
    CalcHome.java:5: package javax.ejb does not exist
    import javax.ejb.EJBHome;
    ^
    CalcHome.java:7: cannot resolve symbol
    symbol : class EJBHome
    location: interface Beans.CalcHome
    public interface CalcHome extends EJBHome {
    ^
    CalcHome.java:8: cannot resolve symbol
    symbol : class CreateException
    location: interface Beans.CalcHome
    Calc create() throws CreateException,
    ^
    CalcBean.java:4: package javax.ejb does not exist
    import javax.ejb.SessionBean;
    ^
    CalcBean.java:5: package javax.ejb does not exist
    import javax.ejb.SessionContext;
    ^
    CalcBean.java:7: cannot resolve symbol
    symbol : class SessionBean
    location: class Beans.CalcBean
    public class CalcBean implements SessionBean {
    ^
    CalcBean.java:17: cannot resolve symbol
    symbol : class SessionContext
    location: class Beans.CalcBean
    SessionContext ctx) { }
    ^
    10 errors.
    These are the compiler errors Im getting now. I have all my class variables setup. Why Iam I getting these errors when Im trying to compile these files?

  • VB6 source code cannot connect to Oracle database after compile to file.exe

    Hi All,
    I have a problem about VB6 connect with Oracle database. It can connect as normal when run on VB program. After compiled to file.exe and execute, it cannot connect to Oracle database. What's going on ? Please advise? Thank you.
    Here is sample of my code connection.
    Option Explicit
    Private wsData As New ADODB.Connection
    wsData.ConnectionString = _
    "Provider=MSDAORA.1;User ID=lsp;Password=lsp2007;Data Source=prd01;Persist Security Info=False"
    wsData.Open
    End sub
    Rgads,
    Ats.

    Hi,
    I believe you're in the wrong forum, this forum is for Oracle Application Express.

  • Error while compiling java file

    Hi, im newby in java,
    i was trying to compile java files, and after that i will use it in JSP as javabean.
    I have 2 files already, the first file is a connection code, and its compiled successfully, it looks like this
    i named this as ConnectionBean.java
    package my_package;
    import java.sql.*;
    public class ConnectionBean {
         private Connection con;
         private static final String driver = "org.postgresql.Driver";
         private static final String url = "jdbc:postgresql://localhost:5432/PSQLDS";
         private static final String username = "postgres";
         private static final String password = "mypassword";
         public ConnectionBean() {
         public Connection logOn() {
              try {
                   Class.forName(driver); con = DriverManager.getConnection(url, username, password); }
              catch(ClassNotFoundException e) {
                   System.err.println("ConnectionBean: driver unavailable..."); con = null; }
              catch (SQLException e) {
                   System.err.println("ConnectionBean: driver not loaded..."); con = null; }
              return con;
         public void logOff() {
              try {
                   con.close(); }
              catch (Exception e) {
                   e.printStackTrace(); }
    as you can see above im using "package", and yes i have manage to put all my java files within the correct path (ROOT\WEB-INF\classes\my_package)
    And also, i have test this class as javabean on JSP file and it works.
    There for i continue to create the second java file, as a purpose to create a back engine for JSP. I use the same package as ConnectionBean.java, it looks like this
    i named this as ListPageEngine.java
    package my_package;
    import java.beans.*;
    import java.sql.*;
    public class ListPageEngine {
         public static void main(String[] args) {
              ConnectionBean conBean = new ConnectionBean();}
    on compiling process using command "javac ListPageEngine.java", i get this error message
    ListPageEngine.java:11: cannot find symbol
    symbol : class ConnectionBean
    location: class my_package.ListPageEngine
    ConnectionBean conBean = new ConnectionBean();}
    ^
    ListPageEngine.java:11: cannot find symbol
    symbol : class ConnectionBean
    location: class my_package.ListPageEngine
    ConnectionBean conBean = new ConnectionBean();}
    ^
    2 errors
    I think, i am pretty much sure that all my configuration (wheater its Apache TomCat, Environment Variable or PostgreSQL server) was good, as a prove, i was able to use ConnectionBean.class in my JSP file.
    I susspect the problem is related with "package", seems i cannot use ConnectionBean class within ListPageEngine class when i use package.
    For another information, i didn't install such thing as J2EE, i only install JDK 1.5, i also guess this might be the cause.
    Right now im all stuck, i try to find thread which might be related with my problem but i failed to find it, most of them get the same answer by UncleSAM which are
    Try the following forum (about JSP technology)
    http://forum.java.sun.com/forum.jspa?forumID=45
    JavaBeans spec contains nothing about JSP, but JSP spec describes using of beans.
    i hope my question is clear so anyone who might have experience or clue with this problem might be able to help me.
    Thanks before

    finally folks, i found answer to my own problem hehehehe..
    the problem is on the compiling command (javac ... my_file.java), i found that i need to add some parameter on the command to make it works.
    This problem solved.

  • Error message when compiling book "file is corrupt" referring to a photo.  Or "cannot find original photo".  Can you use photos that have been "edited" out of "Book Mode"?

    Error message when compiling book "file is corrupt" referring to a photo.  Or "cannot find original photo".  Can you use photos that have been "edited" out of "Book Mode"?

    I did copy it to my desktop, but it still won't let me open it.  I think the file on the disc might be corrupt or something like that though the cd itself checks out fine as far as viruses go.  I was able to verify the disc, but that's about it.  My husband tried it on his iMac and we have the same issue.  It's unzipping the folder, but won't let us open the folder on both the Mac Book Pro or the iMac by double clicking, going to file/open or right clicking.  It just keeps saying the same message as I posted above.  I think I'm just going to have the client put the pictures on either a memory card or a USB memory stick so she won't have to compress the files for zipping purposes.  It's been too frustrating trying to open this folder on this cd she gave me.  She said she created/zipped the cd on her Mac Book Pro but it sure won't open on mine.

  • Problem in compiling j2me file

    Hello friends,
    friends my problem in compiling j2me file..
    when i compile my j2me file through WTK2.2 (toolkit)
    then it creates extra file including j2me" .class" file..
    for example if my j2me file is "aman.java" and when i compile it
    then it will covert into "aman.class" file but it creates one more file like "aman1$.class" ..plz help me to get out of this problem..coz its increase my j2me file size..
    thanks
    Aman

    That is an inner class in aman.java that you are seeing there.
    If you use inner anonymous classes, for example;
    public class MyMIDlet extends MIDlet {
       // code for the MIDlet
       // Anonymous inner class
       setCommandListener(new CommandListener() {
          public void commandAction(Command c, Displayable d) {
            // implementation;
            // may access MyMIDlet's private fields
    }then the command listener you create will become another class named MyMIDlet$1.class.
    In this example you can get rid of the inner class by making one of the existing classes implement that CommandListener interface:
    public class MyMIDlet extends MIDlet implmements CommandListener {
       public void commandAction(Command c, Displayable d) {
         // implementation;
         // may access MyMIDlet's private fields
       // code for the MIDlet
       // Instead of the anonymous inner class, we can now use MyMIDlet since it
       // implements CommandListener
       setCommandListener(this);
       // etc. etc. etc.
    }shmoove

  • Problem compiling java file to access web service! newbie troubles !

    I am new to web services and this is my first program...
    I am compiling java file which has import statement like:
    import org.apache.soap.util.xml.*;
    import org.apache.soap.*;
    import org.apache.soap.rpc.*;
    It says ----- package org.apache.soap.util.xml does not exist as one of errors..
    I have a folder that I named soap myself and I have activation.jar,serces.jar,mail.jar,soap.jar in it.
    I added c:\soap in my classpath and this was supposed to be the quickstart way to try an example out...
    but it gives me compilation errors... what should I do ?

    You'll need to specify each jar file in the classpath. c:\soap\xerces.jar;c:\soap\sax.jar;....

  • Problem while compiling 'dll' files in Form Server..Urgent

    Hi!
    I'm trying to compile the library(dll) in form server and getting a message that "can not open that file".At the same time able to compile 'fmb' files which is in the same directory.
    Could you please help me?
    Thank you,
    Denish

    I am also working on Forte. Forte has an inbuilt Tomcat. You dont need to copy any files to any where in the file mount system. You need to specify the External / Internal Browser settings, So that when you try to execute it, the .jsp file can be displayed in the browser. I havent faced any problem as you said.
    Uma
    http://www.javagalaxy.com

  • Problem compiling source file in package

    Hi, I have 5 source files which I have just packaged together and put in the same sub-directory, the problem is that when I try to compile the file with the main method I get the error message:"cannot read" then the name of the source file. I am compiling from the command line and setting the classpath as I compile with the statement:
    c:\j2sdk1.4.1\bin>javac -classpath c:\directory\package directory source file.java
    I'm not sure what I am doing wrong and the source files all compiled fine before I added the package statement to the files. Please any help would really be appreciated.

    It sounds like the java file your are trying to compile is not in the directory you are compiling from.
    Is this basically what you are doing?:
    Say the package name is mypackage.
    Assume we are O.K. with keeping source and class files together.
    Create a directory named 'mypackage' somewhere...C:\mypackage\.
    Put all the .java files in it (these .java files indicate that they are a member of the 'mypackage' package).
    At a command prompt, cd to the directory containing the 'mypackage' directory...'cd C:\'
    Compile the source files: C:\j2sdk1.4.1\bin\javac mypackage\*.java
    run the main class: C:\j2sdk1.4.1\bin\java mypackage.TheMainClass
    Basically, this says keep the files where you want them and point to javac, instead of moving everything under java/bin. btw it will save a lot of typing if you add java/bin to your PATH.
    Hope this helps.

  • How to check the JDK version of a compiled java file

    can anybody tell me how to check the JDK version of a compiled java file ?
    Edited by: gbhatia8 on Sep 9, 2010 7:04 AM

    The major/minor version of the class file is the way to go.
    Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
    Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

Maybe you are looking for

  • My phone is dropping calls, doesn't ring all the time-goes directly to voice mail, do no recieve alert on when a text is recieved

    1-My phone does not ring all the time upon recieving an incoming call, it goes directly to voice mail. 2- Not recieving alert tone upon recieving a text message. 3- Dropping calls also

  • How do I remove an old version of Flash from addons after updating?

    I recently updated from Firefox 5.0 after a long period of not-updating to Firefox 22.0, and immediately had to update Flash (which I also hadn't updated in awhile as in FF5.0 updating past 11.2.202.235 borked Youtube). However, now I have two differ

  • Problem with package creation

    Hi , I created package name  BBP_ESI, with the following information: Appl. Component - MM software component - SAP_APPL Assign BBP_ESI as a sub package to PI-B2B . 1, Where can i find  Allowed Objects types in the package creation ,i am using SAP  6

  • Taxes not  capturing in miro

    Dear All,               We have created one import PO. There are materials which are excisable .We have maintained the condition types H edu cess on CVD ,Addnl duty,IN basic customs ,IN CVD ,Edu cess on CVD ,Sec Edu cess on BCD,Ed cess on BCD in cond

  • Urgent! IDocs in the BW but not in PSA

    Hello Gurus, I have a situation where, I see the IDocs in the BW inbox with status 53. But the extraction errored out with 90 records receieved but not updtaed. I don't see them either in PSA. How do I process this delta. Thanks, Simmi