JBoss integration - my application does not get deployed

I cannot deploy my web application in ‘local JBoss Server configuration’
Tried with fresh downloaded jboss-5.1.0.GA and jboss-4.2.3.GA with exactly the same results:
The Run Configuration seems correct, everything set up, but when I launch the server (in run or debug mode) – the server starts without any errors and nothing happens then, the application is not deployed! When I press the button ‘Deploy All’ in the Run window I just get message:
‘Facet Web: Server is not connected. Press 'Deploy' to start deployment.’
There are no errors in IDEA nor JBoss logs.

See the attached file.

However when I set IDEA up to use Tomcat or Jetty the application gets deployed there.
What is wrong with the my JBoss set up? I have looked at it and flipped all possible switches, but I am quite clueless right now.
I am using Java 1.6 and Idea 8.1.3

Best regards,
Adam



Attachment(s):
idea-jboss.log
12 comments
Comment actions Permalink

The most common source for such a problem is some firewall blocking
access to JNDI port 1099. Please verify that you didn't disable JNDI,
that it properly listens on port 1099, and that there's no firewall
software blocking access to it.

On 8/19/2009 4:27 PM, Adam wrote:

I cannot deploy my web application in ‘local JBoss Server configuration’
Tried with fresh downloaded jboss-5.1.0.GA and jboss-4.2.3.GA with exactly the same results:
The Run Configuration seems correct, everything set up, but when I launch the server (in run or debug mode) – the server starts without any errors and nothing happens then, the application is not deployed! When I press the button ‘Deploy All’ in the Run window I just get message:
‘Facet Web: Server is not connected. Press 'Deploy' to start deployment.’
There are no errors in IDEA nor JBoss logs.

>

ss

>
>

However when I set IDEA up to use Tomcat or Jetty the application gets deployed there.
What is wrong with the my JBoss set up? I have looked at it and flipped all possible switches, but I am quite clueless right now.
I am using Java 1.6 and Idea 8.1.3

>

Best regards,
Adam

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5243788#5243788


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Hi Martin,

mf@fuhrer.com wrote:

The most common source for such a problem is some firewall blocking
access to JNDI port 1099. Please verify that you didn't disable JNDI,
that it properly listens on port 1099, and that there's no firewall
software blocking access to it.



Thank you for the answer.
As I said I was using the fresh installation of JBoss, without any changes to it, so JNDI should be on.
I have just checked with my browser and I can connect to http://localhost:1099/ (it downloads binary stream that mentions marshalling so I guess this is correct).
I have additionally killed my firewall.

Also when I "stop" the server:
cmd /c C:\jboss\bin\shutdown.bat -s jnp://localhost:1099 -S
Disconnected from server
10:42:41,346 INFO  [Server] Shutting down the server, blockingShutdown: false
10:42:41,361 INFO  [Server] Server exit(0) called
10:42:41,361 INFO  [Server] Runtime shutdown hook called, forceHalt: true
Shutdown message has been posted to the server.
Server shutdown may take a while - check logfiles for completion
10:42:41,361 INFO  [Server] JBoss SHUTDOWN: Undeploying all packages

and so on...
It works correctly.

But the application does not deploy... Do you have any other suggestions?

0
Comment actions Permalink

Adam,

Have you made any progress in finding out why your app didnt deploy?


JetBrains Devs,

We are having the same issue.  We are upgrading from Tomcat 5.5.27 to JBoss 5.1.0.GA and are having the same problem.

For us, the failure only seems to happen if running JBoss from IntelliJ and having IntelliJ deploy the application.  If we start JBoss from command line and drop in the war that IntelliJ built, it deploys fine.  We are binding to 0.0.0.0. and csa is our server which is similar to the web server component included with JBoss 5.1.0.  Were using IJ 8.1.3 and JDK 1.6.0_16.

I run JBoss from the command line using the following command:
c:\jboss-5.1.0.GA\bin\run.bat -c csa -b 0.0.0.0

My windows firewall is disabled.

On a side note, IntelliJ allows us to modify the startup script for JBoss on the Startup/Connection tab in Run/Debug Configurations.  When modifying the shutdown script and saving it, IJ changes the JNP slashes to backslashes from c:\jboss-5.1.0.GA\bin\shutdown.bat -s jnp://10.10.1.10:1099 -S to :\jboss-5.1.0.GA\bin\shutdown.bat -s jnp:\\10.10.1.10:1099 -S.  Effectively rendering a bad command.  Could that be related to this problem or is it a bug in IJ?


Any help would be appreciated.

Marc

0
Comment actions Permalink

phoeniix wrote:

Adam,

Have you made any progress in finding out why your app didnt deploy?

Unfortunatelly not. I was not able to overcome it.

My friend on the same project just started to work with IDEA (thank me Jetbrains :-)) - he set up the environment from scratch and he does not have the problem.
Please give a try if you are desperate :-)

Best regards,
Adam

0
Comment actions Permalink

Marc,
Can you try to launch the server without -b 0.0.0.0? I will do some tests later, but it is quite possible that this is causing problems.

0
Comment actions Permalink

Thanks Martin,

I switched the bind address to 10.10.1.10 and still have the same problem.


Running JBoss from the command line binding to either 0.0.0.0 or 10.10.1.10 and dropping our war built by intellij into the deploy folder works fine.

Running JBoss from intellij starts up fine but doesnt deploy the war or the exploded directory.  I have started up JBoss in IJ using the VM Parameters -Djboss.bind.address=0.0.0.0 and -Djboss.bind.address=10.10.1.10 and both modes fail to deploy the app.  If I remove the VM param so JBoss starts on 127.0.0.1 then the app deploys fine, but useless because we need it accessible from outside the server.

The only changes we made to the default JBoss structure are here:

Copied the web/ folder to csa/ in server/

csa/conf/jboss-service.xml
changed >>> in <mbean code="org.jboss.naming.NamingService" node <<<
      <!--<attribute name="Port">-1</attribute>-->
      <attribute name="Port">1099</attribute>

csa/deploy/jbossweb.sar/server.xml
added
      <Connector protocol="HTTP/1.1" port="80" address="${jboss.bind.address}"
               connectionTimeout="20000" redirectPort="8443" />

csa/deploy/
added
     website-ds.xml
renamed
     hsqldb-ds.xml to hsqldb-ds.xml.old

csa/lib/
added
     jtds-1.2.jar
     antiSqlInjectionJDbcWrapper-1.0-SNAPSHOT.jar


csa/deployers/jbossweb.deployer/web.xml
added
  <!-- =====================================================================-->
  <!-- ========================= CSA web.xml mods ==========================-->
  <!-- =====================================================================-->
    
  <!-- ========================= Production Flag ========================== -->
    <context-param>
        <param-name>isProduction</param-name>
        <param-value>false</param-value>
    </context-param>
    
  <!-- ==================== Analytics production flags ==================== -->
    <context-param>
        <param-name>hbxIsProduction</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>gaIsProduction</param-name>
        <param-value>false</param-value>
    </context-param>
    
  <!-- =========================== Web Services =========================== -->
    <context-param>
        <description>Jboss url for the policy service client</description>
        <param-name>PolicyServiceJnpUrl</param-name>
        <param-value>jnp://finlanddev.xxxxxxxxx.local:1099</param-value>
    </context-param>
    <context-param>
        <description>Jboss url for policy modification</description>
        <param-name>JBOSSURL</param-name>
        <param-value>jnp://finlanddev.xxxxxxxxx.local:1099</param-value>
    </context-param>





Do you see any problems with our setup?  Does IntelliJ 8.1.3/plugin support JBoss 5.1.0.GA?

Marc

0
Comment actions Permalink

UPDATE: A workaround for this is to run JBoss from the command line,  and setup a remote instance of JBoss in IntelliJ that connects to it.   Adding "-Xdebug  -Xrunjdwp:transport=dt_socket,address=41153,suspend=n,server=y" to  JAVA_OPTS allows me to run in debug mode.

0
Comment actions Permalink

FINAL UPDATE: I  was finally able to get JBoss running from within IntelliJ.  In Edit  Configurations... > Startup/Connection > Debug > Startup  Script: I set the bind address to 0.0.0.0 "C:\jboss-5.1.0.GA\bin\run.bat  -c csa -b 0.0.0.0" But also check Use default for the Shutdown Script:   This will start JBoss on all IP's including localhost then use the  default jnp shutdown parameter on localhost to actually shutdown the  server.

0
Comment actions Permalink

I have the similar problems.
1. the start/stop scipt will translate my "/" to "\". The only solution is specify a setting file instead write them in the textbox directly.
2. if i change the default port of jboss (every ports += 100), the intellij deploy doesn't work any more. still no solution...

0
Comment actions Permalink

Hello,

Re:

1. the start/stop scipt will translate my "/" to "\". The only solution is specify a setting file instead write them in the textbox directly.


It looks like you are using the UI incorrectly. "Startup script:" and "Shutdown script:" fields are just for the paths to the scripts, not for parameters.
There's dedicated "Parameters..." button to the right of each field.

Re:

2. if i change the default port of jboss (every ports += 100), the intellij deploy doesn't work any more.


What is your way of changing ports? From your (1) I can assume that you are passing ports configuration with a setting file via command line.
In this case, IDEA integration is unable to detect ports configuration, since it doesn't read config from the command line arguments.

What is your JBoss version? Your sentence "every ports += 100" sounds like you are using port binding set, which is available in JBoss 5 or 6.
If so, I would recommend you to choose one of the binding sets on the "Server" tab of the run configuration.

Also, you can modify JBoss configuration files to change the list of available port binding set or port base values, and in this case IDEA should be able to detect the changes.

Regards,
Michael

0
Comment actions Permalink

Hi,
if someone finds this thread and looking for solution.

I got jboss on pendrive with all configuration and had the same problem. IT was due to hardcoded run.conf which set JAVA_OPTS properties, but did not assign to this variable any other previously set. So, every time overwrite. I added $JAVA_OPTS at the end of these options and everything worked well.

0
Comment actions Permalink

I too hade the same issue and after troubleshooting this for a couple of hours I noticed that JMX access was switched off the binary I used. Since the plugin communicates with the server over JMX this made the server invisible to the plugin.

0

Please sign in to leave a comment.