I'm having some trouble configuring castor to interoperate with sql-server.
I've almost no experience with castor, i've tryed to replicate the cmp_example from openejb but instead of postgresql, i'm using sql server. Can someone help me?
My configuration is like this:
Server: vitaboss Database: garbage Username: gargabe_user Password: garbage_password
My mapping xml file is like this:
<?xml version="1.0"?>
<mapping>
<class name="com.netvita.employee.EmployeeBean" identity="id" key-generator="IDENTITY">
<map-to table="employee" />
<field name="id" type="integer" direct="true">
<sql name="id" type="integer" />
</field>
<field name="firstname" type="String" direct="true">
<sql name="first_name" type="varchar" dirty="check" />
</field>
<field name="lastname" type="String" direct="true">
<sql name="last_name" type="varchar" dirty="check" />
</field>
<field name="email" type="String" direct="true">
<sql name="email" type="varchar" dirty="check" />
</field>
</class>
</mapping>
The database.xml looks like this:
<database name="Local_TX_Database" engine="sql-server">
<driver class-name="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:microsoft:sqlserver://vitaboss\dev/garbage" >
<param name="user" value="garbage_user" />
<param name="password" value="garbage_password" />
</driver>
<mapping href="C:/projects/ejb/vitaboss/conf/mssql.cmp_or_mapping.xml" />
</database>
The global database is like:
<?xml version="1.0"?>
<database name="Global_TX_Database" engine="sql-server">
<jndi name="java:comp/env/jdbc/garbage" />
<mapping href="C:/projects/ejb/vitaboss/conf/mssql.cmp_or_mapping.xml" />
</database>The ejb deploys with no error, but the client always returns this:
Exception in thread "main" java.rmi.RemoteException: The bean encountered a non-
application exception.; nested exception is:
java.rmi.RemoteException: Castor JDO DatabaseNotFoundException thrown wh
en attempting to begin a local transaciton; nested exception is:
org.exolab.castor.jdo.DatabaseNotFoundException: Nested error: org.exola
b.castor.mapping.MappingException: Could not find the class String
at org.openejb.core.transaction.TransactionPolicy.throwExceptionToServer
(TransactionPolicy.java:254)
at org.openejb.core.transaction.TxSupports.handleSystemException(TxSuppo
rts.java:191)
at org.openejb.alt.containers.castor_cmp11.CastorCmpEntityTxPolicy.handl
eSystemException(CastorCmpEntityTxPolicy.java:157)
at org.openejb.alt.containers.castor_cmp11.CastorCmpEntityTxPolicy.befor
eInvoke(CastorCmpEntityTxPolicy.java:101)
at org.openejb.alt.containers.castor_cmp11.CastorCMP11_EntityContainer.c
reateEJBObject(CastorCMP11_EntityContainer.java:780)
at org.openejb.alt.containers.castor_cmp11.CastorCMP11_EntityContainer.i
nvoke(CastorCMP11_EntityContainer.java:521)
at org.openejb.server.EjbDaemon.doEjbHome_CREATE(EjbDaemon.java:728)
at org.openejb.server.EjbDaemon.processEjbRequest(EjbDaemon.java:539)
at org.openejb.server.EjbDaemon.run(EjbDaemon.java:374)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.rmi.RemoteException: Castor JDO DatabaseNotFoundException thrown
when attempting to begin a local transaciton; nested exception is:
org.exolab.castor.jdo.DatabaseNotFoundException: Nested error: org.exola
b.castor.mapping.MappingException: Could not find the class String
at org.openejb.alt.containers.castor_cmp11.CastorCmpEntityTxPolicy.befor
eInvoke(CastorCmpEntityTxPolicy.java:100)
... 6 more
Caused by: org.exolab.castor.jdo.DatabaseNotFoundException: Nested error: org.ex
olab.castor.mapping.MappingException: Could not find the class String
at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:584)
at org.openejb.alt.containers.castor_cmp11.CastorCmpEntityTxPolicy.befor
eInvoke(CastorCmpEntityTxPolicy.java:69)
... 6 more
Any thoughts about the problem?
Thanks, Paulo Lopes
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
