GWT 1.4 deployment to JBoss fails when making RPC call

32 views
Skip to first unread message

nijoblue

unread,
Nov 29, 2007, 3:05:28 AM11/29/07
to Google Web Toolkit
I have tried many combinations to deploy the packaged war file to
jboss 4.0.4 and each time I get this error when making an RPC call.
The xxxxx.gwt.rpc file is definitely packaged in the war file. The
client launches fine. gwt-servlet.jar file is in WEB-INF/lib and
web.xml is updated with the servlet mapping.

Anyone else come across this before? appreciate your help...



[ERROR] Unable to write file 'D:\jboss-4.0.4.ga\server\default\deploy
\dcrtool.war\com.bglobal.globalshare.gshdcr.DcrTool
\1D6131AFCB48A89F3ED5E07ECE755277.gwt.rpc'
java.io.FileNotFoundException: D:\jboss-4.0.4.ga\server\default\deploy
\dcrtool.war\com.bglobal.globalshare.gshdcr.DcrTool
\1D6131AFCB48A89F3ED5E07ECE755277.gwt.rpc (The device is not ready)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at com.google.gwt.dev.util.Util.writeBytesToFile(Util.java:926)
at com.google.gwt.dev.util.Util.writeBytesToFile(Util.java:914)
at com.google.gwt.dev.shell.StandardGeneratorContext
$PendingResource.commit(StandardGeneratorContext.java:142)
at
com.google.gwt.dev.shell.StandardGeneratorContext.commitResource(StandardGeneratorContext.java:
234)
at
com.google.gwt.user.rebind.rpc.ProxyCreator.writeSerializationPolicyFile(ProxyCreator.java:
555)
at
com.google.gwt.user.rebind.rpc.ProxyCreator.create(ProxyCreator.java:
119)
at
com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator.generate(ServiceInterfaceProxyGenerator.java:
56)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
43)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:116)

Ping

unread,
Nov 29, 2007, 6:23:02 AM11/29/07
to Google Web Toolkit
Basing on the stack trace, it seems like a weird file access/
permission problem. BTW, are you correctly prepending the
GWT.getModuleBaseURL() to you rpc's endpoint?

walden

unread,
Nov 29, 2007, 8:24:27 AM11/29/07
to Google Web Toolkit
+1 to permission problem. Is this Linux? Did you deploy as root at
some point?

On Nov 29, 6:23 am, Ping <miguel.p...@gmail.com> wrote:
> Basing on the stack trace, it seems like a weird file access/
> permission problem. BTW, are you correctly prepending the
> GWT.getModuleBaseURL() to you rpc's endpoint?
> On Nov 29, 8:05 am, nijoblue <johnnych...@gmail.com> wrote:
>
>
>
> > I have tried many combinations to deploy the packaged war file to
> > jboss 4.0.4 and each time I get this error when making an RPC call.
> > The xxxxx.gwt.rpc file is definitely packaged in the war file. The
> > client launches fine. gwt-servlet.jar file is in WEB-INF/lib and
> > web.xml is updated with the servlet mapping.
>
> > Anyone else come across this before? appreciate your help...
>
> > [ERROR] Unable to write file 'D:\jboss-4.0.4.ga\server\default\deploy
> > \dcrtool.war\com.bglobal.globalshare.gshdcr.DcrTool
> > \1D6131AFCB48A89F3ED5E07ECE755277.gwt.rpc'
> > java.io.FileNotFoundException: D:\jboss-4.0.4.ga\server\default\deploy
> > \dcrtool.war\com.bglobal.globalshare.gshdcr.DcrTool
> > \1D6131AFCB48A89F3ED5E07ECE755277.gwt.rpc (The device is not ready)
> > at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
> > at com.google.gwt.dev.util.Util.writeBytesToFile(Util.java:926)
> > at com.google.gwt.dev.util.Util.writeBytesToFile(Util.java:914)
> > at com.google.gwt.dev.shell.StandardGeneratorContext
> > $PendingResource.commit(StandardGeneratorContext.java:142)
> > at
> > com.google.gwt.dev.shell.StandardGeneratorContext.commitResource(StandardGe-neratorContext.java:
> > 234)
> > at
> > com.google.gwt.user.rebind.rpc.ProxyCreator.writeSerializationPolicyFile(Pr-oxyCreator.java:
> > 555)
> > at
> > com.google.gwt.user.rebind.rpc.ProxyCreator.create(ProxyCreator.java:
> > 119)
> > at
> > com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator.generate(Serv-iceInterfaceProxyGenerator.java:
> > 56)
> > at
> > com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
> > 43)
> > at com.google.gwt.dev.shell.StandardRebindOracle
> > $Rebinder.tryRebind(StandardRebindOracle.java:116)- Hide quoted text -
>
> - Show quoted text -

nijoblue

unread,
Nov 29, 2007, 5:41:53 PM11/29/07
to Google Web Toolkit
This is Windows XP and no, i did not dploy as root.

nijoblue

unread,
Nov 29, 2007, 5:51:37 PM11/29/07
to Google Web Toolkit
Yes it is prepended with GWT.getModuleBaseURL();

Anyone know why when generating a client proxy that it needs to write
generated resources to gwt.rpc file???

here is the calling sequence when it failed...

[DEBUG] Rebinding com.bglobal.globalshare.gshdcr.client.ToppingService
[DEBUG] Invoking <generate-with
class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/
>
[DEBUG] Generating client proxy for remote service interface
'com.xxx.xxx.xxx.client.ToppingService'
[TRACE] Writing generated resource 'D:\jboss-4.0.4.ga\server\default
\deploy\dcrtool.war\com.xxx.xxx.xxx.DcrTool
\1D6131AFCB48A89F3ED5E07ECE755277.gwt.rpc'
[ERROR] Unable to write file 'D:\jboss-4.0.4.ga\server\default\deploy
\dcrtool.war\com.xxx.xxx.xxx.DcrTool
\1D6131AFCB48A89F3ED5E07ECE755277.gwt.rpc'


Java code
------------------
ToppingServiceAsync toppingService = (ToppingServiceAsync)
GWT.create(ToppingService.class);
ServiceDefTarget target = (ServiceDefTarget) toppingService;
String relativeUrl = GWT.getModuleBaseURL() + "toppings";
target.setServiceEntryPoint(relativeUrl);
toppingService.getMyObj(new ToppingCallback(label));

gwt.xml
--------------
<servlet path="/toppings"
class="com.xxx.xxx.xxx.server.ToppingServiceImpl"/>

web.xml
-------------
<web-app>
<servlet>
<servlet-name>test/servlet-name>
<servlet-class>com.xxxx.xxxx.xxxx.server.ToppingServiceImpl</servlet-
class>
</servlet>
<servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>/toppings</url-pattern>
</servlet-mapping>
</web-app>

Ping

unread,
Nov 29, 2007, 7:08:40 PM11/29/07
to Google Web Toolkit
the .gwt.rpc files contain list of allowed classes serialization.If
I'm not mistaken, this list is used when the classes involved in RPC
(typically DTOs) do not implement IsSerializable and implement
Serializable instead.

anubhava

unread,
Dec 1, 2007, 1:35:45 AM12/1/07
to Google-We...@googlegroups.com
Dear All,


Please Send me server base E.R.P. Software Planning.
In which Database to use.

Secondly pls tell me can I use SQL Server without installing SQL.
Or SQL we can assamble in our setup.


Thanks
Anubhava Dimri

gregor

unread,
Nov 30, 2007, 10:18:04 AM11/30/07
to Google Web Toolkit
Hi nijoblue,

Another possibility (although it maybe a long shot as I would expect
to see it in JBoss console) is you've got this error from Tomcat
somewhere:

java.io.IOException: tmpFile.renameTo(classFile) failed
at org.apache.jasper.compiler.SmapUtil
$SDEInstaller.install(SmapUtil.java:245)

XP is succeptable to this and it's to do with Tomcat reading/writing
JSP/servlet files as it compiles them. If you google "tomcat
tmpFile.renameTo" you'll find it comes up in a lot of different and
obscure contexts. If this is so it would explain why Tomcat can't
write your rpc servlet as per your exception (basically XP is denying
access to the file becasue it thinks some other process is using it).

gregor



On Nov 29, 10:51 pm, nijoblue <johnnych...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages