[Persistence, JBoss/CMP, Hibernate, Database] - Issue with Oracle Datasource
by natFarfan
Hello People:
Can anybody help me with this issue?. I have been trying to configure an Oracle Datasource in Jboss Server and I am getting this error:
17:21:51,078 INFO [Server] Starting JBoss (MX MicroKernel)...
17:21:51,093 INFO [Server] Release ID: JBoss [WonderLand] 3.2.8.SP1 (build: CVSTag=JBoss_3_2_8_SP1 date=200603031235)
17:21:51,093 INFO [Server] Home Dir: D:\opt\runawfe-2.0RC6-bin
17:21:51,093 INFO [Server] Home URL: file:/D:/opt/runawfe-2.0RC6-bin/
17:21:51,109 INFO [Server] Patch URL: null
17:21:51,109 INFO [Server] Server Name: default
17:21:51,109 INFO [Server] Server Home Dir: D:\opt\runawfe-2.0RC6-bin\server\default
17:21:51,109 INFO [Server] Server Home URL: file:/D:/opt/runawfe-2.0RC6-bin/server/default/
17:21:51,109 INFO [Server] Server Temp Dir: D:\opt\runawfe-2.0RC6-bin\server\default\tmp
17:21:51,109 INFO [Server] Root Deployment Filename: jboss-service.xml
17:21:51,609 INFO [ServerInfo] Java version: 1.5.0_05,Sun Microsystems Inc.
17:21:51,609 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_05-b05,Sun Microsystems Inc.
17:21:51,609 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
17:21:51,953 INFO [Server] Core system initialized
17:21:54,484 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
17:21:57,921 INFO [Embedded] Catalina naming disabled
17:21:58,781 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-localhost%2F127.0.0.1-8080
17:21:58,781 INFO [Catalina] Initialization processed in 781 ms
17:21:58,796 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.30
17:21:58,828 INFO [StandardHost] XML validation disabled
17:21:58,875 INFO [Catalina] Server startup in 94 ms
17:22:14,125 ERROR [JBossCacheManager] JBossCacheService to Tomcat clustering not found
17:22:14,125 ERROR [TomcatDeployer] Failed to setup clustering, clustering disabled
17:22:14,140 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker
jboss.web:service=WebServer
ObjectName: jboss.mq.destination:service=Topic,name=testTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Queue,name=testQueue
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Queue,name=A
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=B
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=C
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=D
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=ex
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq:service=Invoker
State: CONFIGURED
I Depend On:
jboss.mq:service=TracingInterceptor
jboss:service=Naming
Depends On Me:
jboss.mq:service=InvocationLayer,type=HTTP
jboss.mq:service=InvocationLayer,type=JVM
jboss.mq:service=InvocationLayer,type=UIL2
ObjectName: jboss.mq:service=TracingInterceptor
State: CONFIGURED
I Depend On:
jboss.mq:service=SecurityManager
Depends On Me:
jboss.mq:service=Invoker
ObjectName: jboss.mq:service=SecurityManager
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
Depends On Me:
jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq:service=TracingInterceptor
jboss.mq.destination:service=Queue,name=DLQ
ObjectName: jboss.mq.destination:service=Queue,name=DLQ
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq:service=InvocationLayer,type=JVM
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker
ObjectName: jboss.mq:service=DestinationManager
State: CONFIGURED
I Depend On:
jboss.mq:service=MessageCache
jboss.mq:service=PersistenceManager
jboss.mq:service=StateManager
Depends On Me:
jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq.destination:service=Queue,name=A
jboss.mq.destination:service=Queue,name=B
jboss.mq.destination:service=Queue,name=C
jboss.mq.destination:service=Queue,name=D
jboss.mq.destination:service=Queue,name=ex
jboss.mq:service=SecurityManager
jboss.mq.destination:service=Queue,name=DLQ
ObjectName: jboss.mq:service=PersistenceManager
State: CONFIGURED
I Depend On:
jboss.jca:service=DataSourceBinding,name=OracleDS
Depends On Me:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:service=DataSourceBinding,name=OracleDS
State: NOTYETINSTALLED
Depends On Me:
jboss.mq:service=PersistenceManager
17:22:14,484 INFO [Http11Protocol] Arrancando Coyote HTTP/1.1 en puerto http-localhost%2F127.0.0.1-8080
I configure orcle-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: oracle-ds.xml,v 1.6 2004/09/15 14:37:40 loubyansky Exp $ -->
<!-- ==================================================================== -->
<!-- Datasource config for Oracle originally from Steven Coy -->
<!-- ==================================================================== -->
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@192.168.137.155:1521:WIMAX</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.92...
<connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
or
<connection-url>jdbc:oracle:oci:@(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>WIMAX_SOA</user-name>
PASSWORD
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<!-- 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) -->
<type-mapping>Oracle9i</type-mapping>
</local-tx-datasource>
Also I configure standardjbosscmp-jdbc, standardjaws, login-config
I add : oracle-jdbc3-service, oracledb-jdbc-state-service. I remove hsqldb-jdbc-state-service and hsqldb-jdbc2-service.
I will appreciate any suggestions.
Thx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021229#4021229
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021229
19Â years, 2Â months
[JBoss Seam] - SeamLoginModule EntityManager injection difficulties
by trickyvail
I am running Seam version 1.1.6 on a JBoss 4.0.5.GA server.
While following the example from the Seam documentation (page 124) for creating a SeamLoginModule authentication method I have run into the following error:
09:37:41,228 ERROR [SeamLoginModule] Error invoking login method
| javax.faces.el.EvaluationException: Exception while invoking expression #{authenticator.authenticate}
| at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:59)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:74)
| [SNIP]
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.seam.RequiredException: In attribute requires value for component: authenticator.entityManager
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1920)
| at org.jboss.seam.Component.injectFields(Component.java:1386)
| at org.jboss.seam.Component.inject(Component.java:1156)
| [SNIP]
| ... 59 more
This suggests that Seam is unable to locate and inject the entityManager by its component name. The relevant java bean that the login component is calling is as follows:
@Name("authenticator")
| public class Authenticator
| {
| @In EntityManager entityManager;
|
| public boolean authenticate()
| {
| return true;
| }
| }
For completeness here, is the form that is calling the validation:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| template="layout/template.xhtml">
|
| <ui:define name="body">
|
| <h1>Login</h1>
| <p>Please login using any username and password</p>
|
| <h:messages styleClass="message"/>
|
| <h:form>
|
| <div class="dialog">
| <div class="prop">
| <span class="name">Username</span>
| <span class="value">
| <h:inputText id="username" value="#{identity.username}"/>
| </span>
| </div>
| <div class="prop">
| <span class="name">Password</span>
| <span class="value">
| <h:inputSecret id="password" value="#{identity.password}"/>
| </span>
| </div>
| <div class="prop">
| <span class="name">Remember me</span>
| <span class="value">
| <h:selectBooleanCheckbox id="rememberMe" value="#{identity.rememberMe}"/>
| </span>
| </div>
| </div>
|
| <div class="actionButtons">
| <h:commandButton value="Login" action="#{identity.login}"/>
| </div>
|
| </h:form>
|
| </ui:define>
| </ui:composition>
I have also tried to annotate the EntityManager object in the following ways:
@In("entityManager") EntityManager entityManager;
|
| @In(value="entityManager") EntityManager entityManager;
but have recieved the same error.
My configuration was generated by seam-gen and the authenticate method works fine until I try to inject an EntityManager into the component.
I will create a Stateful Session Bean in order to try to inject the EntityManager by the EJB3.0 annotation @PersistenceContext rather than Seam @In annotation.
Could this be caused by a filter loading order? I've looked at web.xml and it does not seem to be the cause. I think too that the identity component is a Seam component (ie. eats its own dogfood), therefore should not be a problem, Maybe the identity component is instantiated before other components like the entity manager?
P.S. Thank you Gavin King for all your past helpful answers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021216#4021216
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021216
19Â years, 2Â months