-
1. Re: DocumentStore usage
norman.richards Sep 26, 2007 12:57 PM (in response to nickarls)Are you getting an incompatible type or are you getting an incompatible DocumentStore class from another classloader?
-
2. Re: DocumentStore usage
nickarls Sep 27, 2007 5:23 AM (in response to nickarls)Hmm, it might be a classloader issue, normally the seam-jars are under WEB-INF\lib in the war but where should it be put so that everyone sees it? (both the WAR and my JAR) Only in the EAR?
-
3. Re: DocumentStore usage
norman.richards Sep 27, 2007 3:19 PM (in response to nickarls)They should be in the WAR.
I was just trying to understand what the ClassCastException you are getting is. There isn't enough information there to understand what problem you are seeing. -
4. Re: DocumentStore usage
nickarls Sep 27, 2007 4:20 PM (in response to nickarls)"norman.richards@jboss.com" wrote:
They should be in the WAR.
I was just trying to understand what the ClassCastException you are getting is. There isn't enough information there to understand what problem you are seeing.
I'm trying to do apublic String getInstructionManualURL() { String id = DocumentStore.instance().newId(); DocumentData data = new DocumentData("manual.pdf",DocumentData.DocType.PDF, manualBytes); DocumentStore.instance().saveData(id, data); return DocumentStore.instance().preferredUrlForContent("manual.pdf", DocumentData.DocType.PDF, id); }
But the bean action is in a JAR file and if just have the seam-pdf.jar in my WAR then the JAR can't see it. The classcast just came from moving around seam-jar trying to see what worked. But if it should be in WEB-INF/lib, how can you make the JAR see it? -
5. Re: DocumentStore usage
nickarls Oct 5, 2007 3:20 AM (in response to nickarls)Or if there are no solutions to this (although I find it quite strange that the singleton would return an javassist instance instead of the real one) then what is the suggested way of sending a PDF to the browser?
If I write an own servlet for this, what util classes can be used to attach to the seam contexts from an external servlet? -
6. Re: DocumentStore usage
pmuir Oct 5, 2007 6:50 AM (in response to nickarls)You can't. You'll need to do the work in the war. The war can see the jar but not vice-versa.
-
7. Re: DocumentStore usage
nickarls Oct 5, 2007 8:23 AM (in response to nickarls)Aah, thanks. That got rid of the class-loading stuff. Now I got a "/seam-doc.xhtml Not Found in ExternalContext as a Resource".
The manual gave me the impression that the pdf:s could be served ootb if you didn't need the *.pdf mapping. What component is responsible for the /seam-doc.seam mapping? -
8. Re: DocumentStore usage
pmuir Oct 5, 2007 8:30 AM (in response to nickarls)I believe the phase listener in jboss-seam-pdf.jar
-
9. Re: DocumentStore usage
nickarls Oct 5, 2007 8:43 AM (in response to nickarls)OK, and is it one of the things that should be automagically installed by some other seam listener or filter under 2.0.0CR1? And if so, could something in ICEFaces 1.7DR1 interfere?
-
10. Re: DocumentStore usage
pmuir Oct 5, 2007 8:51 AM (in response to nickarls)All phase listeners are automatically installed by JSF. IceFaces could well interfere - put a breakpoint on beforePhase of DocumentStorePhaseListener and see whether it gets called.