File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes how to configure HSQLDB Datasource name in JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic
Author

how to configure HSQLDB Datasource name in JBoss

murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
hello all,

i am using the HSQLDB in Jboss. Already configured the hsqldb in jboss and created the database as follows


TYPE : HSQL Database Engine Server
DRIVER : org.hsqldb.JdbcDriver
URL : jdbc:hsqldb:hsql://localhost:1701
USER : user
PASSWORD : pass


to use this database where should i configure this database name( in which file should i configure the database name).

please any one help me if know

thanks a lot
Chiaw Huat Lee
Greenhorn

Joined: Oct 24, 2004
Posts: 15
Hi there.

Well, try this:

1. Create a hsqldb-ds.xml inside the deploy directory of your JBOSS folder.
This will be your datasource file...which will tell the jboss for your
application A is using which database.Example of this file can be see at
your jboss/docs/examples/jca.Basically, you can name it whatever name that
you want...as long it end with -ds.xml.

2.Once you done that, you need to configure the jboss...that I assume you have
done it previouslly.

3.Make sure in your ear file contain a folder call META-INF and inside this
folder, it have a file call application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application
1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
<application>
<!--<module>
<ejb>EJB.jar</ejb>
</module>-->
<module>
<web>
<web-uri>yourWarFileName.war</web-uri>
<context-root>/contextName</context-root>
</web>
</module>
</application>

As you can see, this application.xml file will tell the jboss that, for a
particular application, in will use which war file (which contain your web application) and how to access it through your browser(http://localhost ortNumber/contextName).
Sorry for my bad English...
Hope it help.
murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
Hi Chiaw Huat Lee, Thanks a lot for your response.

sorry for my bad explanation about my problem.

Actual problem is that already we are using the PostgreSQL as a database it is already configured. But now we want to use HSQLDB as a default database.

the steps i done :
____________________________

i modified the hsqldb-ds.xml and placed that in jboss/server/default/deploy
folder

and removed the postresql-ds.xml from jboss/server/default/deploy folder


and started the JBoss


then it is giving the following Error:


11:31:28,222 INFO [Engine] StandardWrapper[/edge:invoker]: Loading container servlet invoker
11:31:28,589 INFO [EARDeployer] Started J2EE application: file:/usr/apps/jboss-3.2.3/server/default/deploy/edge.ear
11:31:28,590 INFO [MainDeployer] Deployed package: file:/usr/apps/jboss-3.2.3/server/default/deploy/edge.ear
11:31:28,592 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
<none>
MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss.j2ee:jndiName=EISequenceEntityLocalHome,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/PostgresDS; - nested throwable: (javax.naming.NameNotFoundException: PostgresDS not bound)]
11:31:28,663 INFO [URLDeploymentScanner] Started jboss.deployment:type=DeploymentScanner,flavor=URL
11:31:28,767 INFO [MainDeployer] Deployed package: file:/usr/apps/jboss-3.2.3/server/default/conf/jboss-service.xml
11:31:28,771 INFO [Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 1m:55s:807ms




please help me regarding this problem.

I think the problem occuring since it is trying to read Postgresql-ds.xml
not the hsqldb-ds.xml . If we found the solution, how to avoid in reading other databases in Jboss, there in that file we can say how to avoid Postgresql-ds.xml


plz help me for this problem
murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
Hi Chiaw Huat Lee, Thanks a lot for your response.

sorry for my bad explanation about my problem.

Actual problem is that already we are using the PostgreSQL as a database it is already configured. But now we want to use HSQLDB as a default database.

the steps i done :
____________________________

i modified the hsqldb-ds.xml and placed that in jboss/server/default/deploy
folder

and removed the postresql-ds.xml from jboss/server/default/deploy folder


and started the JBoss


then it is giving the following Error:


11:31:28,222 INFO [Engine] StandardWrapper[/edge:invoker]: Loading container servlet invoker
11:31:28,589 INFO [EARDeployer] Started J2EE application: file:/usr/apps/jboss-3.2.3/server/default/deploy/edge.ear
11:31:28,590 INFO [MainDeployer] Deployed package: file:/usr/apps/jboss-3.2.3/server/default/deploy/edge.ear
11:31:28,592 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
<none>
MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss.j2ee:jndiName=EISequenceEntityLocalHome,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/PostgresDS; - nested throwable: (javax.naming.NameNotFoundException: PostgresDS not bound)]
11:31:28,663 INFO [URLDeploymentScanner] Started jboss.deployment:type=DeploymentScanner,flavor=URL
11:31:28,767 INFO [MainDeployer] Deployed package: file:/usr/apps/jboss-3.2.3/server/default/conf/jboss-service.xml
11:31:28,771 INFO [Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 1m:55s:807ms




please help me regarding this problem.

I think the problem occuring since it is trying to read Postgresql-ds.xml
not the hsqldb-ds.xml . If we found the solution, how to avoid in reading other databases in Jboss, there in that file we can say how to avoid Postgresql-ds.xml


plz help me for this problem
Shailesh Dyade
Greenhorn

Joined: Mar 03, 2008
Posts: 1
Hello Guys,

I am running JBoss 4.2.3 GA in Solaris Box, can any one tell me how to open Database Manager, As I am accessing it from Windows Browser. and I have started the database manager from JMX console which I have accessed from Win Browser.

Thanks in Advance
Shailesh
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9322
    
109

Shailesh,

This is a 5 year old thread which discusses a different issue. Please open a new thread in this forum to discuss your question. Thank you


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to configure HSQLDB Datasource name in JBoss
 
Similar Threads
how to create a database instance in HSQLDB
Create an instance of database in HSQLDB
Configuring Eclipse, JBoss & MySQL for EJB3 application development.
HSQLDB and Eclipse
Watn to use HSQLDB , How to avoid other database configurations in JBoss