DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30347>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30347 embedded:standardContext.addResource(string, string) throw npe Summary: embedded:standardContext.addResource(string, string) throw npe Product: Tomcat 5 Version: 5.0.27 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hello, I am using tomcat 5.0.27 embedded (great!) and i need to use datasource. I have tried two differents ways to append a datasource to standardContext. First way work nice: StandardContext standardContext = embedded.createContext(...,...) ... ContextResource contextResource = new ContextResource(); contextResource.setType(DataSource.class.getName()); contextResource.setName("jdbc/name"); standardContext.addResource(contextResource); .... but i was expected the second way works too (as it seems to me be only a shorter way to proceed): StandardContext standardContext = embedded.createContext(...,...) ... standardContext.addResource("jdbc/name",DataSource.class.getName()); ... but it throw a nullPointerException line 5220 in StandardContext because a variable (namely "managed") is null after a call to Registry.findManagedBean ("ContextResource")... I hope it could help you. Regards, Matthieu Moiroux --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]