• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

EJB 2.0, WSAD 5, example problem

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi every one!!

I'm trying to program my first EJB. I am using:
-WSAD 5.1.1,
-WAS test environment 5.1
-EJB 2.0

I am following this tutorial:

http://www.devx.com/ibm/Article/16365

I am doing it exactly as it is said there, well the only differnce is that they use WAS 5.0 and I use WAS 5.1.

When I get to step number 7.a. I get an error, and I cannot continue.
The Web-based Universal Test Client opens, in the JNDI explorer, and it says:

IWAD0402E Could not perform lookup with the JNDI name: A communication failure occurred while attempting to obtain an initial context with the provider URL: "iiop://localhost:2809/". Make sure that any bootstrap address information in the URL is correct and that the target name server is running. A bootstrap address with no port specification defaults to port 2809. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration.

Finding in the internet I saw it was that I had to Generate | Deployment and RMIC code, but I do it and I get the same problem

What am I doing wrong?
I even downloaded an EAR of the project, imported it and I got again the same problem

Could someone point me to another easy tutorial to prepare a 2.0 EJB with WSAD 5 and WAS 5.1 and use it with a JSP please? Or could you tell me how to do it?

Thanks a lot in advance!!
 
author & internet detective
Posts: 41995
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To troubleshoot a bit, try starting the server by right clicking it and starting. Check the logs as you do. In particular, does the server start up without error? Does the application?

Also, you know that WSAD 5 is no longer supported and EJB 2 is quite old, right?
 
pepe lotas
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi and thanks for the answer

Starting the server right clicking on it and starting does the same effect than starting from the bean by right clicking it and running in server. The logs in the console are this, they seem ok to me, they are all blue colored, no red at all:

*** Se está iniciando el servidor ***
************ Start Display Current Environment ************
WebSphere Platform 5.1 [BASE 5.1.0 b0344.02] running with process name localhost\localhost\server1 and process id 3204
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51
user.install.root = C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51
Java Home = C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51\java\jre
ws.ext.dirs = C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/java/lib;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/classes;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/classes;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/lib;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/lib/ext;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/web/help;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime;C:/Archivos de programa/IBM/SQLLIB/java/db2java.zip;C:/Archivos de programa/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.webservice_5.1.1/runtime/worf.jar
Classpath = C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/properties;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/properties;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/lib/bootstrap.jar;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/lib/j2ee.jar;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/lib/lmproxy.jar;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/lib/urlprotocols.jar;C:/Archivos de programa/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1/runtime/wteServers.jar;C:/Archivos de programa/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1/runtime/wasToolsCommon.jar
Java Library path = C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/bin;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/java/bin;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51/java/jre/bin;C:\Archivos de programa\IBM\WebSphere Studio\eclipse\jre\bin;.;C:\Archivos de programa\IBM\WebSphere Studio\eclipse\jre\bin;C:\Archivos de programa\IBM\WebSphere MQ\Java\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Archivos de programa\ATI Technologies\ATI.ACE\Core-Static;C:\Archivos de programa\Archivos comunes\Roxio Shared\DLLShared\;C:\Archivos de programa\Archivos comunes\Roxio Shared\9.0\DLLShared\;c:\oracle\ora81\bin;c:\oracle\ora92\bin;C:\oracle\10.2.0\client_1\BIN\;C:\Archivos de programa\Attachmate\E!E2K\;C:\Archivos de programa\Subversion\bin;C:\Archivos de programa\Host Integration Server\system;C:\Archivos de programa\IBM\WebSphere Studio\extras\bin;C:\Archivos de programa\IBM\WebSphere Studio\bin;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51\java\bin;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51\java\jre\bin;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51\java\jre\bin\classic;C:\Archivos de programa\IBM\WebSphere MQ\bin;C:\Archivos de programa\IBM\WebSphere MQ\Java\bin;C:\Archivos de programa\IBM\WebSphere MQ\WEMPS\bin;C:\Archivos de programa\IBM\WebSphere Studio\runtimes\base_v51\bin;C:\Archivos de programa\Subversion\bin;C:\ARCHIV~1\IBM\SQLLIB\BIN;C:\ARCHIV~1\IBM\SQLLIB\FUNCTION;C:\ARCHIV~1\IBM\SQLLIB\SAMPLES\REPL
************* End Display Current Environment *************
[19/05/09 8:44:26:932 CEST] 39736d0c ManagerAdmin I TRAS0017I: El estado de rastreo de arranque es *=all=disabled.
[19/05/09 8:44:27:682 CEST] 39736d0c AdminInitiali A ADMN0015I: AdminService inicializado
[19/05/09 8:44:29:214 CEST] 39736d0c Configuration A SECJ0215I: Se ha establecido satisfactoriamente la clase de configuración del proveedor del inicio de sesión JAAS en com.ibm.ws.security.auth.login.Configuration.
[19/05/09 8:44:29:339 CEST] 39736d0c SecurityDM I SECJ0231I: El módulo de diagnóstico FFDC del componente de seguridad com.ibm.ws.security.core.SecurityDM se ha registrado satisfactoriamente: true.
[19/05/09 8:44:29:636 CEST] 39736d0c SecurityCompo I SECJ0309I: La Seguridad de Java 2 está inhabilitada.
[19/05/09 8:44:29:636 CEST] 39736d0c SecurityCompo I SECJ0212I: La información de configuración WCCM JAAS se ha pasado satisfactoriamente a la clase de proveedor de inicio de sesión.
[19/05/09 8:44:29:651 CEST] 39736d0c SecurityCompo I SECJ0240I: La inicialización del servicio de seguridad ha finalizado correctamente.
[19/05/09 8:44:33:808 CEST] 39736d0c ResourceMgrIm I WSVR0049I: Se enlaza Origen de datos de prueba unitaria Cloudscape v5_CF como eis/jdbc/Default_CMP
[19/05/09 8:44:33:886 CEST] 39736d0c ResourceMgrIm I WSVR0049I: Se enlaza Origen de datos de prueba unitaria Cloudscape v5_CF como eis/jdbc/cloudscape/HelloWorldDatasource _CMP
[19/05/09 8:44:33:902 CEST] 39736d0c ResourceMgrIm I WSVR0049I: Se enlaza Origen de datos de prueba unitaria Cloudscape v5 como jdbc/Default
[19/05/09 8:44:33:902 CEST] 39736d0c ResourceMgrIm I WSVR0049I: Se enlaza Origen de datos de prueba unitaria Cloudscape v5 como jdbc/cloudscape/HelloWorldDatasource
[19/05/09 8:44:34:699 CEST] 39736d0c CacheServiceI I DYNA0048I: Antememoria dinámica de WebSphere inicializada satisfactoriamente.
[19/05/09 8:44:37:136 CEST] 39736d0c JMXSoapAdapte A ADMC0013I: Conector SOAP disponible en el puerto 8880
[19/05/09 8:44:37:230 CEST] 39736d0c SecurityCompo I SECJ0243I: El servicio de seguridad se ha iniciado correctamente.
[19/05/09 8:44:37:230 CEST] 39736d0c SecurityCompo I SECJ0210I: Seguridad habilitada false
[19/05/09 8:44:39:121 CEST] 39736d0c ApplicationMg A WSVR0200I: Se inicia la aplicación: adminconsole
[19/05/09 8:44:39:824 CEST] 39736d0c WebContainer A SRVE0161I: IBM WebSphere Application Server - Contenedor Web. Copyright IBM Corp. 1998-2002
[19/05/09 8:44:39:855 CEST] 39736d0c WebContainer A SRVE0162I: Nivel de especificación de servlet: 2.3
[19/05/09 8:44:39:855 CEST] 39736d0c WebContainer A SRVE0163I: Nivel de especificación de JSP con soporte: 1.2
[19/05/09 8:44:39:949 CEST] 39736d0c WebContainer A SRVE0169I: Cargando módulo Web: adminconsole.
[19/05/09 8:44:40:918 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: JSP 1.2 Processor: init
[19/05/09 8:44:41:137 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: SimpleFileServlet: init
[19/05/09 8:44:41:231 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: InvokerServlet: init
[19/05/09 8:44:41:246 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: validator: init
[19/05/09 8:44:41:887 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: EventInitializer: init
[19/05/09 8:44:41:981 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: action: init
[19/05/09 8:44:43:403 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: action: Tiles definition factory loaded
[19/05/09 8:44:43:403 CEST] 39736d0c WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: SecureCleanup: init
[19/05/09 8:44:43:496 CEST] 39736d0c ApplicationMg A WSVR0221I: Aplicación iniciada: adminconsole
[19/05/09 8:44:43:496 CEST] 39736d0c ApplicationMg A WSVR0200I: Se inicia la aplicación: IBMUTC
[19/05/09 8:44:43:528 CEST] 39736d0c WebContainer A SRVE0169I: Cargando módulo Web: IBM Universal Test Client.
[19/05/09 8:44:43:637 CEST] 39736d0c WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: JSP 1.2 Processor: init
[19/05/09 8:44:43:653 CEST] 39736d0c WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: SimpleFileServlet: init
[19/05/09 8:44:43:653 CEST] 39736d0c ApplicationMg A WSVR0221I: Aplicación iniciada: IBMUTC
[19/05/09 8:44:43:653 CEST] 39736d0c ApplicationMg A WSVR0200I: Se inicia la aplicación: HelloWorldEARProject
[19/05/09 8:44:43:715 CEST] 39736d0c EJBContainerI I WSVR0207I: Se prepara el inicio de jar de EJB: HelloWorldEJBProject.jar
[19/05/09 8:44:44:168 CEST] 39736d0c EJBContainerI I WSVR0037I: Se está iniciando el jar de EJB: HelloWorldEJBProject.jar
[19/05/09 8:44:45:168 CEST] 39736d0c ApplicationMg A WSVR0221I: Aplicación iniciada: HelloWorldEARProject
[19/05/09 8:44:45:215 CEST] 39736d0c HttpTransport A SRVE0171I: El transporte http está atendiendo al puerto 9.080.
[19/05/09 8:44:47:450 CEST] 39736d0c HttpTransport A SRVE0171I: El transporte https está atendiendo al puerto 9.443.
[19/05/09 8:44:47:465 CEST] 39736d0c HttpTransport A SRVE0171I: El transporte http está atendiendo al puerto 9.090.
[19/05/09 8:44:47:700 CEST] 39736d0c HttpTransport A SRVE0171I: El transporte https está atendiendo al puerto 9.043.
[19/05/09 8:44:47:731 CEST] 39736d0c RMIConnectorC A ADMC0026I: Conector RMI disponible en el puerto 2810
[19/05/09 8:44:47:856 CEST] 39736d0c WsServer A WSVR0001I: Servidor server1 abierto para e-business


I am sorry, I have the spanish version of the framework.
Yesterday, trying, I changed the default por set by WSAD 2809 to 2810, but everything keeps going the same way.

About the old age of the development software I am using, yes, I know it is very old, but that is what my enterprise asked for... I can do nothing about that, I am very new here.

Thank you very much!!
 
Jeanne Boyarsky
author & internet detective
Posts: 41995
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pepe lotas wrote:[19/05/09 8:44:47:856 CEST] 39736d0c WsServer A WSVR0001I: Servidor server1 abierto para e-business


Yes. When you right click the bean, a lot of steps happen automatically. I'm trying to tease them apart so we can determine which step has the error - which will make it easier to figure out what the actual problem is. While I don't speak Spanish, I do recognize "Server 1 is open for e-business" when I see it. This is good - it means the server started up without any fatal errors (like not being able to use a port.)

Can you try two more things:
1) Right click the server and add your application. See if that has any errors. In particular, check there is a line about starting your EJB and starting your EAR
2) Right click the server and launch the universal test client. See if it lets you do that (without trying to connect to an EJB)
 
pepe lotas
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!!

Thanks again

but now, things have changed

They told me to create a simple session EJB, just something like to return a "Hello World" string, and then, call it from a JSP, to see the differences between the different EJB versions, WSAD or RAD versions, and WAS versions.

I tried to make it, and I got the EJB properly working in the UTC (Universal Test Client). I think the EJB is OK just because in the UTC I can instantiate it, and then I can call its method and it returns the "Hello world" string.

Then I create a new dinamic web project, and I just add a JSP.
Both projects, the EJB one and the JSP one are in the same EAR.

In the EJB I haver 2 interfaces, a "local" and a "localHome". In the local one I have an abstract method called "saludar" that I implemented in a class. So the EJB is compossed by those two interfaces and the class. And it works in the UTC.


Then in the JSP, I can instantiate the EJB class and call the method (That's cheating right?) I have to use the JNDI lookup() method to get the instance or to call the methods from the EJB in the JSP right?

Well, I do this:



But it does not work

Where you read whatever, I tried EVERYTHING
I sailed ALL the internt, but I dont find this, I see how to do it for JBOSS o for netBeans, but not for my problem

I also changed the web.xml in the dinamic web project including this


I tried EVERYTHING in the <ejb-ref-name> value as well as in the lookup method. I don't even know if I have to include this in the web.xml...

I am desperate

I Hope you can help me!!
 
Jeanne Boyarsky
author & internet detective
Posts: 41995
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pepe lotas wrote:But it does not work


What does this mean? What error do you get?
 
pepe lotas
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh sorry you are right.

In the web browser Internet Explore or Mozilla Firefox, I get this message:



When I change the lookup the message changes. What chages is the "ejb/xxx".

I created a local EJB and then a remote EJB, but no one worked :-( both failed in the same place.

I think it is easy to do, but I just don't get it to work, I am sure I am missing a stupid thing...

Thank you!!
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic