Bugs item #563384, was opened at 2002-06-01 20:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=563384&group_id=22866
Category: JBossCMP Group: v3.1 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Scott M Stark (starksm) >Assigned to: Claudio Vesco (cazzius) Summary: SAR with entity fails on server start Initial Comment: The attached sar include an entity bean for perisisting the service config. The sar deploys fine if the JBoss server is running, but if the server is started with the sar in the deploy directory it fails to start. There are depends tags at both the ejb and service level on the DefaultDS but this does not work. ---------------------------------------------------------------------- >Comment By: Claudio Vesco (cazzius) Date: 2002-06-06 10:03 Message: Logged In: YES user_id=211618 The cmp2 testsuite is now ok. CVS HEAD fixed ---------------------------------------------------------------------- Comment By: Claudio Vesco (cazzius) Date: 2002-06-06 08:36 Message: Logged In: YES user_id=211618 OK, I have checked the testsuite and so you can see that the cmp2 tests are falling by the NPE (and you have the stacktrace in jboss logs). I rerun the testsuite... ---------------------------------------------------------------------- Comment By: Claudio Vesco (cazzius) Date: 2002-06-06 07:56 Message: Logged In: YES user_id=211618 OK, I have checked the testsuite and so you can see that the cmp2 tests are falling by the NPE (and you have the stacktrace in jboss logs). I rerun the testsuite... ---------------------------------------------------------------------- Comment By: Claudio Vesco (cazzius) Date: 2002-06-06 07:42 Message: Logged In: YES user_id=211618 I think that the moving of the creation of the entityBridge in the start part of JDBCStoreManager have this problem: when is invoked the startCommand (instance of JDBCStartCommand) there is a NPE at line 103 of JDBCStartCommand because cmrField.getRelatedJDBCEntity () returns null. This method returns null because in the costructor of JDBCEntityBridge class is invoked in the start method of JDBCStoreManager class and not in create method and so there the call of initRelatedData in JDBCCMRFieldBridge simply returns (the related entity is not initialized). The patch is simple... in the JDBCStoreManager class move the lines // setup the type factory, which is used to map java types to sql types. typeFactory = new JDBCTypeFactory( metaData.getTypeMapping(), metaData.getJDBCApplication().getValueClasses()); // create the bridge between java land and this engine (sql land) entityBridge = new JDBCEntityBridge(metaData, this); from the start method at the end of create method. I cannot give you a stacktrace :-) because I have triggered (and resolved) the problem at home and now I am at work. I cannot test fully this patch because in the HEAD testsuite I have other errors in CMR tests (I think). Claudio ---------------------------------------------------------------------- Comment By: Scott M Stark (starksm) Date: 2002-06-04 04:33 Message: Logged In: YES user_id=175228 Yes, I have reduced the work being done by the JDBCStoreManager in its create step to resolve the problem. ---------------------------------------------------------------------- Comment By: David Jencks (d_jencks) Date: 2002-06-02 02:43 Message: Logged In: YES user_id=60525 This is caused by the cmp framework not abiding by the same service lifecycle contracts as the jca framework mbeans. The jca makes the jca mbeans available, and useable and the DataSource bound after the start step, whereas the cmp framework uses the DataSource in its create step. IMO the best fix for this is to make the cmp framework abide by the contracts: create sets up everything visible to other parties but uses nothing outside the current mbean start can use references to the outside world. I'm willing to fix the problem in this way if there is general agreement that this is the best solution. david jencks ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=563384&group_id=22866 _______________________________________________________________ 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development