uPortal IRC Logs-2011-03-30

[13:43:17 CDT(-0500)] <athena> hey EricDalquist i just got this error running initdb
[13:43:20 CDT(-0500)]

<athena> [java] Caused by: java.lang.IllegalArgumentException: Provided data PortalDataKey [name=

Unknown macro: {https}

portlet-definition, script=classpath://org/jasig/portal/io/jaxb-import_v4-0.crn, version=4.0] has no registered importer or upgrader support.


[13:43:20 CDT(-0500)] <athena> [java] at org.jasig.portal.io.xml.JaxbDataImportExportService.importData(JaxbDataImportExportService.java:196)
[13:43:20 CDT(-0500)] <athena> [java] at org.jasig.portal.io.xml.JaxbDataImportExportService.importData(JaxbDataImportExportService.java:154)
[13:43:45 CDT(-0500)] <EricDalquist> do you have customized or new .portlet.xml files?
[13:44:11 CDT(-0500)] <athena> yes, though this failed on importing one i haven't customized
[13:44:20 CDT(-0500)] <EricDalquist> hrm I thought I fixed all of those
[13:44:28 CDT(-0500)] <EricDalquist> I removed the script attribute from the new files
[13:44:37 CDT(-0500)] <athena> ah ok
[13:44:51 CDT(-0500)] <EricDalquist> so finding any file that contains script="classpath://org/jasig/portal/io/jaxb-import_v4-0.crn" and remove that
[13:44:54 CDT(-0500)] <EricDalquist> will fix it
[13:44:57 CDT(-0500)] <athena> hm.
[13:45:05 CDT(-0500)] <athena> this file actually doesn't have a script attribute
[13:45:17 CDT(-0500)] <athena> bet i read the log wrong
[13:45:22 CDT(-0500)] <EricDalquist> I doubt it
[13:45:33 CDT(-0500)] <EricDalquist> that error can only exist if a .portlet.xml contains script=classpath://org/jasig/portal/io/jaxb-import_v4-0.crn
[13:45:35 CDT(-0500)] <athena> ah! ok, here we go
[13:45:49 CDT(-0500)] <athena> no meant bet it was my portlet file, not an unmodified one (smile)
[13:45:54 CDT(-0500)] <athena> i think i see what i need to update
[13:46:03 CDT(-0500)] <EricDalquist> ah ok
[13:46:48 CDT(-0500)] <athena> thanks!
[13:46:52 CDT(-0500)] <EricDalquist> yup
[13:47:09 CDT(-0500)] <athena> i'm also trying to go through and rework the CPD format
[13:47:25 CDT(-0500)] <EricDalquist> yeah I realized that with the new import format we don't need to list the script, we can assume the generic jaxb importer which does its own logic for finding the right import impl
[13:47:30 CDT(-0500)] <athena> the organization for the elements that govern the input field display are pretty weird
[13:47:34 CDT(-0500)] <athena> nice (smile)
[13:47:48 CDT(-0500)] <EricDalquist> well if you feel like you have the time feel free to rework the file format
[13:48:50 CDT(-0500)] <EricDalquist> how are the cpd files parsed right now?
[13:49:03 CDT(-0500)] <EricDalquist> is it still the old by-hand XML parsing?
[13:49:53 CDT(-0500)] <athena> switched it over to jaxb maven plugin yesterday
[13:49:59 CDT(-0500)] <EricDalquist> ncie
[13:50:12 CDT(-0500)] <athena> yeah, i think it'll be a good improvement
[13:50:15 CDT(-0500)] <EricDalquist> how was that on difficulty of getting a new XSD setup?
[13:50:23 CDT(-0500)] <athena> not a big deal at all
[13:50:26 CDT(-0500)] <EricDalquist> good
[13:50:34 CDT(-0500)] <EricDalquist> want to make sure we're not adding onerous processes
[13:50:39 CDT(-0500)] <athena> started with an auto-generated XSD produced by trang
[13:50:49 CDT(-0500)] <athena> no, i think it's really much easier than any of the other strategies we've used
[13:50:57 CDT(-0500)] <athena> the hard part is just figuring out what we want the XSD to actually be
[13:51:02 CDT(-0500)] <EricDalquist> yeah
[13:51:16 CDT(-0500)] <athena> actually was having trouble figuring one thing out
[13:51:20 CDT(-0500)] <EricDalquist> nice that just tweaking the xsd results in a magically updated java data model
[13:51:27 CDT(-0500)] <athena> hopefully i can get it cleaned up today
[13:51:28 CDT(-0500)] <athena> yes!
[13:51:30 CDT(-0500)] <athena> totally
[13:51:37 CDT(-0500)] <athena> if only the JSPs updated themselves too (tongue)
[13:51:41 CDT(-0500)] <EricDalquist> lol
[13:51:43 CDT(-0500)] <EricDalquist> yeah
[13:53:11 CDT(-0500)] <athena> so what i'd really like to do is for each parameter or preference to have an option element
[13:53:39 CDT(-0500)] <athena> and have the option be an abstract type, which extended implementations for a single text field, multi-select, etc.
[13:53:58 CDT(-0500)] <athena> got the abstract element configured in the XSD, and created element extensions of it
[13:54:12 CDT(-0500)] <athena> but not quite clear how to wire that into the parameter element
[13:54:15 CDT(-0500)] <EricDalquist> hrm
[13:54:16 CDT(-0500)] <athena> (did that make any sense so far?)
[13:54:19 CDT(-0500)] <EricDalquist> yeah
[13:54:28 CDT(-0500)] <EricDalquist> can you pastebin the xsd?
[13:54:30 CDT(-0500)] <athena> yeah
[13:54:58 CDT(-0500)] <athena> http://pastebin.com/SDFiWEwE
[13:55:37 CDT(-0500)] <athena> so right now that results in a java object that has both getSingleChoice() and getSingleTextInput() methods, etc.
[13:55:53 CDT(-0500)] <athena> whereas what i'd really like as a getInput() that returns the interface
[13:55:59 CDT(-0500)] <EricDalquist> yeah
[13:55:59 CDT(-0500)] <athena> and then i can do an instanceof check
[13:56:00 CDT(-0500)] <EricDalquist> hrsm
[13:56:13 CDT(-0500)] <athena> i take it you haven't had to deal w/ that use case yet?
[13:56:22 CDT(-0500)] <athena> it did actually create the interface, which is nice
[13:56:23 CDT(-0500)] <EricDalquist> no I haven't (smile)
[13:56:32 CDT(-0500)] <EricDalquist> yeah it does do abstract classes and such
[13:57:00 CDT(-0500)] <EricDalquist> I know you can do xs:any which can be any type of object
[13:57:12 CDT(-0500)] <EricDalquist> but you want like a hybrid
[13:57:55 CDT(-0500)] <athena> hmmm.
[13:58:30 CDT(-0500)] <EricDalquist> http://xsd.stylusstudio.com/2001may/post05008.htm
[13:58:35 CDT(-0500)] <athena> think i can use a type?
[13:58:35 CDT(-0500)] <EricDalquist> some random googling
[13:59:49 CDT(-0500)] <athena> ooooh
[13:59:51 CDT(-0500)] <athena> i think the type does work
[13:59:55 CDT(-0500)] <athena> this stuff is so neat
[14:00:03 CDT(-0500)] <EricDalquist> so what are you doing?
[14:00:05 CDT(-0500)] <athena> kinda confusing, but it seems like it's just a matter of figuring stuff out
[14:00:12 CDT(-0500)] <EricDalquist> yeah xsd/xpath/xslt is really amazingly powerful
[14:00:21 CDT(-0500)] <athena> changed from the choice to <xs:element name="input" type="portlet-option"/>
[14:00:36 CDT(-0500)] <athena> so i'll probably update that to have separate portlet and parameter input types
[14:00:41 CDT(-0500)] <EricDalquist> oh ... neat
[14:00:52 CDT(-0500)] <athena> so that we can make sure people can't set the parameters to a multi-valued input type
[14:01:18 CDT(-0500)] <athena> i still need to add back in support for restrictions, but i think we only need restrictions on text types
[14:01:27 CDT(-0500)] <EricDalquist> yeah
[14:01:37 CDT(-0500)] <athena> since w/ the select/checkbox types you should only be able to pick from a pre-configured whitelist
[14:01:38 CDT(-0500)] <EricDalquist> and we can do reviews of our XSDs before an actual release
[14:01:42 CDT(-0500)] <athena> yeah (smile)
[14:01:44 CDT(-0500)] <EricDalquist> and add more restrictions/keys/etc
[14:01:55 CDT(-0500)] <EricDalquist> those aren't required initially
[14:02:00 CDT(-0500)] <athena> so part of me wonders how much this stuff will actually get used anymore
[14:02:03 CDT(-0500)] <EricDalquist> but are really nice to have to help people when they use xml editors
[14:02:09 CDT(-0500)] <EricDalquist> the CPD stuff?
[14:02:11 CDT(-0500)] <athena> yeah
[14:02:14 CDT(-0500)] <athena> vs. using config mode
[14:02:18 CDT(-0500)] <EricDalquist> probably not by many other than us
[14:02:19 CDT(-0500)] <EricDalquist> right
[14:02:34 CDT(-0500)] <EricDalquist> I can see it being handy as we add more portlets to the core
[14:02:40 CDT(-0500)] <EricDalquist> but for deployers ... who knows
[14:02:44 CDT(-0500)] <athena> yeah
[14:02:59 CDT(-0500)] <athena> will be nice to have the backend support cleaned up at least (smile)
[14:03:12 CDT(-0500)] <EricDalquist> yup
[14:03:26 CDT(-0500)] <EricDalquist> it sure makes refactoring/adding features in the future a lot easier with these changes
[14:03:42 CDT(-0500)] <EricDalquist> really I think the only core grossness left is layouts/profiles
[14:06:06 CDT(-0500)] <athena> yeah (smile)
[14:06:10 CDT(-0500)] <athena> lots of great improvement
[14:55:37 CDT(-0500)] <athena> turns out this is what i needed
[14:55:37 CDT(-0500)] <athena> http://www.xfront.com/VariableContentContainers.html#method1
[14:55:49 CDT(-0500)] <athena> i'd gotten pretty close though (smile)
[14:55:56 CDT(-0500)] <EricDalquist> neat (smile)
[14:56:01 CDT(-0500)] <EricDalquist> glad it is actually possible in the XSD
[14:56:42 CDT(-0500)] <athena> yeah
[14:56:54 CDT(-0500)] <EricDalquist> and xjc generates the object model you want?
[14:58:51 CDT(-0500)] <athena> well . . . sort of (tongue)
[14:58:55 CDT(-0500)] <EricDalquist> lol
[14:59:06 CDT(-0500)] <athena> now instead of a PreferenceInputType
[14:59:08 CDT(-0500)] <athena> i'm getting JAXBElement<? extends PreferenceInputType>
[15:01:31 CDT(-0500)] <EricDalquist> ah
[15:01:32 CDT(-0500)] <EricDalquist> yeah
[15:01:42 CDT(-0500)] <EricDalquist> it does that so you can inspect the QName of the element
[15:01:50 CDT(-0500)] <EricDalquist> instead of having to do an instance-of
[15:01:57 CDT(-0500)] <EricDalquist> though both are just fine (smile)
[15:01:59 CDT(-0500)] <athena> so i guess maybe we can live with that then?
[15:02:04 CDT(-0500)] <EricDalquist> yeah
[15:02:18 CDT(-0500)] <athena> better compile-time checking with the instanceof
[15:02:24 CDT(-0500)] <EricDalquist> that's essentially JAXB's approach to "I only kind of know what type of object this is"
[15:02:27 CDT(-0500)] <EricDalquist> yup
[15:02:54 CDT(-0500)] <athena> hmm.
[15:02:59 CDT(-0500)] <athena> yeah, this isn't great
[15:03:05 CDT(-0500)] <athena> loses all the inheritance too
[15:04:22 CDT(-0500)] <EricDalquist> ?
[15:06:43 CDT(-0500)] <athena> i have to check against the element name, rather than being able to tell what the abstract type is
[15:07:00 CDT(-0500)] <athena> errr, probably a stupid generics question
[15:07:03 CDT(-0500)] <athena> but JAXBElement<? extends PreferenceInputType>
[15:07:20 CDT(-0500)] <athena> can i get to the ? class
[15:07:28 CDT(-0500)] <EricDalquist> you should be able to do jaxbElement.getValue().getClass()
[15:07:47 CDT(-0500)] <EricDalquist> JAXBElement is a pre-defined container for an unmarshalled object
[15:08:22 CDT(-0500)] <EricDalquist> this should work too:
[15:08:22 CDT(-0500)] <EricDalquist> PreferenceInputType pit = jaxbElement.getValue();
[15:08:22 CDT(-0500)] <EricDalquist> if (pit instanceof OtherInputType) {}
[15:08:41 CDT(-0500)] <athena> oh oh!
[15:08:45 CDT(-0500)] <athena> thanks
[15:08:47 CDT(-0500)] <EricDalquist> looks like JAXBElement also has getDeclaredType()
[15:08:50 CDT(-0500)] <athena> totally missed that method
[15:08:54 CDT(-0500)] <EricDalquist> http://download.oracle.com/javase/6/docs/api/javax/xml/bind/JAXBElement.html
[15:09:17 CDT(-0500)] <athena> hurray, all fixed
[15:09:24 CDT(-0500)] <EricDalquist> yay
[15:09:24 CDT(-0500)] <athena> yeah, it was the value that i wanted - terrific (smile)
[15:09:27 CDT(-0500)] <athena> thanks!
[15:09:30 CDT(-0500)] <EricDalquist> yup
[15:10:28 CDT(-0500)] <athena> yay, code compiles
[15:10:33 CDT(-0500)] <EricDalquist> yay!'
[15:10:39 CDT(-0500)] <athena> now to spend the rest of the afternoon beating my head against the JSTL tag (tongue)
[15:11:07 CDT(-0500)] <EricDalquist> (tongue)
[15:11:22 CDT(-0500)] <EricDalquist> to magically render these different input types?
[15:11:34 CDT(-0500)] <EricDalquist> bah
[15:11:43 CDT(-0500)] <EricDalquist> anyone know of an alternative to commons-validator?
[15:11:51 CDT(-0500)] <EricDalquist> I don't want to have to pull in oro just to validate an email address
[15:12:20 CDT(-0500)] <athena> there's the new validation spec stuff available in spring 3, but i haven't gotten to play w/ it yet
[15:12:50 CDT(-0500)] <athena> other than that, i don't have any validations options i'm too wild about
[15:12:52 CDT(-0500)] <EricDalquist> yeah I'm stuck on spring 2.5 for this app
[15:17:50 CDT(-0500)] <athena> yeah
[15:17:53 CDT(-0500)] <athena> in that case, no (sad)