Folks,

I tried the tutorial on
"http://iris.cs.byu.edu/tim/462/tutorial/tutorial.html";.  This
tutorial is based on an earlier version of Jboss (I have 3.0.0)
and uses mySQL as opposed to Hypersonic.

Now, I did the tutorial with Hypersonic and it failed ...
basically, I adjusted the following:

   <datasource>java:/DefaultDS</datasource>
   <type-mapping>Hypersonic SQL</type-mapping>
   <!--<datasource>java:/mySQLDS</datasource>-->
   <!--<type-mapping>mySQL</type-mapping>-->

in jbosscmp-jdbc.xml.

I get a nullPointer exception in the client when retrieving a
CMR.  What follows is the fairly obvious code (trust me unit in
setUnit() is not null, but subsequently invoking
contract.getUnit(), returns null ...):

 private ContractRemote make_contract(String id, String
startDate,
           UnitRemote unit)
 {
  try{

pl("-----------------------------------------------------------");

   pl("Create contract with id = "+id+", & start = "+startDate);
   ContractRemote contract=contract = contract_home.create(id,
startDate);
   contract.setUnit(unit);

   pl("name    --> "+contract.getStartDate());
   pl("id      --> "+contract.getId());
   pl("unit    --> "+contract.getUnit().getNumber());

pl("-----------------------------------------------------------");

   return contract;
  } catch (Exception ex) {
   pl("Caught an unexpected exception while making contract!");
   ex.printStackTrace();
  }
  return null;
 }

Any things I overlooked?

Thanks,

    John-Luc

--
John-Luc Bakker     Telcordia Technologies
**********************************************************
Visit http://www.argreenhouse.com/ngnets for ETS enabled APIs
Visit http://www.argreenhouse.com/ngnapi for JCC RI/TCK
**********************************************************



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to