Problems connectig my webservice to my mysql database.

Hi,
I am trying to connect a webservice to a mysql database. I am using sun application server 8.1 and Mysql 4.1.
I have been using the application servers examples to achieve my goals thus far. I have made the following progress.
- I have got a simple jdbc web application on the application server to access my mysql database.
- I have got a web service on the application server to work properly, in regards to performing a simple rpc method such as 'sayHello'.
- I now want my webservice to have similar functionality to the jdbc application. A simple query or update to the database installed on the application server invoked from the webservice deployed on the application server.
I have been having difficulty in achieveing this. I don't understand why I can't get this to work as i can achieve access to the database from the jdbc app. I am getting the following errors on the application server log:
[#|2005-03-01T14:22:59.739+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
retrieving_initial_context...|#]
[#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
retrieved_initial_context_successfully|#]
[#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
recording_the_greeting...|#]
[#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
getting_datasource...|#]
[#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
got_datasource_successfully|#]
[#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
getting_connection...|#]
[#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
got_connection_successfully|#]
[#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
getting_statement...|#]
[#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
got_statement_successfully|#]
[#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
executing_query...|#]
[#|2005-03-01T14:22:59.900+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
could_not_interact_with_db|#]
[#|2005-03-01T14:22:59.910+0000|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=16;|
excpetion: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.IOException
MESSAGE: An established connection was aborted by the software in your host machine
STACKTRACE:
java.io.IOException: An established connection was aborted by the software in your host machine
     at sun.nio.ch.SocketDispatcher.read0(Native Method)
     at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
     at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
     at sun.nio.ch.IOUtil.read(IOUtil.java:206)
     at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
     at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:75)
     at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:66)
     at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:75)
     at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:94)
     at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:122)
     at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2292)
     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
     at com.mysql.jdbc.Connection.execSQL(Connection.java:2291)
     at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
     at com.mysql.jdbc.Statement.executeQuery(Statement.java:1159)
     at goodbyeservice.GoodbyeImpl.sayGoodbye(Unknown Source)
     at goodbyeservice.GoodbyeIF_Tie.invoke_sayGoodbye(GoodbyeIF_Tie.java:54)
     at goodbyeservice.GoodbyeIF_Tie.processingHook(GoodbyeIF_Tie.java:124)
     at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:321)
     at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
     at com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     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:324)
     at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
     at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
     at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
     at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
     at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
** END NESTED EXCEPTION **
I can't think of what the problem may be other then the following issues:
- the mysql database would allow access from the jdbc application as it is seen as a local process whereas it may not for the webservice as it is seen as a remote process???
- I may need to utilize a different datasource class to give the webservice access rights?
Any help or advice in how this problem might be resolved or even just what it is would help me greatly. Thanks for you time in advance.
Alvee

I am getting this problem from java nio server to java nio client. I get it intermittently on windows. Have not tried other os's. It almost seems like some kind of race condition as my unit test case was passing for the past few weeks and when i changed some code today, it started failing intermittently with this error.
IOException: An established connection was aborted by the software in your host machine

Similar Messages

  • Problem connecting a webservice to a mysql database

    Hi,
    I am trying to connect a webservice to a mysql database. I am using sun application server 8.1 and Mysql 4.1.
    I have been using the application servers examples to achieve my goals thus far. I have made the following progress.
    - I have got a simple jdbc web application on the application server to access my mysql database.
    - I have got a web service on the application server to work properly, in regards to performing a simple rpc method such as 'sayHello'.
    - I now want my webservice to have similar functionality to the jdbc application. A simple query or update to the database installed on the application server invoked from the webservice deployed on the application server.
    I have been having difficulty in achieveing this. I don't understand why I can't get this to work as i can achieve access to the database from the jdbc app. I am getting the following errors on the application server log:
    [#|2005-03-01T14:22:59.739+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieving_initial_context...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieved_initial_context_successfully|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    recording_the_greeting...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_datasource...|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_datasource_successfully|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_connection...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_connection_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_statement...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_statement_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    executing_query...|#]
    [#|2005-03-01T14:22:59.900+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    could_not_interact_with_db|#]
    [#|2005-03-01T14:22:59.910+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    excpetion: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.IOException
    MESSAGE: An established connection was aborted by the software in your host machine
    STACKTRACE:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
    at sun.nio.ch.IOUtil.read(IOUtil.java:206)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:75)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:66)
    at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:75)
    at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(Re adAheadInputStream.java:94)
    at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:122)
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2292)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2291)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
    at com.mysql.jdbc.Statement.executeQuery(Statement.java:1159)
    at goodbyeservice.GoodbyeImpl.sayGoodbye(Unknown Source)
    at goodbyeservice.GoodbyeIF_Tie.invoke_sayGoodbye(GoodbyeIF_Tie.java:54)
    at goodbyeservice.GoodbyeIF_Tie.processingHook(GoodbyeIF_Tie.java:124)
    at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:321)
    at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate. java:443)
    at com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterCha in.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.ja va:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:13 2)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.jav a:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    ** END NESTED EXCEPTION **
    I can't think of what the problem may be other then the following issues:
    - the mysql database would allow access from the jdbc application as it is seen as a local process whereas it may not for the webservice as it is seen as a remote process???
    - I may need to utilize a different datasource class to give the webservice access rights?
    Any help or advice in how this problem might be resolved or even just what it is would help me greatly. Thanks for you time in advance.
    Alvee

    Hi,
    I am trying to connect a webservice to a mysql database. I am using sun application server 8.1 and Mysql 4.1.
    I have been using the application servers examples to achieve my goals thus far. I have made the following progress.
    - I have got a simple jdbc web application on the application server to access my mysql database.
    - I have got a web service on the application server to work properly, in regards to performing a simple rpc method such as 'sayHello'.
    - I now want my webservice to have similar functionality to the jdbc application. A simple query or update to the database installed on the application server invoked from the webservice deployed on the application server.
    I have been having difficulty in achieveing this. I don't understand why I can't get this to work as i can achieve access to the database from the jdbc app. I am getting the following errors on the application server log:
    [#|2005-03-01T14:22:59.739+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieving_initial_context...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieved_initial_context_successfully|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    recording_the_greeting...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_datasource...|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_datasource_successfully|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_connection...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_connection_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_statement...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_statement_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    executing_query...|#]
    [#|2005-03-01T14:22:59.900+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    could_not_interact_with_db|#]
    [#|2005-03-01T14:22:59.910+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    excpetion: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.IOException
    MESSAGE: An established connection was aborted by the software in your host machine
    STACKTRACE:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
    at sun.nio.ch.IOUtil.read(IOUtil.java:206)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:75)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:66)
    at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:75)
    at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(Re adAheadInputStream.java:94)
    at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:122)
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2292)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2291)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
    at com.mysql.jdbc.Statement.executeQuery(Statement.java:1159)
    at goodbyeservice.GoodbyeImpl.sayGoodbye(Unknown Source)
    at goodbyeservice.GoodbyeIF_Tie.invoke_sayGoodbye(GoodbyeIF_Tie.java:54)
    at goodbyeservice.GoodbyeIF_Tie.processingHook(GoodbyeIF_Tie.java:124)
    at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:321)
    at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate. java:443)
    at com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterCha in.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.ja va:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:13 2)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.jav a:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    ** END NESTED EXCEPTION **
    I can't think of what the problem may be other then the following issues:
    - the mysql database would allow access from the jdbc application as it is seen as a local process whereas it may not for the webservice as it is seen as a remote process???
    - I may need to utilize a different datasource class to give the webservice access rights?
    Any help or advice in how this problem might be resolved or even just what it is would help me greatly. Thanks for you time in advance.
    Alvee

  • Problems with UD Connect to a MySQL database

    Hi SAP BI experts,
    I am trying to extract data from a table in a mysql Database to SAP BI 7 using UD Connect. I have followed the instructions at http://www.bi-expertonline.com/downloads/Schroeder0604.doc . However, I get an error as soon as I try to create a UD Connect Data Source to an InfoSource using "Create BW DataSource with UDConnect" from the Extras menu. I can set up the RFC destination as well as the UD connect source. Regarding the UD Connect source object I get an error message "RSSDK|100|Connection could not be established". I already checked if my settings in the connector container service of the Visual Administrator are correct. They are. I have tried to access the data using a simple java programme and it worked fine. My configuration properties are:
    DriverName       com.mysql.jdbc.driver
    Password         xxxxxxxxxx
    URL                 jdbc:mysql://brainsapgw:3306/bi_test
    UserName        sap
    Does anyone have some hints for me what could have gone wrong with it? As far as I can see, the properties should be fine as they work with a normal java programme.
    Thanks in advance
    Martin

    Hi SAP experts,
    it's now working. The problem was that I provided "com.mysql.jdbc.driver" as Driver Name instead of "com.mysql.jdbc.Driver".
    Cheers
    Martin

  • Problem connecting my webservice to mysql database

    Hi,
    I am trying to connect a webservice to a mysql database. I am using sun application server 8.1 and Mysql 4.1.
    I have been using the application servers examples to achieve my goals thus far. I have made the following progress.
    - I have got a simple jdbc web application on the application server to access my mysql database.
    - I have got a web service on the application server to work properly, in regards to performing a simple rpc method such as 'sayHello'.
    - I now want my webservice to have similar functionality to the jdbc application. A simple query or update to the database installed on the application server invoked from the webservice deployed on the application server.
    I have been having difficulty in achieveing this. I don't understand why I can't get this to work as i can achieve access to the database from the jdbc app. I am getting the following errors on the application server log:
    [#|2005-03-01T14:22:59.739+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieving_initial_context...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    retrieved_initial_context_successfully|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    recording_the_greeting...|#]
    [#|2005-03-01T14:22:59.789+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_datasource...|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_datasource_successfully|#]
    [#|2005-03-01T14:22:59.799+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_connection...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_connection_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    getting_statement...|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    got_statement_successfully|#]
    [#|2005-03-01T14:22:59.819+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    executing_query...|#]
    [#|2005-03-01T14:22:59.900+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    could_not_interact_with_db|#]
    [#|2005-03-01T14:22:59.910+0000|INFO|sun-appserver-pe8.1|javax.enterprise.syste m.stream.out|_ThreadID=16;|
    excpetion: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.IOException
    MESSAGE: An established connection was aborted by the software in your host machine
    STACKTRACE:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
    at sun.nio.ch.IOUtil.read(IOUtil.java:206)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:75)
    at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:66)
    at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:75)
    at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(Re adAheadInputStream.java:94)
    at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:122)
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)
    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2292)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2291)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
    at com.mysql.jdbc.Statement.executeQuery(Statement.java:1159)
    at goodbyeservice.GoodbyeImpl.sayGoodbye(Unknown Source)
    at goodbyeservice.GoodbyeIF_Tie.invoke_sayGoodbye(GoodbyeIF_Tie.java:54)
    at goodbyeservice.GoodbyeIF_Tie.processingHook(GoodbyeIF_Tie.java:124)
    at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:321)
    at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate. java:443)
    at com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterCha in.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.ja va:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:13 2)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.ja va:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.jav a:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    ** END NESTED EXCEPTION **
    I can't think of what the problem may be other then the following issues:
    - the mysql database would allow access from the jdbc application as it is seen as a local process whereas it may not for the webservice as it is seen as a remote process???
    - I may need to utilize a different datasource class to give the webservice access rights?
    Any help or advice in how this problem might be resolved or even just what it is would help me greatly. Thanks for you time in advance.
    Alvee

    The driver is in right place
    Originally I placed him in wrong directory and got an error, indicationg, that Driver class is not found, but then I corrected it, The problem is in connection to database - it doesn't work.
    I tired to load the same driver into Netbeans and could easyli create a connection to database, but I get it not working ander Sun Application server

  • Mysql database, counting records

    Hi!
    I have to store measured data to MySQL database. During this process I would like to count a number of records in a database table. It is also necessary to filter records. I'm using the SQL statement as follows:
    SELECT COUNT (fieldname) AS cnt FROM table WHERE condition
    Because I haven't got any result I've created a small database "mysweetdb" and table "icecream" to test my VIs (see picture bellow).
    The VI is attached. The result of counting is a 2D array (DB Tools Fetch Recordset Data.VI output) with one element (one row and one column). This element contains no data.
    I usually don't give up easily so I've created a similar MS ACCESS database and counted data in it. I've got a correct answer: 3. So it might be possible that there is something wrong with MySQL driver. But I've created a small Delphi project and I've counted records in MySQL database and MS ACCESS database. Both results were correct.
    Can anyone explain where is the problem in communication between LabView and MySQL database?
    Versions: XAMPP for Windows 1.7.3, LabView Developer Suite 2010 SP1, MySQL 5.1 ODBC driver
    Thanks in advance for your suggestions.
    Attachments:
    Count records.vi ‏19 KB

    ContDivConsult,
    thank you for your answer. An updated version of my VI is attached. It uses two options: LabSQL library and DB Connectivity Toolkit. LabSQL gives correct results.
    Regards,
    Ljubo.
    Attachments:
    Count records.vi ‏25 KB

  • Problem with connection in Mysql database in struts application

    Helllo
    i've just started learning struts for my new project where i'm having problem in accessing mysql database
    the datasource being defined in struts-config.xml is as follows:
    <data-sources >
        <data-source type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
          <set-property property="driverClassName" value="com.mysql.jdbc.Driver" />
          <set-property property="user" value="root" />
          <set-property property="password" value="" />
          <set-property property="minCount" value="" />
          <set-property property="maxCount" value="" />
          <set-property property="description" value="A" />
          <set-property property="url" value="jdbc:mysql:///dnbotind_nbotdb" />
          <set-property property="readOnly" value="false" />
          <set-property property="autoCommit" value="true" />
          <set-property property="loginTimeout" value="" />
        </data-source>
      </data-sources>as i run the application
    it gives the errors HTTP status 404-Servlet action is not available
    Thx in advance

    student-java wrote:
    it gives the errors HTTP status 404-Servlet action is not availableThis is unrelated to the datasource configuration.
    HTTP 404 is a "Page not found" error. The request URL is simply wrong. Either there's a typo in the URL, or there is a typo in the servlet mapping, or the servlet is not there where you think.

  • Strange problem with MySQL database

    Hello,
    I'm totally puzzled by a strange error occurring with PHP/MySQL on my website... I hope someone has got an idea of what's going on and can let me know.
    In short, I have a MySQL database set up on the remote server where the website is hosted. Some pages of my website access this database with PHP.
    If the website is viewed with a browser in Windows (Firefox), it works well, the database data appear on the pages.
    If the website is viewed with a browser on Mac OS (Firefox, Safari), it doesn't work: the database isn't accessed, I get no error, just everything on the page below my PHP code is missing.
    I've attached two screenshots to show this. The website URL is: http://www.cerc.co.uk/CERC/v02/
    The pages were this occurs are: the home page (index.php and alternative index2.php), the Abous us/News page and the About us/News/Archives page.
    I really don't get where my mistake is. I would like to keep the remote server connexion details outside the root folder, but I guess that if there is no solution to this problem, then I'll have to move it back (I think it might have worked like that).
    Thanks in advance for any comment,
    Emilie
    More details
    I'm using DW CS4 on Windows XP emulated via VMware on Mac OS 10.5 (don't ask why, I wasn't given any choice). I've set up a localhost server on XP via XAMP and the news database is also there.
    Because I'm currently flipping often between the testing server and the remote server, I quickly got fed up to change all the time the connexion mode to the database (localhost or remote server) and have to resynchronise the files each time. Hence I decided to automate a bit the way the database is connected to.
    1. These 4 HTML pages with PHP code have got the below two lines when the PHP code starts:
    $pathpfx = "../.."; // see mysqlconnexion.php
    include('assets_design/php/mysqlconnexion.php');
    2. mysqlconnexion.php (see code below) calls a "connexion" file (in PHP) depending on the value of one parameter ($conxchoice). If $conxchoice = 1, the "connexion" file on the localhost is called. If $conxchoice = 2, the "connexion" file on the remote server is called. I've stored the appropriate version of mysqlconnexion.php on the localhost and the remote server (and I have checked it a million of times, they're in the right place).
    <?php
    // This code is called by and therefore included in the code of some PHP pages,
    // independently of where the pages are located within the website folder.
    // - Connexion to local server: I couldn't get the function include_once to work
    //   with a relative path, hence the use of an absolute path.
    // - Connexion to host server: I couldn't get the function include_once to work
    //   with an absolute path, hence the use of a relative path. This leads to the
    //   following problem: the path of conxsrv.php needs to be adapted to the
    //   position of the calling PHP page within the website, in order for
    //   conxsrv.php to be found on the server (it is located outside the website
    //   root folder). The variable $pathpfx is used for this purpose.
    $conxchoice = 2; // connect to 1 = testing server, 2 = host server
    // Connexion to database
    if ( $conxchoice == 1 )
    { include_once('C:\xampp\htdocs\CERC\assets_testing_server_only\conxloc.php'); }
    if ( $conxchoice == 2 )
    { include_once("$pathpfx/cgi-bin/sqlconx/conxsrv.php"); }
    ?>
    I would guess that a first hint of solution lies in the comment block, but I've really tried everything I could think of to work with relative path/absolute path respectively, unsuccessfully.
    3. The "connexion" file looks like:
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_conx = "aaa";
    $database_conx = "bbb";
    $username_conx = "ccc";
    $password_conx = "ddd";
    $conx = mysql_pconnect($hostname_conx, $username_conx, $password_conx) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>
    With aaa, bbb, ccc and ddd the appropriate value depending on the file. The # lines were introduced by DW when these files were created (I've then changed the variable names and moved the files to another place).
    Screenshots

    Well, my question has actually not been answered yet but the problem, as strangely as it appeared, has now disappeared. Best but scariest of all, I didn't do anything. Weird.
    Hope it never comes back,
    Emilie

  • Any problem with a single MySQL database used on more than one site?

    I have a set of multiple sites hosted separately I'm working on. I'd like to set up a PHP/MySQL database on one site, and be able to pull data from it for completely separate sites. Seems like it shouldn't be a problem. Are there any problems with doing this I need to be aware of?

    I've set up databases on three different hosts, and in all cases I could access the databases from outside the domain of the site itslef.  GoDaddy is one of them, they used to restrict it, but now they give you the option when setting up a new database on your account.

  • MySQL database - Recordset's echoing problem

    Gary, David & any other PHP wizards, listen up -
    Today I decided to use a MySQL database to hold my articles
    in, and then
    call them with a recordset when applicable. Everything works
    really, really
    nicely except for one thing.
    If you go here:
    http://sourtea.com/articles2.php
    And select "Read this article" for any of the articles,
    scroll down to the
    bottom where the comment form is and you'll see some PHP code
    being
    echo'ed - which isn't supposed to be.
    I've noticed in IE - it's always displayed with all articles,
    but on
    Firefox, it seems to only happen with the first article you
    open up, then
    all the others are fine.
    I'm calling the recordsets inside of my php cases, for
    example:
    <?php
    break;
    case 10:
    ?>
    <?php echo $row_getArticles['textfields']; ?>
    <?php
    break;
    case 20:
    ?>
    And so on.
    Now, everything in the "textfields" row is the physical HTML
    and PHP code
    that will write and display the article and the comment form.
    It seems that something is getting scrambled, or that I need
    to write the
    PHP code differently inside the table...
    Help?
    Thanks for your time,
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Web Dev Articles, Photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================

    Hi Joe -
    I did cut and paste the code from DW into the table. I just
    finished up,
    actually, with another solution. I entered the code for the
    comment form
    into a .txt file, and used it as a PHP include for the
    articles.
    Also, for the action of the form (since it's the same form
    being used for
    three different pages) - I set a variable when it calls a
    certain Recordset,
    and then did an "if, elseif" statement inside the .txt file
    where it will
    echo out the appropriate page, depending upon which article
    the user is at.
    For example (from my code):
    <form id="contact_form" action="articles.php?ref=<?php
    if($var == 10) { echo
    '10'; } elseif($var == 20) { echo '20'; } elseif($var == 30)
    { echo '30'; }
    ?>" method="post">
    That's was really the only problem I had to overcome because
    I'm using the
    same form for all three articles (assigning the proper
    action).
    Thanks for the help, Joe - though, I'm not sure if your
    suggestion would
    have worked! Maybe I'll try it sometime...
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Web Dev Articles, Photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]...
    > On Wed 30 Aug 2006 02:08:30p, Shane H wrote in
    macromedia.dreamweaver:
    >
    >> Thanks for the prompt reply. Is there a way around
    this (e.g., being
    >> able to include the PHP code in the row)?
    >
    > Is the PHP code being pulled in from the database? I'm
    not where I can
    > test it right now, but I believe that it won't be
    executed. The only way
    > would be to have it in the page itself.
    >
    > For example:
    >
    > <input
    > name="namefield"
    > class="contactfield"
    > id="namefield"
    > value="&lt;?php if(isset($_POST['namefield'])) echo
    htmlentities($_POST
    > ['namefield']);?&gt;"
    > tabindex="1"
    > accesskey="1"
    > type="text">
    >
    > You can't have that in the data. You could do this:
    >
    > <input
    > name="namefield"
    > class="contactfield"
    > id="namefield"
    > value="<?php if(isset($_POST['namefield'])) echo
    htmlentities($_POST
    > ['namefield']);?>"
    > tabindex="1"
    > accesskey="1"
    > type="text">
    >
    > Or maybe you cut and pasted code, and got the character
    entities &lt;
    > &gt; rather than <>?

  • Problem with Mysql DataBase

    hi all,
    I am new to this topic,so could any one please help me on this problem.
    How to Connect MySQL database with java ,
    I am getting errors with Driver and data source.
    which ODBC data source (user DSN,system DSN or file DSN ....)
    So please help me how to set the driver settings and how to connect it.
    If you have any example ....
    please post it
    thanks...

    sorry! this is the right one..
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class MYSQL
    Class.forName("org.gjt.mm.mysql.Driver");
    String url = "jdbc:mysql:databaseName";
    Connection con = DriverManager.getConnection (url, "loginID", "password");
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * from javatest");
    while(rs.next()) {
    int pid = rs.getInt(1);
    String name = rs.getString(2);
    String address = rs.getString(3);
    String city = rs.getString(4);
    String state = rs.getString(5);
    String zip = rs.getString(6);
    String email = rs.getString(7);

  • Problem creating connection pool to mysql database

    Please, do not ignore this message and help me, if you have any Idea
    I have Sun Java System Application Server 8.1 installed on my computer, I installed also MySQL Connector/J to access MySql Databases through JDBC
    But now when I try to create new connection pool, an error comes:
    Following parameter were used:
    Name: MYSQL1
    Resource Type: javax.sql.XADataSource
    Database Vendor: mysql
    Datasource Classname: com.mysql.jdbc.Driver
    serverName 192.168.0.152
    port 3306
    networkProtocol
    user testuser
    password ***
    databaseName test
    datasourceName
    After saving and then klicking on Ping button, following error comes: "An error has occurred.
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: com.mysql.jdbc.Driver"
    I checked the logs of MySql, there was no attempt to access given Database or MYSQL-server at all
    What Am I doing wrong? How can I create MySql connection under Sun Java System Application Server 8.1?
    Any help will be appreciated

    The driver is in right place
    Originally I placed him in wrong directory and got an error, indicationg, that Driver class is not found, but then I corrected it, The problem is in connection to database - it doesn't work.
    I tired to load the same driver into Netbeans and could easyli create a connection to database, but I get it not working ander Sun Application server

  • [b][u]JSP create mysql DataBase problem[/u][/b]

    While i try to create mysql database through JSP program using query,
    the qurey statement doesn't work
    stmt.executeUpdate("create database employee;"); is not executing.
    The code is as follows : Please Help Me......
    try {
    Connection con = null;
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude1","");
    try {
    Statement stmt=con.createStatement();
    stmt.executeUpdate("create database employee;");
    System.out.println("Statement Executed");
    catch(Exception e) {
    System.out.println("Statement not Executed");
    catch (SQLException ex) {
    while (ex != null) {
    System.out.println("sql exception"+ex);
    ex = ex.getNextException ();
    " THANKS IN ADVANCE "

    It's not common to create databases with Java. I'd say this is especially true of JSPs. You'll have to GRANT permission to access and create tables to every single user that comes in? Are those tables cleaned up when users are done, or does the number of tables grow as the number of users grows? One table per customer? Sounds more like session or cookies to me. Do you validate users to make sure that only authorized users can create tables? Lots of problems, and it doesn't appear that you've addressed any of this from the code you've posted.
    It's a bad idea to have code like this in a JSP. Those are for view only. Better to put database code on the server side where it belongs.
    %

  • Problem Seeing MySQL Database

    I am trying to migrate a MySQL 5 database to Oracle. Using these forums, I successfully resolved my connections problems, but now I have a new issue. When trying to capture my database, the capture screen connects to the server and then gives me a list of databases that I can capture. The problem is that it only lists the "test" database, not the "mysql" database where the data is.
    Any ideas why it does not see all the databases?

    the user root must have
    mysql>grant all on *.* on root;
    How did you get run the mysql 5 plugin?
    I just see plugin for mysql v 3 and 4.
    Thanks
    Murcia

  • Problem with inserting data into mySQL database with jsp

    I have a jsp page that collects infromation about a users vehicle and puts the data into a mySQL database. Iv'e been messing around with it for ages & i can't seem to get it to work even though i cannot see anything wrong with the code, which can be seen below.
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ include file="Connections/connection.jsp" %>
    <%
    // *** Restrict Access To Page: Grant or deny access to this page
    String MM_authorizedUsers="";
    String MM_authFailedURL="login_form.jsp";
    boolean MM_grantAccess=false;
    if (session.getValue("MM_Username") != null && !session.getValue("MM_Username").equals("")) {
      if (true || (session.getValue("MM_UserAuthorization")=="") ||
              (MM_authorizedUsers.indexOf((String)session.getValue("MM_UserAuthorization")) >=0)) {
        MM_grantAccess = true;
    if (!MM_grantAccess) {
      String MM_qsChar = "?";
      if (MM_authFailedURL.indexOf("?") >= 0) MM_qsChar = "&";
      String MM_referrer = request.getRequestURI();
      if (request.getQueryString() != null) MM_referrer = MM_referrer + "?" + request.getQueryString();
      MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied=" + java.net.URLEncoder.encode(MM_referrer);
      response.sendRedirect(response.encodeRedirectURL(MM_authFailedURL));
      return;
    String vehicle_details__registration = null;
    if(request.getParameter("txt_registration") != null){ vehicle_details__registration = (String)request.getParameter("txt_registration");}
    String vehicle_details__make = null;
    if(request.getParameter("txt_make") != null){ vehicle_details__make = (String)request.getParameter("txt_make");}
    String vehicle_details__model = null;
    if(request.getParameter("txt_model") != null){ vehicle_details__model = (String)request.getParameter("txt_model");}
    String vehicle_details__colour = null;
    if(request.getParameter("txt_colour") != null){ vehicle_details__colour = (String)request.getParameter("txt_colour");}
    String vehicle_details__tax_class = null;
    if(request.getParameter("select_tax_class") != null){ vehicle_details__tax_class = (String)request.getParameter("select_tax_class");}
    String vehicle_details__chasis_num = null;
    if(request.getParameter("chasis_num") != null){ vehicle_details__chasis_num = (String)request.getParameter("chasis_num");}
    String vehicle_details__status = null;
    if(request.getParameter("radio_status") != null){ vehicle_details__status = (String)request.getParameter("radio_status");}
    String owner_details__MMColParam = "1";
    if (session.getValue("MM_Username") !=null) {owner_details__MMColParam = (String)session.getValue("MM_Username");}
    Driver Drivervehicle_details = (Driver)Class.forName(MM_connection_DRIVER).newInstance();
    Connection Connvehicle_details = DriverManager.getConnection(MM_connection_STRING,MM_connection_USERNAME,MM_connection_PASSWORD);
    PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
    vehicle_details.executeUpdate();
    %>
    <form name="add_vehicle_form" id="add_vehicle_form">
      <p>Registration mark:
        <input name="txt_registration" type="text" id="txt_registration">
    </p>
      <p>Make:
        <input name="txt_make" type="text" id="txt_make">
    </p>
      <p>Model:
        <input name="txt_model" type="text" id="txt_model">
    </p>
      <p>Colour:
        <input name="txt_colour" type="text" id="txt_colour">
      </p>
      <p>Tax Class:
        <select name="select_tax_class" id="select_tax_class">
          <option value="AAA">Band AAA (up to 100g/km)</option>
          <option value="AA">Band AA (101 - 120g/km)</option>
          <option value="A">Band A (121 - 150g/km)</option>
          <option value="B">Band B (151 - 165g/km)</option>
          <option value="C">Band C (166 - 185g/km)</option>
          <option value="D">Band D (Over 185g/km)</option>
        </select>
      </p>
      <p>Chasis Number:
        <input name="txt_chassis_num" type="text" id="txt_chassis_num">
    </p>
      <p>Status: active:
        <input name="radio_status" type="radio" value="1" checked>
        off-road
        <input name="radio_status" type="radio" value="0">
      </p>
      <p>
        <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <%
    Connvehicle_details.close();
    %>This is the error I am getting from the server
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 3 in the jsp file: /add_vehicle_form.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\Assignment\org\apache\jsp\add_005fvehicle_005fform_jsp.java:113: ')' expected
    PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
    ^
    1 error
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Any help would be much appreciated.
    Thanks

    use this ...
    PreparedStatement vehicle_details =
    Connvehicle_details.prepareStatement("INSERT INTO
    vehicle_man_db.vehicle_details (registartion, make,
    model, colour, tax_class, chasis_num) VALUES
    vehicle_details .setString(1,String
    vehicle_details__registration );
    vehicle_details setString(2,String
    vehicle_details__make );
    vehicle_details .setString(3,String
    vehicle_details__model );
    vehicle_details .setString(4,vehicle_details__colour
    vehicle_details .setString(5,String
    vehicle_details__tax_class);
    vehicle_details .setString(6,String
    vehicle_details__chasis_num );
    vehicle_details .executeQuery();Even you need a screwing up... what's the point putting that String inside. That's the bloody error.

  • Connecting to a Mysql database using CF Administrator and DW

    I can't create a mysql datasource in CF Administrator.
    If I use the following datasource settings in CF
    Administrator:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Drive Class: MySQL Connector J
    AND (note the emphasis) I set my local and remote folders in
    my DW site local folder, remote folder and testing server folders
    all to C:\CFusionMX\db\, I can connect to my mysql database in CF
    Administrator.
    However, with these DW site folder settings, DW doesn't
    recognize any databases (Access or Mysql) at all.
    When I change my DW site folder settings to 'wwwroot'
    (e.g.local folder C:\CFusionMX\db\' is changed to
    'C:\CFusionMX\wwwroot') DW now lists all my CF Administrator
    databases.
    The problem is CF Administrator can't connect to my Mysql
    data sources. It gives me the error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    I've tried changing the 3306 port to 8500, but this doesn't
    help.
    My java path and connector file is:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Is this a ID/password problem? I've tried both 'root' and
    leaving the ID field in the CF Administrator add data source block,
    both to no avail. I don't have a password set in Mysql for 'root'
    either.
    Any help would be gratefully appreciated. I've been working
    on this for weeks and keep running into one problem after another.
    Thanks a million in advance.
    Sincerely,
    Graham A. Kerby

    1) ensure mysql server is running
    2) there are numerous tutorials for mysql installation out
    there
    3) there are good free mysql admin tools out there
    4) use both the above to verify your mysql installation is
    correct
    5) please tell me you do have your zonealarm DISABLED
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

Maybe you are looking for

  • How to see the compilation and runtime errors in NW 2004s

    Hi I have developed some J2EE application and deployed it in a NetWeaver 2004s, some problems has occurred when I try to run this application. Where can I see the errors stacktrace for J2EE applications ? Is there any log ? I have already checked the

  • In the advanced tab of languages and Region the time and date formats will not change

    For a certian Application I am using I need to change the format of the Time and Date. I had no problems in Mountain Lion. In the advanced tab of languages and Region the time and date formats will not change. I need the date format to read as 01/01/

  • How do I get a website to open on firefox from my email?

    I have Internet Explorer. I just downloaded Firefox. An online store that I shop at regularly sends me emails. When I click on their link from my email it takes me to their site through Internet Explorer. How do I get the link from my email to open t

  • Attaching the output type in migo

    Hi experts,   my requirement is to transfer idoc from sap to other system for good receipt,   for that we have created a output type and the custom program for poulating idoc and it is attached to output type .how can we attach this output type to mi

  • OBJECTS_OBJREF_NOT_ASSIGNED Exep CX_SY_REF_IS_INITIAL in LDB ADA

    Hello all, in the report Z_ISR_IMPAC note: (912375) when user runs a large range of 'Asset numbers' the reports abbends with the runtime error (Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED Exception CX_SY_REF_IS_INITIAL ). this happen in the LDB ADA in