You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by laxmiraghu <la...@yahoo.com> on 2009/05/18 09:43:43 UTC

Unable to connect to mysql

HI,

I developed an application using jetspeed as the portal server and mysql as
backend DB.

Everything was just fine. Recently i modified my /etc/my.cnf file to provide
remote access to my DB from a remote machine. After that, my portal server
is unable to connect to mysql db lying in the same machine. 

If i undo changes to /etc/my.cnf file, i can't provide remote access to my
db.

Here is the stack trace:

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'PlatformConfigurator' defined in ServletContext resource
[/WEB-INF/assembly/boot/datasource.xml]: Invocation of init method failed;
nested exception is org.apache.ojb.broker.metadata.MetadataException: Could
not get the metadata from the given datasource
Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not get
the metadata from the given datasource
        at
org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSource(JdbcMetadataUtils.java:277)
        at
org.apache.jetspeed.components.rdbms.ojb.DatabasePlatformConfigurator.init(DatabasePlatformConfigurator.java:70)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1241)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1206)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at
org.apache.jetspeed.components.SpringComponentManager.start(SpringComponentManager.java:237)
        at
org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:122)
        at
org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:159)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Communications link failure

"catalina.out" 384L, 30952C

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
        at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
        at
org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSource(JdbcMetadataUtils.java:261)
        ... 44 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure

Last packet sent to the server was 0 ms ago.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
        at
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
        at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
        at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
        at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
        at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
        ... 46 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:209)
        at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
        at
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
        ... 59 more
FATAL: Jetspeed: init() failed:
org.apache.jetspeed.exception.JetspeedException: Jetspeed Initialization
exception!
        at
org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:144)
        at
org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:159)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)


Please help to resolve this problem. IT's very urgent.

THank you.

-- 
View this message in context: http://www.nabble.com/Unable-to-connect-to-mysql-tp23592587p23592587.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Unable to connect to mysql

Posted by Vivek Kumar <fi...@gmail.com>.
It is clearly and mysql problem.
Try  to change database url from 127.0.0.1 to localhost in jetspeed.xml

laxmiraghu wrote:
> One more thing observed is:
>
> on the command prompt following works fine:
>
> mysql -u root -h localhost -p
>
> mysql -u root -h ip_of_my_m/c -p
>
> However, following doesn't work.
>
> mysql -u root -h 127.0.0.1 -p
>
> ends in following exception:
>
> ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial
> communication packet', system error: 111
>
> Can anybody please help to resolve this issue asap? It will be a GREAT help
> to us.
>
> THanks.
>
>
> laxmiraghu wrote:
>   
>> HI,
>>
>> I developed an application using jetspeed as the portal server and mysql
>> as backend DB.
>>
>> Everything was just fine. Recently i modified my /etc/my.cnf file to
>> provide remote access to my DB from a remote machine. After that, my
>> portal server is unable to connect to mysql db lying in the same machine. 
>>
>> If i undo changes to /etc/my.cnf file, i can't provide remote access to my
>> db.
>>
>> Here is the stack trace:
>>
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean with name 'PlatformConfigurator' defined in ServletContext resource
>> [/WEB-INF/assembly/boot/datasource.xml]: Invocation of init method failed;
>> nested exception is org.apache.ojb.broker.metadata.MetadataException:
>> Could not get the metadata from the given datasource
>> Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not get
>> the metadata from the given datasource
>>         at
>> org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSource(JdbcMetadataUtils.java:277)
>>         at
>> org.apache.jetspeed.components.rdbms.ojb.DatabasePlatformConfigurator.init(DatabasePlatformConfigurator.java:70)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1241)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1206)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>         at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>         at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>>         at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>>         at
>> org.apache.jetspeed.components.SpringComponentManager.start(SpringComponentManager.java:237)
>>         at
>> org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:122)
>>         at
>> org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:159)
>>         at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
>>         at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
>>         at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
>>         at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
>>         at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
>>         at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
>>         at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
>>         at
>> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
>>         at
>> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
>>         at
>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
>>         at
>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
>>         at
>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>>         at
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
>>         at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
>>         at
>> org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>>         at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>>         at
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>>         at
>> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>>         at
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
>> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
>> PoolableConnectionFactory (Communications link failure
>>
>> "catalina.out" 384L, 30952C
>>
>> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
>> PoolableConnectionFactory (Communications link failure
>>
>> Last packet sent to the server was 0 ms ago.)
>>         at
>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
>>         at
>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>>         at
>> org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSource(JdbcMetadataUtils.java:261)
>>         ... 44 more
>> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
>> Communications link failure
>>
>> Last packet sent to the server was 0 ms ago.
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>         at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
>>         at
>> com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
>>         at
>> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
>>         at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
>>         at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>         at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
>>         at
>> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>>         at
>> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>>         at
>> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>>         at
>> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
>>         at
>> org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
>>         at
>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
>>         ... 46 more
>> Caused by: java.net.ConnectException: Connection refused
>>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>>         at
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>>         at java.net.Socket.connect(Socket.java:519)
>>         at java.net.Socket.connect(Socket.java:469)
>>         at java.net.Socket.<init>(Socket.java:366)
>>         at java.net.Socket.<init>(Socket.java:209)
>>         at
>> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
>>         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
>>         at
>> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
>>         ... 59 more
>> FATAL: Jetspeed: init() failed:
>> org.apache.jetspeed.exception.JetspeedException: Jetspeed Initialization
>> exception!
>>         at
>> org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:144)
>>         at
>> org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:159)
>>         at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
>>         at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
>>         at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
>>
>>
>> Please help to resolve this problem. IT's very urgent.
>>
>> THank you.
>>
>>
>>     
>
>   


Re: Unable to connect to mysql

Posted by laxmiraghu <la...@yahoo.com>.
One more thing observed is:

on the command prompt following works fine:

mysql -u root -h localhost -p

mysql -u root -h ip_of_my_m/c -p

However, following doesn't work.

mysql -u root -h 127.0.0.1 -p

ends in following exception:

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial
communication packet', system error: 111

Can anybody please help to resolve this issue asap? It will be a GREAT help
to us.

THanks.


laxmiraghu wrote:
> 
> HI,
> 
> I developed an application using jetspeed as the portal server and mysql
> as backend DB.
> 
> Everything was just fine. Recently i modified my /etc/my.cnf file to
> provide remote access to my DB from a remote machine. After that, my
> portal server is unable to connect to mysql db lying in the same machine. 
> 
> If i undo changes to /etc/my.cnf file, i can't provide remote access to my
> db.
> 
> Here is the stack trace:
> 
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'PlatformConfigurator' defined in ServletContext resource
> [/WEB-INF/assembly/boot/datasource.xml]: Invocation of init method failed;
> nested exception is org.apache.ojb.broker.metadata.MetadataException:
> Could not get the metadata from the given datasource
> Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not get
> the metadata from the given datasource
>         at
> org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSource(JdbcMetadataUtils.java:277)
>         at
> org.apache.jetspeed.components.rdbms.ojb.DatabasePlatformConfigurator.init(DatabasePlatformConfigurator.java:70)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1241)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1206)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>         at
> org.apache.jetspeed.components.SpringComponentManager.start(SpringComponentManager.java:237)
>         at
> org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:122)
>         at
> org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:159)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (Communications link failure
> 
> "catalina.out" 384L, 30952C
> 
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (Communications link failure
> 
> Last packet sent to the server was 0 ms ago.)
>         at
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
>         at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>         at
> org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSource(JdbcMetadataUtils.java:261)
>         ... 44 more
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
> 
> Last packet sent to the server was 0 ms ago.
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
>         at
> com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
>         at
> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
>         at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
>         at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
>         at
> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>         at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>         at
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>         at
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
>         at
> org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
>         at
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
>         ... 46 more
> Caused by: java.net.ConnectException: Connection refused
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at java.net.Socket.<init>(Socket.java:366)
>         at java.net.Socket.<init>(Socket.java:209)
>         at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
>         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
>         at
> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
>         ... 59 more
> FATAL: Jetspeed: init() failed:
> org.apache.jetspeed.exception.JetspeedException: Jetspeed Initialization
> exception!
>         at
> org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:144)
>         at
> org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:159)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
> 
> 
> Please help to resolve this problem. IT's very urgent.
> 
> THank you.
> 
> 

-- 
View this message in context: http://www.nabble.com/Unable-to-connect-to-mysql-tp23592587p23593189.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org