[JBoss Remoting] - org.jboss.remoting.callback.HandleCallbackException: Error handling callback
by dhaval joshi
dhaval joshi [http://community.jboss.org/people/dhaval0129] created the discussion
"org.jboss.remoting.callback.HandleCallbackException: Error handling callback"
To view the discussion, visit: http://community.jboss.org/message/560303#560303
--------------------------------------------------------------
Hi
I am try to monitor the logs from my Application on Jboss 5.1.0 and it keeps throwing this error below
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) org.jboss.remoting.callback.HandleCallbackException: Error handling callback
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) at org.jboss.remoting.callback.ServerInvokerCallbackHandler.handleCallback(ServerInvokerCallbackHandler.java:866)
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) at org.jboss.remoting.callback.ServerInvokerCallbackHandler.handleCallback(ServerInvokerCallbackHandler.java:694)
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) at com.icrco.remoting.Tail.newLogFileLine(Tail.java:70)
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) at com.icrco.remoting.LogFileTailer.fireNewLogFileLine(LogFileTailer.java:82)
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) at com.icrco.remoting.LogFileTailer.run(LogFileTailer.java:138)
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) Caused by: org.jboss.remoting.callback.HandleCallbackException: Unable to persist callback and will not be able to deliver.
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) at org.jboss.remoting.callback.ServerInvokerCallbackHandler.handleCallback(ServerInvokerCallbackHandler.java:779)
2010-09-02 11:08:01,143 ERROR [STDERR] (Thread-20) ... 4 more
please let me know what needs to be done!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560303#560303]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[JBoss Tools] - Create GWT Projects with JBoss Tools and Eclipse WTP
by Andre Dietisheim
Andre Dietisheim [http://community.jboss.org/people/adietish] modified the document:
"Create GWT Projects with JBoss Tools and Eclipse WTP"
To view the document, visit: http://community.jboss.org/docs/DOC-15794
--------------------------------------------------------------
h1. Use Eclipse WTP, get there with the standard
If you want to create GWT applications you unfortunately cannot do it the WTP way and create a so called dynamic web project. The Google plugins implement their own set of views, wizards, launchers and mostly duplicate what's already present and defacto standard in WTP. The consequence is that you'd have to deal with workarounds if you want to get functionalities (run/deploy on JBoss etc.) Google does not offer.
We therefore developed an experimental integration plugin for GWT that allows you to create GWT projects in the way most Eclipse users are used to: by creating Dynamic Web Projects.
h1. Preface
Eclipse offers nice tools to create web applications. The base framework's what we call the Eclipse Web Tools Platform (WTP). Eclipse WTP delivers a standard for most aspects involved when you create web applications.
The google web toolkit, GWT, is a nice framework to develop web applications. Google delivers a plugin for Eclipse and developing with GWT is a very pleasant experience. The GWT plugin uses an embedded jetty to run the application that you develop. Google unfortunately did not base its work on Eclipse WTP and does not comply to the Eclipse project structure for web application. So if you want to use JBoss instead of jetty, the approach to take is not as handy and intuitive as it could be. Furthermore there's no way to use and integrate into plugins that other solution providers offer. You mostly have to proceed by workarounds to get what Google does not offer.
We therefore developed a set of (experimental) plugins that extend Eclipse WTP and allow you to create GWT projects by using Eclipse WTP standard tools. The most obvious benefit is that deploying to JEE application servers (and JBoss partcullarly) is as easy as it is with any other web project.
h1. Solution
Install and use the JBoss GWT Integration. You'll then be able to create GWT projects the WTP way and fully enjoy it's full-blow features and standardized usage patterns.
This How-To shows you all the steps to install the plugins and how to create a dynamic web project that's GWT enabled.
h2. Install JBoss GWT Integration
Add the Google Eclipse Plugins update site:
> http://dl.google.com/eclipse/plugin/3.6/ http://dl.google.com/eclipse/plugin/3.6/
Add the JBoss Tools update site:
> http://download.jboss.org/jbosstools/updates/nightly/jbosstools-3.2.0.M2/ http://download.jboss.org/jbosstools/updates/nightly/jbosstools-3.2.0.M2/
And Install the JBoss GWT Integration
http://community.jboss.org/servlet/JiveServlet/showImage/6254/Picture+4.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6254/Picture...
h2. Create a Dynamic Web Application Project
Make sure you have a JEE server (JBoss application server for instance) in your Eclipse environment. If not, download and declare it to your Eclipse IDE:
http://community.jboss.org/servlet/JiveServlet/showImage/6260/Picture+12.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6260/Picture...
http://community.jboss.org/servlet/JiveServlet/showImage/6259/Picture+11.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6259/Picture...
You're now ready to create a *Dynamic Web Project*.
http://community.jboss.org/servlet/JiveServlet/showImage/6256/Picture+5.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6256/Picture...
The wizard picks your server (runtime) and allows you to configure the various characteristic of your web project.
The *configuration* group allows you to pick the different facets of your project. We provide a *Google Web Toolkit* facet that will configure the GWT related characteristics.
Hit *Modify...*
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
and select the *Google Web Toolkit* facet.
http://community.jboss.org/servlet/JiveServlet/showImage/6262/Picture+14.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6262/Picture...
A few wizard steps further, you may choose to get some GWT *sample code*.
http://community.jboss.org/servlet/JiveServlet/showImage/6411/generate-sa... http://community.jboss.org/servlet/JiveServlet/downloadImage/6411/generat...
You get the Hello World sample that you get when you use the Google Wizard. We just put it to the *WebContent* folder you configured in your Dynamic Web Project wizard (WTP default opposed to what Google does in their plugin). The sample's a fully working GWT application that allows you to get a first impression of what developing with GWT looks like.
h1. Cross compile to Javascript
GWT is about programming in Java and getting javascript for the browser. GWT achieves this with a cross-compiler that creates the javascript for you.
In order to get the project up and running you now need to cross compile the sample's client java code to javascript. Our project has the *GWT nature* and therefore offers the Google compiler in the context menu.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-627... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
h1. Deploy to JBoss
We are now ready to deploy our application. We strictly use the standard Eclipse *WTP* infrastructure in our setup, So you may deploy your GWT application in the same manner you usually deploy and run classic web applications with Eclipse WTP. You have to add the application to a server that's registered in the WTP *servers view*. We deploy our application to our JBoss application server by selecting it in the and choosing *Add and Remove...*
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
You can now add the GWT application to your server. WTP will make sure that it gets deployed and the deployed artifacts are in sync with your workspace (even when you change code, resources, configurations, etc.)
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
h1. Run your application and launch your browser
You may now run your application. We completely comply to the views and steps Eclipse WTP offers to web developers. So there's no custom way to start a server in our setup. We select our JBoss instance in the *Servers view* and *start* it.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
You can now point your browser to the address and port that your JBoss server's bound to.
http://community.jboss.org/servlet/JiveServlet/showImage/6271/Picture+2.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6271/Picture...
h2. Speed up my development cycle!
The approach we've choosen so far uses an extra cross compile step to deploy the application after each change. That's very reliable but it gets tedious at development time. Google delivers a so called hosted/development mode. Its major benefit is that you dont need to cross compile on each change but you can change and test on the fly. This magic is achieved with a browser plugin and a google runtime that interprets your java code at runtime. Changing, testing, changing, testing etc. gets much faster and pleasant, the cross-compilation step's not needed any more.
h2. Launch GWT Codeserver
If you launch your application as Google Web Application, you'll be able to code and test on the fly. The GWT browser plugin will communicate with the GWT code server and execute your changes on the fly. You need to declare though, where your code server's may be reached. You do that by using an *additional url parameter*. Your URL now reads as follows:
> http://localhost:8080/gwt-test/?gwt.codesvr=127.0.0.1:9997 http://localhost:8080/gwt-test/?gwt.codesvr=127.0.0.1:9997
Change the button in your GWT java client code, to see if changes are picked on the fly now.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-640... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
Do not cross-compile, get back to your browser and reload (without cross-compiling again). What you see reflects the changes in the code.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-640... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
To be picky on the issue you could now go to the launch configuration and disable the jetty google usually uses to serve your GWT application:
http://community.jboss.org/servlet/JiveServlet/showImage/6413/disable-bui... http://community.jboss.org/servlet/JiveServlet/downloadImage/6413/disable...
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15794]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
14 years, 3 months
[JBoss Tools] - Create GWT Projects with JBoss Tools and Eclipse WTP
by Andre Dietisheim
Andre Dietisheim [http://community.jboss.org/people/adietish] modified the document:
"Create GWT Projects with JBoss Tools and Eclipse WTP"
To view the document, visit: http://community.jboss.org/docs/DOC-15794
--------------------------------------------------------------
h1. Use Eclipse WTP, get there with the standard
If you want to create GWT applications you unfortunately cannot do it the WTP way and create a so called dynamic web project. The Google plugins implement their own set of views, wizards, launchers and mostly duplicate what's already present and defacto standard in WTP. The consequence is that you'd have to deal with workarounds if you want to get functionalities (run/deploy on JBoss etc.) Google does not offer.
We therefore developed an experimental integration plugin for GWT that allows you to create GWT projects in the way most Eclipse users are used to: by creating Dynamic Web Projects.
h1. Preface
Eclipse offers nice tools to create web applications. The base framework's what we call the Eclipse Web Tools Platform (WTP). Eclipse WTP delivers a standard for most aspects involved when you create web applications.
The google web toolkit, GWT, is a nice framework to develop web applications. Google delivers a plugin for Eclipse and developing with GWT is a very pleasant experience. The GWT plugin uses an embedded jetty to run the application that you develop. Google unfortunately did not base its work on Eclipse WTP and does not comply to the Eclipse project structure for web application. So if you want to use JBoss instead of jetty, the approach to take is not as handy and intuitive as it could be. Furthermore there's no way to use and integrate into plugins that other solution providers offer. You mostly have to proceed by workarounds to get what Google does not offer.
We therefore developed a set of (experimental) plugins that extend Eclipse WTP and allow you to create GWT projects by using Eclipse WTP standard tools. The most obvious benefit is that deploying to JEE application servers (and JBoss partcullarly) is as easy as it is with any other web project.
h1. Solution
Install and use the JBoss GWT Integration. You'll then be able to create GWT projects the WTP way and fully enjoy it's full-blow features and standardized usage patterns.
This How-To shows you all the steps to install the plugins and how to create a dynamic web project that's GWT enabled.
h2. Install JBoss GWT Integration
Add the Google Eclipse Plugins update site:
> http://dl.google.com/eclipse/plugin/3.6/ http://dl.google.com/eclipse/plugin/3.6/
Add the JBoss Tools update site:
> http://download.jboss.org/jbosstools/updates/nightly/jbosstools-3.2.0.M2/ http://download.jboss.org/jbosstools/updates/nightly/jbosstools-3.2.0.M2/
And Install the JBoss GWT Integration
http://community.jboss.org/servlet/JiveServlet/showImage/6254/Picture+4.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6254/Picture...
h2. Create a Dynamic Web Application Project
Make sure you have a JEE server (JBoss application server for instance) in your Eclipse environment. If not, download and declare it to your Eclipse IDE:
http://community.jboss.org/servlet/JiveServlet/showImage/6260/Picture+12.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6260/Picture...
http://community.jboss.org/servlet/JiveServlet/showImage/6259/Picture+11.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6259/Picture...
You're now ready to create a *Dynamic Web Project*.
http://community.jboss.org/servlet/JiveServlet/showImage/6256/Picture+5.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6256/Picture...
The wizard picks your server (runtime) and allows you to configure the various characteristic of your web project.
The *configuration* group allows you to pick the different facets of your project. We provide a *Google Web Toolkit* facet that will configure the GWT related characteristics.
Hit *Modify...*
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
and select the *Google Web Toolkit* facet.
http://community.jboss.org/servlet/JiveServlet/showImage/6262/Picture+14.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6262/Picture...
A few wizard steps further, you may choose to get some GWT *sample code*.
http://community.jboss.org/servlet/JiveServlet/showImage/6411/generate-sa... http://community.jboss.org/servlet/JiveServlet/downloadImage/6411/generat...
You get the Hello World sample that you get when you use the Google Wizard. We just put it to the *WebContent* folder you configured in your Dynamic Web Project wizard (WTP default opposed to what Google does in their plugin). The sample's a fully working GWT application that allows you to get a first impression of what developing with GWT looks like.
h1. Cross compile to Javascript
GWT is about programming in Java and getting javascript for the browser. GWT achieves this with a cross-compiler that creates the javascript for you.
In order to get the project up and running you now need to cross compile the sample's client java code to javascript. Our project has the *GWT nature* and therefore offers the Google compiler in the context menu.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-627... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
h1. Deploy to JBoss
We are now ready to deploy our application. We strictly use the standard Eclipse *WTP* infrastructure in our setup, So you may deploy your GWT application in the same manner you usually deploy and run classic web applications with Eclipse WTP. You have to add the application to a server that's registered in the WTP *servers view*. We deploy our application to our JBoss application server by selecting it in the and choosing *Add and Remove...*
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
You can now add the GWT application to your server. WTP will make sure that it gets deployed and the deployed artifacts are in sync with your workspace (even when you change code, resources, configurations, etc.)
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
h1. Run your application and launch your browser
You may now run your application. We completely comply to the views and steps Eclipse WTP offers to web developers. So there's no custom way to start a server in our setup. We select our JBoss instance in the *Servers view* and *start* it.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
You can now point your browser to the address and port that your JBoss server's bound to.
http://community.jboss.org/servlet/JiveServlet/showImage/6271/Picture+2.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6271/Picture...
h2. Speed up my development cycle!
The approach we've choosen so far uses an extra cross compile step to deploy the application after each change. That's very reliable but it gets tedious at development time. Google delivers a so called hosted/development mode. Its major benefit is that you dont need to cross compile on each change but you can change and test on the fly. This magic is achieved with a browser plugin and a google runtime that interprets your java code at runtime. Changing, testing, changing, testing etc. gets much faster and pleasant, the cross-compilation step's not needed any more.
h2. Launch GWT Codeserver
If you launch your application as Google Web Application, you'll be able to code and test on the fly. The GWT browser plugin will communicate with the GWT code server and execute your changes on the fly. You need to declare though, where your code server's may be reached. You do that by using an *additional url parameter*. Your URL now reads as follows:
> http://localhost:8080/gwt-test/?gwt.codesvr=127.0.0.1:9997 http://localhost:8080/gwt-test/?gwt.codesvr=127.0.0.1:9997
Change the button in your GWT java client code, to see if changes are picked on the fly now.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-640... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
Do not cross-compile, get back to your browser and reload (without cross-compiling again). What you see reflects the changes in the code.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-12-640... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-12...
To be picky on the issue you could now go to the launch configuration and disable the jetty google usually uses to serve your GWT application:
http://community.jboss.org/servlet/JiveServlet/showImage/6413/disable-bui... http://community.jboss.org/servlet/JiveServlet/downloadImage/6413/disable...
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15794]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
14 years, 3 months
[Datasource Configuration] - Trouble with MS SQL 2005 and JBoss 4.0.5 - Tomcat works though?
by Mike Romero
Mike Romero [http://community.jboss.org/people/romerom] created the discussion
"Trouble with MS SQL 2005 and JBoss 4.0.5 - Tomcat works though?"
To view the discussion, visit: http://community.jboss.org/message/560946#560946
--------------------------------------------------------------
Hey Guys,
I have a webapp that I'm trying to port from Tomcat to JBoss. There are two datasources. One is MySQL, one is MSSQL 2005.
I was able to get the MySQL datasource working in JBoss, but MS SQL is giving me the strangest error. "Connection Refused". I know the error itself isn't strange at all, it's just that... there is no network or firewall issue. There is no issue about the SQL server being down or not listening on that port.
Tomcat works. JBoss 4.0.5 doesn't. I haven't tried other versions of JBoss; this is just the version we use here where I work so I am setting my environment up to match theirs.
web.xml:
<resource-ref> <description>Helios</description>
<res-ref-name>jdbc/Helios</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>webCheck</description>
<res-ref-name>jdbc/webCheck</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jboss-web.xml:
<?xml version="1.0" encoding="UTF-8"?> <jboss-web>
<resource-ref>
<res-ref-name>jdbc/Helios</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:jdbc/Helios</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jdbc/webCheck</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:jdbc/webCheck</jndi-name>
</resource-ref> </jboss-web>
sql-ds.xml:
<local-tx-datasource>
<jndi-name>jdbc/webCheckORIG</jndi-name>
<connection-url>jdbc:sqlserver://hostname.domain.edu:5555;databaseName=dbname</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>user</user-name>
<password>pass</password>
</local-tx-datasource>
<xa-datasource>
<jndi-name>jdbc/webCheck</jndi-name>
<track-connection-by-tx></track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
<xa-datasource-property name="ServerName">hostname.domain.edu</xa-datasource-property>
<xa-datasource-property name="PortNumber">5555</xa-datasource-property>
<xa-datasource-property name="DatabaseName">dbname</xa-datasource-property>
<xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
<xa-datasource-property name="User">user</xa-datasource-property>
<xa-datasource-property name="Password">pass</xa-datasource-property>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>MS SQLSERVER2005</type-mapping>
</metadata>
</xa-datasource>
I've been through a few different SQL configs in that "sql-ds.xml" file based on various examples on the web. The problem is always the same - "Connection Refused".
The problem is that I can connect using SQL Server Management Studio as well as from within Eclipse when my webapp is started in Tomcat. It's just that for some reason, JBoss doesn't seem to get it. Another little nugget. Telnet to the port? Nope, that doesn't work. From a server on the same segment, telnet doesn't work either.
I started out with an older version of "sqljdbc.jar", then upgraded to 2.0, then 3.0, then attempted to use the "jtds" driver. Each of these produce "Connection Refused". I've tried with and without JNDI as well. Same problem :( This is truly puzzling.
Any ideas? Is there some compatibility issue between SQL Server 2005 and JBoss 4.0.5? The one thing I noticed is that the example above uses the type-mapping of "MS SQLSERVER2005", only, in "standardjbosscmp-jdbc.xml", there is no entry for 2005, only "MS SQLSERVER" and "MS SQLSERVER2000". This leads me to believe that a newer version of JBoss might have additional support for SQL Server 2005 and that I might just be going against the stream.
Hopefully you guys have some ideas :)
Why does SQL Server Management Studio and Tomcat work? Why does JBoss fail with a "Connection Refused" similarly to the way Telnet does?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560946#560946]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[JBoss Tools] - Create GWT Projects with JBoss Tools and Eclipse WTP
by Andre Dietisheim
Andre Dietisheim [http://community.jboss.org/people/adietish] modified the document:
"Create GWT Projects with JBoss Tools and Eclipse WTP"
To view the document, visit: http://community.jboss.org/docs/DOC-15794
--------------------------------------------------------------
h1. Use Eclipse WTP, get there with the standard
If you want to create GWT applications you unfortunately cannot do it the WTP way and create a so called dynamic web project. The Google plugins implement their own set of views, wizards, launchers and mostly duplicate what's already present and defacto standard in WTP. The consequence is that you'd have to deal with workarounds if you want to get functionalities (run/deploy on JBoss etc.) Google does not offer.
We therefore developed an experimental integration plugin for GWT that allows you to create GWT projects in the way most Eclipse users are used to: by creating Dynamic Web Projects.
h1. Preface
Eclipse offers nice tools to create web applications. The base framework's what we call the Eclipse Web Tools Platform (WTP). Eclipse WTP delivers a standard for most aspects involved when you create web applications.
The google web toolkit, GWT, is a nice framework to develop web applications. Google delivers a plugin for Eclipse and developing with GWT is a very pleasant experience. The GWT plugin uses an embedded jetty to run the application that you develop. Google unfortunately did not base its work on Eclipse WTP and does not comply to the Eclipse project structure for web application. So if you want to use JBoss instead of jetty, the approach to take is not as handy and intuitive as it could be. Furthermore there's no way to use and integrate into plugins that other solution providers offer. You mostly have to proceed by workarounds to get what Google does not offer.
We therefore developed a set of (experimental) plugins that extend Eclipse WTP and allow you to create GWT projects by using Eclipse WTP standard tools. The most obvious benefit is that deploying to JEE application servers (and JBoss partcullarly) is as easy as it is with any other web project.
h1. Solution
Install and use the JBoss GWT Integration. You'll then be able to create GWT projects the WTP way and fully enjoy it's full-blow features and standardized usage patterns.
This How-To shows you all the steps to install the plugins and how to create a dynamic web project that's GWT enabled.
h2. Install JBoss GWT Integration
Add the Google Eclipse Plugins update site:
> http://dl.google.com/eclipse/plugin/3.6/ http://dl.google.com/eclipse/plugin/3.6/
Add the JBoss Tools update site:
> http://download.jboss.org/jbosstools/updates/nightly/jbosstools-3.2.0.M2/ http://download.jboss.org/jbosstools/updates/nightly/jbosstools-3.2.0.M2/
And Install the JBoss GWT Integration
http://community.jboss.org/servlet/JiveServlet/showImage/6254/Picture+4.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6254/Picture...
h2. Create a Dynamic Web Application Project
Make sure you have a JEE server (JBoss application server for instance) in your Eclipse environment. If not, download and declare it to your Eclipse IDE:
http://community.jboss.org/servlet/JiveServlet/showImage/6260/Picture+12.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6260/Picture...
http://community.jboss.org/servlet/JiveServlet/showImage/6259/Picture+11.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6259/Picture...
You're now ready to create a *Dynamic Web Project*.
http://community.jboss.org/servlet/JiveServlet/showImage/6256/Picture+5.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6256/Picture...
The wizard picks your server (runtime) and allows you to configure the various characteristic of your web project.
The *configuration* group allows you to pick the different facets of your project. We provide a *Google Web Toolkit* facet that will configure the GWT related characteristics.
Hit *Modify...*
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-10-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-10...
And select the *Google Web Toolkit* facet.
http://community.jboss.org/servlet/JiveServlet/showImage/6262/Picture+14.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6262/Picture...
A few wizard steps further, you may choose to get some GWT *sample code*.
http://community.jboss.org/servlet/JiveServlet/showImage/6411/generate-sa... http://community.jboss.org/servlet/JiveServlet/downloadImage/6411/generat...
You get the Hello World sample that you get when you use the Google Wizard. We just put it to the *WebContent* folder you configured in your Dynamic Web Project wizard (WTP default opposed to what Google does in their plugin). The sample's a fully working GWT application that allows you to get a first impression of what developing with GWT looks like.
h1. Cross Compile to Javascript
GWT is about programming in Java and getting javascript for the browser. GWT achieves this with a cross-compiler that creates the javascript for you.
In order to get the project up and running you now need to cross compile the sample's client java code to javascript. Our project has the *GWT nature* and therefore offers the Google compiler in the context menu.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-10-627... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-10...
h1. Deploy to JBoss
We are now ready to deploy our application. We strictly use the standard Eclipse *WTP* infrastructure in our setup, So you may deploy your GWT application in the same manner you usually deploy and run classic web applications with Eclipse WTP. You have to add the application to a server that's registered in the WTP *servers view*. We deploy our application to our JBoss application server by selecting it in the and choosing *Add and Remove...*
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-10-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-10...
You can now add the GWT application to your server. WTP will make sure that it gets deployed and the deployed artifacts are in sync with your workspace (even when you change code, resources, configurations, etc.)
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-10-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-10...
h1. Run your application and launch your browser
You may now run your application. We completely comply to the views and steps Eclipse WTP offers to web developers. So there's no custom way to start a server in our setup. We select our JBoss instance in the Servers view and *start* it.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-10-626... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-10...
You can now point your browser to the address and port that your JBoss server's bound to.
http://community.jboss.org/servlet/JiveServlet/showImage/6271/Picture+2.png http://community.jboss.org/servlet/JiveServlet/downloadImage/6271/Picture...
h2. Speed up my development cycle!
The approach we've choosen so far uses an extra cross compile step to deploy the application after each change. That's very reliable but it gets tedious at development time. Google delivers a so called hosted mode. Its major benefit is that your java classes dont get cross-compiled but interpreted to javascript at runtime. Changing, testing, changing, testing etc. gets much faster and pleasant, the cross-compilation step's not needed any more. You need a browser plugin, n additional url parameter and a google runtime to achieve that.
h2. Launch GWT Codeserver
Launch your application as Google Web Application, you'll be able to code and test on the fly, no cross compilation needed any more. The GWT browser plugin will communicate with the GWT code server you just launched and execute your changes on the fly. You need to declare to the plugin where this code server is running. You do that by using an additional url parameter and now your url reads as follows:
> http://localhost:8080/gwt-test/?gwt.codesvr=127.0.0.1:9997 http://localhost:8080/gwt-test/?gwt.codesvr=127.0.0.1:9997
To see whether changes are picked on the fly now, change the button in your GWT java client code:
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-10-640... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-10...
And get back to your browser and reload (without cross-compiling again). What you see reflects the changes in the code.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15794-10-640... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15794-10...
To be picky on the issue you could now go to the launch configuration and disable the jetty google usually uses to serve your GWT application:
http://community.jboss.org/servlet/JiveServlet/showImage/6413/disable-bui... http://community.jboss.org/servlet/JiveServlet/downloadImage/6413/disable...
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15794]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
14 years, 3 months
[Beginner's Corner] - javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.10.136:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out
by Noelia Delgado
Noelia Delgado [http://community.jboss.org/people/Zoeley] created the discussion
"javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.10.136:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out"
To view the discussion, visit: http://community.jboss.org/message/560656#560656
--------------------------------------------------------------
Hi,
I am running JBoss 5.1.0.GA and it appears I am unable to establish a connection from a client running remotely.
When I run the client locally and connect using 'localhost:1099' or '127.0.0.1:1099' the connection succeeds, but when I provide the computer's ip
'192.168.10.136:1099' I get the printStackTrace() output below:
g28:/home/noelia/Desktop# java -jar AppClient.jar
javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.10.136:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server /192.168.10.136:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.10.136:1099 [Root exception is java.net.ConnectException: Conexión rehusada]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at util.Contexto.getInterfazRemota(Contexto.java:29)
at mesa_entrada.IdPaciente.getInterfazRemota(IdPaciente.java:1635)
at mesa_entrada.IdPaciente.setInterfazRemotaPaciente(IdPaciente.java:1645)
at mesa_entrada.IdPaciente$8.actionPerformed(IdPaciente.java:1031)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: javax.naming.CommunicationException: Failed to connect to server /192.168.10.136:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.10.136:1099 [Root exception is java.net.ConnectException: Conexión rehusada]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
... 32 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.10.136:1099 [Root exception is java.net.ConnectException: Conexión rehusada]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
... 33 more
Caused by: java.net.ConnectException: Conexión rehusada
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
... 33 more
java.lang.NullPointerException
at mesa_entrada.IdPaciente$8.actionPerformed(IdPaciente.java:1043)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
g28:/home/noelia/Desktop# java -jar AppClient.jar
javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.10.136:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server /192.168.10.136:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.10.136:1099 [Root exception is java.net.ConnectException: Conexión rehusada]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at util.Contexto.getInterfazRemota(Contexto.java:29)
at mesa_entrada.IdPaciente.getInterfazRemota(IdPaciente.java:1635)
at mesa_entrada.IdPaciente.setInterfazRemotaPaciente(IdPaciente.java:1645)
at mesa_entrada.IdPaciente$8.actionPerformed(IdPaciente.java:1031)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: javax.naming.CommunicationException: Failed to connect to server /192.168.10.136:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.10.136:1099 [Root exception is java.net.ConnectException: Conexión rehusada]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
... 32 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.10.136:1099 [Root exception is java.net.ConnectException: Conexión rehusada]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
... 33 more
Caused by: java.net.ConnectException: Conexión rehusada
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
... 33 more
java.lang.NullPointerException
at mesa_entrada.IdPaciente$8.actionPerformed(IdPaciente.java:1039)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
*My client code is:
*
public
Contexto()*throws NamingException{Properties env =
*new Properties();
// Try with a login that should succeedenv.setProperty(
"java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");env.setProperty(Context.
+URL_PKG_PREFIXES, "org.jboss.naming.client"); env.setProperty(Context.
+PROVIDER_URL, "jnp://192.168.10.136:1099");env.setProperty(Context.
+SECURITY_CREDENTIALS, "");env.setProperty(Context.
+SECURITY_PRINCIPAL, "");env.setProperty(Context.
+SECURITY_PROTOCOL, "java:/jaas/App");
*this.ctx = *new InitialContext(env);}
if anyone can help me I would appreciate.
thanks
Noelia
**
+
+
+
+
+
*
*
**
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560656#560656]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[JBoss Tools] - Use JBoss Tools with Google GWT Plugin
by Andre Dietisheim
Andre Dietisheim [http://community.jboss.org/people/adietish] modified the document:
"Use JBoss Tools with Google GWT Plugin"
To view the document, visit: http://community.jboss.org/docs/DOC-15593
--------------------------------------------------------------
h1. A few simple steps
If you develop web applications with GWT you most likely end up using Eclipse and the Google Plugins for Eclipse. These Plugins offer to run your application on a jetty instance. If you want to use JBoss instead, JBoss Tools allows you to define a war project archive and make sure it gets published to the JBoss instance of your choice. This allows you to use Google GWT plugins proprietary project layout and Eclipse integration together with JBoss servers.
Note: We are working on getting Google GWT Plugin to be a better Eclipse citizen, but for now this will have to do ;)
h2. *Premise*
The google web toolkit, GWT is a nice framework to develop web applications. Google even delivers a plugin for Eclipse so that developing with GWT is a very pleasant experience. The GWT plugin uses an embedded jetty to run the application that you develop. Google unfortunately did not use standard Eclipse project structure for web projects. So if you want to use JBoss instead of jetty, the approach to take is not as intuitive as it could be. This article shows you what steps to take so that you can develop your GWT application seamlessly with JBoss Tools while running on JBoss.
h1. Solution
This How-To shows all the steps to install the plugins and how to configure it with Project Archives.
h2. Install Google Plugin for Eclipse
Install the Google plugin for Eclipse in your Eclipse or JBoss Developer Studio (3.x) by adding the following update site:
> http://dl.google.com/eclipse/plugin/3.5 http://dl.google.com/eclipse/plugin/3.5
You can use the Google GWT plugin i http://code.google.com/eclipse/docs/getting_started.html#installing nstallation guide to see the exact instructions.
h2. Create a Web Application Project
In order to get the support you need for GWT projects, you'll need to create a new *Web Application Project*. You may do so with the toolbar or with entries in the file menu.
http://community.jboss.org/servlet/JiveServlet/showImage/4286/create-web-... http://community.jboss.org/servlet/JiveServlet/downloadImage/4286/create-...
http://community.jboss.org/servlet/JiveServlet/showImage/102-15593-4-4320... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15593-4-...
Notice that here we deselect "Use Google App Engine" since that is not needed for this example.
h2. Create a new WAR with Project Archives
We'll work with a JBoss application server instead of the embedded jetty that's provided with the Google plugins. We therefore need to provide JBoss with a *War Archive* that bundles your project resources. The *Project archives* view allows you to do so. Select your GWT project and go to the *Project archives* view. You can now define a new war archive by right clicking on the project name.
http://community.jboss.org/servlet/JiveServlet/showImage/4289/create-new-... http://community.jboss.org/servlet/JiveServlet/downloadImage/4289/create-...
The wizard that pops up allows you pick an archive name, the path at which it'll be created and the type (packed or unpacked). Choose the settings that fit your needs.
http://community.jboss.org/servlet/JiveServlet/showImage/4290/create-new-... http://community.jboss.org/servlet/JiveServlet/downloadImage/4290/create-...
The wizard created a default fileset, that determines what project files shall be included in the war. We'll replace it by a fileset that includes all files within the *war* directory. This is the location the google plugins compile and package the code to.
http://community.jboss.org/servlet/JiveServlet/showImage/4291/create-new-... http://community.jboss.org/servlet/JiveServlet/downloadImage/4291/create-...
Your war archive shows up in the *Project archives* as soon you hit *finish*.
http://community.jboss.org/servlet/JiveServlet/showImage/4292/create-new-... http://community.jboss.org/servlet/JiveServlet/downloadImage/4292/create-...
h1. Build and publish your war
We now need to publish the War to the JBoss instance. Choose the appropriate entry in the context-menu of your war-archive and hit *Edit publish settings*.
http://community.jboss.org/servlet/JiveServlet/showImage/4293/adjust-war-... http://community.jboss.org/servlet/JiveServlet/downloadImage/4293/adjust-...
JBoss Developer Studio comes with a preconfigured server named jboss-eap. You therefore already get that server in the list of the available servers.
If you use plain JBoss Tools you would need to setup the server manually.
Select the server and choose to publish to it in the way that fits your needs:
http://community.jboss.org/servlet/JiveServlet/showImage/4294/adjust-war-... http://community.jboss.org/servlet/JiveServlet/downloadImage/4294/adjust-...
Your war now's assiociated to your server and will be published to it if your GWT project's been built. The *Servers* view show you the state of the publishing:
http://community.jboss.org/servlet/JiveServlet/showImage/4295/war-on-serv... http://community.jboss.org/servlet/JiveServlet/downloadImage/4295/war-on-...
h2. Cross compile
GWT allows you to write your client code in (almost) plain java instead of funky javascript. GWT ships a cross compiler that generates javascript out of your java classes. You need to start that cross compiler so that the client codes gets into your war. (We show later how you can use the hosted mode too with JBoss)
http://community.jboss.org/servlet/JiveServlet/showImage/4319/cross-compi... http://community.jboss.org/servlet/JiveServlet/downloadImage/4319/cross-c...
The Google cross compiler will inform you in the console view whether's he succeeded in his job. Check the output and wait until it terminated its compilation task.
h2. *Launch your Browser*
The project archive we created was deployed to the base url *gwt-jboss*. The jBoss server that's included in the JBoss developer studio is configured (by default) to run on port *8080*. Your application's therefore accessible at the url:
**
> http://127.0.0.1:8080/gwt-jboss/Gwt_jboss.html http://127.0.0.1:8080/gwt-jboss/Gwt_jboss.html
*http://community.jboss.org/servlet/JiveServlet/showImage/4317/browser.png http://community.jboss.org/servlet/JiveServlet/downloadImage/4317/browser...
h2. Speed up my development cycle!
The approach we've choosen so far uses an extra cross compile step to deploy the application after each change. That's very reliable but it gets tedious at development time. Google delivers a so called hosted mode. Its major benefit is that your java classes dont get cross-compiled but interpreted to javascript at runtime. Changing, testing, changing, testing etc. gets much faster and pleasant, the cross-compilation step's not needed any more. You need a browser plugin, a slightly different url for your application and a google runtime to achieve that.
h2.
h2. Launch Google
If you start this launch configuration you wont have to cross compile your java client classes to javascript. It will get interpreted by the google browser plugin. On the other hand the browser plugin needs access to your java classes. The google runtime you just launched allows it to get your java code. The url parameter you add when you access your application tells the plugin at what host and port the hosted mode runs.
Create a *Web Application* launch configuration for that matter.
http://community.jboss.org/servlet/JiveServlet/showImage/102-15593-4-4321... http://community.jboss.org/servlet/JiveServlet/downloadImage/102-15593-4-...
We want to use our JBoss instance, we therefore disable the embedded jetty that's provided by the GWT plugins.
http://community.jboss.org/servlet/JiveServlet/showImage/4297/new-run-con... http://community.jboss.org/servlet/JiveServlet/downloadImage/4297/new-run...
Now that we want not to cross-compile on each change, we'll need to tell the google browser-plugin where to fetch the code from. We do that by adding an url parameter:
**
> http://127.0.0.1:8080/gwt-jboss/Gwt_jboss.html http://127.0.0.1:8080/gwt-jboss/Gwt_jboss.html*?gwt.codesvr=127.0.0.1:9997*
To convince yourself that there's no cross compilation needed any more, go to the client-package and change any java class that's in there. You may for instance change the label of a button and reload your browser (without launching the google cross-compiler).
http://community.jboss.org/servlet/JiveServlet/showImage/4311/button-labe... http://community.jboss.org/servlet/JiveServlet/downloadImage/4311/button-...
http://community.jboss.org/servlet/JiveServlet/showImage/4312/button-labe... http://community.jboss.org/servlet/JiveServlet/downloadImage/4312/button-...
h1. Conclusion
There you go, now you can use JBoss Tools and JBoss Developer Studio together with Google GWT plugin to do full deployment (with Cross Compile) or development mode via the hosted mode option.
All enabled by utilizing the Project Archives view.
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15593]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
14 years, 3 months