Re: D2W Problem in new application
Re: D2W Problem in new application
- Subject: Re: D2W Problem in new application
- From: Theodore Petrosky <email@hidden>
- Date: Fri, 31 Oct 2014 12:29:22 -0400
So, class paths. you created a new D2W app. did you compare the “Build Path” of your app to the screen shot of the Build Path on the tutorial page?
Ted
On Oct 31, 2014, at 10:05 AM, Flavio Donadio <email@hidden> wrote:
> Fabian,
>
>
> I just noticed something really strange in the error message. I just created a dummy D2W app (no model, as suggested by Theodore) and ran it as a WOApplication.
>
> Here's the full error message, as shown in the browser:
>
>> Application: DummyTest
>> Error: java.lang.IllegalStateException exception
>> Reason:
>> java.lang.IllegalStateException: An Exception occurred while generating the Exception page 'WOExceptionPage'. This is most likely due to an error in 'WOExceptionPage' itself or WebObjects encountered an uncaught exception while creating a Session object.
>>
>>
>> Below are the logs of the original Exception which occured in com.webobjects.appserver.WOApplication, then the later Exception in WOExceptionPage.
>>
>> Original Exception:
>> java.lang.IllegalArgumentException: <com.webobjects.appserver.WOApplication> Class 'Session' exists (interface org.apache.axis.session.Session) but is not a subclass of WOSession.
>> at com.webobjects.appserver.WOApplication._sessionClass(WOApplication.java:1934)
>> at com.webobjects.appserver.WOApplication.createSessionForRequest(WOApplication.java:1973)
>> at com.webobjects.appserver.WOApplication._initializeSessionInContext(WOApplication.java:2110)
>> at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:319)
>> 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 com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>> at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>> at java.lang.Thread.run(Thread.java:695)
>>
>
>> WOExceptionPage Exception:
>> java.lang.IllegalArgumentException: <com.webobjects.appserver.WOApplication> Class 'Session' exists (interface org.apache.axis.session.Session) but is not a subclass of WOSession.
>> at com.webobjects.appserver.WOApplication._sessionClass(WOApplication.java:1934)
>> at com.webobjects.appserver.WOApplication.createSessionForRequest(WOApplication.java:1973)
>> at com.webobjects.appserver.WOApplication._initializeSessionInContext(WOApplication.java:2110)
>> at com.webobjects.appserver.WOContext.session(WOContext.java:369)
>> at com.webobjects.appserver.WOContext.componentActionURL(WOContext.java:1208)
>> at com.webobjects.appserver._private.WOHyperlink._appendComponentActionURLToResponse(WOHyperlink.java:183)
>> at com.webobjects.appserver._private.WOHyperlink.appendAttributesToResponse(WOHyperlink.java:219)
>> at com.webobjects.appserver._private.WOHTMLDynamicElement._appendOpenTagToResponse(WOHTMLDynamicElement.java:493)
>> at com.webobjects.appserver._private.WOHyperlink._appendOpenTagToResponse(WOHyperlink.java:133)
>> at com.webobjects.appserver._private.WOHTMLDynamicElement.appendToResponse(WOHTMLDynamicElement.java:443)
>> at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
>> at com.webobjects.appserver._private.WOConditional.appendToResponse(WOConditional.java:94)
>> at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
>> at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
>> at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
>> at com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:135)
>> at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
>> at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
>> at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
>> at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574)
>> at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543)
>> at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538)
>> at com.webobjects.woextensions.WOExceptionPage.generateResponse(WOExceptionPage.java:47)
>> at com.webobjects.appserver.WOApplication._handleError(WOApplication.java:3095)
>> at com.webobjects.appserver.WOApplication.handleException(WOApplication.java:3245)
>> at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:389)
>> at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:442)
>> at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
>> at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>> at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>> at java.lang.Thread.run(Thread.java:695)
>
>
> The error is not in my application...
>
>
> Cheers,
> Flavio
>
> On 30/10/2014, at 14:24, Fabian Peters <email@hidden> wrote:
>
>> Hi Flavio,
>>
>> It looks like your classpath isn't as it should be. Instead of a WOSession you get a org.apache.axis.session.Session. And the d2wmodel files don't seem to get referenced correctly either. You could open one of them, e.g. /Users/fdonadio/Projects/WonderSource/Frameworks/D2W/ERModernLook/build/ERModernLook.framework/Resources/d2w.d2wmodel in RuleModeler and see whether it can be opened at all and whether the contents look OK.
>>
>> Fabian
>>
>> Am 30.10.2014 um 16:01 schrieb Flavio Donadio <email@hidden>:
>>
>>> Fabian,
>>>
>>>
>>> I see these on the console with no debugging enabled:
>>>
>>> [2014-10-30 12:45:55 BRST] <main> ** DirectToWeb could not merge d2wmodel from file:/Users/fdonadio/Projects/WonderSource/Frameworks/D2W/ERModernLook/build/ERModernLook.framework/Resources/d2w.d2wmodel for reason: ** DirectToWeb exception - a rule cannot be instantiated if its right hand side is null. LHS=(look = 'ERModernLook') RHS=null
>>> [2014-10-30 12:45:55 BRST] <main> ** DirectToWeb could not merge d2wmodel from file:/Users/fdonadio/Projects/WonderSource/Frameworks/D2W/ERModernDirectToWeb/build/ERModernDirectToWeb.framework/Resources/d2w.d2wmodel for reason: ** DirectToWeb exception - a rule cannot be instantiated if its right hand side is null. LHS=null RHS=null
>>> [2014-10-30 12:45:55 BRST] <main> ** DirectToWeb could not merge d2wmodel from file:/Users/fdonadio/Projects/WonderSource/Frameworks/Core/ERDirectToWeb/build/ERDirectToWeb.framework/Resources/d2w.d2wmodel for reason: ** DirectToWeb exception - a rule cannot be instantiated if its right hand side is null. LHS=null RHS=null
>>>
>>>
>>> Cheers,
>>> Flavio
>>>
>>> On 29/10/2014, at 18:36, Fabian Peters <email@hidden> wrote:
>>>
>>>> Hi Flavio,
>>>>
>>>> Assuming you're starting out with an empty rule file, you're probably missing one or more d2w.d2wmodel files from ERDirectToWeb or JavaDirectToWeb. If you enable debug logging on er.directtoweb.ERD2WModel, you'll see which files get loaded.
>>>>
>>>> Fabian
>>>>
>>>> Am 29.10.2014 um 20:46 schrieb Flavio Donadio <email@hidden>:
>>>>
>>>>> Hello, all!
>>>>>
>>>>>
>>>>> I am getting this error when I run the app for the first time:
>>>>>
>>>>> [2014-10-29 17:37:34 BRST] <WorkerThread1> <br.com.codeprint.website.DirectAction>: Exception in performActionNamed() on the action "login" with the message: com.webobjects.directtoweb.D2WModelException: Error - could not find any rule that returns a pageName using the current context <D2WContext task=list, entity=Product, propertyKey=null, pageConfiguration=null>
>>>>> - Error with action login:com.webobjects.directtoweb.D2WModelException: Error - could not find any rule that returns a pageName using the current context <D2WContext task=list, entity=Product, propertyKey=null, pageConfiguration=null>, formValues:{username = (""); password = (""); wosid = ("WnGhLWoSK3H0Bvw752rq0g"); WOSubmitAction = ("login"); }
>>>>> com.webobjects.directtoweb.D2WModelException: Error - could not find any rule that returns a pageName using the current context <D2WContext task=list, entity=Product, propertyKey=null, pageConfiguration=null>
>>>>> at com.webobjects.directtoweb.D2WContext.pageName(D2WContext.java:734)
>>>>> at com.webobjects.directtoweb.D2W._pageWithContextTaskEntity(D2W.java:874)
>>>>> at com.webobjects.directtoweb.D2W._pageWithContextTaskEntity(D2W.java:859)
>>>>> at com.webobjects.directtoweb.D2W.pageForTaskAndEntityNamed(D2W.java:896)
>>>>> at com.webobjects.directtoweb.D2W.listPageForEntityNamed(D2W.java:1034)
>>>>> at br.com.codeprint.website.MainNavigationController.listPageForEntityName(MainNavigationController.java:32)
>>>>> at br.com.codeprint.website.MainNavigationController.homeAction(MainNavigationController.java:26)
>>>>> at br.com.codeprint.website.DirectAction.loginAction(DirectAction.java:72)
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>> at java.lang.reflect.Method.invoke(Method.java:601)
>>>>> at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:144)
>>>>> at er.extensions.appserver.ERXDirectAction.performActionNamed(ERXDirectAction.java:418)
>>>>> at er.directtoweb.ERD2WDirectAction.performActionNamed(ERD2WDirectAction.java:456)
>>>>> at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:259)
>>>>> at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
>>>>> at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
>>>>> at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>>>>> at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>>>>> at java.lang.Thread.run(Thread.java:722)
>>>>>
>>>>> It's a new application and I triple-checked the boilerpate code that should go into MainNavigationController.java. NavigationMenu.plist also seems to be good.
>>>>>
>>>>> d2w.d2wmodel is empty, which seems strange. I had never looked into that file before, I think.
>>>>>
>>>>> I still did not implement authentication, but changed the code according to the tutorial at http://wiki.wocommunity.org/display/WEB/Your+First+D2W+Project .
>>>>>
>>>>> Eclipse 4.4 (Luna) and WOLips 4.4 compiled by myself.
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Flavio
>>>>> _______________________________________________
>>>>> 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