I am a newbie in OJB. I was working with EJB entity beans and Jboss or Websphere in past projects.
I created the persistent java classes and the repository files; I configured the conection for MSSql Server database; then I ran a simple unit test that expected a single row, but it returns an error. I was searching the mail archive for similar questions but I didn�t find anything. All I know is that the connection is Ok and the repository and properties files are in the classpath. Any help will be appreciated. Thanks in advance. This is the entry for the table I want to read: <class-descriptor class="com.ecip.ojb.AtributoImpl" table="ec_atributo"> <field-descriptor autoincrement="true" primarykey="true" column="id_atributo" jdbc-type="INTEGER" name="idAtributo"/> <field-descriptor column="atributo" jdbc-type="VARCHAR" name="atributo"/> <field-descriptor column="descripcion" jdbc-type="VARCHAR" name="descripcion"/> </class-descriptor> This is the error I am getting: [DEFAULT] ERROR: Error in [PersistentFieldPropertyImpl], java.lang.IllegalArgumentException [DEFAULT] ERROR: Declaring class [com.ecip.ojb.AtributoImpl] [DEFAULT] ERROR: Property Name [idAtributo] [DEFAULT] ERROR: Property Type [java.lang.Integer] [DEFAULT] ERROR: anObject was class [com.ecip.ojb.AtributoImpl] [DEFAULT] ERROR: aValue was null [DEFAULT] ERROR: Error invoking method:getIdAtributo in object:com.ecip.ojb.AtributoImpl org.apache.ojb.broker.metadata.MetadataException: Error invoking method:getIdAtributo in object:com.ecip.ojb.AtributoImpl at org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl.doGet(Unknown Source) at org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.get(Unknown Source) at org.apache.ojb.broker.query.QueryByCriteria.buildCriteria(Unknown Source) at org.apache.ojb.broker.query.QueryByCriteria.<init>(Unknown Source) at com.ecip.example.OjbExample.readAtributoId(OjbExample.java:40) at com.ecip.ojb.AtributoImplTest.testReadAtributoId1(AtributoImplTest.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at com.parasoft.eclipse.checker.java.unit.internal.core.test.RemoteTestRunner$1.runProtected(RemoteTestRunner.java:308) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at jtest.IndependentTestSuite$TestRunnerThread.run(IndependentTestSuite.java:249) Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) ... 17 more [DEFAULT] ERROR: Error in [PersistentFieldPropertyImpl], java.lang.IllegalArgumentException [DEFAULT] ERROR: Declaring class [com.ecip.ojb.AtributoImpl] [DEFAULT] ERROR: Property Name [atributo] [DEFAULT] ERROR: Property Type [java.lang.String] [DEFAULT] ERROR: anObject was class [com.ecip.ojb.AtributoImpl] [DEFAULT] ERROR: aValue was null [DEFAULT] ERROR: Error invoking method:getAtributo in object:com.ecip.ojb.AtributoImpl org.apache.ojb.broker.metadata.MetadataException: Error invoking method:getAtributo in object:com.ecip.ojb.AtributoImpl at org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl.doGet(Unknown Source) at org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.get(Unknown Source) at org.apache.ojb.broker.query.QueryByCriteria.buildCriteria(Unknown Source) at org.apache.ojb.broker.query.QueryByCriteria.<init>(Unknown Source) at com.ecip.example.OjbExample.readAtributoId(OjbExample.java:40) at com.ecip.ojb.AtributoImplTest.testReadAtributoId1(AtributoImplTest.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at com.parasoft.eclipse.checker.java.unit.internal.core.test.RemoteTestRunner$1.runProtected(RemoteTestRunner.java:308) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at jtest.IndependentTestSuite$TestRunnerThread.run(IndependentTestSuite.java:249) Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) ... 17 more [DEFAULT] ERROR: Error in [PersistentFieldPropertyImpl], java.lang.IllegalArgumentException [DEFAULT] ERROR: Declaring class [com.ecip.ojb.AtributoImpl] [DEFAULT] ERROR: Property Name [descripcion] [DEFAULT] ERROR: Property Type [java.lang.String] [DEFAULT] ERROR: anObject was class [com.ecip.ojb.AtributoImpl] [DEFAULT] ERROR: aValue was null [DEFAULT] ERROR: Error invoking method:getDescripcion in object:com.ecip.ojb.AtributoImpl org.apache.ojb.broker.metadata.MetadataException: Error invoking method:getDescripcion in object:com.ecip.ojb.AtributoImpl at org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl.doGet(Unknown Source) at org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.get(Unknown Source) at org.apache.ojb.broker.query.QueryByCriteria.buildCriteria(Unknown Source) at org.apache.ojb.broker.query.QueryByCriteria.<init>(Unknown Source) at com.ecip.example.OjbExample.readAtributoId(OjbExample.java:40) at com.ecip.ojb.AtributoImplTest.testReadAtributoId1(AtributoImplTest.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at com.parasoft.eclipse.checker.java.unit.internal.core.test.RemoteTestRunner$1.runProtected(RemoteTestRunner.java:308) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at jtest.IndependentTestSuite$TestRunnerThread.run(IndependentTestSuite.java:249) Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) ... 17 more --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
