wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes jboss datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "jboss datasource" Watch "jboss datasource" New topic
Author

jboss datasource

kishore nag
Greenhorn

Joined: Feb 18, 2010
Posts: 17
Hello Everybody,

I have an issues with jboss while i am deploying my project in to jboss iam getting these errors can you please give me reply and do needfull for me . i have an project in struts2 with jpa persistence.

12:51:20,841 ERROR [TomcatDeployment] ENC setup failed
javax.naming.NameNotFoundException: comp not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

[/color]
2:51:20,841 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/struts2ex state=Create mode=Manual requiredState=Installed
org.jboss.deployers.spi.DeploymentException: URL file:/C:/openlogic-jboss-5.1.0.GA-all-bin-1/jboss-5.1.0.GA/server/default/deploy/struts2ex.war/ deployment failed
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:316)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)


and my persistence.xml is

<persistence-unit name="Struts2ex" transaction-type="RESOURCE_LOCAL">
<!-- StrutsExamplePU -->
<provider>oracle.toplink.essentials.PersistenceProvider</provider>

<!-- <jta-data-source>java:iportds</jta-data-source> -->
<non-jta-data-source>java:/xaOracleDS</non-jta-data-source>
<jar-file>/jboss-local-jdbc.rar</jar-file>
<class>org.strutsexample.Test</class>
<class>org.strutsexample.Test1</class>
<class>org.strutsexample.defaults.IptCurrency</class>
<class>org.strutsexample.defaultss.IptAssettype</class>


<properties>
<property name="toplink.jdbc.driver"
value="oracle.jdbc.driver.OracleDriver"/>
<property name="toplink.jdbc.url"
value="jdbcracle:thin:@192.168.2.192:1521:iport"/>
<property name="toplink.jdbc.user" value="iport"/>
<property name="toplink.jdbc.password" value="iport"/>
</properties>
</persistence-unit>
</persistence>


and created one xml file and i put in to deploy dircetory that was in the name of oracle-ds.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->

<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
<!-- $Id: oracle-ds.xml 88948 2009-05-15 14:09:08Z jesper.pedersen $ -->
<!-- ==================================================================== -->
<!-- Datasource config for Oracle originally from Steven Coy -->
<!-- ==================================================================== -->


<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbcracle:thin:@192.168.2.192:1521:iport</connection-url>
<!--

Here are a couple of the possible OCI configurations.
For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm

<connection-url>jdbcracleci:@youroracle-tns-name</connection-url>
or
<connection-url>jdbcracleci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>

Clearly, its better to have TNS set up properly.
-->
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>iport</user-name>
<password>iport</password>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
<!-- Checks the Oracle error codes and messages for fatal errors -->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->

<!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>

</datasources>
and body please give me reply how to do this


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Try putting source code within code tags (do not use color!!!). If your post is legible, it might be more apt to generate helpful replies.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jboss datasource