Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Newbie: Server publish not including extra RMIC stubs
Newbie: Server publish not including extra RMIC stubs [message #224644] Wed, 03 December 2008 12:23 Go to next message
Jonathan O'Donovan is currently offline Jonathan O'Donovan
Messages: 5
Registered: July 2009
Junior Member
Hi All,

I am trying to deploy a JEE Dynamic Web App to a Tomcat 4.1 server using
server tools. Part of the web app uses RMI, so I have added an ant builder
to the project builders to run RMIC to generate the stubs. The order in
which the project builders run is

JavaScript Builder,
Java Builder
New_Builder (the ant build.xml I added to compile the stubs for 5 classes)
Faceted Project Validation Builder
Validation

When the project is built in eclipse, the correct .classes are generated,
including the RMI stubs. However, when I deploy the project to the server,
the web app is deployed correctly, apart from the RMI stubs which are not
deployed. If I copy the stubs manually into the appropriate directory
(under .metadata) the application works.

Does anyone know why are the stubs not being deployed. Do I need to add
the RMI compile task somewhere in the deploy process?

If anyone could point me in the right direction I would be most grateful,

Jonathan
Re: Newbie: Server publish not including extra RMIC stubs [message #224667 is a reply to message #224644] Wed, 03 December 2008 15:02 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1310
Registered: July 2009
Senior Member
Jonathan O'Donovan wrote:
> Hi All,
> I am trying to deploy a JEE Dynamic Web App to a Tomcat 4.1 server using
> server tools. Part of the web app uses RMI, so I have added an ant
> builder to the project builders to run RMIC to generate the stubs. The
> order in which the project builders run is
> JavaScript Builder,
> Java Builder
> New_Builder (the ant build.xml I added to compile the stubs for 5 classes)
> Faceted Project Validation Builder
> Validation
>
> When the project is built in eclipse, the correct .classes are
> generated, including the RMI stubs. However, when I deploy the project
> to the server, the web app is deployed correctly, apart from the RMI
> stubs which are not deployed. If I copy the stubs manually into the
> appropriate directory (under .metadata) the application works.
>
> Does anyone know why are the stubs not being deployed. Do I need to add
> the RMI compile task somewhere in the deploy process?
>
> If anyone could point me in the right direction I would be most grateful,
>
> Jonathan
>

Where exactly are the RMI stub classes created in the project? Creating
them in the same output folder as the Java source folder for the project
is a location I would expect to work. Also, does your RMI ant build
refresh appropriate folders in your workspace so those files become
visible to the workspace? They have to be visible to the workspace
before they would be included when the project is published to the
server. You can use the Navigator view to see what is visible for any
project folder.

Cheers,
Larry
Re: Newbie: Server publish not including extra RMIC stubs [message #224683 is a reply to message #224667] Thu, 04 December 2008 10:44 Go to previous messageGo to next message
Jonathan O'Donovan is currently offline Jonathan O'Donovan
Messages: 5
Registered: July 2009
Junior Member
Larry Isaacs wrote:

> Jonathan O'Donovan wrote:
>> Hi All,
>> I am trying to deploy a JEE Dynamic Web App to a Tomcat 4.1 server using
>> server tools. Part of the web app uses RMI, so I have added an ant
>> builder to the project builders to run RMIC to generate the stubs. The
>> order in which the project builders run is
>> JavaScript Builder,
>> Java Builder
>> New_Builder (the ant build.xml I added to compile the stubs for 5 classes)
>> Faceted Project Validation Builder
>> Validation
>>
>> When the project is built in eclipse, the correct .classes are
>> generated, including the RMI stubs. However, when I deploy the project
>> to the server, the web app is deployed correctly, apart from the RMI
>> stubs which are not deployed. If I copy the stubs manually into the
>> appropriate directory (under .metadata) the application works.
>>
>> Does anyone know why are the stubs not being deployed. Do I need to add
>> the RMI compile task somewhere in the deploy process?
>>
>> If anyone could point me in the right direction I would be most grateful,
>>
>> Jonathan
>>

> Where exactly are the RMI stub classes created in the project? Creating
> them in the same output folder as the Java source folder for the project
> is a location I would expect to work. Also, does your RMI ant build
> refresh appropriate folders in your workspace so those files become
> visible to the workspace? They have to be visible to the workspace
> before they would be included when the project is published to the
> server. You can use the Navigator view to see what is visible for any
> project folder.

> Cheers,
> Larry


Hi Larry, thanks for your response. My project folder is as follows (from
the project explorer) :

eurokom6
Deployment Descriptor
Java Resources : src
JavaScript Support
ant_rmi (this just contains build.xml for building the rmi stubs)
build (where the .class files are put, including the stubs)
web content
WEB-INF



My .java files are all in src. The corresponding .class files are in
/build, including the RMI stubs.


Also, does your RMI ant build
> refresh appropriate folders in your workspace so those files become
> visible to the workspace? They have to be visible to the workspace
> before they would be included when the project is published to the
> server. You can use the Navigator view to see what is visible for any
> project folder.

I cannot see the stubs in the /build folder using the navigator view so
this is the problem. What is the difference between the navigator view and
the project explorer? How do I get the RMI ant build to refresh
appropriate folders to make them visible to the workspace? Does this mean
deleting folders and re-creating them?



The build.xml is as follows :

<?xml version="1.0"?>
<project name="rmi_compile" default="rmic" basedir="..">


<!-- Standard Directory Identifiers-->
<property name="java.dest.dir" value="${basedir}\build\classes"/>


<!-- RMI Target -->
<target name="rmic" >
<rmic base="${java.dest.dir}"
classname="ie.eurokom.opentools.PmasListFilesRemote" stubversion="1.2" />
<rmic base="${java.dest.dir}"
classname="ie.eurokom.opentools.MailQueue" stubversion="1.2" />
<rmic base="${java.dest.dir}"
classname="ie.eurokom.opentools.MailFilter" stubversion="1.2" />
<rmic base="${java.dest.dir}"
classname="ie.eurokom.opentools.BlockListRemote" stubversion="1.2" />
<rmic base="${java.dest.dir}"
classname="ie.eurokom.opentools.QuarantineRemote" stubversion="1.2" />
</target>


</project>


Many thanks for your help,
Jonathan
Re: Newbie: Server publish not including extra RMIC stubs [message #224721 is a reply to message #224683] Thu, 04 December 2008 14:34 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1310
Registered: July 2009
Senior Member
Jonathan O'Donovan wrote:
> Larry Isaacs wrote:
>
>> Jonathan O'Donovan wrote:
>>> Hi All,
>>> I am trying to deploy a JEE Dynamic Web App to a Tomcat 4.1 server
>>> using server tools. Part of the web app uses RMI, so I have added an
>>> ant builder to the project builders to run RMIC to generate the
>>> stubs. The order in which the project builders run is
>>> JavaScript Builder,
>>> Java Builder
>>> New_Builder (the ant build.xml I added to compile the stubs for 5
>>> classes)
>>> Faceted Project Validation Builder
>>> Validation
>>>
>>> When the project is built in eclipse, the correct .classes are
>>> generated, including the RMI stubs. However, when I deploy the
>>> project to the server, the web app is deployed correctly, apart from
>>> the RMI stubs which are not deployed. If I copy the stubs manually
>>> into the appropriate directory (under .metadata) the application works.
>>>
>>> Does anyone know why are the stubs not being deployed. Do I need to
>>> add the RMI compile task somewhere in the deploy process?
>>>
>>> If anyone could point me in the right direction I would be most
>>> grateful,
>>>
>>> Jonathan
>>>
>
>> Where exactly are the RMI stub classes created in the project?
>> Creating them in the same output folder as the Java source folder for
>> the project is a location I would expect to work. Also, does your RMI
>> ant build refresh appropriate folders in your workspace so those files
>> become visible to the workspace? They have to be visible to the
>> workspace before they would be included when the project is published
>> to the server. You can use the Navigator view to see what is visible
>> for any project folder.
>
>> Cheers,
>> Larry
>
>
> Hi Larry, thanks for your response. My project folder is as follows
> (from the project explorer) :
> eurokom6
> Deployment Descriptor
> Java Resources : src
> JavaScript Support
> ant_rmi (this just contains build.xml for building the rmi stubs)
> build (where the .class files are put, including the stubs)
> web content
> WEB-INF
>
>
>
> My .java files are all in src. The corresponding .class files are in
> /build, including the RMI stubs.
>
>
> Also, does your RMI ant build
>> refresh appropriate folders in your workspace so those files become
>> visible to the workspace? They have to be visible to the workspace
>> before they would be included when the project is published to the
>> server. You can use the Navigator view to see what is visible for any
>> project folder.
>
> I cannot see the stubs in the /build folder using the navigator view so
> this is the problem. What is the difference between the navigator view
> and the project explorer?

Unlike other "navigator" views, such as the Project Explorer view, I
don't believe the Navigator view filters the tree in any way and doesn't
try to present any info in a special fashion, like the "Deployment
Descriptor" in the Project Explorer. You see just what the "workspace"
sees.

Since "build/classes" is an output folder, the Project Explorer view
will filter it from the tree. Since the "build" folder isn't an output
folder, it is visible in the tree, but you won't be able to see the
"classes" folder beneath it.

> How do I get the RMI ant build to refresh
> appropriate folders to make them visible to the workspace? Does this
> mean deleting folders and re-creating them?

On the Builders page of the eurokom6 project's properties dialog, select
the New_Builder and click Edit. On the Main tab, feel free to improve
the name of the builder. :) On the Refresh tab, enable the "Refresh
resources upon completion" option. Under that, select the "Specify
resources" radio button and click Specify Resources. Select the
"eurokom6/build/classes" folder and click Finish and OK twice to exit
the properties dialog. Since this change doesn't trigger a rebuild,
force one using Project -> Clean. Now each time the builder runs, the
"build/classes" folder will be "refreshed", making the generated files
visible to the workspace. Note: you can always manually "refresh" a
folder by right-clicking the folder and selecting Refresh.

Cheers,
Larry

>
>
>
> The build.xml is as follows :
> <?xml version="1.0"?>
> <project name="rmi_compile" default="rmic" basedir="..">
>
>
> <!-- Standard Directory Identifiers-->
> <property name="java.dest.dir" value="${basedir}\build\classes"/>
>
>
> <!-- RMI Target -->
> <target name="rmic" >
> <rmic base="${java.dest.dir}"
> classname="ie.eurokom.opentools.PmasListFilesRemote" stubversion="1.2" />
> <rmic base="${java.dest.dir}"
> classname="ie.eurokom.opentools.MailQueue" stubversion="1.2" />
> <rmic base="${java.dest.dir}"
> classname="ie.eurokom.opentools.MailFilter" stubversion="1.2" />
> <rmic base="${java.dest.dir}"
> classname="ie.eurokom.opentools.BlockListRemote" stubversion="1.2" />
> <rmic base="${java.dest.dir}"
> classname="ie.eurokom.opentools.QuarantineRemote" stubversion="1.2" />
> </target>
>
>
> </project>
>
>
> Many thanks for your help,
> Jonathan
>
Re: Newbie: Server publish not including extra RMIC stubs [message #224729 is a reply to message #224721] Thu, 04 December 2008 16:07 Go to previous message
Jonathan O'Donovan is currently offline Jonathan O'Donovan
Messages: 5
Registered: July 2009
Junior Member
Thanks Larry - that worked great. Now all the stubs are published
automatically with the rest of the .classes.

Many thanks!
Jonathan
Previous Topic:XML not Publishing to Tomcat 6.x and 5.5
Next Topic:Usage of XMLCorePlugin to programatically register XML Catalog in eclipse...
Goto Forum:
  


Current Time: Sat Oct 25 00:01:32 GMT 2014

Powered by FUDForum. Page generated in 0.01766 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software