Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Anyone get Uploader widget to work?
Anyone get Uploader widget to work? [message #87126] Wed, 14 May 2008 06:47 Go to next message
Eclipse UserFriend
Has anyone gotten the RAP File Uploader widget to work? I am using the
latest version of bundle org.eclipse.rwt.widgets.upload from CVS. I get
this exception

java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
at
org.apache.commons.fileupload.servlet.ServletFileUpload.pars eRequest(ServletFileUpload.java:126)
at
org.eclipse.rwt.widgets.upload.servlet.FileUploadServlet.doP ost(FileUploadServlet.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.jav
a:180)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.jav
a:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpSe
rverManager.java:270)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
at
org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
at
org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)

Thanks,
David
Re: Anyone get Uploader widget to work? [message #87141 is a reply to message #87126] Wed, 14 May 2008 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi David,

it seems as if javax.servlet isn't available at runtime. When starting
from Eclipse, make sure, that this plugin is in your launch configuration.

If this doesn't help, can you provide the list of loaded bundles (by
typing ss in the OSGi console)?

Regards,
Stefan.



David Donohue schrieb:
> Has anyone gotten the RAP File Uploader widget to work? I am using the
> latest version of bundle org.eclipse.rwt.widgets.upload from CVS. I get
> this exception
>
> java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
> at
> org.apache.commons.fileupload.servlet.ServletFileUpload.pars eRequest(ServletFileUpload.java:126)
>
> at
> org.eclipse.rwt.widgets.upload.servlet.FileUploadServlet.doP ost(FileUploadServlet.java:119)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.jav
>
> a:180)
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.jav
>
> a:90)
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpSe
>
> rverManager.java:270)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
> at
> org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> at org.mortbay.http.HttpServer.service(HttpServer.java:909)
> at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
> at
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
> at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
> at
> org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)
>
> Thanks,
> David
>
Re: Anyone get Uploader widget to work? [message #87156 is a reply to message #87141] Wed, 14 May 2008 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Stefan!
Below are my bundles. I think I have all required bundles.
David

ss

Framework is launched.

id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.2.R33x_v20080105
1 ACTIVE org.eclipse.equinox.common_3.3.0.v20070426
2 ACTIVE org.eclipse.update.configurator_3.2.101.R33x_v20070810
3 ACTIVE org.eclipse.rap.ui_1.1.0.20080407-1124
4 ACTIVE org.eclipse.equinox.http.jetty_1.0.100.v20080303
5 RESOLVED javax.servlet_2.4.0.v200803061910
6 RESOLVED org.apache.commons.fileupload_1.2.0
7 RESOLVED org.apache.commons.io_1.3.2
8 RESOLVED org.apache.commons.logging_1.0.4.v200803061811
9 RESOLVED org.apache.log4j_1.2.13.v200706111418
Fragments=46
10 <<LAZY>> org.eclipse.core.boot_3.1.100.v20060603
11 RESOLVED org.eclipse.core.commands_3.3.0.I20070605-0010
12 <<LAZY>> org.eclipse.core.contenttype_3.2.100.v20070319
13 ACTIVE org.eclipse.core.expressions_3.3.0.v20070606-0010
14 ACTIVE org.eclipse.core.jobs_3.3.1.R33x_v20070709
15 ACTIVE
org.eclipse.core.runtime.compatibility.auth_3.2.100.v2007050 2
16 RESOLVED
org.eclipse.core.runtime.compatibility.registry_3.2.100.v200 70316
Master=27
17 ACTIVE org.eclipse.core.runtime_3.3.100.v20070530
18 ACTIVE org.eclipse.equinox.app_1.0.1.R33x_v20070828
21 ACTIVE org.eclipse.equinox.http.registry_1.0.100.v20080303
22 ACTIVE org.eclipse.equinox.http.servlet_1.0.100.v20080201
23 RESOLVED org.eclipse.equinox.http_1.0.100.v20070423
24 RESOLVED
org.eclipse.equinox.launcher.win32.win32.x86_1.0.2.R331_v200 71019
Master=25
25 RESOLVED org.eclipse.equinox.launcher_1.0.1.R33x_v20070828
Fragments=24
26 ACTIVE org.eclipse.equinox.preferences_3.2.101.R33x_v20080117
27 ACTIVE org.eclipse.equinox.registry_3.3.1.R33x_v20070802
Fragments=16
28 RESOLVED org.eclipse.osgi.services_3.1.200.v20070605
30 RESOLVED
org.eclipse.rap.core.databinding.beans_1.1.0.20080407-1124
31 RESOLVED org.eclipse.rap.core.databinding_1.1.0.20080407-1124
32 RESOLVED org.eclipse.rap.jface.databinding_1.1.0.20080407-1124
33 RESOLVED org.eclipse.rap.jface_1.1.0.20080407-1124
34 RESOLVED org.eclipse.rap.rwt_1.1.0.20080407-1124
35 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080407-1124
37 RESOLVED org.eclipse.rwt.widgets.upload_1.0.0
39 ACTIVE org.myapp.agent_1.0.0
40 RESOLVED org.myapp.core.extensions_1.0.0
41 RESOLVED org.myapp.core_1.0.0
42 ACTIVE org.myapp.data.rdf.jenabean_1.0.0
44 RESOLVED org.myapp.db_1.0.0
45 ACTIVE org.myapp.experiment_1.0.0
46 RESOLVED org.myapp.log4j.properties_1.0.0
Master=9
47 RESOLVED org.myapp.ui.rap_1.0.0
48 RESOLVED org.mortbay.jetty_5.1.11.v200803061811
54 RESOLVED org.myapp.data.sampling_1.0.0
Re: Anyone get Uploader widget to work? [message #87182 is a reply to message #87156] Wed, 14 May 2008 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi David,

javax.servlet is resolved but should be active. Try typing "start 5" and
see what is the error message.
Regards,
Stefan.

David Donohue schrieb:
> Thanks Stefan!
> Below are my bundles. I think I have all required bundles. David
>
> ss
>
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE org.eclipse.osgi_3.3.2.R33x_v20080105
> 1 ACTIVE org.eclipse.equinox.common_3.3.0.v20070426
> 2 ACTIVE org.eclipse.update.configurator_3.2.101.R33x_v20070810
> 3 ACTIVE org.eclipse.rap.ui_1.1.0.20080407-1124
> 4 ACTIVE org.eclipse.equinox.http.jetty_1.0.100.v20080303
> 5 RESOLVED javax.servlet_2.4.0.v200803061910
> 6 RESOLVED org.apache.commons.fileupload_1.2.0
> 7 RESOLVED org.apache.commons.io_1.3.2
> 8 RESOLVED org.apache.commons.logging_1.0.4.v200803061811
> 9 RESOLVED org.apache.log4j_1.2.13.v200706111418
> Fragments=46
> 10 <<LAZY>> org.eclipse.core.boot_3.1.100.v20060603
> 11 RESOLVED org.eclipse.core.commands_3.3.0.I20070605-0010
> 12 <<LAZY>> org.eclipse.core.contenttype_3.2.100.v20070319
> 13 ACTIVE org.eclipse.core.expressions_3.3.0.v20070606-0010
> 14 ACTIVE org.eclipse.core.jobs_3.3.1.R33x_v20070709
> 15 ACTIVE
> org.eclipse.core.runtime.compatibility.auth_3.2.100.v2007050 2
> 16 RESOLVED
> org.eclipse.core.runtime.compatibility.registry_3.2.100.v200 70316
> Master=27
> 17 ACTIVE org.eclipse.core.runtime_3.3.100.v20070530
> 18 ACTIVE org.eclipse.equinox.app_1.0.1.R33x_v20070828
> 21 ACTIVE org.eclipse.equinox.http.registry_1.0.100.v20080303
> 22 ACTIVE org.eclipse.equinox.http.servlet_1.0.100.v20080201
> 23 RESOLVED org.eclipse.equinox.http_1.0.100.v20070423
> 24 RESOLVED
> org.eclipse.equinox.launcher.win32.win32.x86_1.0.2.R331_v200 71019
> Master=25
> 25 RESOLVED org.eclipse.equinox.launcher_1.0.1.R33x_v20070828
> Fragments=24
> 26 ACTIVE org.eclipse.equinox.preferences_3.2.101.R33x_v20080117
> 27 ACTIVE org.eclipse.equinox.registry_3.3.1.R33x_v20070802
> Fragments=16
> 28 RESOLVED org.eclipse.osgi.services_3.1.200.v20070605
> 30 RESOLVED
> org.eclipse.rap.core.databinding.beans_1.1.0.20080407-1124
> 31 RESOLVED org.eclipse.rap.core.databinding_1.1.0.20080407-1124
> 32 RESOLVED org.eclipse.rap.jface.databinding_1.1.0.20080407-1124
> 33 RESOLVED org.eclipse.rap.jface_1.1.0.20080407-1124
> 34 RESOLVED org.eclipse.rap.rwt_1.1.0.20080407-1124
> 35 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080407-1124
> 37 RESOLVED org.eclipse.rwt.widgets.upload_1.0.0
> 39 ACTIVE org.myapp.agent_1.0.0
> 40 RESOLVED org.myapp.core.extensions_1.0.0
> 41 RESOLVED org.myapp.core_1.0.0
> 42 ACTIVE org.myapp.data.rdf.jenabean_1.0.0
> 44 RESOLVED org.myapp.db_1.0.0
> 45 ACTIVE org.myapp.experiment_1.0.0
> 46 RESOLVED org.myapp.log4j.properties_1.0.0
> Master=9
> 47 RESOLVED org.myapp.ui.rap_1.0.0
> 48 RESOLVED org.mortbay.jetty_5.1.11.v200803061811
> 54 RESOLVED org.myapp.data.sampling_1.0.0
>
Re: Anyone get Uploader widget to work? [message #87240 is a reply to message #87126] Wed, 14 May 2008 10:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

which RAP version do you use? Note that we switched with M4 to the 3.4
codebase of RCP. The sandbox components are not yet updated, so I'm not
sure if these components are currently working with the latest RAP
version. Note also that the fileupload widget gets currently reworked,
so there will be an updated version soon available. The fileupload
should work with M3. Do you have a version of the servlet API as project
in your workspace? Maybe this conflicts with the version of your target.
Please check also the launch configuration.

Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: David Donohue [mailto:dd@daviddonohue.com]
Bereitgestellt: Mittwoch, 14. Mai 2008 12:48
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Anyone get Uploader widget to work?
Betreff: Anyone get Uploader widget to work?


Has anyone gotten the RAP File Uploader widget to work? I am using the
latest version of bundle org.eclipse.rwt.widgets.upload from CVS. I get
this exception

java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
at
org.apache.commons.fileupload.servlet.ServletFileUpload.pars eRequest(Ser
vletFileUpload.java:126)
at
org.eclipse.rwt.widgets.upload.servlet.FileUploadServlet.doP ost(FileUplo
adServlet.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper
..service(ServletManager.jav
a:180)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequ
est(ServletRegistration.jav
a:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(Prox
yServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServ
let.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpSe
rviceServlet.service(HttpSe
rverManager.java:270)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
at
org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:67
7)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
at
org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245
)
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)

Thanks,
David
Re: Anyone get Uploader widget to work? [message #87283 is a reply to message #87182] Wed, 14 May 2008 11:20 Go to previous messageGo to next message
Eclipse UserFriend
Stefan,

My bundle javax.servlet is usually running. It is running now, and I get
the same error. I do not know why it was "resolved" earlier. So I do not
think this is the problem.

I see a number of posts about people getting this error when using
FileUpload in Tomcat. In these cases, it seems the error might be related
to having 2 copies of FileUpload in the classpath. Or perhaps has to do
with the location of the jar file (WEB-INF/lib vs. %java_RE%/lib/ext).

http://forum.java.sun.com/thread.jspa?threadID=650802&me ssageID=9789211
http://forum.java.sun.com/thread.jspa?threadID=698663&me ssageID=9766420

David
Re: Anyone get Uploader widget to work? [message #87293 is a reply to message #87240] Wed, 14 May 2008 12:46 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, Frank,
I think I am using M4. Can you tell my RAP version from by bundles list
(below)?
David

id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.2.R33x_v20080105
1 ACTIVE org.eclipse.equinox.common_3.3.0.v20070426
2 ACTIVE org.eclipse.update.configurator_3.2.101.R33x_v20070810
3 ACTIVE org.eclipse.rap.ui_1.1.0.20080407-1124
4 ACTIVE org.eclipse.equinox.http.jetty_1.0.100.v20080303
5 RESOLVED javax.servlet_2.4.0.v200803061910
6 RESOLVED org.apache.commons.fileupload_1.2.0
7 RESOLVED org.apache.commons.io_1.3.2
8 RESOLVED org.apache.commons.logging_1.0.4.v200803061811
9 RESOLVED org.apache.log4j_1.2.13.v200706111418
Fragments=46
10 <<LAZY>> org.eclipse.core.boot_3.1.100.v20060603
11 RESOLVED org.eclipse.core.commands_3.3.0.I20070605-0010
12 <<LAZY>> org.eclipse.core.contenttype_3.2.100.v20070319
13 ACTIVE org.eclipse.core.expressions_3.3.0.v20070606-0010
14 ACTIVE org.eclipse.core.jobs_3.3.1.R33x_v20070709
15 ACTIVE
org.eclipse.core.runtime.compatibility.auth_3.2.100.v2007050 2
16 RESOLVED
org.eclipse.core.runtime.compatibility.registry_3.2.100.v200 70316
Master=27
17 ACTIVE org.eclipse.core.runtime_3.3.100.v20070530
18 ACTIVE org.eclipse.equinox.app_1.0.1.R33x_v20070828
21 ACTIVE org.eclipse.equinox.http.registry_1.0.100.v20080303
22 ACTIVE org.eclipse.equinox.http.servlet_1.0.100.v20080201
23 RESOLVED org.eclipse.equinox.http_1.0.100.v20070423
24 RESOLVED
org.eclipse.equinox.launcher.win32.win32.x86_1.0.2.R331_v200 71019
Master=25
25 RESOLVED org.eclipse.equinox.launcher_1.0.1.R33x_v20070828
Fragments=24
26 ACTIVE org.eclipse.equinox.preferences_3.2.101.R33x_v20080117
27 ACTIVE org.eclipse.equinox.registry_3.3.1.R33x_v20070802
Fragments=16
28 RESOLVED org.eclipse.osgi.services_3.1.200.v20070605
30 RESOLVED
org.eclipse.rap.core.databinding.beans_1.1.0.20080407-1124
31 RESOLVED org.eclipse.rap.core.databinding_1.1.0.20080407-1124
32 RESOLVED org.eclipse.rap.jface.databinding_1.1.0.20080407-1124
33 RESOLVED org.eclipse.rap.jface_1.1.0.20080407-1124
34 RESOLVED org.eclipse.rap.rwt_1.1.0.20080407-1124
35 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080407-1124
37 RESOLVED org.eclipse.rwt.widgets.upload_1.0.0
39 ACTIVE org.myapp.agent_1.0.0
40 RESOLVED org.myapp.core.extensions_1.0.0
41 RESOLVED org.myapp.core_1.0.0
42 ACTIVE org.myapp.data.rdf.jenabean_1.0.0
44 RESOLVED org.myapp.db_1.0.0
45 ACTIVE org.myapp.experiment_1.0.0
46 RESOLVED org.myapp.log4j.properties_1.0.0
Master=9
47 RESOLVED org.myapp.ui.rap_1.0.0
48 RESOLVED org.mortbay.jetty_5.1.11.v200803061811
54 RESOLVED org.myapp.data.sampling_1.0.0
Re: Anyone get Uploader widget to work? [message #87307 is a reply to message #87293] Wed, 14 May 2008 12:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evolanakis.innoopract.com

The timestamp in the version of your bundles looks like the 1.1 M3 to
me. Compare with the download page:

"RAP 1.1 M3 for Eclipse 3.3 rap-1.1.0-M3-target-3.3-20080407-1124.zip
RAP 1.1 M3 for Eclipse 3.4 rap-1.1.0-M3-target-3.4-20080407-1124.zip "

Regards,
Elias.


David Donohue wrote:
> Thanks, Frank,
> I think I am using M4. Can you tell my RAP version from by bundles list
> (below)?
> David
>
[...]

> 31 RESOLVED org.eclipse.rap.core.databinding_1.1.0.20080407-1124
> 32 RESOLVED org.eclipse.rap.jface.databinding_1.1.0.20080407-1124
> 33 RESOLVED org.eclipse.rap.jface_1.1.0.20080407-1124
> 34 RESOLVED org.eclipse.rap.rwt_1.1.0.20080407-1124
> 35 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080407-1124
> 37 RESOLVED org.eclipse.rwt.widgets.upload_1.0.0


---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
Re: Anyone get Uploader widget to work? [message #87337 is a reply to message #87283] Wed, 14 May 2008 13:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi David,

when running our app in Tomcat, we don't deploy the javax.servlet bundle
as the API comes with Tomcat (is located in /lib/servlet-api.jar and is
exposed to the OSGi-bundles using the ServletBridge). We only have the
javax.servlet bundle running when starting the application in Eclipse
with jetty.

Maybe this duplicated javax.servlet-API is the reason for your problems?

Stefan.

David Donohue schrieb:
> Stefan,
>
> My bundle javax.servlet is usually running. It is running now, and I
> get the same error. I do not know why it was "resolved" earlier. So I
> do not think this is the problem.
> I see a number of posts about people getting this error when using
> FileUpload in Tomcat. In these cases, it seems the error might be
> related to having 2 copies of FileUpload in the classpath. Or perhaps
> has to do with the location of the jar file (WEB-INF/lib vs.
> %java_RE%/lib/ext).
>
> http://forum.java.sun.com/thread.jspa?threadID=650802&me ssageID=9789211
> http://forum.java.sun.com/thread.jspa?threadID=698663&me ssageID=9766420
>
> David
>
Re: Anyone get Uploader widget to work? [message #87352 is a reply to message #87337] Wed, 14 May 2008 16:19 Go to previous messageGo to next message
Eclipse UserFriend
Stefan,

Thanks for reply. I verified that I am using M3 build of RAP, for Eclipse
3.3.

I am not deploying to Tomcat. I am deploying to Jetty. I was merely
reporting that folks in the Tomcat world had the same NoClassDefFoundError
for FileUpload. In those Tomcat situations, the error seemed to relate to
the fact that FileUpload & javax.servlet were loaded using 2 different
classloaders (1 for the Tomcat webapp and 1 for the Tomcat server). This
seems analogous to what might be going on in this OSGi/RAP environment,
with its different bundles & classloaders. The solution i Tomcat always
seemed to be to make sure that commons_fileupload.jar is located only
inside the web app's WEB-INF/lib folder. In this situation, we cannot
bring the code from the Uploader's bundle into the same class loader.
However perhaps we can trick OSGi into thinking they are in the same
classloader using OSGi buddy class loading?

I tried this:
Added this to MANIFEST.MF for bundle org.apache.commons.fileupload:
Eclipse-BuddyPolicy: registered
Bundle-BuddyPolicy: registered

and added this to MANIFEST.MF for bundle org.eclipse.rwt.widgets.upload:
Eclipse-RegisterBuddy: org.apache.commons.fileupload
Bundle-RegisterBuddy: org.apache.commons.fileupload

...and the problem is resolved! Not sure whether this is the best
solution or whether the above manifest headers should be added, but now
uploading works for me!

Many thanks to Stefan, Frank, and Elias for your help!
David




David
Re: Anyone get Uploader widget to work? [message #87396 is a reply to message #87293] Thu, 15 May 2008 01:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

if this is the console log from a deployed application you should remove
the javax.servlet bundle, since this is provided by the container. Note
also that if you add the extension-bundle
(org.eclipse.equinox.servletbridge.extensionbundle) to your config.ini
there is no need for using the update configurator.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: David Donohue [mailto:dd@daviddonohue.com]
Bereitgestellt: Mittwoch, 14. Mai 2008 18:46
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Anyone get Uploader widget to work?
Betreff: Re: Anyone get Uploader widget to work?


Thanks, Frank,
I think I am using M4. Can you tell my RAP version from by bundles list
(below)?
David

id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.2.R33x_v20080105
1 ACTIVE org.eclipse.equinox.common_3.3.0.v20070426
2 ACTIVE
org.eclipse.update.configurator_3.2.101.R33x_v20070810
3 ACTIVE org.eclipse.rap.ui_1.1.0.20080407-1124
4 ACTIVE org.eclipse.equinox.http.jetty_1.0.100.v20080303
5 RESOLVED javax.servlet_2.4.0.v200803061910
6 RESOLVED org.apache.commons.fileupload_1.2.0
7 RESOLVED org.apache.commons.io_1.3.2
8 RESOLVED org.apache.commons.logging_1.0.4.v200803061811
9 RESOLVED org.apache.log4j_1.2.13.v200706111418
Fragments=46
10 <<LAZY>> org.eclipse.core.boot_3.1.100.v20060603
11 RESOLVED org.eclipse.core.commands_3.3.0.I20070605-0010
12 <<LAZY>> org.eclipse.core.contenttype_3.2.100.v20070319
13 ACTIVE org.eclipse.core.expressions_3.3.0.v20070606-0010
14 ACTIVE org.eclipse.core.jobs_3.3.1.R33x_v20070709
15 ACTIVE
org.eclipse.core.runtime.compatibility.auth_3.2.100.v2007050 2
16 RESOLVED
org.eclipse.core.runtime.compatibility.registry_3.2.100.v200 70316
Master=27
17 ACTIVE org.eclipse.core.runtime_3.3.100.v20070530
18 ACTIVE org.eclipse.equinox.app_1.0.1.R33x_v20070828
21 ACTIVE org.eclipse.equinox.http.registry_1.0.100.v20080303
22 ACTIVE org.eclipse.equinox.http.servlet_1.0.100.v20080201
23 RESOLVED org.eclipse.equinox.http_1.0.100.v20070423
24 RESOLVED
org.eclipse.equinox.launcher.win32.win32.x86_1.0.2.R331_v200 71019
Master=25
25 RESOLVED org.eclipse.equinox.launcher_1.0.1.R33x_v20070828
Fragments=24
26 ACTIVE
org.eclipse.equinox.preferences_3.2.101.R33x_v20080117
27 ACTIVE org.eclipse.equinox.registry_3.3.1.R33x_v20070802
Fragments=16
28 RESOLVED org.eclipse.osgi.services_3.1.200.v20070605
30 RESOLVED
org.eclipse.rap.core.databinding.beans_1.1.0.20080407-1124
31 RESOLVED org.eclipse.rap.core.databinding_1.1.0.20080407-1124
32 RESOLVED
org.eclipse.rap.jface.databinding_1.1.0.20080407-1124
33 RESOLVED org.eclipse.rap.jface_1.1.0.20080407-1124
34 RESOLVED org.eclipse.rap.rwt_1.1.0.20080407-1124
35 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080407-1124
37 RESOLVED org.eclipse.rwt.widgets.upload_1.0.0
39 ACTIVE org.myapp.agent_1.0.0
40 RESOLVED org.myapp.core.extensions_1.0.0
41 RESOLVED org.myapp.core_1.0.0
42 ACTIVE org.myapp.data.rdf.jenabean_1.0.0
44 RESOLVED org.myapp.db_1.0.0
45 ACTIVE org.myapp.experiment_1.0.0
46 RESOLVED org.myapp.log4j.properties_1.0.0
Master=9
47 RESOLVED org.myapp.ui.rap_1.0.0
48 RESOLVED org.mortbay.jetty_5.1.11.v200803061811
54 RESOLVED org.myapp.data.sampling_1.0.0
Re: Anyone get Uploader widget to work? [message #91429 is a reply to message #87396] Tue, 03 June 2008 06:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
I having a problem using the uploader widget when deployed in tomcat.I
integrated the FileUpload widget on to my application and the following is
the code inside the createDialogArea of Dialog :


Composite composite = new Composite(parent,SWT.None);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
GridLayout gLayout = new GridLayout();
composite.setLayout(gLayout);

final Upload upload = new Upload(composite, SWT.NONE, null, true);
upload.setLayoutData( new GridData( 300, SWT.DEFAULT ) );
final Label image = new Label( parent, SWT.NONE );
final Label lab = new Label( parent, SWT.NONE );


UploadAdapter uploadAdapter = new UploadAdapter() {
public void uploadFinished( final UploadEvent uploadEvent ) {
if( uploadEvent.isFinished() ) {
File lastUploadedFile = upload.getLastUploadedFile();
try {
System.out.println("FILE NAME :"
+ lastUploadedFile.getName() + " Path :"
+ lastUploadedFile.getCanonicalPath());
;
_tdsatLog.info("FILE NAME :"
+ lastUploadedFile.getName() + " Path :"
+ lastUploadedFile.getCanonicalPath());
;
}catch(Exception ex) {}

lab.setText(lastUploadedFile.getName());
}
}
};
upload.addUploadListener( uploadAdapter );

When i locally launch it, the upload happens successfully only once.When u
attempt it consecutively it remains unresponsive.

Now when u deploy the war on to tomcat, the upload widget remains
unresponsive,the uploadFinished method will never get called.

Has anyone faced a similar problem, do please help me resolve this issue.
My dev environment consists of Eclipse_3.4 with Rc2 target.

Regards,
Murali
Re: Anyone get Uploader widget to work? [message #91672 is a reply to message #91429] Wed, 04 June 2008 03:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

I think your problem is the same as described in the thread 'Uploader:
fails to upload file on Windows', see the post from Cheney Chen. Stefan
has spend some time on reworking the file upload widget and will commit
the new version soon. This will use a service handler instead of an
extra servlet so this problem should vanish completely.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Murali Krishna [mailto:murakris@gmail.com]
Bereitgestellt: Dienstag, 3. Juni 2008 12:46
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Anyone get Uploader widget to work?
Betreff: Re: Anyone get Uploader widget to work?


Hi,
I having a problem using the uploader widget when deployed in tomcat.I
integrated the FileUpload widget on to my application and the following
is the code inside the createDialogArea of Dialog :


Composite composite = new Composite(parent,SWT.None);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, true));
GridLayout gLayout = new GridLayout();
composite.setLayout(gLayout);

final Upload upload = new Upload(composite, SWT.NONE,
null, true);
upload.setLayoutData( new GridData( 300, SWT.DEFAULT )
);
final Label image = new Label( parent, SWT.NONE );
final Label lab = new Label( parent, SWT.NONE );


UploadAdapter uploadAdapter = new UploadAdapter() {
public void uploadFinished( final UploadEvent uploadEvent
) {
if( uploadEvent.isFinished() ) {
File lastUploadedFile = upload.getLastUploadedFile();
try {
System.out.println("FILE NAME :"
+
lastUploadedFile.getName() + " Path :"
+
lastUploadedFile.getCanonicalPath());
;
_tdsatLog.info("FILE NAME :"
+
lastUploadedFile.getName() + " Path :"
+
lastUploadedFile.getCanonicalPath());
;
}catch(Exception ex) {}

lab.setText(lastUploadedFile.getName());

}
}
};
upload.addUploadListener( uploadAdapter );

When i locally launch it, the upload happens successfully only once.When
u attempt it consecutively it remains unresponsive.

Now when u deploy the war on to tomcat, the upload widget remains
unresponsive,the uploadFinished method will never get called.

Has anyone faced a similar problem, do please help me resolve this
issue.
My dev environment consists of Eclipse_3.4 with Rc2 target.

Regards,
Murali
Re: Anyone get Uploader widget to work? [message #91743 is a reply to message #91672] Wed, 04 June 2008 05:58 Go to previous messageGo to next message
Eclipse UserFriend
Oh, that's great and i will look forward for the same.Can i know when will
that happen.Will it be a part of RAP target platform?
Thanks,
Murali
Re: Anyone get Uploader widget to work? [message #91989 is a reply to message #91743] Thu, 05 June 2008 11:53 Go to previous message
Eclipse UserFriend
Hi Murali,

I committed a new version of the upload widget today. Can you check if
your deployment problems persist?

Regards,
Stefan.

Murali Krishna schrieb:
> Oh, that's great and i will look forward for the same.Can i know when
> will that happen.Will it be a part of RAP target platform?
> Thanks,
> Murali
>
Previous Topic:Context of SessionStoreListener
Next Topic:Custom control up up
Goto Forum:
  


Current Time: Sat May 24 10:20:39 EDT 2025

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

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

Back to the top