Re: Troubles with com.webobjects.jspservlet

Filippo Laurìa <[email protected]> Tue, 14 May 2013 16:57:19 +0200
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <CAKdmw2iZNumHdvzhqm1X=iXW1tuyx_nTXyDDmg_EokbTLXxw4g@mail.gmail.com>
Thank you all for answers.

2013/5/13 Pascal Robert <[email protected]>:
>
> Le 2013-05-12 =E0 10:50, Filippo Laur=ECa <[email protected]> a =
=E9crit :
>
>> Hello to all,
>> I'm always trying to build Web-CAT (a WebObjects based application)
>> with the following configuration: eclipse Indigo + WOLips v3.7 +
>> Tomcat7 on Ubuntu 12.10.
>>
>> After many tries I just can build the whole application, using the
>> build.xml file for ant.
>>
>> Then deploying the application goes well, and tomcat does not throw any =
error.
>>
>> Trouble comes when trying to access, the application from main page.
>>
>> Here they are few lines of the stack trace:
>>
>> javax.servlet.UnavailableException: Error initializing servlet adaptor: =
null
>> at com.webobjects.jspservlet.WOServletAdaptor._applicationInit(WOServlet=
Adaptor.java:442)
>> at com.webobjects.jspservlet.WOServletAdaptor.initStatics(WOServletAdapt=
or.java:95)
>> at com.webobjects.jspservlet.WOServletAdaptor.init(WOServletAdaptor.java=
:652)
>> at net.sf.webcat.WCServletAdaptor.init(WCServletAdaptor.java:90)
>> at javax.servlet.GenericServlet.init(GenericServlet.java:160)
>>
>> It seems that there is an error with the component
>> com.webobjects.jspservlet from the framework JavaWOJSPServlet.
>>

Henrique:
With these lines you can read where the error came from. Truely I find
out that problem comes from net.sf.webcat.WCServletAdaptor.

>> Really I don't understand why I get this error, reading here [1] you
>> find out that the error is: "[..] Unknown, but probably just a result
>> of a previous complete failure of the app to start. [..]"
>>
>> I just downloaded sources from sourceforge and then builded them on my
>> laptop. Sourceforge distribute also a war file that magically runs
>> without errors, so I think that perhaps I'm missing some libraries.
>
> Sources of Wonder? The current source is on GitHub.

Sources of Web-CAT. I installed WOLips + Web-Objects framework as I
read from wocommunity.org

>
>> Any suggestion about this? How can I understand where is the problem?
>>
>> Thank you.
>>
>> [1]: http://en.wikibooks.org/wiki/WebObjects/Web_Applications/Deployment=
/Tomcat_Deployment_Details
>
> Please, don't use references from WikiBooks, it's all deprecated content.=
 Sadly, it's still there because they don't allow us to delete the content=
=85
>
> The real wiki is at http://wiki.wocommunity.org
>

Ok.

>
>

I think that this error is due to a bug of WOLips37Stable while
generating "JAR Project". This because when trying to generate a new
"JAR Project" (or simply when accessing JAR project implementing
net.sf.webcat package) I get the same error described here [2]. So I
decided to replace this sources with pre-built jar got from
distributed war file of Web-CAT and it goes fine, without any
exception.

Here you can find some of the eclipse log:

this for creation of new JAR project:
--
!SESSION 2013-05-12 23:09:28.135 ------------------------------------------=
-----
eclipse.buildId=3DM20120208-0800
java.version=3D1.7.0_21
java.vendor=3DOracle Corporation
BootLoader constants: OS=3Dlinux, ARCH=3Dx86_64, WS=3Dgtk, NL=3Dit_IT
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product
org.eclipse.epp.package.jee.product

!ENTRY org.objectstyle.wolips.wizards.WizardsPluginResources 4 4
2013-05-12 23:12:56.922
!MESSAGE Internal Error
!STACK 0
java.lang.NullPointerException
    at org.objectstyle.wolips.wizards.NewWOProjectWizard$InstallProjectTemp=
lateOperation.createFrameworksSupport(NewWOProjectWizard.java:963)
    at org.objectstyle.wolips.wizards.NewWOProjectWizard$InstallProjectTemp=
lateOperation.finishInstallTemplate(NewWOProjectWizard.java:896)
    at org.objectstyle.wolips.templateengine.InstallTemplateOperation.execu=
te(InstallTemplateOperation.java:68)
    at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModif=
yOperation.java:106)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:234=
4)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyO=
peration.java:118)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Moda=
lContext.java:121)

!ENTRY org.eclipse.ui.ide 4 0 2013-05-12 23:12:57.625
!MESSAGE java.lang.RuntimeException: Failed to create project.
!STACK 0
java.lang.RuntimeException: Failed to create project.
    at org.objectstyle.wolips.templateengine.InstallTemplateOperation.execu=
te(InstallTemplateOperation.java:73)
    at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModif=
yOperation.java:106)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:234=
4)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyO=
peration.java:118)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Moda=
lContext.java:121)
Caused by: org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:466)
    at org.eclipse.swt.widgets.Shell.<init>(Shell.java:263)
    at org.eclipse.swt.widgets.Shell.<init>(Shell.java:359)
    at org.eclipse.jface.window.Window.createShell(Window.java:487)
    at org.eclipse.jface.window.Window.create(Window.java:430)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
    at org.eclipse.jface.window.Window.open(Window.java:790)
    at org.eclipse.jface.dialogs.ErrorDialog.open(ErrorDialog.java:360)
    at org.eclipse.jface.dialogs.ErrorDialog.openError(ErrorDialog.java:424=
)
    at org.eclipse.jface.dialogs.ErrorDialog.openError(ErrorDialog.java:389=
)
    at org.objectstyle.wolips.wizards.NewWOProjectWizard$InstallProjectTemp=
lateOperation.createFrameworksSupport(NewWOProjectWizard.java:966)
    at org.objectstyle.wolips.wizards.NewWOProjectWizard$InstallProjectTemp=
lateOperation.finishInstallTemplate(NewWOProjectWizard.java:896)
    at org.objectstyle.wolips.templateengine.InstallTemplateOperation.execu=
te(InstallTemplateOperation.java:68)
    ... 4 more
--

and this for accessing an already created JAR project:

--
!ENTRY org.eclipse.core.resources 4 75 2013-05-12 23:12:59.343
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.objectstyle.wolips 4 75 2013-05-12 23:12:59.343
!MESSAGE Errors running builder 'WOLips Ant Builder' on project 'MyBootstra=
p'.
!STACK 0
java.lang.NullPointerException
    at org.objectstyle.wolips.wodclipse.core.builder.WodBuilder.getBooleanP=
roperty(WodBuilder.java:108)
    at org.objectstyle.wolips.wodclipse.core.builder.WodBuilder.buildStarte=
d(WodBuilder.java:126)
    at org.objectstyle.wolips.core.resources.internal.build.Builder.notifyB=
uilderBuildStarted(Builder.java:224)
    at org.objectstyle.wolips.core.resources.internal.build.Builder.build(B=
uilder.java:137)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.jav=
a:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManage=
r.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManage=
r.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.jav=
a:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManage=
r.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildMa=
nager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.jav=
a:374)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.j=
ava:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:=
241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
--

[2]: http://objectstyle.org/woproject/lists/woproject-dev/2010/07/0022.html