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%
-
14 Dec 2011 1:03 PM #401
OOM when uploading large files.
OOM when uploading large files.
We are using ExtJS's File field along with the DirectJEngine and we are getting OOM's because it wants the file to be loaded in memory (see stacktrace below). Obviously, this will not work for large files. What's out options?
java.lang.OutOfMemoryError: Java heap space
at org.apache.commons.io.output.ByteArrayOutputStream.needNewBuffer(ByteArrayOutputStream.java:128)
at org.apache.commons.io.output.ByteArrayOutputStream.write(ByteArrayOutputStream.java:158)
at org.apache.commons.io.output.ThresholdingOutputStream.write(ThresholdingOutputStream.java:128)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:101)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.getFileItems(DirectJNgineServlet.java:657)
at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processUploadFormPost(DirectJNgineServlet.java:645)
at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processRequest(DirectJNgineServlet.java:613)
at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.doPost(DirectJNgineServlet.java:580)
-
17 Dec 2011 3:03 AM #402
The easiest workaround will be to increment the allocated VM memory to be able to handle the biggest file size you inted to support.
Of course, the best and nicest way to do this would be to use the alternative way of handling files the apache FileUpload library provides, that allows you to handle the stream of data on your own (http://commons.apache.org/fileupload/streaming.html): perhaps you can take a look at the source code and work it out? Unfortunately, I am way too busy to do this myself right now.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/
-
27 Dec 2011 2:27 PM #403
Hi,
When will production version of DJN 2.0 be available. I see you have an alpha posted in July but no activity since then
thanks
~Michael
-
28 Dec 2011 1:42 AM #404
DJN 2.0
DJN 2.0
DJN 2.0 alpha will probably become 2.0 as is, as no changes to functionality have been made. You can use it as is, it is extremely robust.
I haven't delivered 2.0 yet because I would like to update the documentation (not many changes, really, but have to check it all) and add some minor things. If I do not find time to do that, I will just push the current alpha .jar as final at the beginning of the year.
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/
-
19 Jan 2012 4:08 AM #405
Is DirectJNgine comet capable ?
Am i completly missing something or there are just a few extjs components supporting ext direct ?
I would be glad to be wrong and a list of supported components would be useful.
-
2 Mar 2012 9:39 AM #406
DirectJNgine woth Spring3
DirectJNgine woth Spring3
Hello Guys;
I am in a middle of transition from ExtJs3 to ExtJs4 and I have heavly relied on DIRECTJNgine for communication this time.
Right now I am facing problem with DirectJNgine direct calls, I can login succesfully (non Direct call form submit) in my application, and then my main page loads,
but when I make a "DIRECT" call to my Java controller to fetch the name of the user saved in session using :
"SecurityContextHolder.getContext().getAuthentication()" comes out to be null.
My security config in web.xml :
My DirectStore in JS:Code:<filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
In My Java Controller:Code:buildUserGridStore: function(){ return new Ext.data.DirectStore( { autoLoad: true, paramsAsHash:false, root:'', directFn: UserController.loadAllByCriteria, idProperty:'userId', paramOrder: [], fields: [ {name: 'userId'}, {name: 'userName'}, ], listeners: { exception: function(misc){ alert("exception occured: " + misc); }, load: function(s, records){ console.info( "User Loaded " + records.length + " records"); } } }); } });
I am getting SecurityContextHolder.getContext().getAuthentication() NULL ! Any help will be appreciated,.Code:@DirectMethod public List<UserVo> loadAllByCriteria() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if(authentication != null){ baseService().getAllUsers() } return null; }
I am running short of time
please help!!
-
2 Mar 2012 10:15 AM #407
about User guide Beta
about User guide Beta
Let me add some more info that I am using DJN2.0 to stay updated with EXTJS4 + DJN2.0
and I was using User Guide alpha "DirectJNgine_User_Guide.2.0-alpha1.pdf" which explicitly said base params are not working with direct store? but I don't see any information about them "working or not "in beta version of the document.
Secondly I still could not sort out why the Direct calls from DJN are comming out of spring security becuase when the DJN remote call is recieved the java code :Looking forward for suggestions.Code:"SecurityContextHolder.getContext().getAuthentication()" returns null ...

-
4 Mar 2012 10:38 PM #408
-
6 Mar 2012 1:37 AM #409
Form post not working
Form post not working
Hi I am trying submit a form this way (as explained in the User Guide DJN 2.0 alpha1)
My Code : (used to work in ExtJs3 + DJN 1.3)Code:handler: function(){ Profile.updateBasicInfo(form.getForm().el, function(result, e){}); }
Error (in Chrome) :Code:if (btn == 'yes') { console.info(form.getForm().el); // THIS appears UNDEFINED (I am sure this is the problem) console.info(form.getForm().getValues()); // I TRIED PASSING THIS but it didnt worked UserController.deleteUser(form.getForm().getValues().el, function(result, e){ if(e.result.success == true){ //Success Code~ } } }); }
Uncaught TypeError: Cannot call method 'getAttribute' of undefined
I am following UserGuide 2.0 page 20 solution, but any progress on this, any updates, any solution will be really appreciated
-
11 Mar 2012 9:00 AM #410
From beginning of DJN documentation for 2.0 alpha:
The problem here is due to ExtJs 4.x not being backwards compatible with 3.x in that respectVery important!
The remaining documentation belongs to DirectJNgine 1.3, and is mostly correct:
however, due to changes in ExtJs 4.x itself that break older ExtJs code, we advise you to
be careful. If you find some problem, please, contact us.
As far as we know, code using baseParams is not supported anymore. Besides, we have
implemented form submitting via the api parameter: the approach we used in ExtJs 3.x
does not work with ExtJs 4.x anymore, again due to changes in ExtJs itself. See example
and test code for information on how to support form submit.
. DJN implementation did not break anything...
That said, form submit works without a hitch: in order to see how to do it in ExtJs 4, just check the examples & tests DJN provides.
RegardsPedro 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/


Reply With Quote
