Meaningless Drivel is fun!*
The moose likes Tomcat and the fly likes Running the same Application(different name) giving error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Running the same Application(different name) giving error" Watch "Running the same Application(different name) giving error" New topic
Author

Running the same Application(different name) giving error

Sarada Chakrborty
Greenhorn

Joined: Sep 18, 2008
Posts: 1
Hi All,

I m new to JSF, spring and Hibernate web application. I have done a web project using JSF, Hibernate and Spring. We have to maintain the Data records which is stored in mysql db. Now there are different table is there such as example Employee Details and Company Details. So we created two seperate application o tomacat, For both Application we use same functionality except the JSP FILE Name and table name (Which is changed according to Application).

In the employee.hbm.xml

I changed the table name according to application. Two table (Company Details & Employee Details)...

Now while running the application on the tomcat server, only one application is running at a time. if we start running the Employee Application, then Company Application is giving the below error,

Error in Log:

The resourse is already in used/busy.

Interesting thing is only one Application is running at a time and other is in stop status.
Could you please help us, how to overcome the error,

Is it not possible to run both the application on different browsers.


In logs the below error is showing:

java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted.





Error on console:

The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.6.0_07\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Support Tools\;C:\Program Files\java\jdk-6u3\jre\bin\client;C:\Program Files\MySQL\MySQL Server 5.0\bin
Sep 18, 2008 12:46:58 PM org.apache.coyote.http11.Http11BaseProtocol init


Could you please give some idea to sort out the below issue. Could any one help me to run the same applications on the tomcat server. In web.xml what changes is needed so we can run both the application.


Thanks in advance.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there and welcome to Javaranch!

Some questions for you:

* Firstly, are the applications deployed as WARs?
* Is there a reason why you decided to split them into two applications? It doesn't seem like that was necessary..

Some comments:

The console states
The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.6.0_07\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Support Tools\;C:\Program Files\java\jdk-6u3\jre\bin\client;C:\Program Files\MySQL\MySQL Server 5.0\bin
Sep 18, 2008 12:46:58 PM org.apache.coyote.http11.Http11BaseProtocol init


This is actually a red herring, the apache tomcat native library is simply an extra module you can have installed for enhanced performance.

Now the error message in the log is indicating that a socket is being used for a 2nd time. Now I'm not sure what socket that is, maybe the log file states that somewhere? Can you post some more of the log around the error?

You probably have something in both of your applications that are talking to the same socket, you'll need to change the configuration of one of those (again please note that splitting this functionality into 2 applications may not really be necessary).


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Running the same Application(different name) giving error
 
Similar Threads
java.lang.NoClassDefFoundError: java/util/concurrent/ConcurrentSkipListMap
Tomcat 5.5 SEVERE: Error listenerStart
ant not recognized...
java.lang.NullPointerException
trayicon