Could not import javax.ejb.* package

On compiling my EJB program the following errors appears
C:\bea\wlserver6.0sp1\samples\examples\ejb\basic\ValidateBean>javac ValidateBean
.java
ValidateBean.java:3: Package javax.ejb not found in import.
import javax.ejb.*;
^
ValidateBean.java:4: Class javax.ejb.CreateException not found in import.
import javax.ejb.CreateException;
^
ValidateBean.java:5: Class javax.ejb.SessionBean not found in import.
import javax.ejb.SessionBean;
^
ValidateBean.java:6: Class javax.ejb.SessionContext not found in import.
import javax.ejb.SessionContext;
^
ValidateBean.java:7: Class javax.naming.InitialContext not found in import.
import javax.naming.InitialContext;
^
ValidateBean.java:8: Class javax.naming.NamingException not found in import.
import javax.naming.NamingException;
^
ValidateBean.java:9: Package javax.sql not found in import.
import javax.sql.*;
^
ValidateBean.java:15: Interface javax.ejb.SessionBean of class examples.ejb.basi
c.ValidateBean.ValidateBean not found.
public class ValidateBean implements SessionBean {
^
8 errors
for these errors do i have to install any other package and
what are the classpath settings required.
and in which *.jar file, these classes and packages are available

javax.ejb.* is in j2ee.jar
if you use weblogic6.0, you need download ejb20.jar from http://www.weblogic.com
if you use weblogic6.1 ,you need't this file.

Similar Messages

  • Import javax.mail package does not exists

    Hi,
    when i tried to compile the source code for email using jdk1.3.1, it compiled fine. but when i tried to compile using jdk1.4.., it had the following errors such as
    import javax.mail package does not exists,
    import javax.mail.internet package does not exists
    package javax.activation does not exist
    Is it because of the jdk version problem???
    Pls help me

    I have the same problem with javax.ejb
    Now i've downloaded and installed the j2ee and set my classpath to the j2ee.jar. I've had to make a new path cause i'm running XP.
    This doesn't work.
    to compile it in Jcreator or JBuilder I can make it work by adding this package (j2ee.jar) in the project settings - required libraries.
    But I have to do this for every project again and again.
    I can make it work but i thougt the classpath would be enough ??
    Bassegio

  • Javax ejb CreateException: Could not create stateless EJB

    Hi,
    I have a JavaEE (EJB3.0) project deployed on glassfish2.1 as -.ear (exported from eclipse3.4 to the autodeploy-folder) with -.ejb.jar, -.webui.war, general-lib-base.jar (some other...)
    The session bean is invoked by a jsf-managed bean. Have a pure annotation +@ejb+ in managed bean (identifiing the ejb-interface (+@Remote+) ...the ejb is annotated with +@stateless+
    get the following error message:
    *...nested exception is: javax.ejb.CreateException: Could not create stateless EJB*
    as beginner in the JavaEE-field I'm looking for some help concerning the possible causes.
    thank's for any comment...
    (also posted in the Enterprise JavaBeans-forum possibly better there)

    problem fixed: in the deployment-descriptor ejb-jar.xml a spezification of the session-bean hung around ...very annoying!

  • Import javax.ejb.EJBHome; cannot resolve symbol

    Hi i wonder if anyone can help me. I have read alot of the posts regarding this issue and have tried everything to do with the paths and environmental variables and even reinstalled everything.
    import javax.ejb.EJBHome; cannot resolve symbol
    This is the problem i keep getting and here are the paths that i set:
    SET PATH=c:\j2sdkee1.3\bin;c:\jdk1.3.1_01\bin;c:\jakarta-ant-1.3\bin
    SET ANT_HOME=c:\jakarta-ant-1.3
    SET JAVA_HOME=c:\jdk1.3.1_01
    SET J2EE_HOME=c:\j2sdkee1.3
    SET CLASSPATH=c:\j2sdkee1.3\lib\j2ee.jar;c:\jakarta-ant-1.3\lib\ant.jar;c:\jdk1.3.1_01\lib\tools.jar
    What am i doing wrong???

    Im not sure, everything looks ok to me, but here is what i tried:
    I wrote this little test class, and compiled it
    import javax.ejb.EJBHome;
    public class test
    public test()
    I got the same error you did (or similar)
    D:\>javac test.java
    test.java:1: package javax.ejb does not exist
    import javax.ejb.EJBHome;
    ^
    1 error
    then I added the j2ee.jar to my classpath and everything worked fine.
    here are my env vars:
    JAVA_HOME=d:\dev\jdk
    J2EE_HOME=d:\dev\j2sdkee
    CLASSPATH=...;%J2EE_HOME%\lib\j2ee.jar
    If I were you I would double check all the paths you have set up then try a simple case like the one above. If your running NT/2000 make sure the JAVA_HOME, J2EE_HOME and CLASSPATH are system variables not user variables. Another thing you can try is adding the j2ee.jar to the classpath with the -classpath compiler switch.
    javac -classpath %CLASSPATH%;d:\dev\j2sdkee\lib\j2ee.jar test.java
    Other than those things I'm not sure
    Good Luck

  • Importing javax.ejb problems

    Hi,
    I have started learning EJB using netbeans 6.5 running on a mac os X 10.5.6. When i am trying to import javax.ejb and error stating that package javax.ejb does not exist.
    From a search on the net i have learned that on windows os it is a problem of class paths. I don't know how to solve this problem on mac.
    Thanks
    Ray

    Here is what I have done recently:
    I tried it in Eclipse, which also isn't able to find javax.ejb and java.ejb
    What is going wrong? It seems like j2ee.jar doesn't provide these libraries.
    Thank you.

  • Import javax.ejb cannot be resolved

    Hi,
    There are some libraries missing in the following code.
    package era.budget;
    import javax.ejb.*;
    import era.budget.BudgetVO;
    public class BudgetItemVO implements java.io.Serializable
         private Integer itemId;
         private BudgetVO budget;
         private int type;
         private String itemDetails;
         private int amount;
    // -------------- BEGIN GET/SET METHODS --------------
    public BudgetItemVO(Integer id)
              this.itemId = id;
         public BudgetItemVO()
         public Integer getItemId()
              return itemId;
    public BudgetVO getBudget()
              return budget;
         public void setBudget(BudgetVO budget)
              this.budget=budget;
    public int getType()
              return type;
         public void setType(int id)
         this.type=id;
    public String getItemDetails()
              return this.itemDetails;
    public void setItemDetails(String details)
              this.itemDetails=details;
    public int getAmount()
              return this.amount;
    public void setAmount(int amount)
    this.amount=amount;
    As aresult of these missing libraries there are some compilation errors..Some of the errors are as follows
         1)The import javax.ejb cannot be resolved     
         2)EntityBean cannot be resolved to a type     
    3)EntityContext cannot be resolved to a type     
    4)EJBLocalObject cannot be resolved to a type     
    Thanx & Regards
    Maria.

    try: in your project properties choose 'Java Build Path' and add javaee.jar (from J2EE_HOME\lib) as external jar

  • The Manifest Designer could not import the certificate

    What I'm trying to accomplish here is to have the .appx file signed during build time so that the following command would work or even better I should not need it anymore
    set path=%path%;"C:\Program Files (x86)\Windows Kits\8.1\bin\x64"
    SignTool.exe sign /a /f certificate.pfx /fd SHA256 /v /p MySecretPassword TestApp.appx
    I opened package.windows.appmanifest file (located in TestApp_root\TestApp\bld\Release\platforms\windows directory) in the editor view, chose Packaging tab and clicked Choose certificate... From there I chose Select from File... from the Configure Certificate
    drop down menu and selected the .pfx we purchased from Symantec few weeks ago. After that I typed in password and password confirmation as requested.
    I ended up getting an error message "The Manifest Designer could not import the certificate", The certificate you selected is not valid for signing because it's either expired or has another issue.
    I checked that the certificate is listed in certmgr.msc Trusted Root Certificate Authorities > Certificates view and it's issued to our Company name.
    In the Manifest Designer Publisher display name matches our Company name, but Publisher is set to CN=$username$
    I tried to change that to CN=Company Name, OU=Company Name that was mentioned in the certificate, but still no luck.
    Certificate also matches the listed requirements: http://stackoverflow.com/questions/22288410/choosing-a-certificate-for-a-windows-store-application-via-the-package-appxmanif
    How to proceed from here?

    Hi terodev,
    I found a similar discussion on the forum:
    https://social.msdn.microsoft.com/forums/windowsapps/en-us/d858d189-6d14-4c8d-809d-d6c841dd8866/using-domain-certificate-for-app-signing
    Could you take a look and give a try to see if it helps?
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Javax.ejb package

    Hi
    I am new to java, i just want to understand this, does the javax.ejb package come with J2EE jar file or must i download an SDK of some sort to have it my environment? I am currently using NetBeans 5.5 and getting package does not exist error.
    Someone please clarify
    thank you

    Actually the javax.ejb package is not present ordinary J2SE.
    It's present in the J2EE v1.4. You can download this from http://java.sun.com/j2ee/1.4/download.html.
    The javax.ejb is present in the j2ee.jar which is present in C:\Sun\AppServer\lib\j2ee.jar (installed in C: drive).
    Before compiling, classpath needs to declared either in environmental variables or in the command prompt.
    classpath: C:\Sun\AppServer\lib\j2ee.jar;C:\Sun\AppServer\bin;
    Then your javax.ejb package will be included.

  • I keep getting the error:  "lightroom could not import this catalog because of an unknown error" when trying to import from a catalog?

    I have around 400,000 photos of 15 years so given the high number, I organized all my photos into 6 catalogs to avoid potential problems. All the photos and the catalogs are in a 4TB Seagate external hard drive. I use Adobe Lightroom 5 and I use a PC with the latest Windows Office 2013.
    I wanted to have a NEW Catalog of all my rated 1 Star+ photos of all the years in a single Catalog. So I created what I called Star+ Catalog and I was told the best option is to import a Catalog at a time and given that there is no means to filter importing only Stared photos, I would import all the photos and then delete all the UnStared photos. I did that for Catalog Year 2014 but at the end gave me the message: "lightroom could not import this catalog because of an unknown error". It actually had imported around 40k photos from about 50k total. I tried again and again and every time I end up with the same thing. I created another new Catalog and stared from scratch and the same ting happened: the ONLY EXACT 40k or so photos were imported and the rest were not!! When I imported Catalog Year 2013 of around 45k photos, it worked perfectly. But when I imported Catalog Year 2012 of 35k photos, the same thing happened!! 
    I then tried exporting the needed photos to a new Catalog and that worked.  But then when I try to import them again from my Master *+ Catalog I get the same error again!!
    I also tried creating a new Master *+ Catalog and tried to import the Catalogs of each year into it and the same error happened again!!!
    Any advice: 1) on how to solve this? and 2) if there is a better and easier way to create this Master Catalog of All Stared Photos of All my Catalogs?

    This is a duplicate thread - see here

  • Getting "Could not Import Universe" error while trying to refresh a Report

    Hi,
    When we are trying to refresh a report in ZABO in production environment, we are getting an error "Could not import universe".
    We are able to import all other universes and refresh all other reports thru ZABO.
    Even these reports that are dependent on this universe are getting refreshed in Infoview and Full client. We are continuously facing this issue in ZABO.
    We tried the following steps but it did not fix the problem.
    1) Go to Tools -> Universes; Select the Universe to be imported and click on "Import" - Result: An error stating "Cannot find Universe".
    Click on "Refresh" button and then on "Import" again.
    Still the same error " Cannot find Universe"
    2) Click on "Data manager" after opening the report. Go to 'Definition' tab -> click on "..." - Result: "Cannot find Universe" error.
    3) Go to C:\Documents and Settings\<user name>\Application Data\Business Objects\Business Objects 6.0\lsi\
    Take a backup of .rkey and .lsi files of our gateway server and delete them from that location.Then relogin Infoview and ZABO.
    4)Go to Internet Options -> Temporary File Settings -> View Objects.
    Delete RptViewerAX class and ZaboCheckandRunControl class and relogin infoview and ZABO.
    5) Tried creating a new Document based on that Universe.
    6)Publish the universe with a different name and try creating a report based on that.
    None of these trials worked out. Please help us to fix this issue.
    Note: Our Production environment is reverse proxy enabled that has a time out set to 15 mins at webintelligence level. The Error is being observed with in 2 mins from the refresh process started.
    Regards
    Chaitanya

    Hi,
    Go to CMC, and check the path in file store where this Universe is stored.
    Follow this path and check if this universe is present there.
    If you have a local copy, you could open and export this by changing the name and try re-pointint one of the reports.
    If it works, you could delete the original and rename it to the original Universe.
    Regards,
    Jayendra.

  • How to solve the error:  "lightroom could not import this catalog because of an unknown error" when trying to "import from catalog"?

    I have around 400,000 photos of 15 years so given the high number, I organized all my photos into 6 catalogs to avoid potential problems. All the photos and the catalogs are in a 4TB Seagate external hard drive. I use Adobe Lightroom 5 and I use a PC with the latest Windows Office 2013.
    I wanted to have a NEW Catalog of all my rated 1 Star+ photos of all the years in a single Catalog. So I created what I called Star+ Catalog and I was told the best option is to import a Catalog at a time and given that there is no means to filter importing only Stared photos, I would import all the photos and then delete all the UnStared photos. I did that for Catalog Year 2014 but at the end gave me the message: "lightroom could not import this catalog because of an unknown error". It actually had imported around 40k photos from about 50k total. I tried again and again and every time I end up with the same thing. I created another new Catalog and stared from scratch and the same ting happened: the ONLY EXACT 40k or so photos were imported and the rest were not!! When I imported Catalog Year 2013 of around 45k photos, it worked perfectly. But when I imported Catalog Year 2012 of 35k photos, the same thing happened!! 
    Any advice: 1) on how to solve this? and 2) if there is a better and easier way to create this Master Catalog of All Stared Photos of All my Catalogs?

    OK, my starting point is that LR can happily contain 400000+ photos, and it's a mistake to create a 1 star plus catalogue as you suggest. Instead, I'd recommend you create a master catalogue of all your photos, which you can then query however you want - 2 star, or a certain keyword, or with "xyz" in the title etc.
    If you are intent on going that way, you could try a slight change from what you've done so far. Instead of trying to import an entire catalogue and then delete no-star pictures, take the 2014 and 2012 catalogues and select only the 1 star photos. Then do an Export as Catalog for these items, and import the 2014-1star and 2012-1star into your new catalogue. That may get you past the problem images which I suspect are the problem.
    If that doesn't work, or if you follow my initial advice, you're going to need to identify the image where the failure occurs. You may have a corrupt image file, and replacing it from your backup may be sufficient to resolve the problem. Alternatively, it may be a corrupt record in the catalogue, and in this case it may be sufficient to remove the image from the catalogue and import it again. You might try selecting everything in the 2014 catalogue and seeing if you can do an Export as Catalog, creating a clean 2014, and deleting 2014's previews folder might also get rid of a potential problem. Something else is to try the Export as Catalog for images 1-40000, then a second Export as Catalog for images 40002-50k.
    So a few things you'll need to try, rather than a magic bullet, and a recommendation to change the underlying direction.
    John

  • Error--Could not import profiles

    I have installed a distributed instance installation.
    While i was installing the Central instance i gave the profile path as
    \<server_name>\sapmnt\<SID>\SYS\profile
    Now after installation when i go to Rz10 and import profiles , i could not import the instance profiles
    It is giving a message that "Cound not be read"
    Please let me how of how to import that profile or how to change the path to local  system

    Hi Balaji,
    Check if there are some old profiles in you directory. Try to move them into some other folder and then with the clean directory only with the relevant profiles try to import it.
    Secondly you   check that if there is any junk character in the profile?
    Best Wishes.
    Kumar

  • Could not import tables with oci10g\11g connection

    Hi All,
    I am using obiee 11g and oracle 11g database for windows64 bit . I could not import the tables from oracle database in admin using OCI 10\11g.
    I did copy tnsnames.ora to {Oracle_BI1}\network\admin directory & {oracle_common}\network\admin directory and Set up TNS_ADMIN to{Oracle_BI1}\network\admin
    In addition to that I have set oracle_home to {Oracle_BI1} , path to {Oracle_BI1}\bin , oracle_sid to ORCL. In the user.cmd command too I have set tns_name{Oracle_BI1}\network\admin
    When i do lsnrctl or try to open sqlplus , it shows the error. I even copied listener file to {Oracle_BI1}\network\admin directory & {oracle_common}\network\admin directory and Set up TNS_ADMIN to{Oracle_BI1}\network\admin
    Do I need to revert the oracle_home,path,tns_admin to original one C:\app\user\product\11.2.0\dbhome_1....
    Am I missing anything?
    Thanks,
    Vishal

    When you add tns entry at ORACLE_HOME/network/admin that should work.
    Try using tns entry at Data source at connection pool like
    IT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = foo)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = foo.corp)
    )

  • What to do when Photoshop says could not import clipboard because an unexpected end-of-file was encountered

    I have PC, with adobe Photoshop CC 2014 and windows 8. Every time I open Photoshop it says: could not import the clipboard because an unexpected end-of-file was encountered. If I exit the message I still cannot create files or open anything... any suggestions?

    When you load Action and when you create new actions they are saved into you Photoshop Preferences into Actions Palette.psp.  This File is read when you start Photoshop.
    Apple and Microsoft both like to hide important files on users.  Windows search and Apple finder will not find and show hidden files unless you change Mac and Windows setting.  I you getting the error when you start Photoshop there is a shortcut to reset preferences. Hold down Alt, Ctrl, and Shift keys (Mac: Command, Option, Shift) while starting up Photoshop you should be prompted to for an OK to delete preferences.
    If this keeps happening perhaps you have a bad spot on your disk.  Loaded actions are saved into that file so they should show up in the Actions Palette when Photoshop Start Up and read that file during start up. Photoshop Writes that file when you load action sets, when you record and edit actions and most likly also when you close down Photoshop.

  • I keep getting "pkg-config: could not find or read package"

    trying to install firefox-branded using yaourt
    [anthony@arch yaourt]$ yaourt -S firefox-branded
    ==> Downloading firefox-branded PKGBUILD from AUR...
    bsdtar: Removing leading '/' from member names
    x firefox-safe.desktop
    x browser-defaulturls.patch
    x PKGBUILD
    x firefox.install
    x mozilla-firefox-1.0-lang.patch
    x firefox.desktop
    x firefox-version.patch
    x firefox-agent.patch
    x mozconfig
    Comment by: wantilles on Wed, 21 Jul 2010 12:34:35 +0000
    Upstrem update to 3.6.7.
    Comment by: geo on Wed, 21 Jul 2010 12:46:53 +0000
    As reliable as ever, thanks wantilles :)
    Comment by: wantilles on Wed, 21 Jul 2010 16:27:56 +0000
    @ ropez fzerorubigd tschertel
    I won't answer the same questions twice.
    See my comment on Mon, 28 Jun 2010 15:51:20 +0000.
    Comment by: fzerorubigd on Wed, 21 Jul 2010 18:18:22 +0000
    :) I just want to report this is out of date and why I flag this as out of date. nothing else.
    Comment by: wantilles on Sat, 24 Jul 2010 11:36:22 +0000
    Upstream update to 3.6.8.
    Comment by: fzerorubigd on Wed, 11 Aug 2010 17:56:44 +0000
    Its a good work, but can you add default dictionary to this too? I mean just add a dictionaries folder inside installation folder and copy to en-US.dic and en-US.aff from mozilla-1.9.2/extensions/spellcheck/locales/en-US/hunspell folder?
    Thanks for your great work.
    First Submitted: Wed, 25 Jun 2008 06:41:54 +0000
    firefox-branded 3.6.8-1 : Standalone web browser from mozilla.org
    ( Unsupported package: Potentially dangerous ! )
    ==> Edit PKGBUILD ? [Y/n] ("A" to abort)
    ==> ------------------------------------
    ==> n
    ==> firefox-branded dependencies:
    - desktop-file-utils (already installed)
    - zip (already installed)
    - diffutils (already installed)
    - libgnomeui>=2.24.1 (already installed)
    - python (already installed)
    - wireless_tools (already installed)
    - xulrunner=1.9.2.8 (building from AUR)
    - pkg-config (building from AUR)
    ==> Edit firefox.install ? [Y/n] ("A" to abort)
    ==> -------------------------------------------
    ==> n
    ==> Continue building firefox-branded ? [Y/n]
    ==> -----------------------------------------
    ==>
    ==> Building and installing package
    ==> Install or build missing dependencies for firefox-branded:
    Password:
    error: 'pkg-config': could not find or read package
    ==> WARNING: Dependencies have been installed before the failure
    ==> Restart building firefox-branded ? [y/N]
    ==> ----------------------------------------
    ==>
    ==> WARNING: Following packages have not been installed:
    firefox-branded
    I have pkg-config installed (pacman -S base-devel) and ran pacman -Syyu after.

    ==> Making package: firefox-branded 3.6.8-1 (Tue Aug 24 03:59:02 PDT 2010)
    ==> Checking Runtime Dependencies...
    ==> Missing Dependencies:
    -> xulrunner=1.9.2.8
    ==> Checking Buildtime Dependencies...
    ==> Missing Dependencies:
    -> pkg-config
    ==> ERROR: Could not resolve all dependencies.
    thats what I get with makepkg -i

Maybe you are looking for

  • How does jdbc fetch a set of records in oracle

    Hi, Oracle does not support server side cursors,if so how does jdbc fetch a set of records(set by setFetchSize(), which is 10 by default) each time I say rs.next().Does this mean Query is re-executed to fetch the next set of records? Can some body th

  • Probably a stupid question... so sorry in advance!

    I'm planning to buy Photoshop CS3. If I decide to fork out for a Power Mac later in the year, how easy is it to move my Photoshop application from my old G5 to the new PowerMac? Will the licence still be valid? The may be obvious but I've never chang

  • Intermittent iPhoto sync problem

    I've had an iPhone 4 for the past 4 months. Recently (around when I upgraded to iLife 2011), iPhoto sometimes does not "see" my iPhone. I'll plug it in, iTunes will open and start to sync, but iPhoto just sits there and the iPhone doesn't pop up in t

  • How do i chat while video is on

    I'm new to skype and dont know how to chat while the video is on. Is there a button somewhere i need to push? I have a windows 8.1 computer. I see peoples messages in some kind of popup cloud but dont know how to respond with writing. can someone ple

  • Naming convention table name Java

    Dear expert, I know that in the ABAP world, when I create a custom table, it have to start with Z.. or Y.. in the name. Is this the same when I need to create a table in the Java schema? Thanks for you help. Mario