0 Replies Latest reply on Jul 5, 2002 4:08 PM by poco

    JBoss 3.0 CMP-CMR 2.0

    poco

      Hi,
      we've bought the JBossCMP2.0 Documentation from flashline, and the example provided with it won't run correctly. I can deploy the ear file without any mistakes, but when I try to test it, I get errors, most probably related to the Relation (CMR) between tables because they occurs when the User-Customer entries are created (data are inserted in the tables, but without the foreign-key.. which seems to cause Nullpointer...see StackTrace at the end).

      There are so many different version, and the xml files seems to change constantly... I must admit I am a bit lost now... If I compare the jbosscmp-jdbc.xml of the example with the jbosscmp-jdbc.dtd provided with the last downloadable version of JBoss, there are tags in there that are nonexistant in the DTD... (like foreign-key-field for example.. changed to key-field??... or type-mapping when it should in fact be datasource-mapping... and who knows what else...).. How are we supposed to keep track of all this when the documentation and examples don't even explain and use the latest changes? Is there a place where we can get up to date information on the changes that were made in the last few days-weeks-months?


      I'm new to JBoss and I am in charge of evaluating the CMP mechanism for possible use. When I first saw the tables automatically created, I was really happy.. not to say quite excited!.. but now, I've been trying to fix the CMR part of the example for 2 days.... and nothing... It is quite frustrating to see that every link, every forums, seems to point in a different direction.. is there a REAL WORKING EXAMPLE of this... or is CMP just an 'utopian fantasy' that we all wish would work... but does not just yet..?? ;)

      TIA and keep up the good work guys!
      The JBoss community is simply great! Can't wait to be a part of it! (By the way, how can we contrbute?)

      Sorry for my poor English... in the mean time, here is the error I get when I execute the test-user target:

      =-=-=-=-=-=-=-=-=-=-=-
      [d:\javastuff\jboss\cmp\jbosscmp-docs\example]# build test-user
      Buildfile: build.xml

      prepare:

      compile:

      test-user:
      [junit] .
      [junit] Time: 4.607
      [junit]
      [junit] OK (1 tests)
      [junit]
      [junit] java.lang.NullPointerException
      [junit] at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityIntercepto
      r.java:104)
      [junit] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:7
      6)
      [junit] at $Proxy1.isIdentical(Unknown Source)
      [junit] at org.jboss.docs.cmp2.commerce.UserTest.testAddCd(UserTest.java
      :76)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at java.lang.reflect.Method.invoke(Method.java:324)
      [junit] at junit.framework.TestCase.runTest(TestCase.java:166)
      [junit] at junit.framework.TestCase.runBare(TestCase.java:140)
      [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
      [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
      [junit] at junit.framework.TestResult.run(TestResult.java:109)
      [junit] at junit.framework.TestCase.run(TestCase.java:131)
      [junit] at junit.framework.TestSuite.runTest(TestSuite.java:173)
      [junit] at junit.framework.TestSuite.run(TestSuite.java:168)
      [junit] at junit.textui.TestRunner.doRun(TestRunner.java:74)
      [junit] at junit.textui.TestRunner.start(TestRunner.java:234)
      [junit] at junit.textui.TestRunner.main(TestRunner.java:112)
      [junit] .F
      [junit] Time: 2.304
      [junit] There was 1 failure:
      [junit] 1) testAddCd(org.jboss.docs.cmp2.commerce.UserTest)junit.framework.A
      ssertionFailedError: Error in big old method:
      [junit] at org.jboss.docs.cmp2.commerce.UserTest.testAddCd(UserTest.java
      :106)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit]
      [junit] FAILURES!!!
      [junit] Tests run: 1, Failures: 1, Errors: 0
      [junit]

      BUILD FAILED
      =-=-=-=-=-=-=-=-=-=-=-

      Thanks and take care!