Avatar of gudii9
gudii9
Flag for United States of America asked on

EJB sample session bean example

Hi,

I am configuring jboss in my eclipse to run sample ejb session bean. while setting servr i gave server location at runtime by browsing there. Now it is asking JRE. Therre are 2 options default jre and 1.6. what i have to select. what is the difference between them. which one to take. when we have to take each of them.

Also what is the importance of remote interface, can i select local interface option instead of remote interface.

while deploying do i always have to export as jar to jboss deploy location below
C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\deploy

cannot I export as EAR instead of jar?


I started run windows batch file from folder
C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\bin
I do not see my command prompt rolling with jboss server start up messages and jndi names etc. How do i set up to see start up message, application deployed message, jndi name in the command prompt.


when i tried to start server from eclipse getting below error

20:26:14,413 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
20:26:14,415 INFO  [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)
20:26:14,416 INFO  [ServerImpl] Bootstrap URL: null
20:26:14,416 INFO  [ServerImpl] Home Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA
20:26:14,417 INFO  [ServerImpl] Home URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/
20:26:14,417 INFO  [ServerImpl] Library URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/lib/
20:26:14,418 INFO  [ServerImpl] Patch URL: null
20:26:14,418 INFO  [ServerImpl] Common Base URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/common/
20:26:14,421 INFO  [ServerImpl] Common Library URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/common/lib/
20:26:14,421 INFO  [ServerImpl] Server Name: default
20:26:14,421 INFO  [ServerImpl] Server Base Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server
20:26:14,422 INFO  [ServerImpl] Server Base URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/
20:26:14,422 INFO  [ServerImpl] Server Config URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/conf/
20:26:14,422 INFO  [ServerImpl] Server Home Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default
20:26:14,434 INFO  [ServerImpl] Server Home URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/
20:26:14,434 INFO  [ServerImpl] Server Data Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\data
20:26:14,435 INFO  [ServerImpl] Server Library URL: file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/lib/
20:26:14,435 INFO  [ServerImpl] Server Log Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\log
20:26:14,435 INFO  [ServerImpl] Server Native Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\tmp\native
20:26:14,435 INFO  [ServerImpl] Server Temp Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\tmp
20:26:14,436 INFO  [ServerImpl] Server Temp Deploy Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\tmp\deploy
20:26:15,539 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/conf/bootstrap.xml
20:26:16,373 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.IterableTimedVFSCache]
20:26:16,389 INFO  [VFSCacheFactory] Using VFSCache [IterableTimedVFSCache{lifetime=1800, resolution=60}]
20:26:16,960 INFO  [CopyMechanism] VFS temp dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\tmp
20:26:16,975 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.
20:26:18,589 INFO  [ServerInfo] Java version: 1.6.0_23,Sun Microsystems Inc.
20:26:18,589 INFO  [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 19.0-b09,Sun Microsystems Inc.
20:26:18,589 INFO  [ServerInfo] OS-System: Windows 7 6.1,amd64
20:26:18,630 INFO  [JMXKernel] Legacy JMX core initialized
20:26:21,195 INFO  [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@5a2445d7(root=C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
20:26:21,197 INFO  [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@5a2445d7(root=C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
20:26:21,198 INFO  [ProfileServiceImpl] Loaded profile: ProfileImpl@3d9478c7{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
20:26:22,857 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/
20:26:22,863 ERROR [AbstractKernelController] Error installing to Start: name=jboss:service=WebService state=Create mode=Manual requiredState=Installed
java.lang.Exception: Port 8083 already in use.
      at org.jboss.web.WebServer.start(WebServer.java:233)
      at org.jboss.web.WebService.startService(WebService.java:322)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.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:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
      at $Proxy36.start(Unknown Source)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
      at org.jboss.system.ServiceController.start(ServiceController.java:460)
      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:274)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
      at org.jboss.Main.boot(Main.java:209)
      at org.jboss.Main$1.run(Main.java:547)
      at java.lang.Thread.run(Unknown Source)
Caused by: java.net.BindException: Address already in use: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(Unknown Source)
      at java.net.ServerSocket.bind(Unknown Source)
      at java.net.ServerSocket.<init>(Unknown Source)
      at org.jboss.web.WebServer.start(WebServer.java:226)
      ... 54 more
20:26:22,888 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/conf/jboss-service.xml state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying: jboss:service=WebService
      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:123)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:274)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
      at org.jboss.Main.boot(Main.java:209)
      at org.jboss.Main$1.run(Main.java:547)
      at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Port 8083 already in use.
      at org.jboss.web.WebServer.start(WebServer.java:233)
      at org.jboss.web.WebService.startService(WebService.java:322)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.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:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
      at $Proxy36.start(Unknown Source)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
      at org.jboss.system.ServiceController.start(ServiceController.java:460)
      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
      ... 23 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(Unknown Source)
      at java.net.ServerSocket.bind(Unknown Source)
      at java.net.ServerSocket.<init>(Unknown Source)
      at org.jboss.web.WebServer.start(WebServer.java:226)
      ... 54 more
20:26:22,901 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

*** CONTEXTS IN ERROR: Name -> Error

vfsfile:/C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/conf/jboss-service.xml -> java.net.BindException: Address already in use: JVM_Bind


20:26:22,902 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 8s:464ms



How do i fix above error.


i deleted old server and recreated by giving port number 3333
now i am seeing cannot start in 50 seconds error.

Server JBoss v5.0 at localhost was unable to start within 50 seconds. If the server requires more time, try increasing the timeout in the server editor.

where do i go to change it.
How do i fix this error

i changed to 150 still same error. what are jboss tools do i need install them. where to download and how to install

Even 400 seconds also same error. i changed jre from default to 1.6 not sure if that fixes this error.

i was trying to download jboss 5.0.0 CR2 instead of jboss 5.0.0 CR1 from link
http://www.jboss.org/jbossas/downloads/

But i do not see CR2. Where can i download CR2
Please advise

Any ideas, resources, sample code highly appreciated. thanks in advance
JRE.jpg
JRE2.jpg
JRE3.jpg
JRE4.jpg
JRE5.jpg
JRE6.jpg
JRE7.jpg
JRE8.jpg
Java EEJavaJSP

Avatar of undefined
Last Comment
gudii9

8/22/2022 - Mon
Am P

You can use 5.0.0 for 5.0.0 CR2.

Try to execute run.bat from command prompt. If things are fine thru command prompt, but not fine thru eclipse then check the server configuration in eclipse.

Best way to check servers are running properly is to run it standalone. You can follow the below steps.

1. Install jboss, if not installed already
2. Execute run.bat from command prompt
3. Check server is launched properly, verify it by http:/localhost:8080 (refer the attached image)
4. Now, you can integrate your server with any IDE an go ahead.
VerifyJboss.jpg
girionis

Something is already using port 8083. Can you find the process and kill it? Otherwise do a restart and it should go away.
gudii9

ASKER
>>Something is already using port 8083. Can you find the process and kill it? Otherwise do a restart and it should go away.


i did many restarts did not help. I changed port to 3333 did not help. changed to 2222 did not help
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
gudii9

ASKER
>>>You can use 5.0.0 for 5.0.0 CR2.

>>>Try to execute run.bat from command prompt



I had lot of issues with 5.0.0. I have tried so many times but no luck yet.

I went to bin directory and gave command run.bat but it did not start the server as in attachment. Do I need to give any other specific command to start.
why lot of people use jboss 5 intead can i use jboss 6 or 7 as well.

my laptop where i am trying has windows7 OS.

please advise
cmd.jpg
gudii9

ASKER
i tried as in attachment and that is also not working. please advise
cmd2.jpg
gudii9

ASKER
i checked this video

http://www.youtube.com/watch?v=maUmTetFMCk


they have run.bat

which when they click starting server.


i do not have run.bat file

but i have "run windlows batch file".
Are both of them same. I wonder when i click why it wont start.

when i click above file i see command promt window opening quickly for 1 second and disappearing. not sure what is the issue

>>>You can use 5.0.0 for 5.0.0 CR2.
can you please send me direct link to download the server
my laptop is running on windows 7 64 bit OS

i even installed jboss with jdk6 and set jboss home and staterd as below from commnad prompt
http://cmanios.wordpress.com/2012/05/08/install-jboss-5-1-0-ga-to-windows-7/

C:\softwares\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\bin\run.bat  -b 0.0.0.0

that also did not help

please advise
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
gudii9

ASKER
Alternately i am trying weblogic server as well.

http://stackoverflow.com/questions/1987061/how-to-work-with-weblogic-in-eclipse

But no luck yet to set it up. It is wasting lot of time to configure app servers and integrate it with eclipse. IS there any gopod video or tutorial to do it in simple way.



what is


Oracle WebLogic Server 11gR1 (10.3.6) + Coherence -
Package Installer


i do not see plain weblogic installer without coherence. Not sure what is coherence is all all about?
please advise
ASKER CERTIFIED SOLUTION
Am P

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
gudii9

ASKER
>>>What happens if you change to port 3333 or 2222? Do you get any errors in the logs?

I am trying to first start from command prompt to see it starts fine or not.

I do not know how to start from command prompt.

I went to bin directory from windows command prompt .

typed
ran.bat
then enter and nothing is triggering. Do i need to install the server. I did not install jBoss server. I just downloaded zip file and unzipped it and set up advanced environment variables to JBOSS_HOME and then going to
I went to bin directory from windows command prompt .
typed
ran.bat

Am I am missing any other step in between like installing server etc. please advise
girionis

What do you get in the logs? This is a very important step in order to resolve your issue. Have a look at the logs and tell us if you get anything.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
gudii9

ASKER
Where do i see logs

i saw two files here which i am attaching
C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\log

Their time stamp showing 6th not 8th(ie today date) even though i clicked run windows batch file just now.

please advise
server.log
boot.log
Am P

gudii9

ASKER
as  mentioned in the link i added bean entry to bootstrap file under

C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server\default\conf



my new bootstrap file looks as below

<?xml version="1.0" encoding="UTF-8"?>
<!--
   The list of URLs for mc beans to load during bootstrap.
   $Id: bootstrap.xml 81277 2008-11-19 09:54:09Z dimitris@jboss.org $
-->
<bootstrap xmlns="urn:jboss:bootstrap:1.0">

   <url>bootstrap/vfs.xml</url>
   <url>bootstrap/classloader.xml</url>
   <url>bootstrap/aop.xml</url>
   <url>bootstrap/jmx.xml</url>
   <url>bootstrap/deployers.xml</url>
   <url>bootstrap/bindings.xml</url>
   <url>bootstrap/profile-repository.xml</url>
   
   
   <bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
<constructor><parameter class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
<property name="mainDeployer"><inject bean="MainDeployer" /></property>
<property name="serializer"><inject bean="AttachmentsSerializer" /></property>
<property name="persistenceFactory"><inject bean="PersistenceFactory" /></property>
</bean>

</bootstrap>

still did not fix the issue
Log files did not roll now still show April 6th logs
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
gudii9

ASKER
I tried just run and then enter


C:\softwares\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\bin>run

C:\softwares\jboss-5.0.0.GA-jdk6\jboss-5.0.0.GA\bin>




that is also not triggering server start. not sure what is the issue. can you please advise
gudii9

ASKER
after i change JAVA_HOME JBOSS_HOME

when i say run at bin directory of command prompt it triggered the jboss server but this time i am getting below error . please advise





C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\bin>run
===============================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA

  JAVA: C:\Program Files\Java\jdk1.7.0_02\bin\java

  JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=25
6m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Ds
un.rmi.dgc.server.gcInterval=3600000

  CLASSPATH: ;C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\bin\run.jar

===============================================================================

13:54:03,859 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
13:54:03,861 INFO  [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SV
NTag=JBoss_5_0_0_GA date=200812041714)
13:54:03,862 INFO  [ServerImpl] Bootstrap URL: null
13:54:03,863 INFO  [ServerImpl] Home Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.
0.GA
13:54:03,864 INFO  [ServerImpl] Home URL: file:/C:/softwares/jboss-5.0.0.GA/jbos
s-5.0.0.GA/
13:54:03,865 INFO  [ServerImpl] Library URL: file:/C:/softwares/jboss-5.0.0.GA/j
boss-5.0.0.GA/lib/
13:54:03,866 INFO  [ServerImpl] Patch URL: null
13:54:03,867 INFO  [ServerImpl] Common Base URL: file:/C:/softwares/jboss-5.0.0.
GA/jboss-5.0.0.GA/common/
13:54:03,868 INFO  [ServerImpl] Common Library URL: file:/C:/softwares/jboss-5.0
.0.GA/jboss-5.0.0.GA/common/lib/
13:54:03,868 INFO  [ServerImpl] Server Name: default
13:54:03,869 INFO  [ServerImpl] Server Base Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server
13:54:03,870 INFO  [ServerImpl] Server Base URL: file:/C:/softwares/jboss-5.0.0.
GA/jboss-5.0.0.GA/server/
13:54:03,870 INFO  [ServerImpl] Server Config URL: file:/C:/softwares/jboss-5.0.
0.GA/jboss-5.0.0.GA/server/default/conf/
13:54:03,871 INFO  [ServerImpl] Server Home Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server\default
13:54:03,871 INFO  [ServerImpl] Server Home URL: file:/C:/softwares/jboss-5.0.0.
GA/jboss-5.0.0.GA/server/default/
13:54:03,872 INFO  [ServerImpl] Server Data Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server\default\data
13:54:03,873 INFO  [ServerImpl] Server Library URL: file:/C:/softwares/jboss-5.0
.0.GA/jboss-5.0.0.GA/server/default/lib/
13:54:03,873 INFO  [ServerImpl] Server Log Dir: C:\softwares\jboss-5.0.0.GA\jbos
s-5.0.0.GA\server\default\log
13:54:03,874 INFO  [ServerImpl] Server Native Dir: C:\softwares\jboss-5.0.0.GA\j
boss-5.0.0.GA\server\default\tmp\native
13:54:03,875 INFO  [ServerImpl] Server Temp Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server\default\tmp
13:54:03,876 INFO  [ServerImpl] Server Temp Deploy Dir: C:\softwares\jboss-5.0.0
.GA\jboss-5.0.0.GA\server\default\tmp\deploy
13:54:04,493 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/s
oftwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/conf/bootstrap.xml
Failed to boot JBoss:
java.lang.RuntimeException: Error unmarshalling file:/C:/softwares/jboss-5.0.0.G
A/jboss-5.0.0.GA/server/default/conf/bootstrap.xml
        at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:60
)
        at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java
:129)
        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:
394)
        at org.jboss.Main.boot(Main.java:209)
        at org.jboss.Main$1.run(Main.java:547)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/
C:/softwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/conf/bootstrap.xml@17,
115
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
er.java:177)
        at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java
:119)
        at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:53
)
        ... 5 more
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:bootstrap:1.
0}bean not found as a child of {urn:jboss:bootstrap:1.0}bootstrap
        at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startE
lement(SundayContentHandler.java:400)
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHan
dler.startElement(SaxJBossXBParser.java:401)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
        at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Sourc
e)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
ce)
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
er.java:173)
        ... 7 more
13:54:04,617 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
13:54:04,638 INFO  [ServerImpl] Shutdown complete
Shutdown complete
Halting VM
Press any key to continue . . .












I saw in below video they are using jboss 5.0.0 CR2 I am not able to see CR2 at
http://www.jboss.org/jbossas/downloads/

where can I get jboss 5.0.0CR2 server dump. please advise
gudii9

ASKER
when i tried jboss 5.1 getting same error as above
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
girionis

Is there any reason you want to install JBoss 5? Can you try a later version? It seems that there is some incompatibilities between your jboss version and the java you're using.
gudii9

ASKER
From command prompt only if i have jdk 1.7.0.02 then only it is triggering jboss server. if i have 1.7.0.03 then it is not triggering jboss server when type run and enter. Not sure why works with jdk1.7.0.02 not with 1.7.03


Even with 1.7.0.02 it is giving below error after some time




  CLASSPATH: ;C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\bin\run.jar

===============================================================================

14:26:23,002 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
14:26:23,003 INFO  [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SV
NTag=JBoss_5_0_0_GA date=200812041714)
14:26:23,004 INFO  [ServerImpl] Bootstrap URL: null
14:26:23,004 INFO  [ServerImpl] Home Dir: C:\softwares\jboss-5.0.0.GA\jboss-5.0.
0.GA
14:26:23,005 INFO  [ServerImpl] Home URL: file:/C:/softwares/jboss-5.0.0.GA/jbos
s-5.0.0.GA/
14:26:23,005 INFO  [ServerImpl] Library URL: file:/C:/softwares/jboss-5.0.0.GA/j
boss-5.0.0.GA/lib/
14:26:23,006 INFO  [ServerImpl] Patch URL: null
14:26:23,007 INFO  [ServerImpl] Common Base URL: file:/C:/softwares/jboss-5.0.0.
GA/jboss-5.0.0.GA/common/
14:26:23,007 INFO  [ServerImpl] Common Library URL: file:/C:/softwares/jboss-5.0
.0.GA/jboss-5.0.0.GA/common/lib/
14:26:23,008 INFO  [ServerImpl] Server Name: default
14:26:23,008 INFO  [ServerImpl] Server Base Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server
14:26:23,009 INFO  [ServerImpl] Server Base URL: file:/C:/softwares/jboss-5.0.0.
GA/jboss-5.0.0.GA/server/
14:26:23,009 INFO  [ServerImpl] Server Config URL: file:/C:/softwares/jboss-5.0.
0.GA/jboss-5.0.0.GA/server/default/conf/
14:26:23,009 INFO  [ServerImpl] Server Home Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server\default
14:26:23,010 INFO  [ServerImpl] Server Home URL: file:/C:/softwares/jboss-5.0.0.
GA/jboss-5.0.0.GA/server/default/
14:26:23,010 INFO  [ServerImpl] Server Data Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server\default\data
14:26:23,011 INFO  [ServerImpl] Server Library URL: file:/C:/softwares/jboss-5.0
.0.GA/jboss-5.0.0.GA/server/default/lib/
14:26:23,011 INFO  [ServerImpl] Server Log Dir: C:\softwares\jboss-5.0.0.GA\jbos
s-5.0.0.GA\server\default\log
14:26:23,011 INFO  [ServerImpl] Server Native Dir: C:\softwares\jboss-5.0.0.GA\j
boss-5.0.0.GA\server\default\tmp\native
14:26:23,012 INFO  [ServerImpl] Server Temp Dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server\default\tmp
14:26:23,012 INFO  [ServerImpl] Server Temp Deploy Dir: C:\softwares\jboss-5.0.0
.GA\jboss-5.0.0.GA\server\default\tmp\deploy
14:26:24,129 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/s
oftwares/jboss-5.0.0.GA/jboss-5.0.0.GA/server/default/conf/bootstrap.xml
14:26:25,009 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.pl
ugins.cache.IterableTimedVFSCache]
14:26:25,022 INFO  [VFSCacheFactory] Using VFSCache [IterableTimedVFSCache{lifet
ime=1800, resolution=60}]
14:26:25,555 INFO  [CopyMechanism] VFS temp dir: C:\softwares\jboss-5.0.0.GA\jbo
ss-5.0.0.GA\server\default\tmp
14:26:25,556 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.

14:26:26,928 INFO  [ServerInfo] Java version: 1.7.0_02,Oracle Corporation
14:26:26,929 INFO  [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 22.0-
b10,Oracle Corporation
14:26:26,930 INFO  [ServerInfo] OS-System: Windows 7 6.1,amd64
14:26:26,966 INFO  [JMXKernel] Legacy JMX core initialized
14:26:28,929 ERROR [AbstractKernelController] Error installing to Instantiated:
name=StandardBindings state=Described
java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.re
flect.Constructor expected=[int] actual=[java.util.HashSet]
        at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(
ReflectionUtils.java:395)
        at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(R
eflectionUtils.java:153)
        at org.jboss.reflect.plugins.introspection.ReflectConstructorInfoImpl.ne
wInstance(ReflectConstructorInfoImpl.java:106)
        at org.jboss.joinpoint.plugins.BasicConstructorJoinPoint.dispatch(BasicC
onstructorJoinPoint.java:80)
        at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.crea
teTarget(AOPConstructorJoinpoint.java:276)
        at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.disp
atch(AOPConstructorJoinpoint.java:97)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$Joi
npointDispatchWrapper.execute(KernelControllerContextAction.java:241)
        at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(Executio
nWrapper.java:47)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dis
patchExecutionWrapper(KernelControllerContextAction.java:109)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dis
patchJoinPoint(KernelControllerContextAction.java:70)
        at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionIn
ternal(InstantiateAction.java:66)
        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction
(InstallsAwareAction.java:54)
        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction
(InstallsAwareAction.java:42)
        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.sim
pleInstallAction(SimpleControllerContextAction.java:62)
        at org.jboss.dependency.plugins.action.AccessControllerContextAction.ins
tall(AccessControllerContextAction.java:71)
        at org.jboss.dependency.plugins.AbstractControllerContextActions.install
(AbstractControllerContextActions.java:51)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
ctControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
oller.java:1598)
        at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
ctController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:1062)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
actController.java:984)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
oller.java:774)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
oller.java:540)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean
(AbstractKernelDeployer.java:331)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean
s(AbstractKernelDeployer.java:309)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(Abs
tractKernelDeployer.java:130)
        at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicK
ernelDeployer.java:76)
        at org.jboss.bootstrap.microcontainer.TempBasicXMLDeployer.deploy(TempBa
sicXMLDeployer.java:91)
        at org.jboss.bootstrap.microcontainer.TempBasicXMLDeployer.deploy(TempBa
sicXMLDeployer.java:161)
        at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java
:144)
        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:
394)
        at org.jboss.Main.boot(Main.java:209)
        at org.jboss.Main$1.run(Main.java:547)
        at java.lang.Thread.run(Unknown Source)
14:26:29,382 INFO  [ProfileServiceImpl] Loading profile: default from: org.jboss
.system.server.profileservice.repository.SerializableDeploymentRepository@6f36ac
8a(root=C:\softwares\jboss-5.0.0.GA\jboss-5.0.0.GA\server, key=org.jboss.profile
service.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
14:26:29,385 INFO  [ProfileImpl] Using repository:org.jboss.system.server.profil
eservice.repository.SerializableDeploymentRepository@6f36ac8a(root=C:\softwares\
jboss-5.0.0.GA\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKe
y@143b82c3[domain=default,server=default,name=default])
14:26:29,385 INFO  [ProfileServiceImpl] Loaded profile: ProfileImpl@1e33c42c{key
=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,
name=default]}
Failed to boot JBoss:
java.lang.IllegalStateException: Incompletely deployed:

*** DEPLOYMENTS IN ERROR: Name -> Error
StandardBindings -> java.lang.IllegalArgumentException: Wrong arguments. new for
 target java.lang.reflect.Constructor expected=[int] actual=[java.util.HashSet]

*** DEPLOYMENTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual S
tate}
SystemPropertyBinder#1 -> ServiceBindingManager{Installed:Described}
ServiceBindingManager -> ServiceBindingStore{Installed:Instantiated}
SystemPropertyBinder -> SystemPropertyBinder#1{Installed:Described}
ServiceBindingStore -> StandardBindings{Installed:**ERROR**}

        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalVa
lidate(AbstractKernelDeployer.java:290)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(A
bstractKernelDeployer.java:174)
        at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java
:148)
        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:
394)
        at org.jboss.Main.boot(Main.java:209)
        at org.jboss.Main$1.run(Main.java:547)
        at java.lang.Thread.run(Unknown Source)
14:26:29,943 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
14:26:29,951 INFO  [ServerImpl] Shutdown complete
Shutdown complete
Halting VM
Press any key to continue . . .











please advise on how to fix it
gudii9

ASKER
looks like some combinations gives that error

http://stackoverflow.com/questions/2489106/error-starting-jboss-server

How do we know which combination on windows 64 machine gives issue. please advise
jdk1.7.0.02Works.jpg
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
girionis

There are some doubts whether jboss 5 works with jdk 7. As I mentioned earlier try to upgrade to jboss 7 and see if the error persists.
gudii9

ASKER
i am not able to see jboss7 server adapter to add jboss 7 as in attachment. i am trying to add adapter but not able to add. please advise
juno1.jpg
juno2.jpg
juno3.jpg
juno4.jpg
gudii9

ASKER
I went help>>>Install New software>>>then pasted y=url below
http://download.jboss.org/jbosstools/updates/stable/juno/
as given in the link
http://www.jboss.org/tools/download/installation/update_4_0.html#installon420421
i am getting error as below

Unable to read repository at http://download.jboss.org/jbosstools/updates/stable/juno/content.xml.

How do i fix above error.

please advise
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
gudii9

ASKER
do i need to change port MANUALLY in eclipse as well as AT

C:\softwares\eclipse-jee-juno-SR1-win32-x86_64\eclipse\plugins\org.eclipse.jst.server.generic.jboss_1.6.1.v200904151730\servers\jboss5.serverdef

as given below link

http://www.coderanch.com/t/447905/JBoss/Jboss-startup-hangs-Eclipse
I see CR2 here
http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.0.0.CR2/

Not sure if that helps.

I have to increase timeout to 400 from initial 50 by rightclicking on the server in eclipse ide and open then timeout change to 400

Finally it started with jboss5.0.0 CR2
gudii9

ASKER
I see error with annotations
interface class

package com.gp;

@Remote
public interface SampleSessionbeanRemote {
public String testDemo();
	

}


impl class

package com.gp;

/**
 * Session Bean implementation class SampleSessionbean
 */
@Stateless
public class SampleSessionbean implements SampleSessionbeanRemote {

    /**
     * Default constructor. 
     */
    public SampleSessionbean() {
        // TODO Auto-generated constructor stub
    }

	@Override
	public String testDemo() {
		// TODO Auto-generated method stub
		return "test ejb sb";
		
	}

}

Open in new window


I see error at annotations saying cannot resolved to type. how can i fix it. please advise
gudii9

ASKER
One thing i did not understand why it did not work with jdk 1.7.0.3 where as it worked fine with jdk1.7.0.02. i thought higher versions are backward compatible. please advise
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
gudii9

ASKER
where do we see all the jndi names in jboss admin console

http://localhost:8080/jmx-console/

It worked with one other example on net


i created ear project DemoEJB and exported as jar then TestEJB dynamica webproject with servlet inside that called TestDemoEJB



interface is

package com.demo;

import javax.ejb.Remote;

@Remote
public interface FirstDemoEJBRemote {
public String TestDemo();
}


impl file

package com.demo;

import javax.ejb.Stateless;

/**
 * Session Bean implementation class FirstDemoEJB
 */
@Stateless
public class FirstDemoEJB implements FirstDemoEJBRemote {

    /**
     * Default constructor. 
     */
    public FirstDemoEJB() {
        // TODO Auto-generated constructor stub
    }

	@Override
	public String TestDemo() {
		// TODO Auto-generated method stub
		return "testing session bean";
	}

}


servlet is

package com.test;

import java.io.IOException;
import java.io.PrintWriter;

import javax.naming.InitialContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class TestDemoEJB
 */
public class TestDemoEJB extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public TestDemoEJB() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		PrintWriter out=response.getWriter();
		try {
			InitialContext cts=new InitialContext();
		Object obj=	cts.lookup("FirstDemoEJB/remote");
			out.print(obj);
		} catch (Exception ex) {
			out.print(ex.getStackTrace());
			// TODO: handle exception
		}
	}

}

Open in new window


When i hit

http://localhost:8080/TestEJB/TestDemoEJB

got output as

Proxy to jboss.j2ee:ear=DemoEJB.jar,jar=DemoEJB.jar,name=FirstDemoEJB,service=EJB3 implementing [interface org.jboss.ejb3.proxy.intf.SessionProxy, interface org.jboss.ejb3.proxy.intf.EjbProxy, interface com.demo.FirstDemoEJBRemote]


not sure what the above output mean. please advise
adminConsole.jpg
adminConsole2.jpg
adminConsole3.jpg
girionis

Did the new installation work?
Am P

To see jndi names..follow below steps:

1. goto http://localhost:8080/jmx-console
2. click on “service=JNDIView” link under the “jboss” section
3. click on the button under “java.lang.String list()” …


Also, refer https://community.jboss.org/wiki/DisplayTheJDNITreeWithTheJMXConsole
Your help has saved me hundreds of hours of internet surfing.
fblack61
gudii9

ASKER
I am always exporting to 'default' domain. how to create new domain and export into that
gudii9

ASKER
I see as below

JMX MBean Operation View

ganesha-PC      
 



 Other components with java:comp namespace


java:comp namespace of the component jboss.j2ee:ear=DemoEJB.jar,jar=DemoEJB.jar,name=FirstDemoEJB,service=EJB3 :

  +- EJBContext (class: javax.ejb.EJBContext)
  +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
  +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
  +- env (class: org.jnp.interfaces.NamingContext)
  +- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)

java: Namespace


  +- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
  +- comp (class: javax.namingMain.Context)
  +- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
  +- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)
  +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
  +- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- Mail (class: javax.mail.Session)
  +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
  +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
  +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
  +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
  +- jaas (class: javax.naming.Context)
  |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
  +- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
  +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
  +- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration

Global JNDI Namespace


  +- UserTransactionSessionFactory (proxy: $Proxy130 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
  +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
  +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
  +- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- topic (class: org.jnp.interfaces.NamingContext)
  +- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- FirstDemoEJB (class: org.jnp.interfaces.NamingContext)
  |   +- remote (class: Proxy for: com.demo.FirstDemoEJBRemote)
  |   +- remote-com.demo.FirstDemoEJBRemote (class: Proxy for: com.demo.FirstDemoEJBRemote)
  +- queue (class: org.jnp.interfaces.NamingContext)
  |   +- DLQ (class: org.jboss.jms.destination.JBossQueue)
  |   +- ExpiryQueue (class: org.jboss.jms.destination.JBossQueue)
  +- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
  +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
  +- jmx (class: org.jnp.interfaces.NamingContext)
  |   +- invoker (class: org.jnp.interfaces.NamingContext)
  |   |   +- RMIAdaptor (proxy: $Proxy127 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
  |   +- rmi (class: org.jnp.interfaces.NamingContext)
  |   |   +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
  +- TomcatAuthenticators (class: java.util.Properties)
  +- console (class: org.jnp.interfaces.NamingContext)
  |   +- PluginManager (proxy: $Proxy131 implements interface org.jboss.console.manager.PluginManagerMBean)



>>>3. click on the button under “java.lang.String list()” …


why not othger options why only

click on the button under “java.lang.String list()” …


needs to be clicked .

please advise