aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Calling deployed EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Calling deployed EJB" Watch "Calling deployed EJB" New topic
Author

Calling deployed EJB

veerabahu Subramanian
Greenhorn

Joined: Jun 01, 2007
Posts: 17
I am trying to deploy my first EJB, it is the same example given in [URL=Book]Mastering EJB 3.0[/url]. As described in the book I have create a business interface and wrote an bean implementation of it. Since it is EJB3.0 I have used annotation and no deployment descriptor file. Deployed the same in JBOSS using NetBeans.
Now I wrote the client to call a method (sayHello) in the bean class and the code goes like this (I tried using the same told in the example but it didn't workout

Note: My package structure is not as same told in the book. The only change I did
Now when I try to execute this java program from command line I get


Though I am not much sure of the causes of the exception, by reading javadoc i presumed that it could be due to illegal name format. So I tried giving "Hello.class", "Hello"....
Can someone guide me in finding answers for
1. The reason for this exception
2. Steps to get out of it (and have my first EJB3.0 client running)
3. How to find my EJB is deployed.
I am using
JBOSS AS 4.2
Netbeans 6.0
Windows
veerabahu Subramanian
Greenhorn

Joined: Jun 01, 2007
Posts: 17
From the JMXConsole => JNDIView found that my service (Hello) is not deployed. So I tried redeploying and the server logs shows as
2008-04-20 12:01:46,328 DEBUG [org.jboss.deployment.MainDeployer] Undeploying file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar, isShutdown=false
2008-04-20 12:01:46,328 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Unregistering cl=org.jboss.mx.loading.UnifiedClassLoader3@c83cfd{ url=file:/C:/JBOSS/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27015Hello.jar ,addedOrder=52}
2008-04-20 12:01:46,328 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader3@c83cfd{ url=file:/C:/JBOSS/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27015Hello.jar ,addedOrder=52}
2008-04-20 12:01:46,328 DEBUG [org.jboss.util.file.Files] Failed to delete dir: C:\JBOSS\jboss-4.2.2.GA\server\default\tmp\deploy\tmp27015Hello.jar
2008-04-20 12:01:46,343 DEBUG [org.jboss.deployment.DeploymentInfo] Could not delete file:/C:/JBOSS/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27015Hello.jar restart will delete it
2008-04-20 12:01:46,343 DEBUG [org.jboss.deployment.MainDeployer] Undeployed file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,375 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,375 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,375 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar -> C:\JBOSS\jboss-4.2.2.GA\server\default\tmp\deploy\tmp27016Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.JARDeployer] No xml files found
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.JARDeployer@1950198
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.JARDeployer] looking for nested deployments in : file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:service=LoaderRepository,name=Default, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
2008-04-20 12:01:51,390 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@12a3793, cl=org.jboss.mx.loading.UnifiedClassLoader3@175650e{ url=file:/C:/JBOSS/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27016Hello.jar ,addedOrder=0}
2008-04-20 12:01:51,390 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@12a3793, cl=org.jboss.mx.loading.UnifiedClassLoader3@175650e{ url=file:/C:/JBOSS/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27016Hello.jar ,addedOrder=0}
2008-04-20 12:01:51,390 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@175650e{ url=file:/C:/JBOSS/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27016Hello.jar ,addedOrder=0}
2008-04-20 12:01:51,390 DEBUG [org.jboss.mx.loading.ClassLoaderUtils] Multiple class loaders found for pkg:
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar
2008-04-20 12:01:51,390 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar -> file:/C:/JBOSS/jboss-4.2.2.GA/server/default/deploy/Hello.jar

I don't see any misbehaviour with the above log. Can some one comment on what's going wrong. Do I miss anything in the client side or in the server side.

Your help is much appreciated.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling deployed EJB