Again..Asking for help about ejb..

Discussions

EJB programming & troubleshooting: Again..Asking for help about ejb..

  1. Again..Asking for help about ejb.. (15 messages)

    Hi friends,
    Iam pretty new to this ejb concept.Iam trying to work with the Sun's tutorial "Introduction to Building and Deploying Enterprise JavaBeansTM Part 1".i have weblogic5.1(i don't have WL4.5 & i never used it) on a Windows NT machine.in Step5..where we have to create DeploymentDescriptor, i gave the command "java weblogic.ejb.utils.DDConvertor -dir ejb/demo ejb/demo/DeploymentDescriptor.txt" i got this log file generated...
    ddconverter.log file:"Required tag <ejb-name> was set arbitrarily to the JNDI name for the bean: ejb.demo.DemoHome. You should manually change the tag.
    runAsMode is no longer supported. Property is not being set for method: DEFAULT"

    Now iam stuck at this step...and unable to proceed further..
    Can anyone solve my problem..
    I would greatly appreciate u'r help.....

    Threaded Messages (15)

  2. Again..Asking for help about ejb..[ Go to top ]

    Hi,

    If u r working with weblogic 5.1 start with examples provided. Then u will understand more clearly.

    To start with, after writing all u'r bean code write deployment decriptors( u can get a sample from those examples which is an xml file) and run build.cmd in those examples.
    put the jar file in the properties and atrt the server.
    the beans will get deployed then now u run the client

    Hope this will help u

    Regards
    Saran
  3. Again..Asking for help about ejb..[ Go to top ]

    Thanks Saran,
    I would surely refer to the examples.But could u please tell
    me whether my above method is incorrect..Thnks in advace.
  4. Again..Asking for help about ejb..[ Go to top ]

    Hi,

    Its not incorrect.. but as said in the error message
    "runAsMode is no longer supported. Property is not being set for method: DEFAULT"
    Some things are not supported in the latest versions. U can get the details from weblogic docs which are all the things depreceated in latest versions.
    As a learner its better to understand the concepts of ejb first, instead of breaking head for how to deploy or so.
    EJB1.1 supports xml descriptors. So its better to learn how to describe beans using xml files.
    Try to describe beans with xml by getting a sample from the examples provided by weblogic.
    Then after decribing beans create jar file and run ejbc to create stubs and skeletons.
    All the steps are made as build.cmd in the each example.
    Understand what happening there and run build batch file.
    Then proceed with deploying the bean.
    All the best

    Regards
    Saran

  5. Again..Asking for help about ejb..[ Go to top ]

    Hi Saran,
    Thanks for u'r early reply.I tried to work on the example given at the weblogic site http://www.weblogic.com/docs51/intro/intro_ejb.html.
    I followed all the steps perfectly.Tried to deploy the bean using ejbc..when issued this command
    java -Dweblogic.home=%WL_HOME% weblogic.ejbc Emp.jar -d %WL_HOME%\myserver\Emp.jar
    I got this message:
    [EJB}:Creating output jar : D:\weblogic\myserver\Emp.jar.
    However,when i started the server..i got the message displaying 0 deployed.
    However i proceeded with the example and tried to display the jsp file in the browser(http:\\localhost:7001\EmpQuery.jsp) .I got the main interface showing the employee lookup but it is unable display the results when i hit "go".Iam getting the error::Error 404 -Not Found.Could u please help me with a solution..
    Or anyone in this forum who have tried this example can help me.Thanks a lot in advance..
  6. Again..Asking for help about ejb..[ Go to top ]

    Hi,

    "I got this message:
    [EJB}:Creating output jar : D:\weblogic\myserver\Emp.jar. "

     Everything is correct upto this..
     Have u uncommented the following lines in the weblogic properties file

    --> weblogic.ejb.deploy=\
    and have u included this line
    --> c:/weblogic/myserver/Emp.jar

    If u done, what is the error u got while starting the server
    ie before "0 deployed" message..?
    If u give the above information it will help me solve u'r problem

    Regards
    Saran
  7. Again..Asking for help about ejb..[ Go to top ]

    Hi,
    Thanks again.I Have uncommented the following lines in the weblogic properties file
    --> weblogic.ejb.deploy=\
    and included this line
    --> D:/weblogic/myserver/Emp.jar .
    When i start my server iam getting so much stuff in my dos window that iam unable to capture it at a glance.Anyhow i these r the things which i could see before the statement 0 deployed.
    """ at weblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java,
     Compiled Code)
            at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
            at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
            at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
            at java.lang.reflect.Method.invoke(Native Method)
            at weblogic.Server.startServerDynamically(Server.java:99)
            at weblogic.Server.main(Server.java:65)
            at weblogic.Server.main(Server.java:55)
            at weblogic.NTServiceHelper.run(NTServiceHelper.java:19)
            at java.lang.Thread.run(Thread.java:479)

    Wed Jan 10 16:53:17 CST 2001:<I> <EJB> 0 EJB jar files loaded, containing 0 EJBs

    Wed Jan 10 16:53:17 CST 2001:<I> <EJB> 0 deployed, 0 failed to deploy.
    Wed Jan 10 16:53:17 CST 2001:<I> <ZAC> ZAC ACLs initialized
    Wed Jan 10 16:53:17 CST 2001:<I> <ZAC> ZAC packages stored in local directory ex
    ports
    Wed Jan 10 16:53:17 CST 2001:<I> <SSLListenThread> Listening on port: 7002
    Wed Jan 10 16:53:17 CST 2001:<I> <ListenThread> Listening on port: 7001

    <NT Performance Pack> NATIVE: created IoCompletionPort successfully. IoPort=0x00
    0001ec
    Wed Jan 10 16:53:18 CST 2001:<I> <WebLogicServer> WebLogic Server started """
    If u Could figure out something,, please let me know...Thanks for taking interest in my problem....
    Rani....
  8. Again..Asking for help about ejb..[ Go to top ]

    Hi,

    The problem can be easily solved. but u selected a container managed entity bean to statrt with which is little bit advanced.. u could have started with examples in the folder weblogic\examples\ejb\basic\statelesssession.
    But it's ok.. After u completed this successfully u will feel those examples simple. So go a head.

    U mentioned that,
    "When i start my server iam getting so much stuff in my dos window that iam unable to capture it at a glance."

    --> You will find a file called weblogic.log in the folder weblogic\myserver. All the logs, when the server starts will be saved in this file. So before u start the server open this file with a text editor and clear all the contents and save it so that u will get the latest logs and u can capture all the error messages.

    The error msg u posted is not complete.(i understand u'r problem..)
    Anyhow check for the following things in the weblogic properties file.
    1.Uncomment the following lines:

    weblogic.jdbc.connectionPool.demoPool=\
           url=jdbc:cloudscape:demo,\
           driver=COM.cloudscape.core.JDBCDriver,\
           initialCapacity=1,\
           maxCapacity=2,\
           capacityIncrement=1,\
           props=user=none;password=none;server=none

    2. Uncomment these two lines also:

    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.demoPool=demoPool

    weblogic.allow.reserve.weblogic.jdbc.connectionPool.demoPool=everyone

    Hope u know the basics of an entity bean. The persistent fields are actually stored in the cloudscape database which comes as an eval version with weblogic package. To enable the database u have to uncomment the above said lines.
    Try this and tell me whether u still getting error..

    Saran

    Anyhow i these r the things which i could see before the statement 0 deployed.
    """ at weblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java,
     Compiled Code)
            at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:242)
            at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
            at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
            at java.lang.reflect.Method.invoke(Native Method)
            at weblogic.Server.startServerDynamically(Server.java:99)
            at weblogic.Server.main(Server.java:65)
            at weblogic.Server.main(Server.java:55)
            at weblogic.NTServiceHelper.run(NTServiceHelper.java:19)
            at java.lang.Thread.run(Thread.java:479)

    Wed Jan 10 16:53:17 CST 2001:<I> <EJB> 0 EJB jar files loaded, containing 0 EJBs



  9. Again..Asking for help about ejb..[ Go to top ]

    Hi Saran,
    One great thing is that i could deploy the bean following u'r steps.Thanks a lot.But still there is some problem with the jsp file.Whenever i hit "go" in the Employee Lookup interface its still giving Error-400.The problem been displayed in the error log is"Cannot find resource '<%=' in document root 'D:\weblogic\myserver\public_html'"what does this mean..i kept my jsp file in ''D:\weblogic\myserver\public_html' directory.My Error Log file is,(after server getting deployed).I tried to paste the whole thing but it says the message body is too long....
    _______________________________________________________

    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.specification.name = Java Platform API Specification
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.specification.vendor = Sun Microsystems Inc.
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.specification.version = 1.2
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vendor = Sun Microsystems Inc.
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vendor.url = http://java.sun.com/
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.version = 1.2.2
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vm.info = build JDK-1.2.2-W, native threads, symcjit
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vm.name = Classic VM
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vm.specification.name = Java Virtual Machine Specification
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vm.specification.vendor = Sun Microsystems Inc.
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vm.specification.version = 1.0
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vm.vendor = Sun Microsystems Inc.
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> java.vm.version = 1.2.2
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> line.separator =

    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> os.arch = x86
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> os.name = Windows NT
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> os.version = 4.0
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> path.separator = ;
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> sun.boot.library.path = D:\weblogic\jre1_2\jre\bin;D:\weblogic\bin;.;C:\WINNT\System32;C:\WINNT;D:\weblogic\jre1_2\jre\bin;D:\weblogic\bin;D:\weblogic\bin;C:\WINNT\system32;C:\WINNT;e:\jdk1.2.2\bin;e:\j2sdkee1.2.1\bin;D:\weblogic\bin;C:\WINNT\system32;C:\WINNT;e:\jdk1.2.2\bin;e:\j2sdkee1.2.1\bin;D:\weblogic\bin;C:\WINNT\System32;e:\jdk1.2.2\bin;e:\j2sdkee1.2.1\bin;e:\jsdk2.0\bin;D:\weblogic\bin;D:\weblogic\bin;C:\WINNT\system32;C:\WINNT;e:\jdk1.2.2\bin;e:\j2sdkee1.2.1\bin;D:\weblogic\bin;C:\WINNT\system32;C:\WINNT;e:\jdk1.2.2\bin;e:\j2sdkee1.2.1\bin;D:\weblogic\bin;C:\WINNT\System32;;e:\PROGRA~1\E!PC
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> sun.io.unicode.encoding = UnicodeLittle
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> user.dir = D:\weblogic
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> user.home = C:\WINNT\Profiles\Administrator
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> user.language = en
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> user.name = Administrator
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> user.region = US
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> user.timezone = America/Chicago
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> weblogic.class.path = D:\weblogic\license;D:\weblogic\classes;D:\weblogic\myserver\serverclasses;D:\weblogic\lib\weblogicaux.jar
    Thu Jan 11 08:22:07 CST 2001:<I> <System Props> weblogic.system.home = D:\weblogic
    Thu Jan 11 08:22:07 CST 2001:<I> <WebLogicServer> Loaded License : D:/weblogic/license/WebLogicLicense.xml
    Thu Jan 11 08:22:07 CST 2001:<I> <WebLogicServer> Server loading from weblogic.class.path. EJB redeployment enabled.
    Thu Jan 11 08:22:08 CST 2001:<W> <WebLogicServer> Found undeclared property: #
    Thu Jan 11 08:22:10 CST 2001:<I> <Security> 2 certificate(s):
      fingerprint = 56b7dfac29e39c21027973c248d8c1bb, not before = Tue May 30 16:38:01 CDT 2000, not after = Thu May 13 16:38:01 CDT 2004, holder = C=US SP=California L=San Francisco O=BEA WebLogic CN=weblogic.bea.com Email=support at bea dot com , issuer = C=US SP=California L=San Francisco O=BEA WebLogic OU=Security CN=Demo Certificate Authority Email=support at bea dot com , key = modulus length=65 exponent length=3
      fingerprint = 2451db843818b26beb355418d0185bc6, not before = Tue May 30 16:37:44 CDT 2000, not after = Fri May 14 16:37:44 CDT 2004, holder = C=US SP=California L=San Francisco O=BEA WebLogic OU=Security CN=Demo Certificate Authority Email=support at bea dot com , issuer = C=US SP=California L=San Francisco O=BEA WebLogic OU=Security CN=Demo Certificate Authority Email=support at bea dot com , key = modulus length=65 exponent length=3

    Thu Jan 11 08:22:10 CST 2001:<I> <SSLListenThread> Using exportable strength SSL.
    Thu Jan 11 08:22:12 CST 2001:<I> <WebLogicServer> Invoking main-style startup weblogic.jdbc.common.internal.JdbcStartup weblogic.jdbc.common.internal.JdbcStartup
    Thu Jan 11 08:22:12 CST 2001:<I> <JDBC Pool> Creating connection pool demoPool with:
    {poolName=demoPool, maxCapacity=2, props=user=none;password=none;server=none, driver=COM.cloudscape.core.JDBCDriver, aclName=weblogic.jdbc.connectionPool.demoPool, capacityIncrement=1, initialCapacity=1, url=jdbc:cloudscape:demo}
    Thu Jan 11 08:22:14 CST 2001:<I> <JDBC Pool> Connection for pool "demoPool" created.
    Thu Jan 11 08:22:14 CST 2001:<I> <JDBC Init> Creating Tx DataSource named weblogic.jdbc.jts.demoPool for demoPool pool
    Thu Jan 11 08:22:14 CST 2001:<I> <JMS> Beginning startup process
    Thu Jan 11 08:22:14 CST 2001:<I> <JMS> Init JMS Security
    Thu Jan 11 08:22:14 CST 2001:<I> <JMS> Initializing from weblogic.properties
    Thu Jan 11 08:22:14 CST 2001:<I> <JMS> Startup process complete. JMS is active
    Thu Jan 11 08:22:15 CST 2001:<I> <JMS> Bound SessionPoolManager as weblogic.jms.SessionPoolManager
    Thu Jan 11 08:22:15 CST 2001:<I> <JMS> Bound ConnectionConsumerManager as weblogic.jms.ConnectionConsumerManager
    Thu Jan 11 08:22:15 CST 2001:<I> <WebLogicServer> Invoking main-style startup RMI Registry weblogic.rmi.internal.RegistryImpl
    Thu Jan 11 08:22:15 CST 2001:<I> <RMI> Registry started
    Thu Jan 11 08:22:15 CST 2001:<I> <EJB> Enterprise JavaBeans initializing
    Thu Jan 11 08:22:20 CST 2001:<I> <EJB JAR deployment D:/weblogic/myserver/Emp.jar> EJB home interface: 'examples.intro.EmpBeanHome' deployed bound to the JNDI name: 'EmpBeanHome'
    Thu Jan 11 08:22:20 CST 2001:<I> <EJB> 1 EJB jar files loaded, containing 1 EJBs
    Thu Jan 11 08:22:20 CST 2001:<I> <EJB> 1 deployed, 0 failed to deploy.
    Thu Jan 11 08:22:21 CST 2001:<I> <ZAC> ZAC ACLs initialized
    Thu Jan 11 08:22:21 CST 2001:<I> <ZAC> ZAC packages stored in local directory exports
    Thu Jan 11 08:22:21 CST 2001:<I> <SSLListenThread> Listening on port: 7002
    Thu Jan 11 08:22:21 CST 2001:<I> <ListenThread> Listening on port: 7001
    Thu Jan 11 08:22:22 CST 2001:<I> <WebLogicServer> WebLogic Server started
    Thu Jan 11 08:22:58 CST 2001:<I> <ListenThread> Adding address: localhost/127.0.0.1 to licensed client list
    Thu Jan 11 08:22:59 CST 2001:<I> <NT Performance Pack> Allocating: '2' NT reader threads
    Thu Jan 11 08:22:59 CST 2001:<I> <ServletContext-General> file: init
    Thu Jan 11 08:24:05 CST 2001:<E> <ServletContext-General> Cannot find resource '<%=' in document root 'D:\weblogic\myserver\public_html'
    Thu Jan 11 08:24:06 CST 2001:<I> <ServletContext-General> servletimages: init
    ____________________________________________________
    _________________________________________________________
    Please don't leave my problem in middle...i would appreciate u'r help & concern..Hope to find a solution...
  10. Again..Asking for help about ejb..[ Go to top ]

    Hi,

    Great U have done it.. Keep going..

    Regd Jsp.. Its simple.. again..

    Uncomment the following lines in weblogic properties file

    weblogic.httpd.register.*.jsp=\
           weblogic.servlet.JSPServlet
    weblogic.httpd.initArgs.*.jsp=\
           pageCheckSeconds=1,\

    --> here u give u'r javac.exe path

           compileCommand=c:/jdk1.3/bin/javac.exe,\

    --> here u create a folder in myserver directory, i created as compiledJsp, where the compiled jsp will be get stored (here u can see u'r JSP's converted into servlets when it is invoked)

           workingDir=C:/weblogic/myserver/compiledJsp,\
           verbose=true,\
           keepgenerated=true

    Hope it will work now.. All the Best..

    Regards
    Saran
  11. Again..Asking for help about ejb..[ Go to top ]

    Hi Saran,
    I didn't except such an early reply..My god..Iam so happy that i got it..Now, i can explore the things.thank u so much for u'r help..Oh..God..iam so busy..i've to rush..for further investigations & troubles & queries..Thanks a lot..
    I really appreciate u'r help & concern & etc..,etc..,I don't have words even ..thanks a lot..i appreciate it again..
    Rani..
  12. Again..Asking for help about ejb..[ Go to top ]

    Hi,
    I happened to see u'r discussion.Its pretty interesting.Even i have same kind of problem with servlet..But iam a novice to ejb.Iam working on servlets using weblogic server installed in my lab.
    Iam working with SqlServlet which is in examples\intro directory of weblogic installation.After starting my server
    iam getting this error message in webserver log.It Is,
    Cannot find resource 'SqlServlet' in document root 'D:\weblogic\myserver\servletclasses\examples\intro'.
    I tried to experiment with my weblogic.properties file in many ways.And now iam much confused which one to comment and which one not to.For this forum friends who r not aware of my example, it is at
    http://www.weblogic.com/docs51/intro/intro_servlet.html.

    And should i set up weblogic as my HTTP Server...Any suggestions & comments would be greatly appreciated..
    Thanks,
    Vydehi.......
  13. Again..Asking for help about ejb..[ Go to top ]

    Hi Vydehi,

    Have u included the line in the weblogic properties file

    weblogic.httpd.register.sql=examples.servlets.SqlServlet

    in USER-WRITTEN AND DEMO SERVLET REGISTRATIONS para..?

    Regards
    Saran
  14. Again..Asking for help about ejb..[ Go to top ]

    Hi Vydehi,

    Sorry i made a mistake in my previous reply...

    u have to include the following line:

    weblogic.httpd.register.sql=examples.intro.SqlServlet

    in USER-WRITTEN AND DEMO SERVLET REGISTRATIONS para

    Hope now it will work..

    Regards
    Saran
  15. Again..Asking for help about ejb..[ Go to top ]

    Hi,
    Thnks for u'r response.i 've included all the lines below

    weblogic.httpd.register.sql=examples.intro.SqlServlet

    weblogic.http.register.SqlServlet=\examples.intro.SqlServlet


    weblogic.http.initArgs.SqlServlet=\dataSource=demoDataSource
     
    in user written & demo servlet registrations.Iam getting the same error.
    Cannot find resource 'SqlServlet' in document root 'C:\weblogic\myserver\servletclasses\examples\intro'.Is my document root correct.And one more thing do i need to set up my weblogic as http server??

    expecting reply,
    Vydehi.
  16. Again..Asking for help about ejb..[ Go to top ]

    Hi Saran,
    I got it atlast.Thanks,
    Vydehi.