This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 228619 - Error deploying to JBoss 7.2.0
Summary: Error deploying to JBoss 7.2.0
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: JBoss (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 13:24 UTC by Jiri Skrivanek
Modified: 2013-04-26 02:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log. (79.08 KB, text/plain)
2013-04-16 13:24 UTC, Jiri Skrivanek
Details
JBoss server log. (4.38 KB, text/plain)
2013-04-16 13:25 UTC, Jiri Skrivanek
Details
Stack trace. (10.06 KB, text/plain)
2013-04-19 10:45 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2013-04-16 13:24:46 UTC
Created attachment 133527 [details]
IDE log.

I downloaded JBoss 7.2.0 from http://olex.openlogic.com/packages/jboss and after deployment IDE throws some exceptions. To reproduce:

- register JBoss 7.2.0 server
- create Java EE 6 web project
- run project but it fails with exceptions (see below and attached files)

java.lang.ClassCastException: org.netbeans.modules.j2ee.jboss4.JBTargetModuleID cannot be cast to org.jboss.as.ee.deployment.spi.TargetModuleIDImpl
	at org.jboss.as.ee.deployment.spi.DeploymentManagerTarget.start(DeploymentManagerTarget.java:106)
[catch] at org.jboss.as.ee.deployment.spi.DeploymentWorker.run(DeploymentWorker.java:67)
Comment 1 Jiri Skrivanek 2013-04-16 13:25:07 UTC
Created attachment 133528 [details]
JBoss server log.
Comment 2 cheesus 2013-04-16 19:13:55 UTC
> Could not connect to remote://10.163.21.96:9999. The connection timed out

Are you sure your JBoss is listening to this address ?
(AS7 default is to only listen to localhost)

(If this is the case, still, a better error should be thrown of course)
Comment 3 Petr Hejl 2013-04-16 19:44:04 UTC
Jirko I saw this on my machine as well. Although it does not look like that the problem was with hostname and /etc/hosts settings.

It looks like they changed something in JBoss and make it more fragile to this kind of errors.

Also check the last comment here: https://community.jboss.org/message/796586
Comment 4 cheesus 2013-04-16 20:02:03 UTC
> Also check the last comment here: https://community.jboss.org/message/796586

In this post, they added the hostname to the 127.0.0.1. Same thing.

If yours points to the ethernet card address, connection will fail,
as AS7 by default only listens to 127.0.0.1.

(AS7 is meant to be "secured by default", i.e. unlike previous versions, you
don't have to spend hours disabling all dangerous things, but now you need
to enable those you want&need&understand...)
Comment 5 Petr Hejl 2013-04-17 07:02:19 UTC
Although I'm sending URI with "localhost" to the getDeploymentManager (the one in JBoss) it is actually querying a uri parameter for serverHost. If it is null it does InetAddress.getLocalHost().getHostAddress().

InetAddress.getLocalHost() is based on hostname so if the hostname is mapped only to physical address one can easily get this. I'll try to use the parameter. Things might be better with it I guess.
Comment 6 Petr Hejl 2013-04-17 07:50:04 UTC
Fixed in web-main default 65ec9db20085 and javaee7 b69087d68f07.

I would think this is bug in jboss as mechanism to determine where to listen by default is different from mechanism where to connect by default.
Comment 7 Quality Engineering 2013-04-18 02:19:40 UTC
Integrated into 'main-golden', will be available in build *201304172301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/65ec9db20085
User: Petr Hejl <phejl@netbeans.org>
Log: #228619 - Error deploying to JBoss 7.2.0
Comment 8 Jiri Skrivanek 2013-04-19 10:44:42 UTC
Still the same with build web-main-javaee7-244-on-20130419.
Comment 9 Jiri Skrivanek 2013-04-19 10:45:10 UTC
Created attachment 133590 [details]
Stack trace.
Comment 10 Petr Hejl 2013-04-19 10:50:09 UTC
This looks like IP misconfiguration. What is your /etc/hosts, hostname and interfaces?
Comment 11 Petr Hejl 2013-04-22 13:20:03 UTC
Ok, I've found the cause. The root cause is still the same as described in comment #5. We just need to pass proper URI to underlying JB factory - in certain cases the URI was wrong.

Fixed in web-main ff0111acd7c5 and javaee7 f22c798c7f43.

Please verify.
Comment 12 Quality Engineering 2013-04-23 00:08:13 UTC
Integrated into 'releases', will be available in build *201304222201* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/b69087d68f07
User: Petr Hejl <phejl@netbeans.org>
Log: #228619 - Error deploying to JBoss 7.2.0
Comment 13 Quality Engineering 2013-04-23 02:11:22 UTC
Integrated into 'main-golden', will be available in build *201304222301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b69087d68f07
User: Petr Hejl <phejl@netbeans.org>
Log: #228619 - Error deploying to JBoss 7.2.0
Comment 14 Quality Engineering 2013-04-25 00:18:26 UTC
Integrated into 'releases', will be available in build *201304242201* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/f22c798c7f43
User: Petr Hejl <phejl@netbeans.org>
Log: #228619 - Error deploying to JBoss 7.2.0
Comment 15 Quality Engineering 2013-04-26 02:45:34 UTC
Integrated into 'main-golden', will be available in build *201304252301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f22c798c7f43
User: Petr Hejl <phejl@netbeans.org>
Log: #228619 - Error deploying to JBoss 7.2.0