Thank you for the reply.

I tried appending file://c:/ but that did not work as the following
error came up instead.... 

In the openejb.conf I have the following line,
Global_TX_Database file://C:/EJBTest/conf/postgresql.cmp.global-database.xml
Local_TX_Database   file://C:/EJBTest/conf/postgresql.cmp.local-database.xml

I also made sure that both remote and local references the same
configuration file (I checked it by adding a incorrect line in the
configuration file). 

javax.naming.NamingException: Attempted to load OpenEJB. Cannot embed OpenEJB. 
Exception: java.lang.Exception Cannot initailize OpenEJB. Cannot instantiate the 
container Default CMP Container.  Received message: Cannot locate the 
Global_TX_Database file. The path specified is not a valid file: 
C:\EJBTest\file:\C:\EJBTest\conf\postgresql.cmp.global-database.xml
        at 
org.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:67)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
        at javax.naming.InitialContext.init(InitialContext.java:219)
        at javax.naming.InitialContext.<init>(InitialContext.java:195)
        at net.ims.test.StandaloneClient.main(StandaloneClient.java:44)

Now, OpenEJB cannot find the configuration file... What did I do wrong???

Regards,
Hiroshi


----------------------------------------------------
Hiroshi Higuchi <[EMAIL PROTECTED]>
----------------------------------------------------

----------------------- Original Message -----------------------
From:    Jacek Laskowski <[EMAIL PROTECTED]>
Date:    Thu, 05 Aug 2004 17:45:06 +0200
Subject: Re: [openejb-user] cannot access the database from local server

> Hiroshi Higuchi (2247990) wrote:
> > Hello!
> 
> Hello Hiroshi,
> 
> > When I run OpenEJB outside my application, i.e. remote server, I can
> > access entity beans stored in a database. However, it is not the case
> > when I run it as a local server. It throws the following exception when
> > it tries to retrieve an entity bean via home interface. 
> > 
> > It seems to be failing to make connection to the database, so I thought
> > the configuration file may be incorrect. However, it works fine if
> > OpenEJB runs as a remote server using the same configuration files.
> > 
> > I can retrieve the home interface from the server. What I cannot do is
> > accessing/creating entity beans in a database. I really appreciate a lot
> > if somebody could help me out here.
> > 
> > Thank you!!
> > 
> > 
> > OpenEJB 0.9.2
> > Java version 1.4.2_03
> > 
> > java.rmi.RemoteException: The bean encountered a non-application exception.; 
> > nested exception is: 
> >     java.rmi.RemoteException: Castor JDO DatabaseNotFoundException thrown when 
> > attempting to begin a local transaciton; nested exception is: 
> >     org.exolab.castor.jdo.DatabaseNotFoundException: Nested error: 
> > java.net.MalformedURLException: unknown protocol: c
> 
> I don't know why it fails when the configuration is used by the Local 
> Server, and neither does it when used in the remote mode. The only 
> explanation is that both use different configuration files.
> 
> As to the exception above, it seems that one of the file paths specified 
> in the config files starts with 'c:/'. I guess you work on Windows and 
> that's why you specified it that way. Change the file path so that it 
> starts with 'file://c:/'.
> 
> As to the difference in OpenEJB runs when running remotely vs embedded 
> (locally), are you sure that the same config files are used? Try 
> deleting one of them so OpenEJB will end up with an exception that it 
> missed that.
> 
> > ----------------------------------------------------
> > Hiroshi Higuchi <[EMAIL PROTECTED]>
> > University of New South Wales (Sydney Australia)
> > ----------------------------------------------------
> 
> Jacek


----------
----------

Reply via email to