[Installation, Configuration & Deployment] - unable to connect to db
by sonoerin
I am unable to get my app to connect to a running instance of mySQL. I can connect to it via Eclipse IDE using a URL:
jdbc:mysql://localhost:3306/mydb
But in my mysql-ds.xml file I have this:
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://127.0.0.1:3306/mydb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>user</user-name>
<pass word>none</pass word> <-- formatted to show in this post
</local-tx-datasource>
But when I try to access the site I get this:
Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Cannot connect to MySQL server on 127.0.0.1:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:395)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:297)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:447)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:874)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:103)
Does anyone know what might prevent JBOss 4.0.2 from connecting to the db?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980895#3980895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980895
19 years, 6 months
[Installation, Configuration & Deployment] - Jboss 3.0.8 upgrade to 4.0.5 problem
by poonwingyee
Hi All,
i want to upgrade the jboss from 3.0.8 to 4.0.5.
In 3.0.8, it is using jetty not tomcat.
the setting configuration is difference to the 4.0.5.
My Database is using hypersonic.
how to setting connect my database.
i try to change the file "hsqldb-ds.xml"
<connection-url>jdbc:hsqldb:hsql://localhost:4467</connection-url>
when i change the this connection-url. many error message is prompted.
when i change the DefaultDS change to other <jndi-name>xxxDB</jndi-name>, it also many error message about create XX table.
http-invoker.sar, jms folder is it required in the default folder?
jms create the user table and time ... table .
[question] if i need to connect the new database is it make the new file xxx-hsqldb-ds.xml. and keep the original hsqldb-ds.xml (which is connect localDB.script?
on the other hand,
i try to keep the original file. and then add the new file xxx-hsqldb-ds.xml,
it allow me to try <connection-url>jdbc:hsqldb:hsql://localhost:4467</connection-url>, no error is occured.
i can connect my dbtools to get some data from db. (it don't need connect from ejb)
however, my web application server need to connect ejb, the error is occured.
when my program run to this statement the error is occured.
"home = (EJBHome) PortableRemoteObject.narrow(objref,homeClass);"
error="10:54:18,210 ERROR [STDERR] ServerConfig getServerConfig exception: java.lang.ClassCastException"
my system have many ejb.jar.
is it ejb-jar.xml setting is wrong. each ejb.jar is packaged by ejb-jar.xml which is using the jboss 3.0.8 setting. is it jboss 4.0.5 is difference setting to package the ejb jar?
<?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
|
| <ejb-jar>
| <display-name>AuditTrailEJB</display-name>
| <enterprise-beans>
| <entity>
| <display-name>AuditTrail</display-name>
| <ejb-name>AuditTrail</ejb-name>
| <home>com.bpmaware.docaware.entitybean.AuditHome</home>
| <remote>com.bpmaware.docaware.entitybean.Audit</remote>
| <ejb-class>com.bpmaware.docaware.entitybean.impl.AuditTrailBean</ejb-class>
| <persistence-type>Bean</persistence-type>
| <prim-key-class>com.bpmaware.docaware.entitybean.AuditPK</prim-key-class>
| <reentrant>False</reentrant>
| <security-identity>
| <description></description>
| <use-caller-identity></use-caller-identity>
| </security-identity>
| </entity>
| </enterprise-beans>
| <assembly-descriptor>
| <container-transaction>
| <method>
| <ejb-name>AuditTrail</ejb-name>
| <method-intf>Home</method-intf>
| <method-name>*</method-name>
| </method>
| <method>
| <ejb-name>AuditTrail</ejb-name>
| <method-intf>Remote</method-intf>
| <method-name>*</method-name>
| </method>
| <trans-attribute>Required</trans-attribute>
| </container-transaction>
| </assembly-descriptor>
| </ejb-jar>
|
|
is it wrong?
please help, i need to upgrade the jboss.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980894#3980894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980894
19 years, 6 months
[JBoss Eclipse IDE (users)] - JBossWS Plugin gen code problem
by kalvin
Hello,
I am getting an error when deploying the following walkthrough example.
http://www.soapui.org/jbossws/topdown_example.html
Here is the error log:
22:08:26,306 WARN [PortComponentMetaData] <wsdl-port> element in webservices.xml not namespace qualified: :HelloWorldPort
22:08:26,540 WARN [JSR109ServerMetaDataBuilder] Adding wsdl targetNamespace to: {http://www.example.org/HelloWorld/}:HelloWorldPort
22:08:26,556 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.5.GA_ejb3/server/default/deploy/HelloWorld.war
org.jboss.ws.WSException: Cannot find port in wsdl: {http://www.example.org/HelloWorld/}:HelloWorldPort
I think the problem is in the webservices.xml, which is generated when publishing the implementation class (helloworld.impl.HelloWorld) as web serveic. Below is the WSDL port value found in the generated webservices.xml file.
<wsdl-port>:HelloWorldPort</wsdl-port>
So, I repeated a few times of the entire walkthrough, and make sure that I didn't type the leading colon in the "WSDL Port to use" field of the "Publish as WebService" dialog box. However, the results were the same. Is this a bug in the wstools or the JBossWS Eclipse plugin?
Thanks,
Kalvin
P.S. My environment is JBossIDE 2.0.0.Beta2, JBossAS 4.0.5.GA, java version 1.5.0_06 and MS Windows XP Professional.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980892#3980892
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980892
19 years, 6 months