Re: Adding Direct2Web technologies to existing projects
Re: Adding Direct2Web technologies to existing projects
- Subject: Re: Adding Direct2Web technologies to existing projects
- From: Kieran Kelleher <email@hidden>
- Date: Wed, 24 Jun 2009 21:55:12 -0400
POI errors. Check that you actually do not have multiple versions of
POI in your ExcelGenerator framework Libraries. If you install Wonder
from source, it installs files and thus merges a new version framework
on top of an old version framework. So if someone committed a new POI
jar with a different name (with version in the name for example) you
might have both the old and new versions and the old one getting called.
I know Anjo tried to fix this in the Wonder build.xml, but just maybe
the change had to be reverted due to other problems. I don't have time
to research now. In any case, check for multiple versions of POI in
classpath.
On Jun 24, 2009, at 8:23 PM, Joe Little wrote:
I've gotten further. Because of my other error (No Wonder project
creation with 3.5 tree for some reason) I didn't have the entire app
using ERXSession, ERXApplication, etc. Now that I've done that, its
starting to find the dynamic pages.
Now I'm getting POI errors and I can't yet trace down to what is
causing them:
[2009-6-24 17:21:56 PDT] <WorkerThread0> <WOWorkerThread id=0
socket=null> Workerthread exiting due to error, respawning with ID
10000...
Exception in thread "WorkerThread0"
com.webobjects.foundation.NSForwardException
[java.lang.NoSuchMethodError]
org.apache.poi.hssf.usermodel.HSSFRow.createCell(I)Lorg/apache/poi/
hssf/usermodel/HSSFCell;:java.lang.NoSuchMethodError:
org.apache.poi.hssf.usermodel.HSSFRow.createCell(I)Lorg/apache/poi/
hssf/usermodel/HSSFCell;
at
com
.webobjects
.foundation
.NSForwardException
._runtimeExceptionForThrowable(NSForwardException.java:41)
at
com
.webobjects
.appserver._private.WOWorkerThread.run(WOWorkerThread.java:238)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoSuchMethodError:
org.apache.poi.hssf.usermodel.HSSFRow.createCell(I)Lorg/apache/poi/
hssf/usermodel/HSSFCell;
at er.excel.EGSimpleTableParser.parseTable(EGSimpleTableParser.java:
358)
at er.excel.EGSimpleTableParser.parseNode(EGSimpleTableParser.java:
261)
at er.excel.EGSimpleTableParser.parse(EGSimpleTableParser.java:246)
at er.excel.EGSimpleTableParser.workbook(EGSimpleTableParser.java:
122)
at er.excel.EGSimpleTableParser.data(EGSimpleTableParser.java:110)
at er.excel.EGWrapper.appendToResponse(EGWrapper.java:95)
at
com
.webobjects
.appserver
._private
.WOComponentReference.appendToResponse(WOComponentReference.java:135)
at
com
.webobjects
.appserver
._private.WOSwitchComponent.appendToResponse(WOSwitchComponent.java:
181)
at
com
.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:
1122)
at er.directtoweb.pages.ERD2WPage.appendToResponse(ERD2WPage.java:
615)
at
er
.directtoweb.pages.ERD2WListPage.appendToResponse(ERD2WListPage.java:
395)
at
com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:
1385)
at
er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java:
540)
at
com
.webobjects
.appserver.WOApplication.appendToResponse(WOApplication.java:1794)
at
er
.extensions
.appserver.ERXApplication.appendToResponse(ERXApplication.java:1674)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._dispatchWithPreparedPage(WOComponentRequestHandler.java:242)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._handleRequest(WOComponentRequestHandler.java:369)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
.handleRequest(WOComponentRequestHandler.java:442)
at
com
.webobjects
.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at
er
.extensions
.appserver
.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1772)
at
er
.extensions
.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1737)
at
com
.webobjects
.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at
com
.webobjects
.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
... 1 more
On Wed, Jun 24, 2009 at 5:15 PM, David Holt<email@hidden>
wrote:
Hi Joe,
I did exactly what you are doing as soon as I watched David's
screencast. My
model is in a separate framework with my own customized templates
(based on
the Wonder ones), so that shouldn't be an issue.
Have you turned on rule tracing? That is very informative. See the
last
entry in my run configuration below.
Did you add a rule to your user.d2wmodel in the Application? That's
what I
did.
On 24-Jun-09, at 4:32 PM, Joe Little wrote:
I enjoyed David's screencast of the D2W tech in action, and I think
if
nothing else, its the way to easily generate random Excel
spreadsheets
since rules will always trump code when dealing with the daily whims
of management. I've been able to replicate his example as long as I
have my model local to the project and not in a framework. Further,
David and I thought my issues may be related to not having a Wonder
generated source files from the model, but I have since made a
separate model framework using _WonderEntity.java and
WonderEntity.java for my eogen.
The problem is that whenever I try to load in a D2W dynamic page, I
get the likes of this:
<snip>
Its like it cannot find my model in any way. The project already is
correctly display a table looping through my data, so I know the
build
path and such are fine. This all works:
public NSArray<Applicant> applicants() {
if (_applicants == null) {
_applicants =
Applicant.fetchAllApplicants(session().defaultEditingContext());
}
return _applicants;
}
Adding the model and source to the project locally tends to resolve
the issue with D2W, but that just seems wrong :(
Seems unnecessary.
Any clue on how the dynamic pages should be generated? Could it be
something to do with the imports that WOLips found, even though I'm
binding to ER's D2W as well?
Here's the relevant main.java imports:
import com.webobjects.directtoweb.D2W;
import com.webobjects.directtoweb.ListPageInterface;
import com.webobjects.eocontrol.EOArrayDataSource;
Here are mine:
import ca.cscw.project.components.common.DHComponent;
import ca.cscw.project.model.Person;
import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WOContext;
import com.webobjects.directtoweb.D2W;
import com.webobjects.directtoweb.ListPageInterface;
import com.webobjects.eocontrol.EOArrayDataSource;
import com.webobjects.foundation.NSArray;
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden