This content has been marked as final. Show 7 replies
The devloader_context.xml is in fact created within WebContent/META-INF folder, even in Workshop 10.2 release, provided the project has external dependency.
Please check if the project configuration contains external dependency.
- Project > Properties - Java build path
On the "Source Tab", does the "Default output folder:" point to a directory other than "Project/WebContent/WEB-INF/classes"?
On the "Libraries Tab", is there a reference to any external jars (apart from the ones in WEB-INF/lib folder)?
What version of Tomcat server are you working with?
Thanks for the reply.
The Default output folder does point to the "Project/WebContent/WEB-INF/classes" folder.
On the libraries tab, in addition to the Web App Libraries (from WEB-INF/lib), it also references the J2EE library (j2ee-1.4.jar) and JRE Library (jdk150_11).
We are running this with Tomcat 5.0.19.
The J2EE & JRE Library are not required at the runtime, meaning the server runtime will resolve with it's local copy.
There are no external references in your project for the devloader_context.xml to be created.
What exactly are you trying to resolve by using devloader_context.xml?
We create our DB DataSources in server.xml. Those are then linked to the context via <ResourceLink> entries in context.xml. However without using devloader_context.xml, Workshop ignores our context.xml and doesn't merge it into server.xml. Therefore when the server runs, we get a JNDI exception saying that "jdbc is not bound in this context." Creating those entries in devloader_context.xml is the only way we've been able to get our DataSources to be used in our web app.
The best option would be to continue using the workaround (as earlier), manually create devloader_context.xml and mark it readonly.
FYI: Workshop tomcat server adapter is built on top WTP , and it is the WTP framework that merges the context.xml into server.xml. Since you don't have any dependency (library) Workshop removes the devloader_context.xml file within META-INF.
Good to know. The workaround works for us, but I wanted to see if there was a better way. Thanks for the help.
I wrote a comment on http://forums.bea.com/thread.jspa?threadID=400000992&#msg5700005125
I bring the same comment here, I hope it saves some time for you.
use BEA WorkSpace Studio version 1.1 with tomcat.
My project use to work fine and datasource used to being copied properly to .metadata\.plugins\org.eclipse.wst.server.core\tmp0
but one of my colleague had some issue so he checked in devLoader_context.xml to cvs which made my local version stop working. In this case Servers\Tomcat v5.5 @ localhost-config\Server.xml become different from the one in tmp directory.
Servers\Tomcat v5.5 @ localhost-config\Server.xml has my database resource but the one in tmp file always get overwritten with empty context.
Finally I deleted devLoader_context.xml and it started to work fine.
I didn't spend more time to find out technical reason since I already spent a lot of time on this, but I think devLoader_context.xml
context.xml have the same behavior with devLoader_context.xml higher priority to get overwritten.
marking file as read only does not work as well.
So I prefered to declare my resource just inside the server.xml