« Return to Thread: Cant validate dwr.xml on local machine

Re: Cant validate dwr.xml on local machine

by Joe Walker-3 :: Rate this Message:

Reply to Author | View in Thread


DWR configures an EntityResolver before loading the dwr.xml file so it resolves DTDs from the JAR and not the network.
Joe.

On Fri, Jul 11, 2008 at 3:07 PM, Gregorgio <rgcp@...> wrote:

The reason I want to use SYSTEM instead of PUBLIC is because my app might not
be able to reach http://directwebremoting.org/schema/dwr20.dtd since I am in
the Intranet and wont have access to the Internet, but if you are telling me
that it actually wont go out to the network to search for the DTD then I am
safe.

Thanks!!





Joe Walker-3 wrote:
>
> Why not use a PUBLIC doctype?
>
> <!DOCTYPE dwr PUBLIC
>     "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
>     "http://directwebremoting.org/schema/dwr20.dtd">
>
> dwr.jar contains a copy of the dtd and it won't read the network to find
> it.
>
> Joe.
>
> On Thu, Jul 10, 2008 at 9:48 PM, Gregorgio <rgcp@...> wrote:
>
>>
>> Hello I am trying to validate my dwr.xml on my local machine but its
>> throwing
>> a null pointer.
>> I am positive that my path to the DTD is correct.
>> If I use <!DOCTYPE dwr PUBLIC .......(URL TO DTD) it works
>> but when I try <!DOCTYPE dwr SYSTEM ....(PATH TO DTD)
>>
>> Please help, its urgent.
>>
>> this is my dwr.xml
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <!DOCTYPE dwr SYSTEM "/usr/tomcat/webapps/CARS/WEB-INF/dwr20.dtd">
>>
>> <dwr>
>>  <allow>
>>    <create creator="new" javascript="OrgSuggestions">
>>
>>    </create>
>>  </allow>
>> </dwr>
>>
>>
>>
>> This is the error thrown on the browser:
>>
>> java.lang.NullPointerException
>>
>>
>> org.directwebremoting.impl.DTDEntityResolver.resolveEntity(DTDEntityResolver.java:42)
>>
>>
>> com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(EntityResolverWrapper.java:148)
>>
>>
>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:701)
>>
>>
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1019)
>>
>>
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>>
>>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>>
>>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>>
>>
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>>
>>
>> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
>>
>>
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
>>        javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
>>
>>
>> org.directwebremoting.impl.DwrXmlConfigurator.setInputStream(DwrXmlConfigurator.java:132)
>>
>>
>> org.directwebremoting.impl.DwrXmlConfigurator.setServletResourceName(DwrXmlConfigurator.java:87)
>>
>>
>> org.directwebremoting.impl.ContainerUtil.configureFromDefaultDwrXml(ContainerUtil.java:263)
>>
>>
>> org.directwebremoting.impl.ContainerUtil.configureContainerFully(ContainerUtil.java:421)
>>        org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:79)
>>
>>
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
>>
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>
>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>>
>>
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
>>
>>
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>>
>>
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>>
>>
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>>
>>
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
>>        java.lang.Thread.run(Thread.java:595)
>>
>>
>>
>>
>>
>> This is my web.xml configuration
>>        <servlet>
>>          <servlet-name>dwr-invoker</servlet-name>
>>
>>  <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
>>          <init-param>
>>             <param-name>debug</param-name>
>>             <param-value>true</param-value>
>>          </init-param>
>>          <load-on-startup>3</load-on-startup>
>>        </servlet>
>> --
>> View this message in context:
>> http://www.nabble.com/Cant-validate-dwr.xml-on-local-machine-tp18391557p18391557.html
>> Sent from the DWR - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Cant-validate-dwr.xml-on-local-machine-tp18391557p18404694.html
Sent from the DWR - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


 « Return to Thread: Cant validate dwr.xml on local machine