greptilian logo

IRC log for #javaee, 2013-10-29

Please see http://irclog.greptilian.com/javaee for which days have been logged.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:00 scripty i guess IRC is Devil
00:02 kotten scripty: why do you say that?
00:03 cem_ sfisque: why they use tsv instead of excel ?
00:06 scripty cem_ well excel is complex in structure compared to text you know what that could mean
00:08 cem_ sfisque: osan
00:19 cem_ translator > pdurbin: why they use tsv instead of excel ?
00:19 pdurbin translator? what does that mean?
00:20 cem_ japanese to englesh
00:21 pdurbin oh
00:21 pdurbin cem_: who is using tsv?
00:21 * pdurbin loves tsv: https://github.com/pdurbin/vim-tsv
00:21 cem_ i am
00:22 pdurbin down with proprietary formats such as excel
00:22 whartung it's xml! Open, yo!
00:22 pdurbin heh
00:22 * pdurbin loves antiword too
00:23 pdurbin javaeebot: lucky antiword
00:23 javaeebot pdurbin: http://www.winfield.demon.nl/
00:23 pdurbin yeah. Antiword: a free MS Word document reader - http://www.winfield.demon.nl
00:23 whartung there's apache POI too
00:24 cem_ i use windows
00:24 pdurbin down with windows ;)
00:29 pdurbin down with zealotry
00:32 scripty joined ##javaee
00:37 cem_ why pdurbin
00:37 cem_ windows is easy
00:41 scripty left ##javaee
00:45 cem_ pdurbin: why i need to go to excel ? then tsv
00:48 pdurbin cem_: excel? windows? can we talk about java ee instead?
00:49 cem_ pdurbin: i'm talking about java
00:50 pdurbin cem_: you are?
00:50 cem_ pdurbin: yes
00:53 pdurbin cem_: then please continue
01:09 scripty joined ##javaee
01:21 tjsnell joined ##javaee
01:28 lolololool joined ##javaee
01:29 shrewdu joined ##javaee
01:39 cem_ left ##javaee
04:04 scripty joined ##javaee
04:42 Quest joined ##javaee
05:22 shrewdu left ##javaee
06:04 Quest searched abit, but didnt got the logic
06:04 Quest any help for this? cant get answers. http://stackoverflow.com/questions/19650750/recieving-and-sending-files-through-http-in-a-mobile-cell-phone-application
06:46 Quest http://pastebin.ca/2472382  how the H3ll, can an outputstream write to an HTTP resonse in struts2 app action class?
06:54 cheater_2 joined ##javaee
07:08 Quest partially solved ^
07:17 dangertools joined ##javaee
07:17 dangertools joined ##javaee
07:19 Quest question changed. http://stackoverflow.com/questions/19650750/recieving-and-sending-files-through-http-in-a-mobile-cell-phone-application
07:29 Quest If I want to get 2 things in one request from user (sent/uploaded to server), what is a proper way?  1. A parameter like site.com?id=1    2. An image streamed as byte data.   Both in single request.
09:49 SoniEx2 joined ##javaee
10:10 Quest joined ##javaee
11:30 MegaMatt joined ##javaee
11:42 acuzio morning Quest ; how are you ?
12:39 tommmied joined ##javaee
12:48 [twisti] joined ##javaee
13:17 Naros joined ##javaee
13:20 jonesbusy joined ##javaee
14:07 scripty joined ##javaee
14:56 Radditz joined ##javaee
14:56 Quest joined ##javaee
14:59 acuzio Quest: You should really use Struts 0.92 - its simpler than Struts2.x btw
15:01 Quest thats contrary to > 95% advice on internet. struts1 is horrible
15:06 r3m1 joined ##javaee
15:06 sess spring mvc > struts any day
15:06 sess any version
15:06 * Quest agrees
15:07 Quest for mediam apps. struts2 is must
15:07 Quest for scalable and featurefulls. spring
15:07 Quest bare servlets is not recommended anymore
15:07 Quest ignoring javaee. that i dont know much of its  improvements
15:08 Quest whats the difference between sending a multipart file and sending it as byte[] ? implied that both would use input/outputStreams
15:08 Quest basic and stupid question ^
15:09 scripty Quest your the most awesome person
15:10 Quest scripty,  i know
15:10 Quest why use multipart any way? why do conversion overhead?
15:11 sess a byte[] is not a stream obviously
15:11 sess HttpRequest objects handles multipart objects iirc
15:12 Quest yes. so?  httprequest.getInputStream.read(byte[]) would do
15:12 Quest why use multipart?
15:12 scripty :D
15:13 pdurbin Quest: are you talking about multipart mime types? http://en.wikipedia.org/wiki/MIME#Multipart_messages
15:14 sess Quest: getInputStream probably gets the whole request
15:14 sess while you are interested in the file upload part
15:14 sess im just guessing here btw, i've seldom digged deep in fileupload stuff
15:14 Naros acuzio: what in the world would you use Struts 0.92 :o
15:15 Naros Struts 2 is not complicated to use at all.
15:15 Quest i f just send a param    video=yes&array=myByteArrayMadeByJavaScript          iam good to go?
15:15 sfisque and why pre 1.x.  at the very least 1.3.9+ should be used if your'e going pre-2
15:16 sess uh
15:16 sess Quest: you cant send a byte array as a query string....
15:16 sess it has to be a string
15:16 sess thats not how you upload files
15:16 sess you use an input type="file" and post it
15:16 Naros uploading files are sent as a part of the request payload, not part of the query or URI
15:16 scripty urgh ! God
15:17 Quest hm. how can i send byte []  over http in order for the server to recieve it and make an image out of it?
15:17 Quest instead of multipart?
15:17 sess exactly how i told you to
15:17 sess 2 lines above
15:17 sess it becomes a multipart
15:17 sess when you recieve it
15:17 t432 joined ##javaee
15:17 sess just post it with a file input and read the file from whatever API your framework throws at you
15:17 Quest so It cant be recieved else than multipart?
15:18 Naros Quest: this is the part i love about struts.  I define the result type of that controller as stream and I'm done.
15:18 * scripty someone needs to be sent back to school
15:18 Naros I pass the byteoutputstream to the framework and it handles the rest.
15:18 sess Quest: dunno, is the object you handle a HttpServletRequest?
15:18 dreamreal joined ##javaee
15:18 dreamreal was kicked by ChanServ: User is banned from this channel
15:18 sfisque you can send it as the stream body, but you cannot send binary in an url-encoded query string
15:18 Naros Correct
15:18 Quest sess,  all transfer is via http
15:18 sfisque aka, POST, not GET
15:18 sfisque or PUT
15:18 sess Quest: obviously, what does that have to do with this?
15:19 acuzio Naros: I have code in it :-)
15:19 aloo joined ##javaee
15:19 acuzio And in reality it is the simplest one
15:20 sess Quest:  http://stackoverflow.com/questions/2422468/how-to-upload-files-to-server-using-jsp-servlet
15:20 sess example
15:20 bobek joined ##javaee
15:21 Naros Quest: You basically want to receive a file from the server, yes?  If so, have the HttpServletResponse set the appropriate mime type, content-length, and disposition values and then stream the bytes as the response payload.
15:21 aloo was kicked by Quest: aloo
15:21 Naros Or are you wanting to upload a file to the server?
15:21 Quest wanting to upload file to server but not as multipart
15:21 Naros why not multi-part?
15:22 scripty Quest please google
15:22 sfisque because it might not be necessary?
15:22 Quest am.. just my teamlead discrition
15:22 Naros All our attachment forms use enctype="multipart/form-data"
15:22 Quest yes. thats what i used for ages. multipart
15:22 sfisque if you're responding to a form Quest, you have to use multipart.
15:23 Naros We transmit the file payload and other information regarding the file such as description and whatnot we collect from users.  I don't understand why not use that?
15:23 Quest basically   there has to be a param sent with the file.     the file sent as byte[] stream,             then the server sends the file to another client
15:23 Quest file sharing mobile application
15:24 sess wait, are you downloading a file from the server?
15:24 sfisque here, read this Quest - http://www.ietf.org/rfc/rfc1867.txt
15:24 sess I thought you were uploading it
15:24 Quest k
15:24 Naros OK but none of that implies not using multipart
15:24 Quest sess,  both. uploading to the RECIEVER,
15:24 sess wat
15:24 sfisque bbiab.  code strong!
15:24 Naros see yah sfisque
15:25 Quest Naros,  not using multipart is a teamlead discreation
15:25 scripty huh ?
15:25 scripty that is stupid
15:25 Naros multipart is required to upload files via HTTP
15:26 Naros otherwise only form data is sent, not the file
15:26 Quest yes. thats what i have been doing. and this question is making me more stupid
15:26 scripty Quest are you working ?
15:26 Naros I think it is making your teamlead look stupid.
15:26 acuzio psst Naros he is the team lead
15:26 sess lol
15:26 Quest Naros,  are there any other ways else than not using multipart?   but using http
15:27 sess Quest:  is your issue with DOWNLOADING or UPLOADING files?
15:27 sess on the server
15:27 Quest acuzio,  no iam not.
15:27 Naros If the requirement is to use port 80 to upload files, but not HTTP protocol - then you can use w/e.  But using HTTP, you have to stay within the restrictions of the protocol and RFC
15:27 acuzio Quest: realy - i thought you were sorry
15:27 Quest http is requirement as these days mobile networks only allow http
15:27 Quest ok
15:28 Naros lol Quest: you can use port 80 but that doesn't mean you have to use HTTP protocol over that port
15:28 Naros IM clients do that all the time
15:28 Quest oh
15:29 Naros Yah most of them still use their proprietary protocol but just over port 80 since it is typically open and the IM client's default ports are usually locked down by firewall rules.
15:30 Quest and then use some thing like sockets or else to communicate on port 80?
15:30 Quest let me ask.
15:30 acuzio that is surreal
15:30 Naros Yep, but again that all depends on YOUR requirements.
15:31 Quest no.. not allowed.       this weired.      hm...........     let me see. so there is not other way sending/receiving  file data on http protocol else than multip part..        ANY WAY?
15:32 Naros Sorry, nope.
15:32 sess why would you even want to do that
15:32 scripty most of the time this channel goes Nuts// see u all
15:33 scripty left ##javaee
15:33 Naros The query string has a maximum size limit which is typically 1024 on most platforms.  So even if you COULD send it in the query string, that would be one damn small file.
15:33 Radditz I saw the conversation, I wouldn't recommend using port 80 for other than HTML, if you're doing a server as it is reserved
15:33 Radditz on linux you need to be admin to listen on port 80
15:33 bobek Naros: That limitation is only for GET
15:33 Quest Naros,  hm
15:33 Quest sess,  ise
15:34 Quest i see
15:34 Naros bobek: right, not for POST
15:34 sess posting a base64encoded array could work in theory i guess
15:34 sess but you need html5 for that
15:34 sess or flash perhaps
15:34 Radditz sess: but you still need to decode it on the server
15:34 sess it would be read as a normal field
15:34 sess on the server
15:34 sess not sure of the max size of a posted field though
15:35 Radditz well I don't know much about this as I don't directly use the java ee framework so yeah
15:35 Naros this is far outside javaee :P
15:35 sess not really javaee related
15:35 sess yeah
15:35 bobek Quest: What's the rationale behind the "No multipart/form-data" decision?
15:36 Quest ok. how to make the clients download a file via http?
15:36 Naros Other than your teamlead wants it that way.
15:36 sess bobek: mass delusion
15:36 Quest bobek,  really dont know.
15:36 sess Quest: i normally make servlets
15:36 sess and write a byte[]to the response
15:36 Quest sess, got it
15:36 sess your framework might have special support for it aswell
15:36 sess that might be easier
15:36 Naros and specify the right mimetype on the response, content-length, and file disposition values.
15:36 sess http://stackoverflow.com/questions/1442893/implementing-a-simple-file-download-servlet
15:36 Quest sess,  struts2
15:36 Naros if you're using strusts2, here yah go
15:36 Quest sess,  Naros  i see.
15:37 Quest Naros,  whats specail in struts2 for that?
15:37 Naros look into result type stream
15:37 Naros yah let me paste
15:37 sess seems to exist some functionality for it in struts
15:37 Naros http://pastebin.com/Hj213WKV
15:37 sess so you wont have to handle streaming and stuff
15:37 bobek Quest: On ##java you said that you don't want to keep files in memory
15:37 bobek Quest: Does this still hold?
15:38 t432 left ##javaee
15:38 Naros We basically created a named result called 'download' of type 'stream'.  We use this wherever we need to send anything to the browser from a struts2 app
15:38 Naros this can handle images, documents, anything
15:38 Naros all the ${} are variables from the action
15:38 Quest Naros,  sess  so for uploading file to server., I had to use multipart. there is no other way. lets agree on that firs. thats no. 1.          no. 2,  I can response.write (the image as byte [] with some headers) and the client will start downloading it?  3. I also need to send some params with that file in no.2.  may be two files and some  params.
15:39 sess you dont send two files in the same response
15:39 Naros I could be mistaken but I think in HTML4, you can't send 2 files in the same response.
15:39 Naros Not sure whether HTML5 has any facilities for this
15:39 sess how would you even handle that on the client side
15:40 sess for images, there is one request per image
15:40 Naros Client would have to decode it somehow :P
15:40 Naros It's doable, just outside HTTP
15:40 sess what kind of parameters do you need to get? Cant you get them in the original request and then just fetch the images via the servlet in seperate requests?
15:40 Naros I have generally zipped up multiple files into an archive and transmitted the archive when we've needed to send multi-files.
15:41 Quest hm
15:41 Naros sess: he'd have to if he's using struts2 with the stream result type.
15:42 Quest Naros,  if the client downloads the image. in what form will it see it?
15:42 sess ....as an image
15:42 Naros technically, depends on it's extension and content type you specify in the response.
15:42 sess <img src="myAwsomeFileServlet?imageId=123456"/>
15:42 sess putting the image bytes in the response
15:42 sess will render that image
15:43 Naros aye, but I could put a document's bytes in that response but it won't render jack :P
15:43 Naros I believe if you set the wrong content type even on an image, it wont' render properly either.
15:43 sess i think it probably would render
15:43 sess as long as the binary data was alright
15:43 Naros Perhaps, probably client specific tho
15:44 sess and obviously you put the image bytes in the response if you call it from an <img> tag
15:44 sess yeah
15:44 sess but most browsers are fairly easy on the MIME types
15:44 Naros My bet would be IE would choke.  Firefox/Chrome probably make a best guess judgement call, even by inspecting the byte stream's signature marker.
15:45 Naros But that gets into my M$ bias :P
15:45 Quest sess, so when the user opens that url in browser (for which the servlet starts response.write the byte [] of image)  , the image file would start downloading?
15:46 sess isnt the image rendered as part of a page?
15:46 sess or will the user open the image in its own window?
15:46 Naros if he's just streaming bytes it is just a download.
15:47 Naros unless it's a callback like you posted earlier in the rendered page as an img tag src
15:47 sess if you open an url with a html document that has an img tag, it will download the src as soon as it parses the img tag
15:47 sess and render it
15:47 sess always in a seperate request from the document, other images, and other resources like css and js files
15:48 Quest sess,  Naros  there are not tags here in this case. just the url for image.
15:48 Naros then it will be treated just like a regular download
15:48 Radditz you still have a http header before sending the data, no?
15:48 Quest remember its a file sharing app. no pages there.
15:49 Radditz if it's a file sharing app then you are not forced to use http ?
15:49 Quest Radditz,  negative. all/most cellnetworks permit https
15:49 Quest -s
15:49 sess oh are you doing a native mobile app
15:50 Quest Naros,  sess  i think the way to go is use multipart to upload file.  and to respond. 1, make appropriate headers, 2, response.write byte[] . case solved. ?
15:50 Quest sess,  yes
15:50 Quest <Quest> file sharing mobile application
15:51 sess sounds reasonable
15:51 Radditz aren't bytes always encoded? or you can specify no encoding?
15:53 sess how would bytes be encoded
15:53 bobek Quest: before you close the case, make sure you set the proper response headers
15:53 whartung depends on the context
15:53 sess it's binary data, it has no encoding by its very nature
15:53 Quest bobek,  yes.  as i   said 1, make appropriate headers,
15:54 Quest Radditz,  sess  bobek  whartung  i think the combination of making headers and the http protocol itself will make the encoding.  just a gues
15:54 whartung http doesn't encode binary data
15:54 whartung the headers tell you the content type that the binary represents
15:54 sess strings are encoded, not bytes
15:54 Quest then is anything needed?
15:54 bobek Quest: I did not see if you answered my earlier question
15:55 Quest bobek,  which one?
15:55 bobek Quest: whether you can store the file on the server before you send it to the client
15:56 Quest bobek,  the last catch was, I dont want to store the file. just send it on the fly to the receiver on other hand
15:56 whartung easier if you can just store the file, but do whatever you want
15:57 Quest whartung,  yes.  its easier, but the user base is huge. so can do alot of storing/ disk i/o
15:57 bobek Quest: how big files are we talking about?
15:57 Quest whartung,  i just hope its possible to to that on the fly
15:57 Quest bobek,  10 million  users
15:57 Quest bobek,  and normal images.
15:58 Quest 100k to 700k
15:58 bobek Quest: I'm interested in the maximum size of the image files?
15:58 bobek Quest: ok
15:58 Quest ^
15:58 whartung by streaming it yourself,  you adopt the bulk of the responsibility of the HTTP protocol in to your code. If you store a file, you get to delegate that to an actual HTTP server.
15:58 Quest streaming would be preferable.
15:59 whartung what are you streaming it out of?
15:59 Quest sess,  Naros  bobek  whartung  Radditz  thanks all. I would code, and then return
16:05 sfisque joined ##javaee
16:05 whartung o/ sfisque
16:07 scripty joined ##javaee
16:08 [twisti] left ##javaee
16:11 sfisque yo whartung :-)
16:12 scripty hey sfisque
16:13 * sfisque waves to scripty :-)
16:40 hid joined ##javaee
16:41 cem_ hello brothers
16:41 * sfisque waves to cem_
16:42 cem_ in few more days i'll start servlet and jsp
16:42 acuzio how come you dont wave to me ?
16:42 * acuzio sulks as sfisque doesnt wave to him
16:43 * sfisque waves to acuzio and give him a chuck on the shoulder
16:43 acuzio heh  :-)
16:43 acuzio has Quest finally solved his problem then
16:43 * whartung ponders…a woodchuck? a drill chuck? chuck roast? Chuck Jones?
16:43 hck wow !
16:44 bobek chuck norris
16:45 sfisque i hear if chuck norris kicks a computer, it writes 10000 lines of correctly running EE code
16:45 acuzio nonsense-
16:45 acuzio even Chuck is incapable of doing that
16:46 acuzio :-)
16:47 whartung heresy
16:47 hck Chuck Norris has counted to infinity. Twice.
16:52 cem_ joined ##javaee
17:00 cem_ joined ##javaee
17:02 cem__ joined ##javaee
17:02 cem__ hi
17:02 cem__ sorry my connection got lost
17:05 sfisque did it roll under the couch?
17:05 sfisque >.<
17:36 * hck is away: Move move movvv Away
17:39 chapin joined ##javaee
17:39 chapin How critical is it to move from JDK 1.7.0_17 to JDK 1.7.0_45?
17:48 tjsnell essential!
17:48 sfisque there are some server code exploits that have been fixed
17:48 sfisque i would recommend it
17:48 sfisque for deployment, but for compilation it's non-essential
17:49 tjsnell he left
17:50 sfisque lolz
17:50 sfisque hopefully he'll check the chatlog
17:57 pdurbin huh. I seem to be suffering from this: http://stackoverflow.com/questions/4730103/xerces-error-org-apache-xerces-impl-dv-dtd-dtddvfactoryimpl
17:58 whartung of course you are, it's Xerces...
17:58 sfisque are you bundling XML processing libs in your ear/war?  generally that's a recipe for trouble
17:58 sfisque better to use the container bundled ones
17:58 whartung da
17:58 sfisque or upgrade the containers libs if necessary
17:59 sfisque i had similar issues deploying jsfwiki on jboss.  had to remove xerces and xalan from the war and redeploy
18:00 pdurbin sfisque: here's the commit where I added xercesImpl to my pom.xml. I'm pretty sure I need it for oiosaml.java (but maybe not?): https://github.com/IQSS/dvn/commit/818a9cd
18:00 sfisque any container is going to provide xml off the shelf
18:00 pdurbin at the moment it's a complete mess. make a tiny edit, save and you can't deploy
18:00 sfisque do you need a specific version?
18:01 sfisque the other option is somehow force your app to deploy in its own isolated classloader
18:01 whartung jdk provides xml off the shelf
18:02 whartung are  you using endorsed libs>
18:02 whartung ?
18:03 pdurbin whartung: someone added <endorseddirs>${endorsed.dir}</endorseddirs> to our pom.xml in places. I didn't for what I added
18:06 whartung whenever I see xerces dependencies I cringe
18:07 pdurbin hmm, I commented out the xercesImpl from my pom.xml but I'm still getting DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory... after a simple edit. I restared glassfish in between. Maybe I need to blow away ~/.m2 or something
18:08 sfisque i used to cringe.  now i just trust the container will give me what i need and fix references where necessary
18:09 Quest joined ##javaee
18:10 crm_ joined ##javaee
18:12 pdurbin nicely written question: http://stackoverflow.com/questions/11677572/dealing-with-xerces-hell-in-java-maven
18:14 croc joined ##javaee
18:15 croc left ##javaee
18:17 kobain joined ##javaee
18:20 sfisque so design question, hopefully someone here has faced a similar context.  we have a bunch of entities that get processed and sent out onto JMS queues.  each entity maps to a specific queue (some share a queue, but each one maps to one),  e.g. all instances of ObjectX get sent to QueueW.  i'm trying to use injected @Resources for the Queue references but i cannot see a clean way to map ObjectX to QueueW without doing funky reflection or creating a new annota
18:20 pdurbin xerces is still getting pulled in somehow. versions 2.6.2 and 2.10.0
18:20 sfisque dependencies of other libs
18:20 sfisque using maven?
18:22 whartung any way to create a custom injector where you can put the mapping?
18:24 sfisque the other option is to use a static final string and use JNDI to lookup the queue rather than use injection.  :-/
18:25 sfisque at least the string->queue linkage is in the container so it's configurable, but i dislike putting static finals in entities
18:25 pdurbin hmm `mvn package --debug` seems to tell me org.opensaml:opensaml:jar:2.5.1-1 wants xerces:xercesImpl:jar:2.10.0. I'm not sure why xercesImpl-2.6.2 is getting downloaded
18:25 sfisque and i wanted to use @Resource and not use jndi (i like jndi but it can be a little klunky at times)
18:26 sfisque is one of your maven plugins pulling it in?
18:26 pdurbin sfisque: plausible, I suppose
18:26 whartung yea
18:26 whartung I just didn't know how extensible the resource injection capability is
18:27 whartung that perhaps you can create a SfiqueQueue class (that simply extends Queue) and write a custom factory for it.
18:27 sfisque yeah, i didnt want to do that. i'm trying to use as much of the container natively as possible
18:28 whartung is the injection lifecycle exposed at all? can you intercept it?
18:29 sfisque not sure.  but that might be a way to go, thx whartung.
18:29 * sfisque dives back into the bowels of JEE
18:30 whartung they've done pretty good job of exposing most everything else
18:34 cem_ joined ##javaee
18:35 cem_ it took quite alot to join to channel
18:35 cem_ sorry
18:39 tjsnell why?
18:52 pdurbin whelp. I've tried both "exclusion" and "provided" with maven. still in xerces hell :(
18:52 sfisque swtich to ant?
18:52 sfisque :P
18:52 pdurbin sfisque: back to ant, you mean ;)
18:52 sfisque yes, back to ant
18:53 sfisque come back to the dark side.....
18:53 sfisque embrace your emotions….
18:53 tjsnell a fools journey
18:54 pdurbin "In my office, the mere mention of the word Xerces is enough to incite murderous rage from developers" -- http://stackoverflow.com/questions/11677572/dealing-with-xerces-hell-in-java-maven
19:29 acuzio pdurbin: we use the solution as described in the first answer : JAXP - job done - plus we have our local repos
19:30 pdurbin acuzio: so... exclusions in maven? I'm looking at http://stackoverflow.com/questions/6657418/glassfish-3-1-1-error-on-redeploy/17391150#17391150 right now
19:31 acuzio pdurbin: exclusions yes - but i have no experience with GF - ask in the main channel - i think cheeser or one of the other ops are big GF users
19:32 pdurbin not a bad idea. or #glassfish even. cheeser used to work on glassfish
19:33 acuzio well tehre you go then
19:35 pdurbin acuzio: I'll talk out loud a little more here first. would hate to bother him
19:36 pdurbin if I exclude xercesImpl I get this: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
19:36 pdurbin which kind of makes sense... but I thought the point was that jaxp has its own xerces
19:37 pdurbin also, I'm finding the output of `mvn dependency:tree` to be useful. or at least interesting
19:46 semiosis pdurbin: i think any sufficiently large maven project has lots of exclusions for this kind of problem, not just with xerces
19:59 pdurbin semiosis: lots of exclusions. ok
19:59 pdurbin semiosis: but now I'm getting that not found error for org.apache.xerces.jaxp...
19:59 semiosis we even have to exclude servlet itself from the aws sdk!
20:00 pdurbin huh
20:00 semiosis exclude it all the places it's brought in by transitivity, then add it as a dep to your pom
20:01 pdurbin add org.apache.xerces.jaxp... as a dep?
20:01 semiosis well not exactly
20:01 semiosis add a dependency that provides it
20:03 semiosis in that SO page you linked they talk about orgs hosting xerces in their own maven repos (nexus, artifactory, etc) and giving them arbitrary names
20:03 semiosis you'd need to do that, then include that in your pom
20:03 semiosis since apparently xerces isnt in mvn central
20:04 pdurbin well, no, xerces is in mvn central these days: http://stackoverflow.com/questions/11677572/dealing-with-xerces-hell-in-java-maven/15265458#15265458
20:04 semiosis oh neat
20:04 semiosis do you have that as a dep in your pom?
20:04 pdurbin but I thought the goal was to exclude xerces and somehow add a dependency that includes the jaxp from glassfish instead
20:04 semiosis ohhh sorry i'm confused
20:05 pdurbin me too, obviously :)
20:06 semiosis my intuition is that if your app server provides libs then you dont need that in maven
20:06 semiosis i think the app server would already have a classpath with those libs, then add to that the libs maven brings in
20:07 semiosis why do you want to use the one built in to glassfish?
20:08 pdurbin that seems to be the advice I'm getting here. "use JAXP from glassfish"
20:08 tjsnell if the container has the dependency you just mark it provided in maven
20:10 pdurbin tjsnell: right. <scope>provided</scope> like this: http://stackoverflow.com/questions/4542139/maven-provided-scope ... I took a stab at that but I must not be doing it right
20:11 pdurbin since I'm using OIOSAML (which requires OpenSAML, which requires xerces), this might help explain, but it's talking about Java 1.5: OIOSAML.java - JAXP 1.3 endorsement - https://svn.softwareborsen.dk/oiosaml.java/sp/branches/slo.post/docs/endorsement.html
20:11 pdurbin "OIOSAML.java Service Provider uses the OpenSAML framework. OpenSAML requires the use of alternative implementations of JAXP 1.3 than the ones provided with the Java Runtime Environment."
20:12 pdurbin I mean, maybe that's old. I don't know
20:15 pdurbin this talks about using opensaml in maven-based projects: https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaInstall
20:15 pdurbin "OpenSAML relies heavily on JAXP 1.3 for low-level XML parsing and creation. Some JREs, most notably Sun's, ship with horribly broken JAXP implementations. As such you may (in the Sun JRE case, you must) endorse a different JAXP provider. At the time of this writing, the only known JAXP provider to work is the Apache Xerces & Xalan projects."
20:30 acuzio pdurbin: does it have to be Xerces - there are other parsers you know
20:31 pdurbin acuzio: "OIOSAML.java requires Xerces 2.9.1 in order to work" -- https://svn.softwareborsen.dk/oiosaml.java/ws-federation/trunk/docs/prereqs.html
20:31 acuzio you are stuffed then - it seems
20:31 pdurbin I was just looking at that. but lucky for you guys (and gals?) I have to go pick up the kids
20:31 pdurbin so I leave you to talk about something more interesting :)
20:31 acuzio kids - fuck me
20:32 acuzio for some reason i thought you were like a uni student or something
20:33 Naros lol a few of us are approaching 40 :P
20:33 pdurbin maybe I'll try something along these lines next: http://stackoverflow.com/questions/6439368/any-best-practices-for-dealing-with-java-ee-and-java-endorsed-dirs
20:33 acuzio Naros: :-)
20:33 pdurbin Naros: I can definitely see 40 from here
20:34 Naros sadly I can too
20:34 Naros and its too damn close
20:34 acuzio I am not all that young btw -
20:35 Naros lol if you're below 30, you're a baby.
20:35 acuzio i am not
20:35 Naros :P
20:37 acuzio you know tjsnell is like 80 or something
20:37 sess i would have guessed 14
20:37 * Naros rolls on the floor.
20:39 kotten joined ##javaee
20:39 acuzio :-)
20:39 acuzio he is not 80 - we just call him that
20:40 acuzio You can never be too rich, too thin or have too much broadband
20:41 acuzio and the broadband bit is the most impt.
20:43 whartung pdurbin: this is our open saml dependency in mavaen
20:43 whartung http://pastie.org/8441004
21:09 SoniEx joined ##javaee
21:10 * pdurbin squirrels it away (thanks, whartung)
21:43 * Naros grumbles about hibernate ....
21:44 Naros anyone using hibernate where you have Restrictions.eq(field,value).ignoreCase() works?
21:44 Naros Looks like 4.2.2.Final and onward its broken.
21:47 sfisque you shoudl be able to tag it as "provided" in our pom
21:47 sfisque re: including libs in maven (pdurbin)
21:48 sfisque *** your
21:48 semiosis is there anything special he needs to do so that glassfish provides it in the web app's classpath?
21:49 sfisque negative.  if it's in the container, it's provided
21:49 semiosis seemed like after he had excluded it from maven the app still couldn't find it
21:49 sfisque for compilation you can tag a lib as "provided" so that maven does not fetch it
21:50 sfisque we tag the javax.validation lib as "provided" in our pom, for example, and it does not get downloaded for the compile/packaging
21:50 sfisque <scope>provided</scope>
21:51 sfisque and just make sure your env puts it in the classpath for compilation (if its in GF, netbeans should already do that, assuming your project targets GF)
21:51 semiosis pdurbin: ^^
21:55 sfisque for example we have:
21:55 sfisque <dependency>
21:55 sfisque <groupId>javax.annotation</groupId>
21:55 sfisque <artifactId>jsr250-api</artifactId>
21:55 sfisque <scope>provided</scope>
21:55 sfisque </dependency>
21:55 sfisque no need for maven to fetch it, because GF provides it
22:00 semiosis yes, provided, got it :)
22:01 semiosis and when you do that, but get a classnotfound error, then what?
22:01 sfisque what container are you targeting and what IDE are you using?
22:02 semiosis well not me, pdurbin
22:08 sfisque i'm working on a write up of my "talking to camel wihtout camel".  hopefully it will be informative for people
22:08 sfisque between chatting with tjsnell and pouring thorugh camel code, i figured out how to strip out camel and spring from our build :-)
22:08 tjsnell heh
22:09 sfisque and btw, thx tjsnell.  i got it working nicely.  stripped about 30% off our war file size :-)
22:11 tjsnell does that matter?
22:11 tjsnell I've never been in a situation where I war size was an issue
22:12 sfisque permgen.  heapsize.  loading classes unnecessarily.  scalability
22:13 sfisque if i load 75 classes to do what 2 will do, i've eaten up permgen and heap space unnecessarily and that can introdice scalability issues
22:15 sfisque and because i have a fetish for minimalism in code :-)
22:15 sfisque why use a bazooka when you can use chop sticks
22:16 tjsnell war file doesn't dictate heapsize
22:19 sfisque no, but unnecessarily instantiating objects eats it up
22:19 sfisque remove the objects == remove the instances
22:20 tjsnell that's orthogonal to war size :)
22:20 tjsnell I've just seen folks too focused on that as a metric strip too much and then get bit
22:21 sfisque correlated, not orthogonal.  nothing exists in a vacuum
22:21 tjsnell oh, that extra code handled the edge case that took down production last night
22:21 tjsnell disk space and memory are crazy cheap :)
22:21 sfisque right, but did it do its work by leveraging a bloated unnecesary lib or was it compact and light weight
22:22 sfisque everything costs something, and has to scale in the enterprise
22:23 tjsnell more importantly
22:23 tjsnell been there done that
22:23 tjsnell and I've never ever had war size cause a scaling issue
22:23 tjsnell and any mem issues have never ever been because of too many libs
22:23 tjsnell but too many stupid devs :)
22:23 tjsnell more importantly I need to go find dinner!
22:25 pdurbin thanks for the continued maven advice. I'll see what I can figure out and hopefully push a solution to https://github.com/IQSS/dvn/tree/oiosaml
22:27 sfisque npnp
22:28 pdurbin hopefully it'll translate to newer versions of oiosaml/opensaml and glassfish (3 vs 4). the general techniques should
22:29 sfisque it should.  maven is maven
22:30 pdurbin ant doesn't have these issues at all?
22:30 sfisque it does and it doesnt
22:31 sfisque since ant only references what you put on the classpath, it's easier to handle
22:31 sfisque what you're seeing is botht he good and bad of having maven automate your dependencies
22:31 sfisque you need it, so it grabs it.  but sometimes it grabs too much and you have to fine tune the pomn
22:31 sfisque ***pom
22:32 sfisque just wait when you have to lock versions because a particular lib is incompatible with a newer version of another lib
22:32 pdurbin is gradle better at any of this?
22:33 tjsnell gradle is better overall
22:33 sfisque i've grown to appreciate what maven does, but i'm still an ant fan.  i like the subtle control AND being able to build my sandbox how i want it
22:33 tjsnell but dependency management is not easy
22:33 sfisque maven forces your hand in some areas which i dislike
22:33 tjsnell I won't work on an ant project
22:33 tjsnell :)
22:33 pdurbin :)
22:34 tjsnell been there, done that
22:34 pdurbin we recenty moved from sourceforge/svn to github. and from ant to maven. I hope it makes it easier for people to contribute
22:34 tjsnell no more :)
22:35 sfisque has anyone used ivy?
22:35 sfisque javaeebot lucky apache ivy ant
22:35 javaeebot sfisque: http://ant.apache.org/ivy/
22:35 tjsnell yep
22:35 tjsnell ivy was our gateway drug to maven
22:35 sfisque ROFL
22:35 sfisque see now i can get behidn that.  let me build my sandbox how i want, but solve the dep issue for me
22:35 pdurbin I've heard of ivy
22:36 tjsnell don't do ivy
22:36 tjsnell it's like the worst of both worlds
22:36 sfisque couldnt you (purely speculative) have ivy consume maven repos, and still use ant for the subtle control?
22:37 tjsnell that's how ivy works
22:37 tjsnell it's nightmarish
22:37 tjsnell gradle uses maven repos too actually
22:37 pdurbin I assume gradle reuses a lot of the maven infrastructure. maven central and whatnot
22:37 sfisque sounds heavenly.  i think i'm going to try it out tonight and fall in love
22:37 pdurbin jinx
23:20 MegaMatt joined ##javaee
23:38 kotten joined ##javaee
23:51 javaeebot` joined ##javaee
23:53 cem_ joined ##javaee
23:54 cem_ hi
23:54 sfisque greets cem_
23:56 AlCoF__ joined ##javaee
23:57 cem_ hi i want to convert paper page to digital
23:57 pdurbin cem_: with java?
23:57 cem_ these are hand written
23:57 cem_ yes
23:57 kotten I think a scanner will do it better
23:57 sfisque JNI wrapped around twain
23:58 sfisque would be the only way i think you could do it
23:59 cem_ can this transfer into appropriate word ..i tried different things it didnt workout

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Please see http://irclog.greptilian.com/javaee for which days have been logged.