Thanks for the answer.   This was the piece of information that I was
missing.

Adam



                                                                                       
                       
                    Scott                                                              
                       
                    Stirling             To:     JRun-Talk 
<[EMAIL PROTECTED]>                      
                    <sstirling@al        cc:                                           
                       
                    laire.com>           Subject:     RE: EJB Problems                 
                       
                                                                                       
                       
                    11/13/00                                                           
                       
                    10:57 AM                                                           
                       
                    Please                                                             
                       
                    respond to                                                         
                       
                    jrun-talk                                                          
                       
                                                                                       
                       
                                                                                       
                       




You should remove the data source definition from the JMC (unless you are
going to use the same data source name for access from servlets/JSPs).
This
is a nasty bug that will be fixed in SP2, but the gist of it is this:

Servlet/JSP engine are in one JNDI namespace

EJB server is in another namespace

So data sources defined in the JMC are totally unknown to the EJB server.

You left a few things out of the data source definition in the
deploy.properties file.  See the Ejipt API docs in the docs directory for
more info:

$JRUN_HOME/docs/api/jrun/index.html

EjiptProperties --> namely, JDBC_SOURCES, SOURCE_DRIVER_CLASS_NAME,
SOURCE_URL, SOURCE_USER and SOURCE_PASSWORD


Which correspond in the properties file to:

ejipt.jdbcSources
ejipt.sourceDriverClassName
ejipt.sourceURL
ejipt.sourceUser
ejipt.sourcePassword

And if you're interested, the max, minFree and maxFree connections
properties.


Scott Stirling
Allaire Corporation
http://www.allaire.com/developer/jrunreferencedesk/

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 13, 2000 9:46 AM
> To: JRun-Talk
> Subject: EJB Problems
>
>
> I am trying to develop a CMP Entity bean and I am having lots
> of problems.
> When I try to start up my JRun server that has my deployed
> EJB it won't
> start.   Here is the error in the event log.
>
> 11/13 08:28:17 error (JRun) The ejb service failed to load.
> Please verify
> that you are using a Java Virtual Machine version 1.2 or higher.
> 11/13 08:28:17 error (JRun) JRun Aborting!
> [javax.servlet.ServletException:
> The url cannot be null]
> [2]java.sql.SQLException: The url cannot be null
>      at java.sql.DriverManager.getConnection(DriverManager.java:494)
>      at java.sql.DriverManager.getConnection(DriverManager.java:177)
>      at allaire.ejipt._ejb._DataSource._createConnection
> (_DataSource.java:203)
>      at allaire.ejipt._ejb._ConnectionPool._getConnection
> (_ConnectionPool.java:147)
>      at allaire.ejipt._ejb._DataSource.<init>(_DataSource.java:345)
>      at
> allaire.ejipt._ejb._DataSource._createSources(_DataSource.java:78)
>      at allaire.ejipt.Ejipt.<init>(Ejipt.java:335)
>      at allaire.jrun.ejb.EjbServer.<init>(EjbService.java:171)
>      at allaire.jrun.ejb.EjbService.init(EjbService.java:71)
>      at allaire.jrun.ServletService.init(ServletService.java:66)
>      at allaire.jrun.ServletService.init(ServletService.java:31)
>      at
> allaire.jrun.servlet.JRunServletLoader.loadServletInstance(JRu
> nServletLoader.java:236)
>      at allaire.jrun.servlet.JRunSE.initServices(JRunSE.java:620)
>      at
> allaire.jrun.servlet.JvmContext.initServices(JvmContext.java:96)
>      at allaire.jrun.servlet.JRunSE.init(JRunSE.java:187)
>      at allaire.jrun.servlet.JvmContext.init(JvmContext.java:35)
>      at allaire.jrun.ServletService.init(ServletService.java:66)
>      at allaire.jrun.ServletService.init(ServletService.java:31)
>      at JRun.main(JRun.java:154)
> [1]javax.servlet.ServletException: The url cannot be null
>      at allaire.jrun.ejb.EjbService.init(EjbService.java:83)
>      at allaire.jrun.ServletService.init(ServletService.java:66)
>      at allaire.jrun.ServletService.init(ServletService.java:31)
>      at
> allaire.jrun.servlet.JRunServletLoader.loadServletInstance(JRu
> nServletLoader.java:236)
>      at allaire.jrun.servlet.JRunSE.initServices(JRunSE.java:620)
>      at
> allaire.jrun.servlet.JvmContext.initServices(JvmContext.java:96)
>      at allaire.jrun.servlet.JRunSE.init(JRunSE.java:187)
>      at allaire.jrun.servlet.JvmContext.init(JvmContext.java:35)
>      at allaire.jrun.ServletService.init(ServletService.java:66)
>      at allaire.jrun.ServletService.init(ServletService.java:31)
>      at JRun.main(JRun.java:154)
> [0]javax.servlet.ServletException: The url cannot be null
>      at allaire.jrun.ServletService.init(ServletService.java:33)
>      at
> allaire.jrun.servlet.JRunServletLoader.loadServletInstance(JRu
> nServletLoader.java:236)
>      at allaire.jrun.servlet.JRunSE.initServices(JRunSE.java:620)
>      at
> allaire.jrun.servlet.JvmContext.initServices(JvmContext.java:96)
>      at allaire.jrun.servlet.JRunSE.init(JRunSE.java:187)
>      at allaire.jrun.servlet.JvmContext.init(JvmContext.java:35)
>      at allaire.jrun.ServletService.init(ServletService.java:66)
>      at allaire.jrun.ServletService.init(ServletService.java:31)
>      at JRun.main(JRun.java:154)
>
>
>
> I have defined the datasource in the JMC as StoneDB.   I have
> tested this
> DataSource with the test function in the JMC.   The test
> works properly.
>
> Here is how I have defined my deploy.properties.   I don't know if the
> problem is in how I defined the deploy.properties or some
> where else.   I
> don't feel that they have given us very good documentation on
> the subject
> of CMP EJBs.   If anyone could shed some light I would appreciate it.
>
> ejipt.jdbcSources=StoneDB
>
> ejipt.isCreateSilent=false
>
> ejipt.createSQL=SELECT (name, password) FROM infocus_users
> WHERE userid
> \= ?
> ejipt.createSQL.params=id
> ejipt.createSQL.fields=name, password
> ejipt.createSQL.paramTypes=INTEGER
> ejipt.createSQL.source=StoneDB
>
> ejipt.postCreateSQL=INSERT INTO infocus_users (userid, name, password)
> VALUES (?,?,?)
> ejipt.postCreateSQL.params=id,name,password
> ejipt.postCreateSQL.paramTypes=INTEGER,STRING,STRING
> ejipt.postCreateSQL.source=StoneDB
>
> ejipt.loadSQL=SELECT (name, password) FROM infocus_users
> WHERE userid \= ?
> ejipt.loadSQL.params=id
> ejipt.loadSQL.paramTypes=INTEGER
> ejipt.loadSQL.fields=name,password
> ejipt.loadSQL.source=StoneDB
>
> ejipt.storeSQL=UPDATE infocus_users SET name \= ?, password \= ? WHERE
> userid \= ?
> ejipt.storeSQL.params=name,password
> ejipt.storeSQL.paramTypes=STRING, STRING
> ejipt.storeSQL.source=StoneDB
>
>
> Thanks for any help,
>
> Adam
------------------------------------------------------------------------------

Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.



------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to