Watch the Port Using and deploy packages in JBOSS

Watch the Port Using and deploy packages in JBOSS

I stayed in Ubuntu System these days.
One problem accured.

My 80 port is using when I tryed to start my jboss server. The error message is:
Server port In Use 80-Http

So I tryed to figure out which service/software is using this port.

First I install a tool
>sodu apt-get install nmap

Executing the check command
>nmap localhost

The result is as follow:
Starting Nmap 5.21 ( http://nmap.org ) at 2011-03-15 17:39 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00037s latency).
Hostname localhost resolves to 2 IPs. Only scanned 127.0.0.1
rDNS record for 127.0.0.1: localhost.localdomain
Not shown: 994 closed ports
PORT      STATE SERVICE
80/tcp    open  http
631/tcp   open  ipp
1723/tcp  open  pptp
3306/tcp  open  mysql
7070/tcp  open  realserver
45100/tcp open  unknown

So, it is http, it is apache2.

>sudo /etc/init.d/apache2 stop

Still, I have problem with these messages:

Problem One:
17:51:50,596 ERROR [Http11Protocol] Error initializing endpoint
java.net.BindException: Permission denied /0.0.0.0:80
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:504)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:175)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1029)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:683)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:821)
at org.jboss.web.tomcat.service.deployers.TomcatService.startService(TomcatService.java:313)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
at org.jboss.system.ServiceMBeanSupport.pojoStart(ServiceMBeanSupport.java:216)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Solution:
It's a fundamental Linux/Unix design choice. All ports below 1024 can only be bound by a process with "root" permissions.
So I changed my port to 8080.


Problem Two:
18:07:32,960 ERROR [BasicLazyInitializer] Javassist Enhancement failed: net.tss.app.service.store.ejb.entity.Store
java.lang.RuntimeException: java.lang.IllegalArgumentException: Can not set static javassist.util.proxy.MethodFilter field net.tss.app.service.store.ejb.entity.Store_$$_javassist_0._method_filter to org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer$1
at javassist.util.proxy.ProxyFactory.setField(ProxyFactory.java:358)
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:341)
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:314)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:273)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:162)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:183)

Solution:
That is my project problem, I have package conflicks. So I remove javassist and ongl in xwork-core.jar

Problem Three:
17:53:17,002 WARN  [JBossManagedConnectionPool] Unable to fill pool
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 1,645 milliseconds ago.  The last packet sent successfully to the server was 1,645 milliseconds ago.)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:541)
at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
at java.lang.Thread.run(Thread.java:636)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Solution:
That is connection problem. We restart the jboss server. It works fine.

你可能感兴趣的:(java,apache,Hibernate,mysql,jboss)