uPortal IRC Logs-2011-04-15
[09:50:29 CDT(-0500)] <athena> anything you can think of for me to do to troubleshoot that NPE?
[09:50:54 CDT(-0500)] <EricDalquist> well you can try just doing a simple null check on the portlet definition there
[09:51:07 CDT(-0500)] <EricDalquist> but I bet when you add that you get a similar error from a different spot
[09:51:21 CDT(-0500)] <EricDalquist> if the portal can't walk from window to entity to definition not much will work
[09:51:44 CDT(-0500)] <EricDalquist> maybe add some debugging to print out the window and entity objects if the definition is null
[09:51:56 CDT(-0500)] <EricDalquist> and see if you can figure out why the portal isn't finding the definition object there
[09:52:50 CDT(-0500)] <athena> ok, i'll try that
[09:53:00 CDT(-0500)] <EricDalquist> sorry I don't have better answers
[09:53:06 CDT(-0500)] <EricDalquist> but I'm really at a loss for what could be happening
[09:53:15 CDT(-0500)] <athena> i did try and walk back through the code a bit, but i really have no idea either
[09:53:18 CDT(-0500)] <athena> not sure what's going on
[09:53:30 CDT(-0500)] <EricDalquist> to get to that point in the code the portal has found an entity for the subscribe id in the layout
[09:53:41 CDT(-0500)] <EricDalquist> then found/created a window for that entity
[09:53:55 CDT(-0500)] <EricDalquist> and is working on executing on that entity
[09:53:58 CDT(-0500)] <EricDalquist> er window
[09:53:59 CDT(-0500)] <athena> only things that i know are different about that environment is that it's built w/ maven 2, and it's running w/ a different hostname and using apache
[09:54:15 CDT(-0500)] <athena> yeah
[09:54:16 CDT(-0500)] <EricDalquist> yeah that shouldn't matter
[10:10:19 CDT(-0500)] <athena> getting windows like 62_u16l1n6_17.u16l1n6
[11:00:29 CDT(-0500)] <athena> hey eric
[11:00:45 CDT(-0500)] <athena> probablem seems to be coming from PortletWindowRegistryImpl
[11:01:03 CDT(-0500)] <athena> specifically the getParentPortletEntity method
[11:01:13 CDT(-0500)] <EricDalquist> hrm, ok
[11:01:14 CDT(-0500)] <athena> the code successfully gets the portlet window and the parent id
[11:01:24 CDT(-0500)] <athena> but then doesn't get the actual parent entity
[11:01:56 CDT(-0500)] <EricDalquist> huh
[11:02:30 CDT(-0500)] <EricDalquist> so it finds the IPortletWindow for the id
[11:02:47 CDT(-0500)] <athena> it's actually kind of hard to tell what's completely going on
[11:02:47 CDT(-0500)] <EricDalquist> and that has a parentParentPortletentityId
[11:03:03 CDT(-0500)] <EricDalquist> but then portletEntityRegistry.getPortletEntity returns null?
[11:03:03 CDT(-0500)] <athena> the log statements are printed out in a weird order
[11:03:15 CDT(-0500)] <EricDalquist> hrm
[11:03:19 CDT(-0500)] <EricDalquist> are they coming from different threads?
[11:03:39 CDT(-0500)] <athena> possibly
[11:03:45 CDT(-0500)] <EricDalquist> feel free to email me a big log chunk if you want another set of eyes on it
[11:03:46 CDT(-0500)] <athena> kind of hard to sort through it
[11:03:49 CDT(-0500)] <athena> sure
[11:06:13 CDT(-0500)] <athena> ok, found an example of one that's failing
[11:06:24 CDT(-0500)] <athena> INFO [uPortal-PortletRenderer-1] Apr/15 11:58:00,406 registry.PortletWindowRegistryImpl.[] - Found parent portlet entity id 62_u16l1n6_17
[11:06:53 CDT(-0500)] <athena> but then it fails to actually find that in the entity registry
[11:08:09 CDT(-0500)] <EricDalquist> ok
[11:09:53 CDT(-0500)] <EricDalquist> I can so some testing on my end in a few hours
[11:10:03 CDT(-0500)] <athena> ok
[11:10:11 CDT(-0500)] <athena> i'm just mystified because i can't reproduce it locally
[11:10:19 CDT(-0500)] <athena> my instance is completely fine
[11:10:32 CDT(-0500)] <EricDalquist>
[11:10:51 CDT(-0500)] <athena> yeah
[11:10:56 CDT(-0500)] <athena> dunno what would be different here
[11:20:56 CDT(-0500)] <athena> ok, narrowed it down a bit more
[11:20:58 CDT(-0500)] <athena> INFO [uPortal-PortletRenderer-1] Apr/15 12:19:58,846 registry.PortletWindowRegistryImpl.[] - Found parent portlet entity id 62_u16l1n6_17
[11:20:58 CDT(-0500)] <athena> INFO [uPortal-PortletRenderer-1] Apr/15 12:19:58,846 registry.PortletEntityRegistryImpl.[] - Couldn't find persistend entity id
[11:21:20 CDT(-0500)] <athena> so in portletEntityRegistry.getPortletEntity
[11:21:44 CDT(-0500)] <EricDalquist> hrm
[11:21:51 CDT(-0500)] <EricDalquist> so the entity id that the window is resolving to is persistent
[11:21:57 CDT(-0500)] <EricDalquist> but there is no persistent entity in the db
[11:22:03 CDT(-0500)] <EricDalquist> blarg
[11:22:19 CDT(-0500)] <EricDalquist> all of the logic in the entity registry has just been growing and growing
[11:22:25 CDT(-0500)] <EricDalquist> and I think we have a bunch of broken edge cases
[11:22:29 CDT(-0500)] <athena> possibly
[11:22:37 CDT(-0500)] <athena> though it's weird - i mean, this is just HSQL
[11:22:43 CDT(-0500)] <EricDalquist> the entity registry tries to be smart about only persisting entities that need it
[11:22:51 CDT(-0500)] <athena> yeah
[11:22:52 CDT(-0500)] <EricDalquist> so ones that actually have preferences
[11:23:00 CDT(-0500)] <EricDalquist> if they don't it uses a session stored map
[11:23:15 CDT(-0500)] <EricDalquist> uhg ok
[11:23:23 CDT(-0500)] <EricDalquist> I think I just thought of a race condition for this
[11:23:33 CDT(-0500)] <EricDalquist> if the URLs are generated while a persistent entity exists
[11:23:50 CDT(-0500)] <EricDalquist> but some request after the url is generated results in the entity switching from persistant to transient
[11:23:52 CDT(-0500)] <athena> wondered if it was something race-y, since i've done an initportal lately on my local machine
[11:24:01 CDT(-0500)] <EricDalquist> the entity registry needs to handle that better
[11:24:12 CDT(-0500)] <EricDalquist> and create/return a new transient entity instead
[11:25:19 CDT(-0500)] <athena> what makes it go from persistent to transient?
[11:25:52 CDT(-0500)] <EricDalquist> if there are portlet preferences
[11:25:56 CDT(-0500)] <EricDalquist> or not
[11:26:20 CDT(-0500)] <athena> seems kind of weird that all the portlets in the whole portal are failing
[11:26:24 CDT(-0500)] <EricDalquist> right
[11:26:55 CDT(-0500)] <EricDalquist> where in portlet entity registry did you add the log line :INFO [uPortal-PortletRenderer-1] Apr/15 12:19:58,846 registry.PortletEntityRegistryImpl.[] - Couldn't find persistend entity id:
[11:27:31 CDT(-0500)] <athena> line 151
[11:29:18 CDT(-0500)] <EricDalquist> hrm
[11:29:32 CDT(-0500)] <EricDalquist> ok ... give me about 30 minutes to do some other stuff here
[11:29:38 CDT(-0500)] <EricDalquist> and I'll look into it more here
[11:31:12 CDT(-0500)] <athena> thanks!
[11:31:33 CDT(-0500)] <athena> if i find out anything else i'll let you know
[11:58:20 CDT(-0500)] <athena> so . . . session is nul
[11:58:33 CDT(-0500)] <athena> which means the code returns null instead of the persistent id map
[12:00:05 CDT(-0500)] <EricDalquist> um
[12:00:08 CDT(-0500)] <EricDalquist> session being null is bad
[12:00:15 CDT(-0500)] <athena> yeah
[12:00:37 CDT(-0500)] <athena> going to look and see whether the code just can't find the request, or whether the session isn't associated w/ the request
[12:00:40 CDT(-0500)] <athena> though seems like either is bad
[12:00:58 CDT(-0500)] <athena> we don't think this is somehow related to apache+tomcat do we?
[12:01:32 CDT(-0500)] <athena> kinda guessing not, because enough of a session is coming through for a user to get an authenticated layout
[12:07:38 CDT(-0500)] <athena> ok, it can't find the request
[12:08:18 CDT(-0500)] <EricDalquist> um
[12:08:20 CDT(-0500)] <EricDalquist> that's ... weird
[12:09:26 CDT(-0500)] <athena> yeah.
[12:39:28 CDT(-0500)] <athena> yeah, this is actually returning null on occasion :/
[12:39:29 CDT(-0500)] <athena> final RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
[12:39:41 CDT(-0500)] <EricDalquist> that's neat
[12:40:09 CDT(-0500)] <EricDalquist> that should only happen if the main portal execution thread has completed but portlets haven't
[12:40:14 CDT(-0500)] <EricDalquist> so in the case of a portlet timeing out
[12:40:45 CDT(-0500)] <EricDalquist> that is a ThreadLocal backed class that is populated and cleared by the spring DispatcherServlet that handles all *.uP requests
[12:44:01 CDT(-0500)] <athena> yeah i ummmm don't know what to think about that
[12:44:18 CDT(-0500)] <EricDalquist> so what ends up getting rendered in the UI
[12:44:32 CDT(-0500)] <athena> every single portlet displays the error portlet message
[12:44:47 CDT(-0500)] <EricDalquist> can you paste me the contents of one of those error portlets?
[12:44:49 CDT(-0500)] <athena> authenticated, unauthenticated, DLM fragments, custom content . . .
[12:46:17 CDT(-0500)] <athena> well, right now it's an NPE on the logging statement in which i'm referencing the request
[12:46:32 CDT(-0500)] <EricDalquist> huh
[12:46:39 CDT(-0500)] <EricDalquist> so it is null while the main rendering thread is still executing
[12:46:40 CDT(-0500)] <athena> http://pastebin.com/HrRHTLe4
[12:46:45 CDT(-0500)] <EricDalquist> how the heck is that null
[12:46:59 CDT(-0500)] <athena> i don't know :/
[12:47:23 CDT(-0500)] <athena> this is what i've tracked down to from the ThreadNamingPortletExecutionInterceptorAdaptor
[12:47:52 CDT(-0500)] <EricDalquist> right
[12:48:15 CDT(-0500)] <EricDalquist> the thread local is being used because when the entity registry was first imagined it was thought to be request agnostic
[12:48:33 CDT(-0500)] <EricDalquist> so passing the current request in (like you have to do with the window registry) wasn't done
[12:48:45 CDT(-0500)] <EricDalquist> that changed with the selective entity persistance
[12:49:03 CDT(-0500)] <EricDalquist> and at that time instead of changing the API we just grabbed the request out of the threadlocal
[12:49:20 CDT(-0500)] <EricDalquist> the fact that the tread local is null during normal portal request process is bad though
[12:49:23 CDT(-0500)] <EricDalquist> that shouldn't ever happen
[12:49:35 CDT(-0500)] <EricDalquist> ioh ... wait
[12:49:38 CDT(-0500)] <EricDalquist> I just had a thought ...
[12:49:47 CDT(-0500)] <EricDalquist> in the pastebin you just sent me
[12:50:03 CDT(-0500)] <EricDalquist> can you find that exception in your logs and see what the name of the thread it was thrown from is?
[12:50:24 CDT(-0500)] <athena> what's the best way to figure that out?
[12:50:35 CDT(-0500)] <EricDalquist> it is included in the log like
[12:50:38 CDT(-0500)] <EricDalquist> er lin
[12:50:40 CDT(-0500)] <EricDalquist> line
[12:50:47 CDT(-0500)] <EricDalquist> INFO [uPortal-PortletRenderer-1] Apr/15 11:58:00,406 registry.PortletWindowRegistryImpl.[] - Found parent portlet entity id 62_u16l1n6_17
[12:50:55 CDT(-0500)] <EricDalquist> that is "uPortal-PortletRenderer-1"
[12:51:02 CDT(-0500)] <EricDalquist> for the name of the Thread
[12:51:36 CDT(-0500)] <athena> the line right above it starts with
[12:51:37 CDT(-0500)] <athena> INFO [TP-Processor3] Apr/15 13:37:52,066 url.PortalRequestUtilsImpl.[]
[12:51:44 CDT(-0500)] <athena> but . . . hm.
[12:51:50 CDT(-0500)] <EricDalquist> ok
[12:51:53 CDT(-0500)] <EricDalquist> so that is a tomcat thread
[12:51:54 CDT(-0500)] <athena> that's from something that was likely successful
[12:52:00 CDT(-0500)] <EricDalquist> ok
[12:52:05 CDT(-0500)] <EricDalquist> so what I'm wondering about
[12:52:09 CDT(-0500)] <athena> here we go
[12:52:23 CDT(-0500)] <athena> WARN [TP-Processor3] Apr/15 13:37:52,067 worker.PortletRenderExecutionWorker.[] - Execution failed on portlet 38_u16l1n
[12:52:23 CDT(-0500)] <athena> 11_17.u16l1n11java.util.concurrent.ExecutionException: java.lang.NullPointerException
[12:53:01 CDT(-0500)] <EricDalquist> hrm
[12:53:06 CDT(-0500)] <EricDalquist> that doesn't help my theory
[12:53:09 CDT(-0500)] <athena> lol
[12:53:31 CDT(-0500)] <EricDalquist> so when the portal dispatches to a portlet it always goes through the execution manager
[12:53:53 CDT(-0500)] <EricDalquist> which has a IPortletExecutionInterceptor API
[12:54:15 CDT(-0500)] <EricDalquist> that allows code to execute on the thread/request/response/execution before and after
[12:54:45 CDT(-0500)] <EricDalquist> one of these interceptors copies all of the thread locals from the tomcat thread, into the portlet thread and then clears them after the portlet thread is complete
[12:54:52 CDT(-0500)] <EricDalquist> and I was wondering if that was the problem
[12:55:28 CDT(-0500)] <EricDalquist> yeah ... I'm really wondering if this is the problem
[12:55:49 CDT(-0500)] <EricDalquist> right now I have all of these interceptors just using annotation based autowiring
[12:56:20 CDT(-0500)] <athena> is there any way this might be platform/setup dependent?
[12:56:20 CDT(-0500)] <EricDalquist> and the code that gets them injected looks like:
[12:56:21 CDT(-0500)] <EricDalquist> @Autowired
[12:56:21 CDT(-0500)] <EricDalquist> public void setExecutionInterceptors(List<IPortletExecutionInterceptor> executionInterceptors) {
[12:56:32 CDT(-0500)] <mklein21005> when I try to log in I get an error that says uPortal encountered an error that is preventing it from rendering but when I hit refresh i sucessfully log in
[12:56:33 CDT(-0500)] <EricDalquist> ordering is dependent on how spring orders those beans
[12:56:42 CDT(-0500)] <athena> ah, interesting
[12:56:57 CDT(-0500)] <EricDalquist> and non-deterministic config of a List is a BAD thing
[12:56:58 CDT(-0500)] <EricDalquist> ok ...
[12:57:09 CDT(-0500)] <EricDalquist> mklein21005: what version of uPortal are you using?
[12:57:29 CDT(-0500)] <mklein21005> 3.2.4
[12:57:43 CDT(-0500)] <EricDalquist> anything interesting in the portal log file?
[12:58:06 CDT(-0500)] <mklein21005> it basically just says Unable to instantiate a "org.jasig.portal.layout.dlm.DistributedLayoutManager"
[12:58:21 CDT(-0500)] <EricDalquist> can you pastebin the entire log line and corresponding stack trace?
[12:59:38 CDT(-0500)] <EricDalquist> so athena ... a impl opinion question
[12:59:46 CDT(-0500)] <athena> sure
[13:00:07 CDT(-0500)] <EricDalquist> do I move PortletWorkerFactoryImpl from an @Service bean to declaring it in spring just so I can explicitly list the interceptor order
[13:00:08 CDT(-0500)] <EricDalquist> or
[13:00:30 CDT(-0500)] <EricDalquist> do I add the Ordered interface to the IPortletExecutionInterceptor interface
[13:00:32 CDT(-0500)] <EricDalquist> and sort the list
[13:00:41 CDT(-0500)] <athena> i actually haven't played w/ the ordered interface at all
[13:00:45 CDT(-0500)] <athena> though that sounds neat
[13:00:54 CDT(-0500)] <EricDalquist> its been a part of spring for a while now
[13:01:03 CDT(-0500)] <athena> another option i guess is to declare the list explicitly in the config, then autowire the list
[13:01:04 CDT(-0500)] <EricDalquist> lots of their bundled inteceptor/resolver classes support it
[13:01:09 CDT(-0500)] <EricDalquist> oh yeah
[13:01:12 CDT(-0500)] <EricDalquist> forgot you can do that
[13:01:16 CDT(-0500)] <EricDalquist> that's probably the best bet
[13:01:18 CDT(-0500)] <athena> ok
[13:01:31 CDT(-0500)] <athena> that way we can have an explicit listing w/o having to take the @Service off
[13:01:34 CDT(-0500)] <EricDalquist> yup
[13:02:46 CDT(-0500)] <EricDalquist> I sure hope this is actually the problem
[13:03:14 CDT(-0500)] <athena> me too!
[13:03:22 CDT(-0500)] <athena> really would love to get this server up and running
[13:03:36 CDT(-0500)] <athena> if we're going to submit something to apple before the conference we'll need to do it in a couple weeks
[13:03:45 CDT(-0500)] <athena> but also it'd be a good way to do some up4 testing
[13:03:49 CDT(-0500)] <EricDalquist> yes
[13:03:54 CDT(-0500)] <EricDalquist> valuable to get this stuff sorted out now
[13:04:30 CDT(-0500)] <athena> definitely
[13:04:53 CDT(-0500)] <athena> having it on a real server w/ SSL, a non-default hostname, etc. is always helpful
[13:04:59 CDT(-0500)] <athena> though we'll have to sort out the postgres issues still
[13:05:18 CDT(-0500)] <EricDalquist> hrm
[13:05:32 CDT(-0500)] <athena> one thing at a time
[13:05:38 CDT(-0500)] <EricDalquist> with the explicit list I'll have to remove all the @Service annotations from the interceptor impls
[13:05:46 CDT(-0500)] <EricDalquist> but that isn't a big deal
[13:06:07 CDT(-0500)] <athena> hmm
[13:06:17 CDT(-0500)] <athena> if we did @Service("name")
[13:06:28 CDT(-0500)] <athena> you could probably construct the list using <bean ref="name"/>
[13:06:36 CDT(-0500)] <athena> instead of explicitly calling the classname
[13:07:01 CDT(-0500)] <EricDalquist> oh true
[13:07:33 CDT(-0500)] <athena> by the way, i'm already being asked for the recording from yesterday, if you happen to see jim
[13:08:02 CDT(-0500)] <EricDalquist> ok
[13:08:04 CDT(-0500)] <EricDalquist> I'll ask him
[13:08:14 CDT(-0500)] <EricDalquist> I think we're both pretty swamped until Tuesday
[13:08:14 CDT(-0500)] <athena> thanks
[13:08:17 CDT(-0500)] <athena> yeah
[13:08:19 CDT(-0500)] <EricDalquist> this hr system upgrade is just nuts
[13:08:24 CDT(-0500)] <athena> yeah it sounds like it
[13:08:47 CDT(-0500)] <athena> i'd be happy to do whatever i can to get those recordings out and put together, but don't think i have access to where the files are stored
[13:09:10 CDT(-0500)] <EricDalquist> ok
[13:09:16 CDT(-0500)] <EricDalquist> I'll see if he can just get those out
[13:09:48 CDT(-0500)] <athena>
[13:10:02 CDT(-0500)] <athena> by the way, i did some work last night to actually use the filter tokens in that build.properties file
[13:10:11 CDT(-0500)] <athena> we never really looped back around on actually using that
[13:10:12 CDT(-0500)] <EricDalquist> oh neat
[13:10:17 CDT(-0500)] <athena> do you want me to check that in?
[13:10:28 CDT(-0500)] <athena> figure we still have some time to play with stuff and see if everyone likes it
[13:10:28 CDT(-0500)] <EricDalquist> sure
[13:10:31 CDT(-0500)] <athena> ok
[13:24:44 CDT(-0500)] <EricDalquist> athena: I'm going to commit this inteceptor fix but I can't test it locally
[13:24:56 CDT(-0500)] <EricDalquist> since I'm almost done with the url sytnax stuff for mobile
[13:25:03 CDT(-0500)] <EricDalquist> and I have to finishe that before starting the portal
[13:25:12 CDT(-0500)] <EricDalquist> will you be able to actually test this?
[13:25:15 CDT(-0500)] <athena> sure i'll test it out
[13:25:16 CDT(-0500)] <athena> yep
[13:27:30 CDT(-0500)] <EricDalquist> ok committed
[13:27:33 CDT(-0500)] <athena> yay!
[13:27:35 CDT(-0500)] <athena> thanks
[13:27:40 CDT(-0500)] <EricDalquist> hopefully bamboo is nice to me and all the tests still pass
[13:27:54 CDT(-0500)] <EricDalquist> it looked like the should to me
[13:28:15 CDT(-0500)] <athena> hehe
[13:37:17 CDT(-0500)] <athena> ok, looks like the spring config isn't quite right yet
[13:37:21 CDT(-0500)] <athena> i can take a look at it
[13:37:27 CDT(-0500)] <EricDalquist> thanks :/
[13:37:53 CDT(-0500)] <athena> no worries!
[13:37:59 CDT(-0500)] <athena> really appreciate you taking all the time to help
[13:38:11 CDT(-0500)] <EricDalquist> no problem
[13:38:28 CDT(-0500)] <athena> where is the portletExecutionInterceptors bean wired?
[13:38:32 CDT(-0500)] <athena> rendering pipeline fiel?
[13:39:44 CDT(-0500)] <athena> hm
[13:39:46 CDT(-0500)] <athena> nm
[13:39:51 CDT(-0500)] <EricDalquist> PortletWorkerFactoryImpl
[13:41:00 CDT(-0500)] <EricDalquist> https://issues.jasig.org/browse/UP-2978
[13:41:05 CDT(-0500)] <EricDalquist> for this bug
[13:42:02 CDT(-0500)] <athena> hm, ok, actually i'm not sure why this isn't working
[13:42:10 CDT(-0500)] <athena> should the Qualifier value match on the bean name?
[13:42:28 CDT(-0500)] <EricDalquist> I thought it should
[13:42:36 CDT(-0500)] <athena> i'll try using @Resource instead
[13:43:10 CDT(-0500)] <EricDalquist> ok
[13:49:34 CDT(-0500)] <EricDalquist> brb
[13:59:51 CDT(-0500)] <EricDalquist> is the patch working?
[13:59:55 CDT(-0500)] <athena> well . . .
[14:00:00 CDT(-0500)] <athena> yes and no?
[14:00:00 CDT(-0500)] <EricDalquist> heh
[14:00:20 CDT(-0500)] <athena> the portlets are no longer broken, yay
[14:00:38 CDT(-0500)] <athena> though now the HTML is actually displayed in the browser, rather than rendered
[14:00:41 CDT(-0500)] <athena> http://umobile.unicon.net/uPortal/f/u16l1s4/normal/render.uP
[14:01:00 CDT(-0500)] <athena> but the HTML at least includes the correct portlet HTML!
[14:01:01 CDT(-0500)] <EricDalquist> rendered fine for me ...
[14:01:04 CDT(-0500)] <athena> so that does seem to have helped
[14:01:05 CDT(-0500)] <athena> oh really?
[14:01:08 CDT(-0500)] <EricDalquist> yeah
[14:01:12 CDT(-0500)] <athena> maybe my browser has just given up
[14:01:20 CDT(-0500)] <athena> theeere we go
[14:01:25 CDT(-0500)] <athena> maybe it wasn't 100% started up
[14:01:25 CDT(-0500)] <athena> ok
[14:01:26 CDT(-0500)] <athena> so
[14:01:28 CDT(-0500)] <athena> FIXED
[14:01:30 CDT(-0500)] <athena> YAY ERIC
[14:01:33 CDT(-0500)] <athena> thank you so much
[14:01:36 CDT(-0500)] <EricDalquist> yay!
[14:01:40 CDT(-0500)] <EricDalquist> well and thank you for finding that bug
[14:01:49 CDT(-0500)] <athena> glad we tracked it down
[14:01:53 CDT(-0500)] <EricDalquist> finding and tracking down a bug like that with another developer is much more sane
[14:01:56 CDT(-0500)] <athena> i'll check in that change to @Resource
[14:01:58 CDT(-0500)] <athena> yeah
[14:01:59 CDT(-0500)] <athena> totally
[14:01:59 CDT(-0500)] <EricDalquist> thanks
[14:02:09 CDT(-0500)] <athena> i can't imagine if we'd had to debug that w/ an adopting school
[14:02:14 CDT(-0500)] <EricDalquist> yeah
[14:02:15 CDT(-0500)] <EricDalquist> exactly
[14:04:30 CDT(-0500)] <EricDalquist> hrm
[14:04:31 CDT(-0500)] <EricDalquist> athena:
[14:04:35 CDT(-0500)] <EricDalquist> I logged in as admin
[14:04:39 CDT(-0500)] <EricDalquist> and now I see plain text html
[14:04:49 CDT(-0500)] <EricDalquist> weird
[14:04:54 CDT(-0500)] <EricDalquist> 2nd render fixed it ....
[14:04:55 CDT(-0500)] <athena> uhoh
[14:05:04 CDT(-0500)] <athena> so sounds like there's still some weirdness lurking
[14:05:07 CDT(-0500)] <EricDalquist> yeah ....
[14:05:38 CDT(-0500)] <EricDalquist> looks like un-cached renders are resulting in a "text/plain" content-type
[14:05:46 CDT(-0500)] <EricDalquist> rendering from cache fixes it though
[14:05:50 CDT(-0500)] <athena> yeah
[14:05:56 CDT(-0500)] <athena> and your request made admin work for me
[14:06:02 CDT(-0500)] <athena> but when i logged in as student i had to refresh
[14:06:05 CDT(-0500)] <EricDalquist> yup
[14:06:14 CDT(-0500)] <athena> hope that behavior at least happens locally
[14:06:17 CDT(-0500)] <athena> and isn't just this server
[14:06:17 CDT(-0500)] <EricDalquist>
[14:06:24 CDT(-0500)] <athena> because that was painful
[14:06:27 CDT(-0500)] <EricDalquist> lol
[14:06:44 CDT(-0500)] <EricDalquist> well I'm going to get some lunch
[14:06:52 CDT(-0500)] <EricDalquist> then finish up the mobile url stuff
[14:07:03 CDT(-0500)] <EricDalquist> and then if you haven't figured out the plain text issue I'll look at it
[14:07:15 CDT(-0500)] <athena> ok
[14:07:32 CDT(-0500)] <athena> yeah i may need your help on that - don't know as much about the rendering pipeline as i probably should
[14:07:45 CDT(-0500)] <EricDalquist> no problem
[14:42:56 CDT(-0500)] <athena> yeah . . . that doesn't crop up locally
[14:43:05 CDT(-0500)] <EricDalquist> hah
[14:43:09 CDT(-0500)] <EricDalquist> of course note
[14:43:11 CDT(-0500)] <EricDalquist> not
[14:43:31 CDT(-0500)] <athena> any chance it's something similar w/ some other list?
[14:43:55 CDT(-0500)] <EricDalquist> no, I'm thinking there is some issue we don't know about with using the XSL media-type that we're doing
[14:44:01 CDT(-0500)] * athena tells everyone to just hit refresh and ignore it
[14:44:15 CDT(-0500)] <EricDalquist> so the portal is supposed to pass through the value that the theme XSL specifies in the xsl:output media-type attribute
[14:44:27 CDT(-0500)] <athena> i can see what the headers look like on the first request
[14:44:32 CDT(-0500)] <EricDalquist> is this server fronted with apache?
[14:44:35 CDT(-0500)] <athena> yes
[14:44:40 CDT(-0500)] <athena> wondering if that's related at all
[14:44:55 CDT(-0500)] <EricDalquist> I wonder if locally the content-type header is missing on the first request
[14:45:04 CDT(-0500)] <EricDalquist> and it works because the browser guesses
[14:45:11 CDT(-0500)] <EricDalquist> but apache could be sticking plain/text in for the missing header
[14:45:12 CDT(-0500)] <athena> sounds plausible
[14:45:14 CDT(-0500)] <EricDalquist> just a random guess
[14:45:15 CDT(-0500)] <athena> i'll check it out
[14:45:16 CDT(-0500)] <athena> yeah
[14:45:47 CDT(-0500)] <EricDalquist> so yeah, see what the headers look like on first request
[14:46:15 CDT(-0500)] <athena> will do!
[14:46:17 CDT(-0500)] <athena> restarting it now
[14:46:54 CDT(-0500)] <athena> good guess
[14:47:00 CDT(-0500)] <athena> er wait, no
[14:47:01 CDT(-0500)] <athena> i see it now
[14:47:03 CDT(-0500)] <athena> text/html
[14:47:10 CDT(-0500)] <athena> unless this did a second request to get the headers
[14:47:22 CDT(-0500)] <EricDalquist> probably not
[14:47:22 CDT(-0500)] <athena> don't think it does though
[14:47:28 CDT(-0500)] <EricDalquist> so the portal is returning text/html
[14:48:00 CDT(-0500)] <athena> http://pastebin.com/pcXnNcS5
[14:48:37 CDT(-0500)] <athena> let me just double check w/ charles
[14:48:50 CDT(-0500)] <EricDalquist> huh
[14:48:55 CDT(-0500)] <EricDalquist> so text/html
[14:49:44 CDT(-0500)] <athena> ok, so the web dev tools bar actually was doing a second request or something
[14:49:51 CDT(-0500)] <athena> using charles, the header shows up as text/plain
[14:49:52 CDT(-0500)] <EricDalquist> heh'
[14:49:54 CDT(-0500)] <EricDalquist> ok
[14:50:14 CDT(-0500)] <athena> let me try on localhost and see if it's missing, or tomcat sets it, or what
[14:50:15 CDT(-0500)] <EricDalquist> and that is locally?
[14:50:18 CDT(-0500)] <EricDalquist> ok
[14:50:23 CDT(-0500)] <EricDalquist> oh that was on the server
[14:50:59 CDT(-0500)] <athena> yeah
[14:52:29 CDT(-0500)] <athena> ok, yep, content-type is missing on local
[14:52:47 CDT(-0500)] <EricDalquist> good to know
[14:52:59 CDT(-0500)] <athena> then set correctly on the second request
[14:53:04 CDT(-0500)] <athena> so excellent guess by mr. eric
[14:53:05 CDT(-0500)] <athena>
[14:53:06 CDT(-0500)] <EricDalquist> I'm just getting switched over to up dev
[14:53:39 CDT(-0500)] <athena> content-encoding isn't set on the first request either
[14:53:41 CDT(-0500)] <athena> no problem
[14:53:50 CDT(-0500)] <athena> at least this one is less catastrophic
[14:54:19 CDT(-0500)] <EricDalquist> yeah
[14:54:35 CDT(-0500)] <athena> feeling much better about things now
[14:57:32 CDT(-0500)] <EricDalquist> that's good
[14:58:12 CDT(-0500)] <EricDalquist> so if you're interested in following along jen
[14:58:20 CDT(-0500)] <EricDalquist> I'm starting looking in DynamicRenderingPipeline
[14:58:27 CDT(-0500)] <EricDalquist> which is the "head" of the rendering pipline
[14:59:52 CDT(-0500)] <EricDalquist> does the portal actually send a content-encoding header on the 2nd request?
[15:00:19 CDT(-0500)] <athena> yes, it does
[15:00:57 CDT(-0500)] <EricDalquist> huh
[15:01:28 CDT(-0500)] <EricDalquist> I wonder if the spring dispatcher servlet sets that
[15:07:28 CDT(-0500)] <athena> you think the spring dispatcher would only apply it on the second request?
[15:07:56 CDT(-0500)] <EricDalquist> not really
[15:08:02 CDT(-0500)] <EricDalquist> but that's the only thing I can think of
[15:08:27 CDT(-0500)] <EricDalquist> so XSLTComponent is what sets the MEDIA_TYPE property in the pipeline's output properties
[15:08:31 CDT(-0500)] <EricDalquist> I'll be able to debug here shortly
[15:11:22 CDT(-0500)] <athena> ah
[15:11:24 CDT(-0500)] <athena> sounds good
[15:15:55 CDT(-0500)] <EricDalquist> wtf ... so I'm seeing Content-Type being set on the first request
[15:17:02 CDT(-0500)] <athena> how are you checking for the header?
[15:17:30 CDT(-0500)] <EricDalquist> hrm ... just a minute
[15:21:14 CDT(-0500)] <athena> curl http://localhost:8080/uPortal -I
[15:21:25 CDT(-0500)] <athena> probably the easiest way to demonstrate it
[15:21:39 CDT(-0500)] <athena> hm, guess that doesn't follow redirects
[15:22:10 CDT(-0500)] <EricDalquist>
[15:23:43 CDT(-0500)] <athena> curl http://localhost:8080/uPortal/render.userLayoutRootNode.uP -I
[15:23:57 CDT(-0500)] <athena> executing that twice does actually demonstrate the weirdness
[15:24:00 CDT(-0500)] <athena> at least on my laptop
[15:24:03 CDT(-0500)] <EricDalquist> ok
[15:25:37 CDT(-0500)] <EricDalquist> http://pastebin.com/0vdM8aPp
[15:25:40 CDT(-0500)] <EricDalquist> that is what I see
[15:25:43 CDT(-0500)] <EricDalquist> on the first request
[15:25:56 CDT(-0500)] <EricDalquist> latest trunk / initdb
[15:26:56 CDT(-0500)] <EricDalquist> do you know what versions of tomcat you and the server are using?
[15:28:08 CDT(-0500)] <athena> looks like i'm likely using 6.0.29
[15:28:11 CDT(-0500)] <athena> and server 6.0.32
[15:28:55 CDT(-0500)] <athena> and that's a portal that you started up and haven't touched at all after starting?
[15:29:08 CDT(-0500)] <EricDalquist> yup
[15:29:11 CDT(-0500)] <EricDalquist> restart tomcat
[15:29:17 CDT(-0500)] <EricDalquist> then run any of those curl commands
[15:29:19 CDT(-0500)] <athena> interesting
[15:29:22 CDT(-0500)] <EricDalquist> yeah
[15:29:26 CDT(-0500)] <EricDalquist> I just committed a small change
[15:29:29 CDT(-0500)] <EricDalquist> that adds some logging
[15:29:32 CDT(-0500)] <athena> you're on a mac too right now?
[15:29:35 CDT(-0500)] <athena> ok, i'll try that out
[15:29:38 CDT(-0500)] <EricDalquist> and falls back to a default content type
[15:29:46 CDT(-0500)] <EricDalquist> so if you try and and see if you get warning in the loggs
[15:29:50 CDT(-0500)] <EricDalquist> I'm on linux right now
[15:29:55 CDT(-0500)] <athena> hmm
[15:29:56 CDT(-0500)] <EricDalquist> only on mac at home
[15:30:01 CDT(-0500)] <athena> i do have compression="on"
[15:30:10 CDT(-0500)] <athena> though wouldn't really expect that to be the issue
[15:30:11 CDT(-0500)] <EricDalquist> where is that set?
[15:30:20 CDT(-0500)] <athena> in tomcat's server.xml
[15:30:23 CDT(-0500)] <athena> can try turning it off
[15:38:03 CDT(-0500)] <athena> is it this no mediaType warning?
[15:38:09 CDT(-0500)] <EricDalquist> yeah
[15:38:16 CDT(-0500)] <EricDalquist> "No mediaType was specified in the pipeline output properties, defaulting to"
[15:38:35 CDT(-0500)] <EricDalquist> can you set a breakpoint at XSLTComponent:157
[15:38:45 CDT(-0500)] <EricDalquist> that is where the XSLT code pulls the media type out of the stylsheet
[15:38:56 CDT(-0500)] <EricDalquist> I'm wondering if it is missing or something
[15:41:35 CDT(-0500)] <athena> so that message doesn't actually show up
[15:41:39 CDT(-0500)] <athena> it gets the correct mime-type
[15:41:51 CDT(-0500)] <EricDalquist> ok ... well that is even more confusing then
[15:41:56 CDT(-0500)] <athena> agreed!
[15:42:07 CDT(-0500)] <EricDalquist> since all that happens then is:
[15:42:08 CDT(-0500)] <EricDalquist> res.setContentType(mediaType + "; charset=" + CHARACTER_SET);
[15:42:22 CDT(-0500)] <athena> now it's working though
[15:42:31 CDT(-0500)] <athena> so . . . . i'm confused
[15:42:42 CDT(-0500)] <athena> but working is good i suppose?
[15:42:51 CDT(-0500)] <athena> so not sure what's up with that
[15:42:59 CDT(-0500)] <EricDalquist> heh
[15:43:01 CDT(-0500)] <EricDalquist> yeah
[15:43:55 CDT(-0500)] <athena> go figure
[15:45:25 CDT(-0500)] <athena> ok, it looks like actually this might be related to turning compression on
[15:45:31 CDT(-0500)] <EricDalquist> wtf
[15:45:35 CDT(-0500)] <athena> once i set that back on the problem came back
[15:45:37 CDT(-0500)] <athena> agreed!
[15:45:54 CDT(-0500)] <athena> i mean, easy enough to turn that off
[15:45:58 CDT(-0500)] <athena> but it is kinda nice to have on
[15:46:20 CDT(-0500)] <EricDalquist> yeah
[16:02:50 CDT(-0500)] <EricDalquist> athena: so the default mobile url will look like /uPortal/normal/render.uP
[16:02:56 CDT(-0500)] <athena> ok
[16:03:04 CDT(-0500)] <athena> sounds fine to me
[16:03:08 CDT(-0500)] <EricDalquist> no folder or portlet targeted
[16:03:13 CDT(-0500)] <athena> gotcha
[16:03:27 CDT(-0500)] <EricDalquist> but the UrlState (normal in this case) is a core concept of the urls
[16:03:31 CDT(-0500)] <EricDalquist> it won't really affect anything
[16:03:33 CDT(-0500)] <athena> sure
[16:03:34 CDT(-0500)] <athena> that's fine
[16:03:39 CDT(-0500)] <EricDalquist> just codifies that it is a "normal" url
[16:03:45 CDT(-0500)] <athena> can hardly see URLs on a phone anyway
[16:03:53 CDT(-0500)] <EricDalquist>
[16:27:28 CDT(-0500)] <athena> ok
[16:27:38 CDT(-0500)] <athena> so if i were to implement a new rendering pipeline for JSON layout data
[16:27:48 CDT(-0500)] <athena> how much work would that entail?
[16:27:57 CDT(-0500)] <EricDalquist> not too much I don't think
[16:27:57 CDT(-0500)] <athena> presumably we'd need something to handle a single URL for it
[16:28:07 CDT(-0500)] <athena> a new structure/theme, perhaps
[16:28:22 CDT(-0500)] <EricDalquist> the big question is how do you plan on doing the XML -> JSON serialization
[16:28:34 CDT(-0500)] <EricDalquist> your current XML wrapper around json would work fine
[16:28:41 CDT(-0500)] <EricDalquist> and likely be the simplest approach
[16:28:44 CDT(-0500)] <athena> hm, ok
[16:28:56 CDT(-0500)] <athena> it'd be better if we could actually just output JSON
[16:29:03 CDT(-0500)] <athena> but if we can't, we can still fake it out
[16:29:07 CDT(-0500)] <EricDalquist> well you can
[16:29:11 CDT(-0500)] <athena> just harder?
[16:29:14 CDT(-0500)] <EricDalquist> you would just add a component immediately after the serializer
[16:29:20 CDT(-0500)] <EricDalquist> that stripped those tags
[16:29:24 CDT(-0500)] <athena> ah, gotcha
[16:29:35 CDT(-0500)] <EricDalquist> we might be able to get even more creative
[16:29:51 CDT(-0500)] <EricDalquist> the URL stuff should be fine
[16:30:09 CDT(-0500)] <EricDalquist> you'd likely need a new IUrlNodeSyntaxHelper impl
[16:30:19 CDT(-0500)] <EricDalquist> but it would probably be pretty close to the one used for mobile
[16:30:44 CDT(-0500)] <athena> makes sense
[16:30:51 CDT(-0500)] <athena> ok
[16:30:59 CDT(-0500)] <athena> so new IUrlNodeSyntaxHelper
[16:31:01 CDT(-0500)] <athena> new structure/theme?
[16:31:02 CDT(-0500)] <EricDalquist> though hrm
[16:31:27 CDT(-0500)] <EricDalquist> that approach depends on being able to correctly select a profile based on some info to make the request use the right struct/theme XSL
[16:31:37 CDT(-0500)] <EricDalquist> you're likely more familiar with the feasibility there
[16:31:46 CDT(-0500)] <EricDalquist> I think that's ok as long as you're find with still sharing the one layout
[16:31:57 CDT(-0500)] <EricDalquist> since I think that is still our primary profile/layout restriction
[16:32:40 CDT(-0500)] <athena> well i think what we'd actually want is to map that rendering pipeline to a URL
[16:33:00 CDT(-0500)] <EricDalquist> ok, and not use any of the url features?
[16:33:08 CDT(-0500)] <athena> just have one static URL probably
[16:33:13 CDT(-0500)] <EricDalquist> essentially a "get me the user's layout as json"
[16:33:22 CDT(-0500)] <athena> yeah
[16:33:31 CDT(-0500)] <EricDalquist> that's doable too
[16:33:34 CDT(-0500)] <athena> just /uPortal/layout.json or whatever
[16:33:42 CDT(-0500)] <EricDalquist> you'd need a new IPortalRenderingPipeline impl
[16:33:52 CDT(-0500)] <athena> that way we could eventually use it to give a tablet the JSON layout, but use the main desktop theme to render portlets
[16:33:59 CDT(-0500)] <EricDalquist> which is the top level that reads character data events from the pipeline
[16:34:03 CDT(-0500)] <athena> gotcha
[16:34:26 CDT(-0500)] <EricDalquist> so if you look at https://wiki.jasig.org/display/UPC/Rendering+Pipeline
[16:34:28 CDT(-0500)] <athena> how will we associate the XSLT with that pipeline?
[16:34:31 CDT(-0500)] <EricDalquist> and scroll to the bottom of the page
[16:34:40 CDT(-0500)] <EricDalquist> the pipeline is all request based
[16:34:47 CDT(-0500)] <EricDalquist> it looks up the current IUserInstance
[16:34:58 CDT(-0500)] <EricDalquist> from that it gets the IUserProfile
[16:35:08 CDT(-0500)] <EricDalquist> which defines the structure and theme stylesheet descriptor IDs
[16:35:13 CDT(-0500)] <athena> hmm.
[16:35:29 CDT(-0500)] <athena> so that doesn't work so well for this use case i guess
[16:35:39 CDT(-0500)] <EricDalquist> though you could override that
[16:35:56 CDT(-0500)] <EricDalquist> open up BaseTransformerSource
[16:36:21 CDT(-0500)] <EricDalquist> and you can look at StructureTransformerSource which is one impl of that class
[16:36:30 CDT(-0500)] <athena> gotcha
[16:36:32 CDT(-0500)] <athena> that makes sense
[16:36:56 CDT(-0500)] <EricDalquist> so you could have your own impl of TransformerSource or BaseTransformerSource if you can re-use some of that logic, to return the XSL template you want to be used in the XSLT component
[16:37:47 CDT(-0500)] <athena> ok, that makes a lot of sense
[16:38:04 CDT(-0500)] <athena> i think this'll work well, too, because it'll be independent of the profile/layout
[16:38:13 CDT(-0500)] <athena> so it might work well for tablets sometday
[16:38:35 CDT(-0500)] <EricDalquist> yeah
[16:38:46 CDT(-0500)] <athena> seems like a really nice way of doing things
[16:38:53 CDT(-0500)] <EricDalquist> sorry I initially forgot that you needed this as a quick way of doing a JSON view of the layout
[16:38:56 CDT(-0500)] <EricDalquist> so that should be pretty easy
[16:39:06 CDT(-0500)] <athena> nice
[16:39:07 CDT(-0500)] <athena> ok
[16:39:22 CDT(-0500)] <athena> so with this strategy we need a new TransformerSource
[16:39:28 CDT(-0500)] <EricDalquist> yes
[16:39:42 CDT(-0500)] <athena> what stylesheet is that defining? is that structure, theme, both?
[16:39:44 CDT(-0500)] <EricDalquist> you would need a new transformer source for your structure -> json XSLT
[16:39:48 CDT(-0500)] <EricDalquist> whatever you want
[16:39:56 CDT(-0500)] <EricDalquist> you can have as many XSLTs as you feel like in the pipeline
[16:40:06 CDT(-0500)] <athena> oooh
[16:40:09 CDT(-0500)] <athena> that's gorgeous
[16:40:18 CDT(-0500)] <athena> what's this StaticTransformerSource do?
[16:40:35 CDT(-0500)] <EricDalquist> always returns the same XSL document
[16:40:40 CDT(-0500)] <EricDalquist> yeah ... it really is a bunch of spring beans that wire together on a generic API
[16:40:49 CDT(-0500)] <athena> sounds like the static one is maybe already what we need?
[16:40:55 CDT(-0500)] <EricDalquist> you can mix an match as many components as you want in any orddr
[16:40:57 CDT(-0500)] <EricDalquist> should be close
[16:41:03 CDT(-0500)] <athena> terrific
[16:41:13 CDT(-0500)] <EricDalquist> you might need to check that it actually uses XSLT Templates so its not re-parsing every request
[16:41:24 CDT(-0500)] <EricDalquist> also ... the mobile URL syntax stuff works
[16:41:45 CDT(-0500)] <EricDalquist> no layout node folders in dashboard or maximized portlet views
[16:41:50 CDT(-0500)] <EricDalquist> just need to fix the home button
[16:42:00 CDT(-0500)] <EricDalquist> do you have renderingPipelineContext.xml open?
[16:42:26 CDT(-0500)] <athena> oh yay!
[16:42:27 CDT(-0500)] <athena> yes, i do
[16:43:38 CDT(-0500)] <EricDalquist> so starting at the top
[16:43:47 CDT(-0500)] <athena> so it looks like this kind of goes through and each component wraps the previous one?
[16:43:54 CDT(-0500)] <EricDalquist> yeah
[16:44:08 CDT(-0500)] <EricDalquist> open up PipelineComponent
[16:44:14 CDT(-0500)] <EricDalquist> that is the base interface for the entire thing
[16:44:50 CDT(-0500)] <EricDalquist> each component calls getEventReader on the wrappedComponent
[16:44:57 CDT(-0500)] <athena> makes sense
[16:45:06 CDT(-0500)] <EricDalquist> then reads events off of it and does something with them
[16:45:06 CDT(-0500)] <athena> where are the URLs configured?
[16:45:25 CDT(-0500)] <EricDalquist> URLs are completely separate from the rendering pipeline
[16:45:44 CDT(-0500)] <EricDalquist> for your case you just need to create a new @Controller that wires in your new IPortalRenderingPipeline impl
[16:45:49 CDT(-0500)] <athena> ah!
[16:45:51 CDT(-0500)] <EricDalquist> and delegates to it
[16:45:56 CDT(-0500)] <athena> makes sense
[16:46:04 CDT(-0500)] <athena> and can use the one mapped to render.uP and such as a model
[16:46:08 CDT(-0500)] <athena> this is all SO cool
[16:46:14 CDT(-0500)] <EricDalquist> yup
[16:46:27 CDT(-0500)] <EricDalquist> and you should be able to share the first 4 component beans
[16:46:28 CDT(-0500)] <athena> <3
[16:46:50 CDT(-0500)] <athena> makes sense
[16:46:56 CDT(-0500)] <EricDalquist> so your XSLTComponent that uses the static transformer source would set preStructureTransformLogger as its wrappedComponent
[16:46:58 CDT(-0500)] <athena> and then diverge off from there isntead of structure/theme
[16:47:02 CDT(-0500)] <EricDalquist> yup
[16:47:04 CDT(-0500)] <athena> ya
[16:47:10 CDT(-0500)] <athena> so i don't even have to configure those in again
[16:47:12 CDT(-0500)] <athena> brilliant
[16:47:13 CDT(-0500)] <EricDalquist> yup
[16:47:34 CDT(-0500)] <EricDalquist> as you can see lookin in that file logging can be added at any step by inserting a LoggingStAXComponent
[16:47:44 CDT(-0500)] <EricDalquist> same with caching via the CachingStAXPipelineComponent
[16:48:02 CDT(-0500)] <EricDalquist> the one thing that we'll have to do a little figuring on is how your StAXSerializingComponent is going to be setup
[16:48:29 CDT(-0500)] <EricDalquist> that is the thing right now that serializes the XML (via StAX events) to string data and CharacterEvents
[16:48:34 CDT(-0500)] <EricDalquist> it also does chunking
[16:48:38 CDT(-0500)] <athena> that is so terrific
[16:48:55 CDT(-0500)] <EricDalquist> so it breaks up the serialized text around specific XML elements or text patterns
[16:49:03 CDT(-0500)] <athena> ah, gotcha
[16:49:10 CDT(-0500)] <EricDalquist> the use of that is caching
[16:49:20 CDT(-0500)] <athena> ahh
[16:49:23 CDT(-0500)] <EricDalquist> so like you're interacting with portlet 3 on a page with 5 portlets on it
[16:49:45 CDT(-0500)] <EricDalquist> the portal actually broke up that serialized theme output into 6 chunks of text (simplified a bit there)
[16:49:53 CDT(-0500)] <EricDalquist> around the <channel> elements the theme outputs
[16:50:15 CDT(-0500)] <EricDalquist> and stick a special PortletPlaceholderEvent subclass of the CharacterEvent class
[16:50:19 CDT(-0500)] <athena> gotcha
[16:50:32 CDT(-0500)] <athena> yeah i saw some of those when i was doign some debugging before
[16:50:38 CDT(-0500)] <EricDalquist> then when rendering is happening each CharacterEvent that just contains a string is written out directly
[16:51:00 CDT(-0500)] <EricDalquist> where as that PortletPlaceholderEvent is handled by the PortletRenderingIncorporationComponent component
[16:51:03 CDT(-0500)] <EricDalquist> and converted into text
[16:51:22 CDT(-0500)] <EricDalquist> by either calling portlet.render or getting the render results that happened in a separate thread
[16:51:29 CDT(-0500)] <athena> gotcha
[16:51:35 CDT(-0500)] <EricDalquist> again ... each actual component just focuses on its own job
[16:51:37 CDT(-0500)] <athena> yeah
[16:51:42 CDT(-0500)] <EricDalquist> and doesn't care what it is calling or what calls it
[16:52:12 CDT(-0500)] <EricDalquist> the only real restrictions is you need the StAXSerializingComponent at some point to convert from XML to text
[16:52:51 CDT(-0500)] <EricDalquist> and by the time you get to the very top you can only have CharacterDataEvents
[16:53:10 CDT(-0500)] <EricDalquist> since they are the only ones that actually have textual data to be written out
[16:53:25 CDT(-0500)] <EricDalquist> so what I'm thinking is that with your XML -> JSON use case we still do that via XSLT
[16:53:41 CDT(-0500)] <EricDalquist> since writing a custom XMLEvent -> JSON serializer would probably be a lot more work
[16:54:08 CDT(-0500)] <EricDalquist> and then just look at using the chunking features of the StAXSerializingComponent to split out just the JSON bit
[16:54:15 CDT(-0500)] <EricDalquist> the other thing that might work
[16:54:27 CDT(-0500)] <EricDalquist> is a custom component immediately before the StAXSerializingComponent
[16:54:49 CDT(-0500)] <EricDalquist> that strips out the begin/end element events that wrap the big text event that represents all the JSON
[16:55:08 CDT(-0500)] <EricDalquist> if I remember correctly the StAX serializer doesn't actually enforce valid XML
[16:55:15 CDT(-0500)] <athena> ah
[16:55:23 CDT(-0500)] <EricDalquist> also ... you can do this all via unit tests
[16:55:26 CDT(-0500)] <EricDalquist> take a look at RenderingPipelineIntegrationTest
[16:55:28 CDT(-0500)] <athena> excellent
[16:55:37 CDT(-0500)] <athena> so maybe lets just do XML-wrapped JSON first
[16:55:40 CDT(-0500)] <athena> then improve from there
[16:55:42 CDT(-0500)] <EricDalquist> yeah
[16:55:47 CDT(-0500)] <EricDalquist> if you get that working via a unit test
[16:55:59 CDT(-0500)] <EricDalquist> I can give you and to see if we can find an elegant way of stripping the XML wrapper
[16:56:03 CDT(-0500)] <EricDalquist> I think we'll be able to
[16:56:07 CDT(-0500)] <athena> sure that sounds great
[16:56:11 CDT(-0500)] <EricDalquist> that test wires up a close facsimile to the actual rendering pipeline
[16:56:13 CDT(-0500)] <athena> so exciting
[16:56:27 CDT(-0500)] <EricDalquist> so if you go off of that you should be able to get a unit test setup that actually does thi
[16:56:28 CDT(-0500)] <EricDalquist> this
[16:56:34 CDT(-0500)] <athena> yeah that'd be great
[16:56:44 CDT(-0500)] <athena> well hopefully i have enough info that i can play with it over the weekend
[16:57:30 CDT(-0500)] <EricDalquist> also ... take a look in the org.jasig.portal.xml.stream, org.jasig.portal.xml.stream.events, and org.jasig.portal.character.stream packages
[16:57:43 CDT(-0500)] <EricDalquist> there are all sorts of helper/utility classes in there
[16:58:01 CDT(-0500)] <EricDalquist> that make doing things like inserting or removing events from an event reader really easy and efficient
[16:58:52 CDT(-0500)] <EricDalquist> I'm pretty excited that we may actually be using some of these new features right out of the box in 4.0
[16:59:15 CDT(-0500)] <EricDalquist> this rendering pipeline concept is what ken and peter were talking about long ago
[16:59:32 CDT(-0500)] <EricDalquist> part of the problem is then the helper APIs such as StAX just didn't exist yet
[16:59:39 CDT(-0500)] <EricDalquist> so we didn't have as nice of a way of doing it
[17:00:00 CDT(-0500)] <EricDalquist> athena: question on the mobile ui
[17:00:14 CDT(-0500)] <EricDalquist> do you know where in muniversality that Home link is rendered?
[17:01:29 CDT(-0500)] <athena> yeah let me find it
[17:01:45 CDT(-0500)] <EricDalquist> that is the only thing that appears to be broken
[17:02:00 CDT(-0500)] <athena> line 73 of components.xsl
[17:02:14 CDT(-0500)] <athena> er, wait
[17:03:02 CDT(-0500)] <EricDalquist> oh I found it
[17:03:12 CDT(-0500)] <EricDalquist> line 163 I think
[17:03:13 CDT(-0500)] <athena> oh ok
[17:03:14 CDT(-0500)] <athena> yeah
[17:03:15 CDT(-0500)] <athena> i think so
[17:03:20 CDT(-0500)] <athena> the XSLT is kind of a mess right now
[17:03:24 CDT(-0500)] <athena> need to clean it up before the release
[17:03:32 CDT(-0500)] <athena> but the rendering pipeline split will help a lot too
[17:03:53 CDT(-0500)] <EricDalquist> good
[17:04:14 CDT(-0500)] <EricDalquist> so are we using the same XSL right now for both mobile browsers and umobile?
[17:04:46 CDT(-0500)] <EricDalquist> I guess I'm wondering where the split is between how stuff works for the mobile browser and the mobile native app
[17:06:05 CDT(-0500)] <EricDalquist> blah ... its 40 and raining ... do not want to go wait for the bus
[17:07:49 CDT(-0500)] <athena> ugh i don't blame you
[17:07:55 CDT(-0500)] <athena> sounds like our weather for the last month
[17:08:12 CDT(-0500)] <athena> the split between native and browser is in muniversality.xsl, at the bottom
[17:08:16 CDT(-0500)] <athena> it's pretty hacky right now
[17:08:17 CDT(-0500)] <EricDalquist> it was 75 and sunny last Sunday
[17:08:26 CDT(-0500)] <athena> wow!
[17:08:26 CDT(-0500)] <EricDalquist> april just had to remind us that it is still april after all
[17:08:38 CDT(-0500)] <athena> apparently we're actually going to get some sun this weekend
[17:08:43 CDT(-0500)] <athena> not all sun, and not warmer
[17:08:45 CDT(-0500)] <athena> but i will take it!
[17:08:49 CDT(-0500)] * EricDalquist loves the new URLs
[17:08:56 CDT(-0500)] <EricDalquist> navigated to a portlet in umobiule browser
[17:09:01 CDT(-0500)] <EricDalquist> restarted tomcat
[17:09:03 CDT(-0500)] <EricDalquist> hit refresh
[17:09:11 CDT(-0500)] <EricDalquist> still see that portlet maximized
[17:09:24 CDT(-0500)] <EricDalquist> yay and the home button works
[17:09:45 CDT(-0500)] <athena> hurray!
[17:10:02 CDT(-0500)] <athena> thanks so much
[17:10:07 CDT(-0500)] <athena> sounds terrific
[17:10:18 CDT(-0500)] <EricDalquist> great
[17:10:22 CDT(-0500)] <EricDalquist> ok I'll get this committed
[17:10:34 CDT(-0500)] <athena> awesome
[17:11:49 CDT(-0500)] <EricDalquist> you'll need to re run initdb
[17:12:05 CDT(-0500)] <EricDalquist> since now the IUrlNodeSyntaxHelper instance is specified as part of the stylesheet descriptor
[17:12:14 CDT(-0500)] <EricDalquist> or just re-import the stylsheet descriptors
[17:16:15 CDT(-0500)] <EricDalquist> ok committed
[17:16:32 CDT(-0500)] <EricDalquist> that should fix all of the URL issues people may have been having.
[17:18:58 CDT(-0500)] <EricDalquist> well I'm heading out
[17:19:15 CDT(-0500)] <EricDalquist> hopfully I can find some time to knock a few more tasks off this weekend