Castor dropping connections

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Castor dropping connections

Jason Woollard
Hi,

I'm very new to EJBs in general and am trying to replace some POJO classes
used to access mySQL in a tomcat webapp. I've had a very interesting
journey configuring all the relevant xml files and so forth but have hit
against the following error message:

11-Apr-2006 00:50:25 org.exolab.castor.jdo.engine.DatabaseImpl finalize
WARNING: An open database instance
(org.exolab.castor.jdo.engine.DatabaseImpl@1c1eceb:Local_TX_Database)
against database: Local_TX_Database has been encountered. This instance
will be closed now to release system resources. Please consider changing
your code as well to enforce that all database connections are closed
after use.SQL executed, but not closed:null
11-Apr-2006 00:50:25 org.castor.jdo.engine.DatabaseRegistry loadDatabase

I'm using mySQL 5, Tomcat 5 and the stable release of openEJB 1.0

I was curious as to whether the fact tomcat is still connecting to mySQL
via a JDCB declaration in its server.xml could cause this error - although
surely mySQL can handle simultaneous connections. I saw this was recorded
as a bug (http://www.mail-archive.com/dev@.../msg00595.html) and
its apparently resolved so I'm really stuck as to what to try next.

I can provide all my relevant source and conf files if it helps, in this
instance I'm trying to retreive a pre-existing users details via their
logon id (primary key integer in the db) using a findByUserID(int id)
method - perhaps its just me doing something wrong with the remote, home,
object classes.

Thanks in advance for your help!

--
Jason Woollard


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Castor dropping connections

Bruce Snyder
On 4/11/06, Jason Woollard <[hidden email]> wrote:

> Hi,
>
> I'm very new to EJBs in general and am trying to replace some POJO classes
> used to access mySQL in a tomcat webapp. I've had a very interesting
> journey configuring all the relevant xml files and so forth but have hit
> against the following error message:
>
> 11-Apr-2006 00:50:25 org.exolab.castor.jdo.engine.DatabaseImpl finalize
> WARNING: An open database instance
> (org.exolab.castor.jdo.engine.DatabaseImpl@1c1eceb:Local_TX_Database)
> against database: Local_TX_Database has been encountered. This instance
> will be closed now to release system resources. Please consider changing
> your code as well to enforce that all database connections are closed
> after use.SQL executed, but not closed:null
> 11-Apr-2006 00:50:25 org.castor.jdo.engine.DatabaseRegistry loadDatabase
>
> I'm using mySQL 5, Tomcat 5 and the stable release of openEJB 1.0
>
> I was curious as to whether the fact tomcat is still connecting to mySQL
> via a JDCB declaration in its server.xml could cause this error - although
> surely mySQL can handle simultaneous connections. I saw this was recorded
> as a bug (http://www.mail-archive.com/dev@.../msg00595.html) and
> its apparently resolved so I'm really stuck as to what to try next.
>
> I can provide all my relevant source and conf files if it helps, in this
> instance I'm trying to retreive a pre-existing users details via their
> logon id (primary key integer in the db) using a findByUserID(int id)
> method - perhaps its just me doing something wrong with the remote, home,
> object classes.

Jason, though this error from Castor was innocuous, it has already
been fixed. See the issue below for info on the fix:

http://jira.codehaus.org/browse/CASTOR-1356

Castor just recently released version 1.0 and I hazard a guess that
David has not yet updated to this version yet.

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://incubator.apache.org/activemq/
Apache ServiceMix - http://incubator.apache.org/servicemix/
Castor - http://castor.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Castor dropping connections

dblevins
Administrator
In reply to this post by Jason Woollard

On Apr 11, 2006, at 5:54 AM, Jason Woollard wrote:

> Hi,
>
> I'm very new to EJBs in general and am trying to replace some POJO  
> classes
> used to access mySQL in a tomcat webapp. I've had a very interesting
> journey configuring all the relevant xml files and so forth but  
> have hit
> against the following error message:
>
> 11-Apr-2006 00:50:25 org.exolab.castor.jdo.engine.DatabaseImpl  
> finalize
> WARNING: An open database instance
> (org.exolab.castor.jdo.engine.DatabaseImpl@1c1eceb:Local_TX_Database)
> against database: Local_TX_Database has been encountered. This  
> instance
> will be closed now to release system resources. Please consider  
> changing
> your code as well to enforce that all database connections are closed
> after use.SQL executed, but not closed:null
> 11-Apr-2006 00:50:25 org.castor.jdo.engine.DatabaseRegistry  
> loadDatabase
>
> I'm using mySQL 5, Tomcat 5 and the stable release of openEJB 1.0
>
> I was curious as to whether the fact tomcat is still connecting to  
> mySQL
> via a JDCB declaration in its server.xml could cause this error -  
> although
> surely mySQL can handle simultaneous connections. I saw this was  
> recorded
> as a bug (http://www.mail-archive.com/dev@.../ 
> msg00595.html) and
> its apparently resolved so I'm really stuck as to what to try next.
>
> I can provide all my relevant source and conf files if it helps, in  
> this
> instance I'm trying to retreive a pre-existing users details via their
> logon id (primary key integer in the db) using a findByUserID(int id)
> method - perhaps its just me doing something wrong with the remote,  
> home,
> object classes.
>

Hi Jason,

Your app is fine.  That's a very nasty and false warning.  I did work  
this out with the Castor guys, here is the jira for reference:
http://jira.codehaus.org/browse/CASTOR-1356

It's fixed in Castor 1.0-M4 and Castor 1.0 final.  Our OpenEJB 1.0  
pre-dates either of those, so if you replace the castor 1.0-M1 jar  
with either the castor-1.0-M4 or castor-1.0 jar the false error  
message should go away.

A side note on the Castor config files, in the 3.0 branch of OpenEJB  
you only need a cmp.mapping.xml file next to the ejb-jar.xml your ejb  
jar archive and no longer need to supply all those other database  
files (e.g local tx database and global tx database).

If you or anyone wanted to contribute, backporting that fix from 3.0  
to 1.0 would be excellent.  I'd be happy to release an OpenEJB 1.1  
immediately with that fix and as well as including the final 1.0 of  
Castor.

-David
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Castor dropping connections

dblevins
Administrator

On Apr 10, 2006, at 6:43 PM, David Blevins wrote:

> A side note on the Castor config files, in the 3.0 branch of  
> OpenEJB you only need a cmp.mapping.xml file next to the ejb-
> jar.xml your ejb jar archive and no longer need to supply all those  
> other database files (e.g local tx database and global tx database).
>
> If you or anyone wanted to contribute, backporting that fix from  
> 3.0 to 1.0 would be excellent.  I'd be happy to release an OpenEJB  
> 1.1 immediately with that fix and as well as including the final  
> 1.0 of Castor.
>

Here is the related commit if someone feels up to it:

http://cvs.openejb.org/changelog/openejb/trunk/openejb3/container/ 
openejb-core/src/main/java/org/openejb/alt/containers/castor_cmp11?
cs=2570

-David

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OpenEJB / Castor usage problems - still

Jason Woollard
In reply to this post by dblevins
Hi,

Thanks to David and Bruce for their replies - you were right that changing
to the castor-1.0.jar fixed the error message. However I'm still having
troubles with my application now producing:

INFO :  OpenEJB ready.
FATAL:  Castor JDO initialization failed: null
java.lang.NullPointerException
        at
org.exolab.castor.jdo.transactionmanager.TransactionManagerRegistry.getTransactionManager(TransactionManagerRegistry.java:77)
        at
org.castor.jdo.engine.AbstractConnectionFactory.initialize(AbstractConnectionFactory.java:131)
        at
org.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:177)
        at
org.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:136)
        at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:562)
        at
org.openejb.alt.containers.castor_cmp11.CastorCMP11_EntityContainer.postInit(CastorCMP11_EntityContainer.java:428)
        at
org.openejb.alt.containers.castor_cmp11.CastorCMP11_EntityContainer.invoke(CastorCMP11_EntityContainer.java:516)
        at
org.openejb.core.entity.EntityEjbHomeHandler.findX(EntityEjbHomeHandler.java:110)
        at
org.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:145)
        at
org.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:299)
        at
org.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:87)
        at $Proxy0.findByPrimaryKey(Unknown Source)
        at edushop.ctrl.LoginCtrl.<init>(LoginCtrl.java:87)

in openejb.log. I'm not sure if this list is the best place to ask for
help, but if anyone could offer an opinion as to what is causing this or
suggest a better place to ask I would be very gratefull - I'm running out
of time for this job!

I've put all the relevant files at www.runlevel5.co.uk/probs

[DIR] EJB/            <-- The META-INF cmp_*_database and ejb classes
[TXT] LoginCtrl.java    <-- The class I'm calling from in my webapp
[   ] eduShop           <-- The commands I use to compile / deploy the app
(generates no errors at this point)
[   ] openejb.conf          <-- from $OPENEJB_HOME/conf/
[   ] openejb.log             <-- from $OPENEJB_HOME/log/
[DIR] tomcat-conf/           <-- tomcat web.xml for app and server.xml

I've followed just about every how-to I can find; searched through the
castor docs and am yet again at the point where I don't know where to
look.

If it help the main webapp never returns from the remote call to: User
user = home.findByPrimaryKey(new Integer(uid)); after seeming to
sucessfully retreive UserHome home in the lines before.

Thanks in advance for any help you can provide,
Jason

> On Apr 11, 2006, at 5:54 AM, Jason Woollard wrote:
>
>> Hi,
>>
>> I'm very new to EJBs in general and am trying to replace some POJO
>> classes
>> used to access mySQL in a tomcat webapp. I've had a very interesting
>> journey configuring all the relevant xml files and so forth but
>> have hit
>> against the following error message:
>>
>> 11-Apr-2006 00:50:25 org.exolab.castor.jdo.engine.DatabaseImpl
>> finalize
>> WARNING: An open database instance
>> (org.exolab.castor.jdo.engine.DatabaseImpl@1c1eceb:Local_TX_Database)
>> against database: Local_TX_Database has been encountered. This
>> instance
>> will be closed now to release system resources. Please consider
>> changing
>> your code as well to enforce that all database connections are closed
>> after use.SQL executed, but not closed:null
>> 11-Apr-2006 00:50:25 org.castor.jdo.engine.DatabaseRegistry
>> loadDatabase
>>
>> I'm using mySQL 5, Tomcat 5 and the stable release of openEJB 1.0
>>
>> I was curious as to whether the fact tomcat is still connecting to
>> mySQL
>> via a JDCB declaration in its server.xml could cause this error -
>> although
>> surely mySQL can handle simultaneous connections. I saw this was
>> recorded
>> as a bug (http://www.mail-archive.com/dev@.../
>> msg00595.html) and
>> its apparently resolved so I'm really stuck as to what to try next.
>>
>> I can provide all my relevant source and conf files if it helps, in
>> this
>> instance I'm trying to retreive a pre-existing users details via their
>> logon id (primary key integer in the db) using a findByUserID(int id)
>> method - perhaps its just me doing something wrong with the remote,
>> home,
>> object classes.
>>
>
> Hi Jason,
>
> Your app is fine.  That's a very nasty and false warning.  I did work
> this out with the Castor guys, here is the jira for reference:
> http://jira.codehaus.org/browse/CASTOR-1356
>
> It's fixed in Castor 1.0-M4 and Castor 1.0 final.  Our OpenEJB 1.0
> pre-dates either of those, so if you replace the castor 1.0-M1 jar
> with either the castor-1.0-M4 or castor-1.0 jar the false error
> message should go away.
>
> A side note on the Castor config files, in the 3.0 branch of OpenEJB
> you only need a cmp.mapping.xml file next to the ejb-jar.xml your ejb
> jar archive and no longer need to supply all those other database
> files (e.g local tx database and global tx database).
>
> If you or anyone wanted to contribute, backporting that fix from 3.0
> to 1.0 would be excellent.  I'd be happy to release an OpenEJB 1.1
> immediately with that fix and as well as including the final 1.0 of
> Castor.
>
> -David
>


--
Jason Woollard
17 North Way
Lewes
East Sussex
BN7 1DS

+44 7730 930 306
www.runlevel5.co.uk

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenEJB / Castor usage problems - still

dblevins
Administrator

On Apr 11, 2006, at 6:18 AM, Jason Woollard wrote:

> Hi,
>
> Thanks to David and Bruce for their replies - you were right that  
> changing
> to the castor-1.0.jar fixed the error message. However I'm still  
> having
> troubles with my application now producing:
>
> INFO :  OpenEJB ready.
> FATAL:  Castor JDO initialization failed: null
> java.lang.NullPointerException
>         at
> org.exolab.castor.jdo.transactionmanager.TransactionManagerRegistry.ge
> tTransactionManager(TransactionManagerRegistry.java:77)
>
[...]
> in openejb.log. I'm not sure if this list is the best place to ask for
> help, but if anyone could offer an opinion as to what is causing  
> this or
> suggest a better place to ask I would be very gratefull - I'm  
> running out
> of time for this job!
>

My guess is that your local/global tx database files are setup  
wrong.  I can't blame you as those things are less than intuitive,  
which is why I yanked the need for them in the 3.x branch.  That  
said, I went ahead and backported that feature to the 1.x branch and  
whipped up an unstable release for you which also includes Castor 1.0:

   openejb-1.1-20060411
   http://www.openejb.org/Latest+Unstable

That basically contains these three fixes:
   OPENEJB-138: Upgrade to Castor 1.0
   OPENEJB-137: Allow Castor cmp mapping files to be in the ejb jar  
archive
   OPENEJB-136: Remove need for Castor local and global tx database  
files


Here is how you deal with the slight change:


1. Edit the your openejb.conf/xml file

Add these properties to your CMP container definition:

<Container id="Default CMP Container" ctype="CMP_ENTITY">
     PoolSize 100
     Engine  instantdb
     ConnectorName  Default JDBC Database
     JdbcDriver org.enhydra.instantdb.jdbc.idbDriver
     JdbcUrl jdbc:idb:conf/instantdb.properties
     UserName Admin
     Password pass
</Container>

The "Engine" property is the same as what would have been in your  
Castor JDO database xml files.  We will build those for you at  
startup, so we still need that.

The "ConnectorName" property is the name of which ever Connector  
definition you wish to use for CMP Container.  We're actually going  
to use that when your CMP bean requires that it participate in any  
JTA transactions (aka. global transactions).

The other four properties (JdbcDriver, JdbcUrl, UserName, Password)  
you can copy straight from the Connector definition.  It'd be nice if  
we did that for you, but the config data for a Connector is not  
available to a Container so we'll have to work on that in the  
future.  This information is going to be used to establish direct  
connections to the database when your CMP bean does not want to  
participate in any JTA transactions (global transactions) -- in this  
situation we start a local transaction that isn't XA enabled that  
just your CMP participates in.

2.  Delete your old foo.database.xml files

3.  Move your cmp mapping.xml file

The cmp mapping.xml must be in your ejb jar archive at "META-INF/
cmp.mapping.xml"


That's it.

Let us know how it goes.

-David

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenEJB / Castor usage problems - still

Jason Woollard
Thanks so much for all your efforts so far - alas its still not going
smoothly! Although I copied mysql-connector-java-3.1.12-bin.jar to
$openejb_home/lib I'm getting:

FATAL:  OpenEJB has encountered a fatal error and cannot be started:
Assembler failed to build the container system.
org.openejb.OpenEJBException: Cannot load the container Default CMP
Container.  Received message: Unable to construct the Castor JDOManager
objects: org.exolab.castor.mapping.MappingException: The persistence
engine mysql  is not supported in this Castor configuration: The
persistence engine mysql  is not supported in this Castor configuration
        at
org.openejb.alt.assembler.classic.ContainerBuilder.buildContainer(ContainerBuilder.java:177)
...

I've put mappings under webapps/EJB/META-INF/cmp.mapping.xml; removed the
global/local TX*.xml files; and my openejb.conf now looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<openejb
        xmlns="http://www.openejb.org/System/Configuration">
<Container
        id="Default CMP Container" ctype="CMP_ENTITY">
    # The default size of the method ready bean pools.
    # Every bean class gets its own pool of this size.

    PoolSize 100

    Engine mysql

    ConnectorName  Default JDBC Database

    # Driver class name

    JdbcDriver com.mysql.jdbc.Driver

    # Url for creating connections

    JdbcUrl jdbc:mysql://localhost:3306/edushop

    # Default user name

    UserName www-data

    # Default password

    Password removed

</Container>

<Container id="Default BMP Container" ctype="BMP_ENTITY">
        ... Stateless / statefull / bmp containers removed for email ...
</Container>

    <Connector id="Default JDBC Database">
    JdbcDriver   com.mysql.jdbc.Driver
    JdbcUrl      jdbc:mysql://localhost:3306/edushop
    UserName     www-data
    Password     removed
</Connector>
    <Deployments dir="beans/"/>
    <Deployments jar="/usr/local/apache-tomcat/webapps/EJB/ejb.jar"/>
</openejb>

Am I doing anything really stupid somewhere?

As a small aside the new Latest Unstable (openejb-1.1-20060411.tar.gz)
seems to be missing openejb_home/logs - needs a simple mkdir & touch
foo.log

Kind Regards, Jason

>
> On Apr 11, 2006, at 6:18 AM, Jason Woollard wrote:
>
>> Hi,
>>
>> Thanks to David and Bruce for their replies - you were right that
>> changing
>> to the castor-1.0.jar fixed the error message. However I'm still
>> having
>> troubles with my application now producing:
>>
>> INFO :  OpenEJB ready.
>> FATAL:  Castor JDO initialization failed: null
>> java.lang.NullPointerException
>>         at
>> org.exolab.castor.jdo.transactionmanager.TransactionManagerRegistry.ge
>> tTransactionManager(TransactionManagerRegistry.java:77)
>>
> [...]
>> in openejb.log. I'm not sure if this list is the best place to ask for
>> help, but if anyone could offer an opinion as to what is causing
>> this or
>> suggest a better place to ask I would be very gratefull - I'm
>> running out
>> of time for this job!
>>
>
> My guess is that your local/global tx database files are setup
> wrong.  I can't blame you as those things are less than intuitive,
> which is why I yanked the need for them in the 3.x branch.  That
> said, I went ahead and backported that feature to the 1.x branch and
> whipped up an unstable release for you which also includes Castor 1.0:
>
>    openejb-1.1-20060411
>    http://www.openejb.org/Latest+Unstable
>
> That basically contains these three fixes:
>    OPENEJB-138: Upgrade to Castor 1.0
>    OPENEJB-137: Allow Castor cmp mapping files to be in the ejb jar
> archive
>    OPENEJB-136: Remove need for Castor local and global tx database
> files
>
>
> Here is how you deal with the slight change:
>
>
> 1. Edit the your openejb.conf/xml file
>
> Add these properties to your CMP container definition:
>
> <Container id="Default CMP Container" ctype="CMP_ENTITY">
>      PoolSize 100
>      Engine  instantdb
>      ConnectorName  Default JDBC Database
>      JdbcDriver org.enhydra.instantdb.jdbc.idbDriver
>      JdbcUrl jdbc:idb:conf/instantdb.properties
>      UserName Admin
>      Password pass
> </Container>
>
> The "Engine" property is the same as what would have been in your
> Castor JDO database xml files.  We will build those for you at
> startup, so we still need that.
>
> The "ConnectorName" property is the name of which ever Connector
> definition you wish to use for CMP Container.  We're actually going
> to use that when your CMP bean requires that it participate in any
> JTA transactions (aka. global transactions).
>
> The other four properties (JdbcDriver, JdbcUrl, UserName, Password)
> you can copy straight from the Connector definition.  It'd be nice if
> we did that for you, but the config data for a Connector is not
> available to a Container so we'll have to work on that in the
> future.  This information is going to be used to establish direct
> connections to the database when your CMP bean does not want to
> participate in any JTA transactions (global transactions) -- in this
> situation we start a local transaction that isn't XA enabled that
> just your CMP participates in.
>
> 2.  Delete your old foo.database.xml files
>
> 3.  Move your cmp mapping.xml file
>
> The cmp mapping.xml must be in your ejb jar archive at "META-INF/
> cmp.mapping.xml"
>
>
> That's it.
>
> Let us know how it goes.
>
> -David
>
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenEJB / Castor usage problems - still

dblevins
Administrator
On Apr 11, 2006, at 3:46 PM, Jason Woollard wrote:

> Thanks so much for all your efforts so far - alas its still not going
> smoothly! Although I copied mysql-connector-java-3.1.12-bin.jar to
> $openejb_home/lib I'm getting:
>
> FATAL:  OpenEJB has encountered a fatal error and cannot be started:
> Assembler failed to build the container system.
> org.openejb.OpenEJBException: Cannot load the container Default CMP
> Container.  Received message: Unable to construct the Castor  
> JDOManager
> objects: org.exolab.castor.mapping.MappingException: The persistence
> engine mysql  is not supported in this Castor configuration: The
> persistence engine mysql  is not supported in this Castor  
> configuration
>         at
> org.openejb.alt.assembler.classic.ContainerBuilder.buildContainer
> (ContainerBuilder.java:177)
> ...
>
> I've put mappings under webapps/EJB/META-INF/cmp.mapping.xml;  
> removed the
> global/local TX*.xml files; and my openejb.conf now looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <openejb
>         xmlns="http://www.openejb.org/System/Configuration">
> <Container
>         id="Default CMP Container" ctype="CMP_ENTITY">
>     PoolSize 100
>     Engine mysql
>     ConnectorName  Default JDBC Database
>     JdbcDriver com.mysql.jdbc.Driver
>     JdbcUrl jdbc:mysql://localhost:3306/edushop
>     UserName www-data
>     Password removed
> </Container>
>

Ok that is odd, of course mysql is supported by Castor.

Bruce, you have any idea what is going on?  That error message  
doesn't mean a lot to me.  Here is where we configure our JDOManager  
instances:

http://cvs.openejb.org/viewrep/openejb/trunk/openejb1/modules/core/ 
src/java/org/openejb/alt/containers/castor_cmp11/
JDOManagerBuilder.java?r=2599
http://cvs.openejb.org/viewrep/openejb/trunk/openejb1/modules/core/ 
src/java/org/openejb/alt/containers/castor_cmp11/
CastorCMP11_EntityContainer.java?r=2599#l287

-David



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenEJB / Castor usage problems - still

Bruce Snyder
On 4/12/06, David Blevins <[hidden email]> wrote:

> On Apr 11, 2006, at 3:46 PM, Jason Woollard wrote:
>
> > Thanks so much for all your efforts so far - alas its still not going
> > smoothly! Although I copied mysql-connector-java-3.1.12-bin.jar to
> > $openejb_home/lib I'm getting:
> >
> > FATAL:  OpenEJB has encountered a fatal error and cannot be started:
> > Assembler failed to build the container system.
> > org.openejb.OpenEJBException: Cannot load the container Default CMP
> > Container.  Received message: Unable to construct the Castor
> > JDOManager
> > objects: org.exolab.castor.mapping.MappingException: The persistence
> > engine mysql  is not supported in this Castor configuration: The
> > persistence engine mysql  is not supported in this Castor
> > configuration
> >         at
> > org.openejb.alt.assembler.classic.ContainerBuilder.buildContainer
> > (ContainerBuilder.java:177)
> > ...
> >
> > I've put mappings under webapps/EJB/META-INF/cmp.mapping.xml;
> > removed the
> > global/local TX*.xml files; and my openejb.conf now looks like this:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <openejb
> >         xmlns="http://www.openejb.org/System/Configuration">
> > <Container
> >         id="Default CMP Container" ctype="CMP_ENTITY">
> >     PoolSize 100
> >     Engine mysql
> >     ConnectorName  Default JDBC Database
> >     JdbcDriver com.mysql.jdbc.Driver
> >     JdbcUrl jdbc:mysql://localhost:3306/edushop
> >     UserName www-data
> >     Password removed
> > </Container>
> >
>
> Ok that is odd, of course mysql is supported by Castor.

Yep, MySQL is definitely supported.

> Bruce, you have any idea what is going on?  That error message
> doesn't mean a lot to me.  Here is where we configure our JDOManager
> instances:

The only way that the error above will be thrown is if the engine is
not listed in the castor.properties file or if the Hashtable where
engines are loaded doesn't contain an engine. All supported
persistence engines in Castor are listed in the castor.properties file
by way of their factory and I know that MySQL is listed there, So I'm
wondering if there is an extra space after the engine name in your
configuration. The error message shown above contains an extra space
therefore I wonder if that's causing the MySQLFactory to not be found
in the Hashtable.

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://incubator.apache.org/activemq/
Apache ServiceMix - http://incubator.apache.org/servicemix/
Castor - http://castor.org/
Loading...