So, my errors... Exception invoking listener method onReportSubmit of component Report/ReportSearch: Unable to construct service myReportingApp.reportMap: Error building service myReportingApp.reportMap: Unable to find constructor applicable for autowiring. Use explicit constructor parameters.
Unable to construct service myReportingApp.reportMap: Error building service myReportingApp.reportMap: Unable to find constructor applicable for autowiring. Use explicit constructor parameters. Error building service myReportingApp.reportMap: Unable to find constructor applicable for autowiring. Use explicit constructor parameters. Ouch. I've read everything I could find...and spent hours digging this stuff up and still confused. ---------- Forwarded message ---------- From: Jason Suplizio <[EMAIL PROTECTED]> Date: Feb 3, 2006 5:42 PM Subject: Hivemind +singleton service To: Tapestry users <[email protected]> Hello all, I've been spinning my wheels over this all day. I have 2 things I'm trying to accomplish: 1- Wire up Hivemind to get singleton and inject it into my page. 2- If necessary, since I can not serialize my providers, data squeeze the singleton. Essentially, I call a synchronized current() method on a provider (with a private constructor), which returns the singleton. My provider implements a factory interface used to build the object returned. This is where I'm at...please see if you can help! hivemodule.xml <service-point id="report" interface="com.myApp.ReportFactory"/> <implementation service-id="reportMap"> <invoke-factory model="singleton"> <construct class="com.myApp.ReportProvider" initialize-method="current"/> </invoke-factory> </implementation> MyPage.page <inject object="service: myReportingApp.reportMap" property="provider"/> MyPage.java public abstract AdminReportMapFactory getProvider(); ReportProvider .java public class ReportProvider implements ReportFactory { private static ReportProvider current = null; private ReportProvider() { // default constructor - needs to be private to enforce singleton nature super(); } /** * Get the singleton instance * @return ReportProvider */ public static synchronized ReportProvider current() { if (current == null) { current = new ReportProvider(); } return current; } public List lookup(String name, String reportID) { return getFactory().lookupReportID(name, reportID); } private ReportFactory getFactory() { return ReportFactoryImpl.getInstance(); }
