Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parse deploy

 
arjun rampal
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i downlaoded bookstore from java sute.configuration is jboss4+eclipse3.1+myeclipse3.8.4.after deploying i am getting the following error.
1)Couldn't create bookstore database bean: Couldn't open connection to database: jdbc not bound
2)Failed to parse WEB-INF/jboss-web.xml; - nested throwable:

(org.jboss.deployment.DeploymentException: resource-ref jdbc/BookDB found in jboss-web.xml

but not in web.xml)
3)Missing application web.xml, using defaults only

StandardEngine[jboss.web].StandardHost[localhost].StandardContext[/bookstore]
4)Failed to parse descriptors for war(file:/C:/jboss-4.0.2RC1/server/all from java
four files are relavent here oracle-ds.xml,oracleds-xa.xml,web.xml,jboss-web.xml whose content i have pasted below thanxs in advance
1)<jboss-web>
<resource-ref>
<res-ref-name>jdbc/BookDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/jdbc/BookDB</jndi-name>
</resource-ref>
</jboss-web>
2)<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
-->
Code:
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>BookstoreWAR</display-name>
<filter>
<filter-name>HitCounterFilter</filter-name>
<filter-class>samples.webapps.bookstore.filters.HitCounterFilter</filter-class>
</filter>
<filter>
<filter-name>OrderFilter</filter-name>
<filter-class>samples.webapps.bookstore.filters.OrderFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>HitCounterFilter</filter-name>
<servlet-name>BookStoreServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>OrderFilter</filter-name>
<servlet-name>ReceiptServlet</servlet-name>
</filter-mapping>
<listener>
<listener-class>samples.webapps.bookstore.listeners.ContextListener</listener-class>
</listener>
<servlet>
<display-name>BannerServlet</display-name>
<servlet-name>BannerServlet</servlet-name>
<servlet-class>samples.webapps.bookstore.BannerServlet</servlet-class>
</servlet>
<servlet>
<display-name>ShowCartServlet</display-name>
<servlet-name>ShowCartServlet</servlet-name>
<servlet-class>samples.webapps.bookstore.ShowCartServlet</servlet-class>
</servlet>
<servlet>
<display-name>CashierServlet</display-name>
<servlet-name>CashierServlet</servlet-name>
<servlet-class>samples.webapps.bookstore.CashierServlet</servlet-class>
</servlet>
<servlet>
<display-name>CatalogServlet</display-name>
<servlet-name>CatalogServlet</servlet-name>
<servlet-class>samples.webapps.bookstore.CatalogServlet</servlet-class>
</servlet>
<servlet>
<display-name>ReceiptServlet</display-name>
<servlet-name>ReceiptServlet</servlet-name>
<servlet-class>samples.webapps.bookstore.ReceiptServlet</servlet-class>
</servlet>
<servlet>
<display-name>BookStoreServlet</display-name>
<servlet-name>BookStoreServlet</servlet-name>
<servlet-class>samples.webapps.bookstore.BookStoreServlet</servlet-class>
</servlet>
<servlet>
<display-name>BookDetailsServlet</display-name>
<servlet-name>BookDetailsServlet</servlet-name>
<servlet-class>samples.webapps.bookstore.BookDetailsServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>BannerServlet</servlet-name>
<url-pattern>/banner</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ShowCartServlet</servlet-name>
<url-pattern>/showcart</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CashierServlet</servlet-name>
<url-pattern>/cashier</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CatalogServlet</servlet-name>
<url-pattern>/catalog</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ReceiptServlet</servlet-name>
<url-pattern>/receipt</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>BookStoreServlet</servlet-name>
<url-pattern>/enter</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>BookDetailsServlet</servlet-name>
<url-pattern>/bookdetails</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<error-page>
<exception-type>samples.webapps.bookstore.exception.BooksNotFoundException</exception-type>
<location>/errorpage.html</location>
</error-page>
<error-page>
<exception-type>javax.servlet.UnavailableException</exception-type>
<location>/errorpage.html</location>
</error-page>
<error-page>
<exception-type>samples.webapps.bookstore.exception.BookNotFoundException</exception-type>
<location>/errorpage.html</location>
</error-page>
<resource-ref>
<res-ref-name>jdbc/BookDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>
3)oracle-ds.xml
datasources>
<local-tx-datasource>
<jndi-name>Oracle</jndi-name>
<connection-url>jdbc racle:thin:@arunojha:1521:arun</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>jdbc racle ci:@youroracle-tns-name</connection-url>
or
<connection-url>jdbc racle ci:@(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>ravi</user-name>
<password>ravi</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>
<local-tx-datasource>
<jndi-name>jdbc/BookDB</jndi-name>
<connection-url>jdbc racle:thin:@arunojha:1521:arun</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>BOOKSTORE</user-name>
<password>BOOKSTORE</password>
</local-tx-datasource>

</datasources>
4)
<datasources>
<xa-datasource>
<jndi-name>XAOracleDS</jndi-name>
<track-connection-by-tx/>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc racle:thin:@arunojha:1521:arun</xa-datasource-property>
<xa-datasource-property name="User">ravi</xa-datasource-property>
<xa-datasource-property name="Password">ravi</xa-datasource-property>
<!-- 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>
<!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
<no-tx-separate-pools/>

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




<mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
name="jboss.jca:service=OracleXAExceptionFormatter">
<depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
</mbean>

</datasources>
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the crux of it is how to debug which line in the xml file that causes the problem.

I'm having a similar problem too. The trace stack just does not mention where exactly the culprit is. Is there a debug level that I could switch on where I could zoom in on the exact location of the fault ?

Any help would be very much appreciated.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "asa asas" -

Welcome to JavaRanch. Glad to see you here.

These forums are fairly light on rules, but one rule we do have is that your name complies with our naming policy.

Could you please go here and update your name for us?

Thanks in advance, and I hope you find these forums useful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic