Jboss and eclipse, problems with JNDI

Hi, i have managed to deploy my j2ee application (according to jboss), its a simple HelloWorld app, problem is when i try to look it up.
In the client:
System.out.println("starter");
Context context = new InitialContext();
System.out.println("etter context");
Object objref = context.lookup("HelloWorld");
// Stops here and a javax.naming.NoInitialContextException is thrown...
// What is wrong?
The jboss.xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd">
<jboss>
<enterprise-beans>
<session>
<ejb-name>HelloWorld</ejb-name>
<jndi-name>ejb/HelloWorld</jndi-name>
</session>
</enterprise-beans>
<resource-managers>
</resource-managers>
</jboss>

I have managed to run the file now but i had to do it from command prompt and include every jar file from jboss + the files in my project. My problem now is an eclipse problem i think.
I have created a client wich looks up the ejb, but the thing is that i have to manually import a bunch of jboss jar-files to get it to work. isn't there a way i can make eclipse / jboss import those jar's automatically? perhaps create a client automatically or something?
Hope someone can help..

Similar Messages

  • JBoss and Eclipse Problem

    Hi @ all,
    i'm trying to learn J2EE technology with jboss and eclipse dev.kit.
    I use the Jboss/eclipse tutorial (http://prdownloads.sourceforge.net/jboss/Tutorial-1.3.0.pdf)
    but there are several problems with the ear-file.
    This error will be processed if I try to deploy the package to the jboss
    server:
    14:20:12,765 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:service=EARDeployment,url='FiboApp.ear'
    14:20:12,765 WARN [ServiceController] Ignoring request to stop nonexistent service: null
    14:20:12,765 INFO [EJBDeployer] Undeploying: file:/C:/jboss-4.0.0/server/default/tmp/deploy/tmp3781FiboApp.ear-contents/FiboEJB.jar
    14:20:12,765 WARN [ServiceController] Ignoring request to stop nonexistent service: null
    14:20:12,765 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss-4.0.0/server/default/deploy/FiboApp.ear
    14:20:12,781 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:service=EARDeployment,url='FiboApp.ear'
    14:20:12,781 WARN [ServiceController] Ignoring request to remove nonexistent service: jboss.j2ee:service=EARDeployment,url='FiboApp.ear'
    14:20:12,843 WARN [ServiceController] Ignoring request to destroy nonexistent service: null
    14:20:12,843 WARN [ServiceController] Ignoring request to remove nonexistent service: null
    14:20:12,843 WARN [DeploymentInfo] Could not delete file:/C:/jboss-4.0.0/server/default/tmp/deploy/tmp3781FiboApp.ear restart will delete it
    14:20:37,906 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.0/server/default/deploy/FiboApp.ear
    14:20:37,984 INFO [EARDeployment] Registration is not done -> stop
    14:20:37,984 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jboss-4.0.0/server/default/deploy/FiboApp.ear
    org.jboss.deployment.DeploymentException: Error in accessing application metadata: ; - nested throwable: (javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EARDeployment,url='FiboApp.ear' already registered.)
    at org.jboss.deployment.EARDeployer.init(EARDeployer.java:270)
    at org.jboss.deployment.MainDeployer.init(MainDeployer.java:799)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:736)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
    at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy8.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
    Caused by: javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EARDeployment,url='FiboApp.ear' already registered.
    at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:755)
    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1397)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1392)
    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:359)
    at org.jboss.deployment.EARDeployer.init(EARDeployer.java:262)
    ... 21 more
    Can anybody help.
    Thx in advance.
    Greets from Germany
    Ben

    Hi, I ran into Sam problem. I have the Eclipse 3.1.0, JBOSS 4.0.1sp1, JBoss-IDE 1.3.0 running under JDK 1.5.0.02. It appers for sum resion that the jboss-web.xml is not getting the name of the �<ejb-ref-name></ejb-ref-name>�. if I manually add the name so it looks like this: �<ejb-ref-name>ejb/Fibo</ejb-ref-name>� the project deploys. I am new to this as well and am not shore what needs to be changed to fix this in the build. I am thinking it�s a problem in the way XDoclet parses the source for the META DATA.

  • Problem with JNDI in WLS 5.1

    Hi all,
    i have a problem with JNDI in WLE 5.1.
    i am accessing an LDAP on another machine running Netscape Directory Server.
    The host URL is ldap://myhost:65535/o=marco, c=fi
    i am always getting back the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassCastException: weblog
    ic.jndi.WLInitialContextFactory
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    58)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    and my code is this:
    Hashtable _environment = new Hashtable();
    try {
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    environment.put(Context.PROVIDERURL, "ldap://myhost:65535");
    if ((principal!=null) || (credentials!=null)) {
    environment.put(Context.SECURITYAUTHENTICATION, "simple");
    environment.put(Context.SECURITYPRINCIPAL, principal);
    environment.put(Context.SECURITYCREDENTIALS, credentials);
    context = new InitialContext(environment);
    parser = context.getNameParser(initialCtxFactory);
    } catch(Exception e) {
    e.printStackTrace();
    can anyone help me please??
    thanx in advance
    marco

    Take out the "weblogic.jndi.WLInitialContextFactory" and add the respective factory NAME..
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Cheers,
    Naggi
    Senthil Kumar S wrote:
    http://weblogic.com/docs51/classdocs/API_jndi.html#delegate
    Marco wrote:
    Hi all,
    i have a problem with JNDI in WLE 5.1.
    i am accessing an LDAP on another machine running Netscape Directory Server.
    The host URL is ldap://myhost:65535/o=marco, c=fi
    i am always getting back the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassCastException: weblog
    ic.jndi.WLInitialContextFactory
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    58)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    and my code is this:
    Hashtable _environment = new Hashtable();
    try {
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    environment.put(Context.PROVIDERURL, "ldap://myhost:65535");
    if ((principal!=null) || (credentials!=null)) {
    environment.put(Context.SECURITYAUTHENTICATION, "simple");
    environment.put(Context.SECURITYPRINCIPAL, principal);
    environment.put(Context.SECURITYCREDENTIALS, credentials);
    context = new InitialContext(environment);
    parser = context.getNameParser(initialCtxFactory);
    } catch(Exception e) {
    e.printStackTrace();
    can anyone help me please??
    thanx in advance
    marco--
    http://www.net4tech.com

  • Mail and iPhoto Problems with sending photos.

    Mail and iPhoto Problems with sending photos.
    I have this problem that started a while ago and seems to be getting worse.
    Here are the different scenarios.
    -If I try to share a photo to email within iPhoto, it will insert the image file name in the mail message, but no image icon or opened image. In iPhoto Preferences under General I have chosen to use Email Photos using Mail.
    -If I choose to use iPhoto to send the photo, it will compose the message and the photo is viewable. If I send the message i can view the photo within the email I sent to myself. Nothing happens when I double click on the photo in the Mail message. Nothing happens when i control click on the photo in the mail message. Nothing happens when I try to drag the photo to the desktop from the mail message. When I try to save attachments from the email and choose a place to save it, the save button is grayed out and it cannot be saved. When I check the mail message it says there is an attachemnt but there is no file size listed.
    -If I use the stationary within Mail app I cannot drag a photo into the placeholder, I get a circle with a line through it symbol when I try. It happens if I try to drag a photo from the desktop or from the media browser within Mail app.
    -If I drag the photo to the desktop from iPhoto, I can double click it on the desktop and it will open in Preview.
    -If I then control click on the same photo on the desktop and scroll to share/email, the generic photo icon will be inserted in the mail message. If i double click the photo icon in the mail message  I get a message it can't be opened because it is empty.
    -If I drag that same image to the mail message body the same thing happens.
    -If I send that email to someone they cannot open the image file.
    What I can do:
    - I can drag that same image file on the desktop to my dropbox folder and  it will upload. From there I can go on my iPad and download the photo and send it through email just fine.
    -I can open the same image file on my desktop in Preview, I can copy and paste it into a mail message and the image will be viewable in the mail message by me and by the recipient.
    -I can drag that same image on the desktop to my safari browser window and it will be viewable in the page. i can then copy and paste that image into a mail message and it is viewable in the message.  I can then send that email message to myself and i can control click on the image and get all my options. It also shows as an attachment with the size of the image file in the mail message.
    I can send that message to someone and they can see the photo and open it fine.
    -If I send that same email to me I can see the photo within the mail.  If I then drag that photo to the desktop I cannot use it again to put in an email as the same problem happens again.
    I have tried all scenarios in my user account, another users account and in a guest account. The same happens in all. I am guessing because of this it is not a corrupt preference file, unless all of the preference files are corrupt. The guest user account I added a new email account so it was brand new and still had the problem.
    I am stumped, all and any help is appreciated.

    Another problem that may be related….
    I have Snapz Pro. I used to be able to save the snaps to my desktop or a folder. Now when I take a screenshot and try to save the file to my desktop or a folder on my desktop I get this message  "Files cannot be created in the selected location. You do not have permission to write to the selected location.   Please choose a different location."  I have found that i can only save the file to the clipboard.   I have repaired permissions many times and still I have this problem.

  • I have bought Adobe Photoshop Elements 10 last August 2013 and having problems with installing it on Windows 8.1?

    I have bought Adobe Photoshop Elements 10 last August 2013 and having problems with installing it on Windows 8.1.  Why am I having this problem?

    You can check you Adobe account online to see if the serial number is registered under your account.  If not then your only option will likely be to contact Adobe Support directly thru chat to see if they can provide you with a/the serial number. For them to do so will require you being able to prove ownership.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • I have Iphoon 4 and ihave problem with speaker what i have to do?

    I have Iphoon 4 and ihave problem with speaker what i have to do?My problem is no body can heir me.
    I have got my IPhoon from London U.K. Now i'm in Saudia Arabia

    If it's happening on all the apps that you've downloaded from the App Store, but not the Apple built-in ones, then try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.
    If it's happening on all apps then try closing them all completely and then see if they work when you re-open them : from the home screen (i.e.not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I have ipad 2 and facing problem with programs swtching off

    I have ipad 2 and facing problem with programs it's swtching off while working and turn to home page. Am using ios 5

    If it's happening on all the apps that you've downloaded from the App Store, but not the Apple built-in ones, then try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.
    If it's happening on all apps then try closing them all completely and then see if they work when you re-open them : from the home screen (i.e.not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I have an iMac OS X 10.6.8 and have problems with the backup Disk for Time Machine disconnecting itself with the message that I ejected it improperly.. It ejected itself - why?

    I have an iMac OS X 10.6.8 and have problems with the backup drive to Time Machine ejecting itself and so does not automatically backup the way it is meant to do. It is connected with an USB cable to my iMac. What could cause this - malfuntioning drive?

    The "iLife" apps are not part of any Mac operating system install and are a separate purchase.
    Once you get past 10.6.6 you can purchase and download iPhoto, GarageBand and iMovie. iWeb and iDVD have been discontinued.
    Snow Leopard 10.6.6 and higher include the App Store application which is what you use to purchase Lion.

  • Just purchased Wndows Vista and having problems with the port for Palm 125

    I just purchased a Windows Vista computer and having problems with getting my Palm 125 to sync with the desktop.  I get an error message saying:  "Com1 not available"  What do I do?
    Thanks,
    Frustrated
    Post relates to: Palm m125
    This question was solved.
    View Solution.

    Sorry, that didn't work.  I get no drop down menu from the Hot Sync Manager for the Serial Port.  What comes up often is:  "The selected port, COM1, is not available at this time.  Hot Sync Manager will open the port when it becomes available." 
    Could it be the Norton Antivirus Firewall that is preventing the Hot Sync Manager to open the Serial Port?  Just a thought.  Thanks for your help.
    Post relates to: Palm m125

  • Scanner and fax problems with the Officejet 7410 AIO

    Hi
    I have Windows 7 SP1 Ultimate 64 bit and I installed the basic drivers for the network of the Officejet 7410 AIO printer and I checked that all its functions worked properly.
    Now, the functionality of the scanner and fax do not work more as in the "Devices and Printers" not appear more their relative icons. How come? How do I install them manually?
    Thanks
    Bye
    balubeto

    Hi balubeto,
    Welcome to the HP Forums!
    I see that you are having scanning, and faxing problems with your HP Officejet 7410 on Windows 7 SP1.
    I would recommend the following:
    Run the HP Print and Scan Doctor, to diagnose the issue.
    Uninstall the software. Uninstalling the Printer Software.
    Re-install the software using the HP Printer Install Wizard for Windows.
     Hope this helps, and have a great day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • MacBook will not start. I have restarted with original CD. I have used Utilities and "no problem" with hard drive. I have reset PRAM. I have tried safe boot. Nothing is work. Gray screen with Apple logo and rotating wheel. Thanks for any suggestions!

    MacBook will not start. I have restarted with original CD. I have used Utilities and "no problem" with hard drive. I have reset PRAM. I have tried safe boot. Nothing is work. Gray screen with Apple logo and rotating wheel. Thanks for any suggestions!

    Snow Leopard is a Mac OS X version. You say that it's the version you have in your Mac (10.6.8). Do a back up of your files, format the hard drive (using Disk Utility) and reinstall again

  • I bought an iPad in June 2012 and have it worked fine, but after 2 weeks of purchase, he began to hang up, then the sound disappeared and the screen became black. I updated all through itunes, but the sound is still absent, and still problem with sound an

    I bought an iPad in June 2012 and have it worked fine, but after 2 weeks of purchase, he began to hang up, then the sound disappeared and the screen became black. I updated all through iTunes, but the sound is still absent, and still problem with sound and iPad still doesnt work.

    Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • Pixelated video and upscaling problems with ringing artifacts on Youtube since Flash player 10.3

    Pixelated video and upscaling problems with ringing artifacts on Youtube since Flash player 10.3. Flash palyer 10.2 was the last version without the listed problems.
    For anyone interested you may see here what 'ringing artifacts' means : http://en.wikipedia.org/wiki/Ringing_artifact
    More about Image artifacts/errors related to video scaling here :  http://en.wikipedia.org/wiki/Video_scaler
    Test configuration :
    Windows 7 x64
    Intel HD Graphics with lastest available drivers from manufacturer.
    Any solution from Adobe?

    Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.
    Thanks,
    Chris

  • Power and Sync problems with Zen Vision:M

    )Power and Sync problems with Zen Vision:MX Lately, my Vision M is having problems that when I plug it into the USB port on any PC to charge it, it lights up for a moment and then goes blank.
    When I unplug it and reseat the usb cable, nothing happens. When I try to turn it on, it's dead. This happens even though it's not fully depleted of battery energy.
    Pressing the reset button does not do anything. The only thing that I've found that will work is to open it up and unplug the battery. But even that is starting to not work.
    This doesn't happen every time I use it, but it is happening quite a bit. It's gotten to the point today that I can't even charge the battery at all.
    Any suggestions? I don't think it's the battery, as it does charge when I don't have these issues, but I'm not really positi've of that either.

    The connector on the motherboard check it . It may need to be resoldered. The last time I ran into those symptoms that was the solution.

  • Jboss Server starting problem with eclipse

    {color:#000080}+i am using eclipse 3.4.2 and jboss.When i start jboss serve the following error is getting!!!!+{color}
    {color:#993300}DEPLOYMENTS IN ERROR:
    Deployment "TransactionManager" is in error due to the following reason(s): **ERROR**, java.lang.ExceptionInInitializerError: java.net.MalformedURLException: unknown protocol: e
    Deployment "jboss.jca:service=WorkManager" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:service=WorkManager' **
    Deployment "jboss:service=invoker,type=unified" is in error due to the following reason(s): Configured
    Deployment "<UNKNOWN DefaultUserTransactionprovider>" is in error due to the following reason(s): ** UNRESOLVED Demands 'TransactionManager' **
    Deployment "jboss:service=TransactionManager" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss:service=TransactionManager' **
    Deployment "jboss.jca:service=CachedConnectionManager" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:service=CachedConnectionManager' **
    Deployment "jboss.web:service=WebServer" is in error due to the following reason(s): Configured{color}
    Its URGENT
    Thanks in advance_+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Problems like this don't cease to amaze me.
    We are in the year of 2009 and this problem is most probably caused because jboss is started from a path which contains one or more space.
    Try move your jboss installation or eclipse installation (i am not familiar how jboss in installed inside eclipse) to a folder with no spaces and the problem should go away.
    It is sad that nice software like jboss has stupid bugs like this. Oh and it migh not be jboss but the JVM. It is silly in any case...

Maybe you are looking for