[Tomcat, HTTPD, Servlets & JSP] - Re: DataSource Problem JBoss/Tomcat Only Configuration
by kdolan
Ok - so if that is correct (which I think today I proved), I cannot use the -dx.xml file to resolve my JNDI/JDBC connection pool because I can only use the Tomcat only configuration of JBoss.
If I do not put the -dx.xml file in my deploy folder, JBoss starts but when my application runs I get a "NameNotFoundException" which references "TestWarDB".
For reference...
my web.xml contains:
<resource-ref>
TestDataSource
<res-ref-name>jdbc/TestDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
my jboss-web.xml contains:
<resource-ref>
<res-ref-name>jdbc/TestDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/TestWarDB</jndi-name>
</resource-ref>
So how do I tell JBoss/Tomcat how to resolve java:/TestWarDB?
I have tried configuring Tomcat (the version deployed within JBoss) according to Tomcat's documentation but I have had no luck in getting anything to work. If JBoss has a Tomcat Only installation configuration, I cannot possible think this would not support interaction with a database.
Kelly
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081492#4081492
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081492
18 years, 7 months
[EJB 3.0] - org.jboss.deployment.DeploymentException: Failed to setup cl
by toplink
Hi,
I have an ejb3 application which includes POJO and ejb2.0 sessionbean, I got following exception when I deployed the application on JBOSS 4.2.1GA, does anyone have some ideas about this?
[java] org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/TestRunner, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml)
[java] at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:176)
[java] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
[java] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
[java] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
[java] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
[java] at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
[java] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
[java] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
[java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
[java] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
[java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
[java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
[java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
[java] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
[java] at $Proxy9.deploy(Unknown Source)
[java] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
[java] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
[java] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
[java] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
[java] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
[java] Caused by: org.jboss.deployment.DeploymentException: ejb-ref ejb/TestRunner, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml
[java] at org.jboss.deployment.ClientDeployer.setupEnvironment(ClientDeployer.java:266)
[java] at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:172)
[java] ... 22 more
The jboss.xml I put in app_ejb.jar looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<enterprise-beans>
<ejb-name>TestRunnerBean</ejb-name>
<jndi-name>ejb/TestRunner</jndi-name>
</enterprise-beans>
The ejb-jar.xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0">
<enterprise-beans>
<ejb-name>TestRunnerBean</ejb-name>
oracle.toplink.testing.tests.internal.ejb.TestRunnerHome
oracle.toplink.testing.tests.internal.ejb.TestRunner
<ejb-class>oracle.toplink.testing.tests.internal.ejb.TestRunnerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<persistence-context-ref>
<persistence-context-ref-name>persistence/myPersistenceContext</persistence-context-ref-name>
<persistence-unit-name>toplinkentities</persistence-unit-name>
</persistence-context-ref>
<persistence-unit-ref>
<persistence-unit-ref-name>persistence/myPersistenceUnit</persistence-unit-ref-name>
<persistence-unit-name>toplinkentities</persistence-unit-name>
</persistence-unit-ref>
<!--
any ejb or resource refs that are accessed in the test case
-->
<!--
any other ejbs in the jar
-->
</enterprise-beans>
</ejb-jar>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081482#4081482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081482
18 years, 7 months