View Poll Results: If you read it, did you find DirectJNgine User's Guide adequate?
- Voters
- 54. You may not vote on this poll
-
Yes
40 74.07% -
No
14 25.93%
-
21 May 2012 1:31 AM #421
I just forgot to tell you that the portable way to intercept a method call is to create your own Dispatcher that extends SsmDispatcher: you can get what you want that way, without having to hack DJN code base.but I need to intercept the calls to my method before they happen. By analyzing your source code, I've found that
every server side method is callled by the code on the line 144 of DispatcherBase class
Check how SsmDispatcher is used and registered for details.
Regards,Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
22 May 2012 11:51 PM #422
Post about the future of DJN (II)
Post about the future of DJN (II)
There is a new post discussing the future of DJN, and the new features that might be added.
You can find it at http://softdevbuilttolast.wordpress....jngine-2-1-ii/
Regards,Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
29 May 2012 8:33 AM #423
Beyond DJN 2.1 (III)
Beyond DJN 2.1 (III)
This post might be of interested to those interested in knowing/participating in what might be there for future versions of DJN.
As always, ideas are welcome
Regards,Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
13 Jun 2012 2:40 AM #424
DirectJNgine 2.2 beta 1 is out!
DirectJNgine 2.2 beta 1 is out!
DJN 2.2 beta 1 adds some additional features to DJN 2.1, including:
- Auto-conversion of function arguments to arrays, to handle some ExtJs scenarios .
- Custom Date support, to avoid do-it-yourself date handling.
- Expermiental: extra server application exception data.
Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
2 Jul 2012 11:13 AM #425
directjengine + spring mvc + maven
directjengine + spring mvc + maven
Hey guys, I’m trying to configure it to work with spring mvc in a maven project, but the djn/directprovider just gives me
javax.servlet.ServletException: Servlet.init() for servlet DjnServlet threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:636)
root cause
java.lang.NullPointerException
com.softwarementors.extjs.djn.StringUtils.getNonBlankValues(StringUtils.java:67)
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createApiConfigurationsFromServletConfigurationApi(DirectJNgineServlet.java:438)
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.createDirectJNgineRouter(DirectJNgineServlet.java:175)
com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.init(DirectJNgineServlet.java:155)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:636)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
Configured the web.xml properly, all the needed resources can be accessed on the server.
I’ve took the FormPostDemo files and put them in my spring app, everything seems to be configured properly.
How is the Api.js generated? It seems that I have the same Api.js as copied, not getting regenerated, Is there a difference what kind of project I have and the folder structure?
Nothing relative in the log with the debug = true
-
2 Jul 2012 11:29 AM #426
Some quick notes:
The api file is not regenerated if there are no changes, to avoid invalidating browser caches, so do not assume it will be recreated on app startup: delete or rename it to force DJN to regenerate it.
On the other hand, if you are having some problem due to permissions, remember that you can configure DJN to keep the files in memory (see the docs).
I think you might be missing some little detail, it really looks like you misstyped something. Why don't you try debugging? You've got a .jar with the source. If you are using Eclipse or a similar tool it will be easy to see what's going on.
Regards,Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
2 Jul 2012 11:59 AM #427
Removed Api.js - not regenerated, configured directjngine to use in memory Api file, still the same problem, all that tomcat6 gives me is :
Jul 2, 2012 10:50:34 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sp1n3.web.war
INFO [http-8080-16] (DirectJNgineServlet.java:307) - Servlet GLOBAL configuration: debug=false, providersUrl=djn/directprovider, minify=true, batchRequestsMultithreadingEnabled=true, batchRequestsMinThreadsPoolSize=16, batchRequestsMaxThreadsPoolSize=80, batchRequestsMaxThreadsPerRequest=8, batchRequestsMaxThreadKeepAliveSeconds=60, gsonBuilderConfiguratorClass=com.softwarementors.extjs.djn.gson.DefaultGsonBuilderConfigurator, dispatcherClass=com.softwarementors.extjs.djn.servlet.ssm.SsmDispatcher, jsonRequestProcessorThreadClass=com.softwarementors.extjs.djn.servlet.ssm.SsmJsonRequestProcessorThread, contextPath=--not specified: calculated via Javascript--, createSourceFiles=true
INFO [http-8080-16] (DirectJNgineServlet.java:171) - Servlet GLOBAL configuration: registryConfiguratorClass=
nothing else on the requests or anything...
And
. If you are using Eclipse or a similar tool it will be easy to see what's going on. -- not that experienced yet
This is my web.xml conf for directjengine :
Folder structure for the demoCode:<!-- DirectJNgine servlet --> <servlet> <servlet-name>DjnServlet</servlet-name> <servlet-class> com.softwarementors.extjs.djn.servlet.DirectJNgineServlet</servlet-class> <init-param> <param-name>providersUrl</param-name> <param-value>djn/directprovider</param-value> </init-param> <!-- more parameters... --> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>DjnServlet</servlet-name> <url-pattern>/djn/directprovider/*</url-pattern> </servlet-mapping> <init-param> <param-name>apis</param-name> <param-value> demo </param-value> </init-param> <init-param> <param-name>createSourceFiles</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>demo.apiFile</param-name> <param-value>demo/Api.js</param-value> </init-param> <init-param> <param-name>demo.apiNamespace</param-name> <param-value>Ext.app</param-value> </init-param> <init-param> <param-name>demo.classes</param-name> <param-value> com.myproject.directjengine.FormPostDemo </param-value> </init-param>
src/main/webapp/demo (with the FormPostDemo.html and .js files)
this folder will be on localhost:8080/appName/demo
Any other suggestions?
-
2 Jul 2012 12:03 PM #428
Oh, btw...DirectJNgine has *tons* of debugging assertions. If you do not have assertions enabled in your web app, enable them.
It is very likely that they will show the exact line were something is going wrong.Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
2 Jul 2012 12:47 PM #429
enabled assertions, now i can see the exact line, but still nothing in the log for this app!
log4j.logger.com.softwarementors.extjs.djn=ALL
am i missing something? i don't get it
-
3 Jul 2012 6:21 AM #430
Recreated the project and everything looks fine, thanks a lot for your time and help!


Reply With Quote