If you are running your JEE application on these servers, you surely will face this problem; either the oracle 10g server or the JBoss 4.2 won't work because they both are using the same port (8080).
Solution is evident : change the http port of one of them, so here I'll explain both methodes, so you can chose what's more appropriate. I chosed to change the Oracle one because am running JBoss on eclipse and I don't want to mess up the IDE config.
Oracle 10g XE
This should be done using sql plus commands, I have no idea how to call the sqlplus command line on Linux distributions (although I should do), but I think it's as simple as in Windows environment :
0 - Make sure your Oracle 10g server is running (OracleServiceXE and OracleXETNSListener are at least running, and you can ensure it by taking a look at Services in Control Panel)
1 - Start
2 - Run
3 - type : sqlplus /nolog
3' - you should receive :
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 26 10:40:44 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
on your console window.
4 - type : connect
4' - you'll get : Enter user-name:
5- type : system
6 - you'll be asked for the password, type it, it won't be visible so pay attention while typing.
6' - if your server is not running you'll get a Protocol error, if you have typed a bad password, it will show you a convenient error message, otherwise, you'll get a "Connected." message.
7 - Once connected, you can throw it the change port command. Assuming the port number is PORT_NUMBER, this is what you should enter :
Exec DBMS_XDB.SETHTTPPORT( PORT_NUMBER );
7' - you'll get : PL/SQL procedure successfully completed.
8 - Enter "quit" and go smell your java application.
JBoss 4.2 AS
This one is easier to change, just go to your JBoss directory, and find this file :
<JBoss_directory>\server\default\deploy\jboss-web.deployer\server.xml
Open it, your eyes will just focus on this part of code automatically :
You know what should be done then. Just don't forget to restart your server.
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="2000" disableUploadTimeout="true" />
If you are still facing an error like this one :
ERROR [Naming] Could not start on port 1099 java.net.BindException: Address already in use: JVM_Bindthen you should also change the port used for JNDI, (It seems that Oracle use the same port too). The configuration file is this one :
<JBoss_directory>\server\default\conf\JBoss-Service.xml
just change the value here :
<!-- The listening port for the bootstrap JNP service. Set this to -1and that's it.
to run the NamingService without the JNP invoker listening port. -->
<attribute name="Port">1099</attribute>
Eclipse
Last episode is here, in eclipse JBoss server pluggin. For mysterious reasons, your server still doesn't want to work, (even it's doing quiet well outside eclipse). So maybe you should check the xml configuration files through the plugin (I think it's all about cache). I have nothing to comment, just look at the pic and you'll get all what you have to do.
| Change JNDI port value from Eclipse JBoss Fast View |
Now, I think game is over!
0 comments:
Post a Comment