Problem with embedded data-sources.xml and custom UserManager
Hi all,
Our application uses a custom UserManager, which is basically extended from the JDBC UserManager, declared as follows in orion-application.xml:
<user-manager class="com.infocorpnow.a2g.security.oracle.A2GUserManager">
<property name="table" value="pos.users" />
<property name="userNameField" value="username" />
<property name="passwordFiled" value="password" />
<property name="dataSource" value="jdbc/A2GDS" />
<property name="groupMemberShipTableName" value="pos.user_roles" />
<property name="groupMemberShipGroupFieldName" value="role_name" />
<property name="groupMemberShipUserNameFieldName" value="login_id" />
</user-manager>
Since we want to be able to deploy the application several times on the application server, and therefore have each deployment of the ear point to its own datasource (i.e. its own local "A2GDS"), we've found out how to embed data-sources.xml inside the EAR file we're deploying, and modify the orion-application.xml as follows:
<data-sources path="./data-sources.xml" />
And then place data-sources.xml in the same meta-inf folder as the orion-application.xml.
This has worked fine when deploying to the standalone OC4J.
Now when I try to deploy the exact same EAR file in Oracle 9iAS, and I get to the User Manager screen, the Custom User Manager does not show up correctly. It did show up prior to me embedding the data-sources.xml. Please help? This is fairly urgent.
Thanks
Jason
I should also mention I'm using the Java Edition of 9iAS R2 (9.0.3 container) on Solaris.
Similar Messages
-
Problem with finding data-source
I get the following exception: javax.naming.NameNotFoundException: jdbc/localDatabaseDS not found
when i try to initiate my ds (datasource). Does anybody know what to do?
class =
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.NameNotFoundException;
* This class handles handles the connectionpool business <br>
* @author Taeke de Jong
public class DbConnectionPool {
private DataSource ds = null;
* constructor with datasource from JNDI
public DbConnectionPool(String dataSource)
try {
Context context = new InitialContext();
ds = (DataSource) context.lookup('jdbc/localDatabaseDS');
catch(NameNotFoundException nox) {System.out.println(nox.toString());}
catch(NamingException nex) {System.out.println(nex.toString());}
web.xml =
<servlet>
<servlet-name>DbConnectionServlet_2</servlet-name>
<servlet-class>minlnv.ifw.common.connection.DbConnectionServlet</servlet-class>
<init-param>
<param-name>databaseName</param-name>
<param-value>localDatabase</param-value>
</init-param>
<init-param>
<param-name>dataSource</param-name>
<param-value>jdbc/localDatabaseDS</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<resource-ref>
<description>JNDI DataSource localDatabase IFW</description>
<res-ref-name>jdbc/localDatabaseDS</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>APPLICATION</res-auth>
</resource-ref>
data-sources.xml =
<data-source class="com.evermind.sql.DriverManagerDataSource"
connection-driver="oracle.jdbc.driver.OracleDriver"
ejb-location="jdbc/localDatabaseDS"
inactivity-timeout="30"
location="jdbc/localDataseCorDS"
name="localDatabase"
pooled-location="jdbc/localDatabasePooledDS"
url="jdbc:oracle:thin:@10.160.140.30:1521:ifwt"
// left out password and username
min-connections="7" max-connections="10" connection-retry-interval="1" xa-location="jdbc/xa/OracleXADS"
/>Do not use the "hardcoded" examples from the book. Check the deployed data-sources and use them as parameter calling lookup method.
The following have been tested using a simple servlet with Jdeveloper 9.0.5.2 but I think other Jdeveloper/OC4J versions work similar.
My application is called ds.
The following command lists the datasources which are deployed with the application.
I ran the following command against the %JDEV_HOME%\j2ee\home standalone OC4J server but it should work against the embedded OC4J server too.
Here is the command to list the available datasources:
C:\jdev9052\j2ee\home>\jdk142_04\bin\java -jar admin.jar ormi://localhost admin welcome -application ds -dataSourceInfo
And here is the output of the command.
DataSource info:
com.evermind.sql.DriverManagerXADataSource/ds/jdbc/xa/BookDBXADS - cached: 0 used: 0 total: 0
com.evermind.sql.OrionPooledDataSource/ds/jdbc/BookDBPooledDS - cached: 0 used: 0 total: 0
com.evermind.sql.OrionCMTDataSource/ds/jdbc/BookDBDS - cached: 0 used: 0 total: 0
com.evermind.sql.DriverManagerXADataSource/ds/jdbc/xa/DEVXADS - cached: 0 used: 0 total: 0
com.evermind.sql.OrionPooledDataSource/ds/jdbc/DEVPooledDS - cached: 1 used: 0 total: 1
com.evermind.sql.OrionCMTDataSource/ds/jdbc/DEVDS - cached: 1 used: 0 total: 1
ds = ds my application
jdbc/DEVDS = string parameter used in lookup method
jdbc/DEVPooledDS = string parameter used in lookup method
Checking the j2ee application directory we can find the same:
C:\>dir C:\jdev9052\j2ee\home\applications\ds\META-INF
Volume in drive C has no label.
Volume Serial Number is A83F-C94A
Directory of C:\jdev9052\j2ee\home\applications\ds\META-INF
08/12/2004 10:14 AM <DIR> .
08/12/2004 10:14 AM <DIR> ..
08/12/2004 10:14 AM 395 application.xml
08/12/2004 10:14 AM 933 data-sources.xml
08/12/2004 10:14 AM 283 orion-application.xml
3 File(s) 1,611 bytes
2 Dir(s) 10,078,003,200 bytes free
The orion-application.xml points the data-sources.xml file in the same directory. ds application uses the datasources which are listed in this file, not data-sources.xml in C:\jdev9052\j2ee\home\config directory.
And here is the content of C:\jdev9052\j2ee\home\applications\ds\META-INF\data-sources.xml
C:\>more C:\jdev9052\j2ee\home\applications\ds\META-INF\data-sources.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
<data-sources>
<data-source name="jdev-connection-BookDB" class="com.evermind.sql.DriverManagerDataSource" location="jdbc/BookDBCoreDS" x
a-location="jdbc/xa/BookDBXADS" ejb-location="jdbc/BookDBDS" pooled-location="jdbc/BookDBPooledDS" connection-driver="oracle
.jdbc.driver.OracleDriver" username="myname" password="mypw" url="jdbc:oracle:thin:@122.118.222.17:1521:DXX" inactivity-timeout
="30"/>
<data-source name="jdev-connection-DEV" class="com.evermind.sql.DriverManagerDataSource" location="jdbc/DEVCoreDS" xa-loca
tion="jdbc/xa/DEVXADS" ejb-location="jdbc/DEVDS" pooled-location="jdbc/DEVPooledDS" connection-driver="oracle.jdbc.driver.Or
acleDriver" username="myname" password="mypw" url="jdbc:oracle:thin:@122.118.222.17:1521:DXX" inactivity-timeout="30"/>
</data-sources>
...location="jdbc/DEVDS"
or
...location="jdbc/BookDBPooledDS"
The lookup method needs the string(s) above (between "") -
Problem with the data source and web.xml
I have an issue where JSC is removing my resource reference:
<resource-ref>
<description>Creator generated DataSource Reference</description>
<res-ref-name>jdbc/localOracleDatabase</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
from the web.xml and sun-web.xml.
The application has been working great in the IDE for months then wham, no more data source definition. I try and add the reference manually and the IDE takes it out. I am "NOT" adding it to the .xml's in the build area. Why is JSC removing the data source entry?This continues to be a problem. The only way that I can get around the problem is to drag a table from the data source onto the design pallete and then the datasource is added back to the web.xml. I can run fine for 10 or 15 runs then the entry is once again removed from the web.xml.
Help please! -
Problem with "Insufficient data for image" and embedded JPEG 2000 Images
I frequently download pdf from the http://www.glorecords.blm.gov web site. They are reporting a problem with Reader Reader 10.1.4 and the pdf files they have.
"("Insufficient data for image" and embedded JPEG 2000 Images)"
I am experiencing the same "Insufficient data for image" error when opening their downloaded pdf and viewing in ACROBAT X 10.1.4.
Can someone address this please?
Win 7 sp1Read this:
http://blogs.adobe.com/dmcmahon/2012/08/21/acrobat-insufficient-data-for-an-image-error-af ter-updating-to-10-1-4-or-9-5-2/ -
Problem with new data-sources format
Hi, I m moving to Oracle IAS 10.1.3, so i m testing the application with the standalone version.
I use the datasource converter just like the manual say.
this is how datasources looks..
<?xml version = '1.0' encoding = 'UTF-8'?>
<data-sources>
<managed-data-source user="scott" password="tiger" login-timeout="-1" connection-pool-name="OracleDS_connectionPool" jndi-name="jdbc/OracleCoreDS" name="OracleDS_jdbc/OracleCoreDS"/>
<managed-data-source login-timeout="-1" connection-pool-name="OracleDS_connectionPool" jndi-name="jdbc/OracleCoreDS_non_tx" name="jdbc/OracleCoreDS_non_tx_jdbc/OracleCoreDS_non_tx"/>
<managed-data-source login-timeout="-1" connection-pool-name="OracleDS_connectionPool" jndi-name="jdbc/OracleDS" name="jdbc/OracleDS_jdbc/OracleDS"/>
<native-data-source user="user" password="pass" url="jdbc:oracle:thin:@70.101.0.200:1521:DEV" login-timeout="-1" data-source-class="oracle.jdbc.pool.OracleDataSource" jndi-name="jdbc/etgs" name="etgs"/>
<connection-pool name="etgs_connectionPool" connection-retry-interval="0" inactivity-timeout="30" max-connections="2147483647">
<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="etgs" password="etgs" url="jdbc:oracle:thin:@70.101.0.200:1521:DEV" login-timeout="-1"/>
</connection-pool>
<connection-pool name="OracleDS_connectionPool" connection-retry-interval="0" inactivity-timeout="30" max-connections="2147483647">
<connection-factory factory-class="oracle.jdbc.driver.OracleDriver" user="scott" password="tiger" url="jdbc:oracle:thin:@//localhost:1521/oracle.regress.rdbms.dev.us.oracle.com" login-timeout="-1"/>
</connection-pool>
</data-sources>
When I start de oc4j, I have the following problem:
C:\soft\oc4j_101300\bin>oc4j -start
Starting OC4J from C:\soft\oc4j_101300\j2ee\home ...
[2006-08-23 17:54:46,210] WARN org.hibernate.cfg.HbmBinder - Could not perform validation checks for component as the c
lass ar.com.tgs.spac.domain.solicitud.SolicitudProgramada was not found
[2006-08-23 17:54:49,882] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 17002, SQLState: null
[2006-08-23 17:54:49,882] ERROR org.hibernate.util.JDBCExceptionReporter - Excepci¾n de E/S: Socket is not connected
[2006-08-23 17:54:49,897] WARN org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
java.sql.SQLException: Excepci¾n de E/S: Socket is not connected
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionP
rovider.java:80)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:777
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:70
3)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowi
reCapableBeanFactory.java:1058)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAuto
wireCapableBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCap
ableBeanFactory.java:823)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:345)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAuto
wireCapableBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCap
ableBeanFactory.java:823)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:345)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:105)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueRe
solver.java:225)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:117)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(Abst
ractAutowireCapableBeanFactory.java:713)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAuto
wireCapableBeanFactory.java:611)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:329)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAuto
wireCapableBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCap
ableBeanFactory.java:823)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:345)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAuto
wireCapableBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCap
ableBeanFactory.java:823)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:345)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAuto
wireCapableBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCap
ableBeanFactory.java:823)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:345)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListable
BeanFactory.java:275)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableW
ebApplicationContext.java:134)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1015)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:649)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:428)
at com.evermind.server.Application.getHttpApplication(Application.java:512)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite
.java:1975)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1894)
at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:633)
at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:302)
at com.evermind.server.http.HttpServer.setSites(HttpServer.java:273)
at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:180)
at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2296)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:944)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:113)
at java.lang.Thread.run(Thread.java:595)
[2006-08-23 17:54:50,179] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from eh
cache-failsafe.xml found in the classpath: code-source:/C:/soft/oc4j_101300/j2ee/home/applications/app-web/WEB-INF/lib/e
hcache-1.1.jar!ehcache-failsafe.xml
Any idea ?
really thanksAnother strange thing..
My ABAP colleague, debugged the program for me and point out:
* get data class (only standard and user values)
> SELECT * FROM ddart INTO TABLE l_t_ddart
ORDER BY tabart.
DELETE l_t_ddart WHERE ddclass <> 'STD' AND
ddclass <> 'USR'.
LOOP AT l_t_ddart INTO l_s_ddart.
The l_t_ddart table contains only 21 rows (without my new Data Class, which is visible under SE16!)! I checked under oracle sqlplus and SELECT * FROM SAP<SID>.ddart; returned 22 rows WITH my new Data Class!
I'm a little bit confused... -
Problem with Multiple Data Source Retrieval
Hi,
We are working on a Project that is concerned with JSF and XML parsing. We have successfully parsed the XML and made an object model- Lists out of it to display it using JSF. Additionaly we also want to display some data from the database compare it with the XML data and then display it on the GUI.
So e.g we have an attribute code in the XML structure which is a number. Before displaying it on the GUI we first have to query the database what this number or code actually means i.e its description text . get it and display alongside the other data from the XML. So the question is
1) How to get data from different data sources
2) Compare the data
3) and merge and display into GUI .
And we have to display it with JSF and as far as i know JSF has no comparison mechanism ..??!!
Thanks for any help,You can compare stuff in the EL, but I don't think this is what you need.
You can just use Java code in the backing bean class for all the business logic. You can use DAO classes for database access logic. Finally for displaying you can use the JSF tags such as h:outputText. -
Problem with a Data Source in Web Logic
Hi everybody,
Currently i am deploying a 11g ADF application, i am testing my application in a Web Logic 10.3.2.0, and in the beginning all works OK, but when the user test the application like a half of hour the data source throws this exception:
Messages
Test of MOR_DS_ORA2 on server soa_server1 failed, reason:
Connection test failed with the following exception: weblogic.common.resourcepool.ResourceUnavailableException: No resources currently available in pool MOR_DS_ORA2 to allocate to applications. Either specify a time period to wait for resources to become available, or increase the size of the pool and retry..
This error only occur in the development server of the company, never in the embed WL of my JDeveloper 11 g
Checking my code (appModuleImpl where is all the logic and integration with my DB) i don't see any wrong.
I call SP like this:
String stmt = "BEGIN XXMOR_FUNCIONAL_PKG.XXMOR_SOL_REPROCESAR_PR(?, ?); END;";
CallableStatement st = null;
try {
st = getDBTransaction().createCallableStatement(stmt, 2);
st.setInt(1, idSol);
st.setString(2, rw.getTrackingIdConcom());
st.execute();
System.out.println("Exito.");
catch (SQLException e) {
throw new JboException(e);
finally {
if (st != null) {
try {
st.close();
catch (SQLException e) {}
Execute some querys like this:
public ArrayList getElementsByArguments(String query){
ArrayList al = new ArrayList();
ResultSet rs = null;
try {
rs = getDBTransaction().createStatement(0).executeQuery(query);
ResultSetMetaData rsMeta = rs.getMetaData();
int numColumnas = rsMeta.getColumnCount();
while(rs.next()) {
for (int i = 1; i <= numColumnas; i++) {
al.add(rs.getString(i));
} catch (SQLException e) {
getDBTransaction().commit();
return al;
And some insert and update like this:
public String setNewFzaVta(Number idSegNeg, String idenFzaVta, String nomFzaVta, String region, String copysOrden,
String copysFecha, String mutlifuerza, String rtcrdAut, String autCorreo, String mercadotecnia,
String divCanal, String conCom, String activa, String notificacion, String createBy, Date currentDate,
String matloc, Number tolerancia, String rate){
XxmorFzasVtasTabViewImpl u = (XxmorFzasVtasTabViewImpl)getXxmorFzasVtasTabView1();
XxmorFzasVtasTabViewRowImpl newRow = (XxmorFzasVtasTabViewRowImpl)u.createRow();
SequenceImpl seq = new SequenceImpl("XXMOR_ID_FZAVTA_SQ", getDBTransaction());
Number seqNextval = seq.getSequenceNumber();
newRow.setIdSegNeg(idSegNeg);
newRow.setIdFzaVentas(seqNextval);
newRow.setIdentFzaVentas(idenFzaVta);
newRow.setNombreFzaVentas(nomFzaVta);
newRow.setRegion(region);
newRow.setCopysXOrden(copysOrden);
newRow.setCopysXFecha(copysFecha);
newRow.setMultifuerza(mutlifuerza);
newRow.setRtcrdAuthAut(rtcrdAut);
newRow.setAutXCorreo(autCorreo);
newRow.setMercadotecnia(mercadotecnia);
newRow.setDivXCanal(divCanal);
newRow.setCondicionesComerciales(conCom);
newRow.setActiva(activa);
newRow.setNotificacionExtInt(notificacion);
newRow.setCreatedBy(createBy);
newRow.setCreatedDate(currentDate);
newRow.setMatloc(matloc);
newRow.setAutTolerancia(tolerancia);
newRow.setGetRate(rate);
u.insertRow(newRow);
getDBTransaction().commit();
return seqNextval.toString();
Can anybody help me ! ????Hi,
from the original post it is not obvious from where the code is called and if the AM is released properly. So if you face the same issue, maybe you can explain more
Frank -
RDA Problems with financial data sources- new FI-GL
I have created a generic DataSource/extractor based on view on tables FAGLFLEXA and BSEG. The extractor is marked at Real-Time, with 300s Safety-Interval (lower) and Time Stamp.
On ECC side I have created a function module to post transactions to Delta Queue directly and got it configured using BTE. This is event based and event is GL Transaction posting.
In BI I have a created an Infopackage to Init Delta without Data and Initialized it.
I created another Infopackage for delta, marked it Real-Time, and assigned it to a Daemon that would run every 5 minutes.
PROBLEM: 1. am not able to see posted GL entries in Delta Queue.
2. As there is nothing in delta Queue daemon is not pulling anything.
I have gone through most of SDN Blogs and forums. One message that I am getting is that this is because of FI-GL DataSources.
Its also mentioned somewhere that FI-GL has to be handled specially. But how its not told anywhere.
Thanks and looking forward,
RamHello,
See this [Financial Accounting: Procedure for Line Item Extraction |http://help.sap.com/saphelp_nw04/helpdata/en/af/16533bbb15b762e10000000a114084/frameset.htm]
Also see
SAP Note 1006650 NewGL: Performance problems for Delta Init extractor
SAP Note 551044 Detaching the extractors for the InfoSources 0FI_*_4
[How to Improve the Runtime of the 0FI_GL_4 Extractor (NW7.0)|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0366a92-424e-2a10-569a-cc711dc1cfde]
Thanks
Chandran -
Problem with reading data from screen and inserting in table
hi ther,
im new to abap-webdyn pro. can anyone suggest how to read data from screen and insert into table when press 'ADD' button.
i done screen gui , table creation but problems with action. what the content of acton add.
is ther any link that helps me or tut??
thankx in advance!
regardsHi,
Create a context node for the screen fields for which you want to enter the values with cardinality 1.1.....
Now in the layout of your view bind the screen input fields to that context node(attributes) to the value property of the input fields...
Now in the action of ADD button....
--> go the wizard and select the read node button and select the node which you have created it generates the auto code for you.....
for example if the node is contains aone attribute like MATNR
reading the node from wizard will generate the code as....
DATA lo_nd_matnr TYPE REF TO if_wd_context_node.
DATA lo_el_matnr TYPE REF TO if_wd_context_element.
DATA ls_matnr TYPE wd_this->element_matnr.
DATA lv_matnr TYPE wd_this->element_matnr-matnr.
* navigate from <CONTEXT> to <MATNR> via lead selection
lo_nd_matnr = wd_context->get_child_node( name = wd_this->wdctx_matnr ).
* @TODO handle non existant child
* IF lo_nd_matnr IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_matnr = lo_nd_matnr->get_element( ).
* @TODO handle not set lead selection
IF lo_el_matnr IS INITIAL.
ENDIF.
* get single attribute
lo_el_matnr->get_attribute(
EXPORTING
name = `MATNR`
IMPORTING
value = lv_matnr ).
here the variable lv_matnr will contain the entered value......
now you can use this value for further process.
Thanks,
Shailaja Ainala. -
Problem with generic data source
I have a infoset using this infoset I have developed one datasource everything fine,When i see the data on RSA3 it is going to dump.
Please help.. what is the problem.....
Regards,
Sasidhar.Hi Sasidhar
RSA3 is working fine for same datasource in DEV because you must have very less amount of data in DEV as compared to PROD.
I would suggest that instead of testing only in RSA3 , load the data into BW using infopackage schedule option in background and then see it is successful.
Regards
Pradip -
Problem with VDKON data source
HI,
I am using 2lis_13_vdkon DS .
in rsa3 there is no 20 sales org value.
but in BI its updating 20 salesorg .
can any one through some .....
Thanks,
Chinna.Hi Mansi,
I a m loading init
Thanks,
Chinna -
10.1.3 Migration Issue with data-sources.xml
Hi:
Running into lots of migration issues for an application built in 10.1.3 EA, migrating to 10.1.3. production, mostly in the BC project. Here's one: the database connections built in EA were not carried over to prod, so they needed to get re-built. No biggie. But now the data-sources.xml file in the model project has duplicate entries for my data sources. I have tried directly editting that file and removing the duplicates, but when I go to run my application (ADF Faces & ADF BC) JDeveloper hangs. When I abort JDev and re-start it, the duplicate entries are back in data-sources.xml (and yes, I did save the file after making the changes). It seems that the xml file is built dynamically from definitions stored elsewhere. Where is the source? What will I need to modify to get the changes to take?
Thanks.
Johnny LeeThere is new control over when/whether JDeveloper add/updates your data-sources.xml file for the embedded server. The settings are located here:
Tools | Embedded OC4J Server Preferences | Current Workspace | Data Sources
There are some settings there that control whether/when we update the data-sources.xml -
903/902/BC4J can't get data-sources.xml conn pooling to work in production; help
I have several BC4J ears deployed to a 903 instance of OC4J being configured as a standalone
instance. I've had this problem since I started deploying in development on 902. So it's
some basic problem that I've not mastered.
I can't get data-sources.xml managed connection pooling to actually pool conn's. I'm wanting
to declare my jndi jdbc source connection pool in j2ee/home/config/data-sources.xml.
Have all BC4J apps get conns from this JNDI JDBC pool. I've removed all data-sources.xml from my BC4J ears,
and published the jndi jdbc source in my oc4j common data-sources.xml. I've tested that this is
the place controlling the conn URL/login passwd by commenting it out of config/data-sources.xml
and my BC4J apps then throw exceptions, can't get conn.
I've set the oc4j startup cmd line with the BC4J property to enabled connection pooling:
-Djbo.doconnectionpooling=true
symptom
Connections are created and closed. Instead of being put back into the pool managed by oc4j,
what ever BC4J is doing or my data-sources.xml is doing, the connections are just being created and
closed.
I can verify this via (solaris) lsof and netstat, where I see my oc4j instance under test load
with only 1 or 2 conns to the db box, and the ephemeral port is tumbling, meaning a new socket is
being opened for each conn. ;( grrrrrrr
Does anyone have a clue as to why this is happening?
Thanks, curt
my data-sources.xml
<data-sources>
<data-source
class="com.evermind.sql.DriverManagerDataSource"
connection-driver="oracle.jdbc.driver.OracleDriver"
ejb-location="jdbc/DEVDS"
location="jdbc/DEVCoreDS"
name="DEVDS"
password="j2train"
pooled-location="jdbc/DEVPooledDS"
url="jdbc:oracle:thin:@10.2.1.30:1521:GDOC"
username="jscribe"
xa-location="jdbc/xa/DEVXADS"
inactivity-timeout="300"
max-connections="50"
min-connections="40"
/>
</data-sources>I've run another test using local data-source.xml, that's packaged in the .ear. Still
pooling under BC4J doesn't work??
A piece of info is that the 903 oc4j release notes states that global conn pooling doesn't
work. Infering that the j2ee/home/config/data-sources.xml data sources aren't pooled or ??
I just tested so called local connection pooling, where I edited the data-sources.xml that
gets packaged in the ear, to include the min/max params and re-ran my test.
Still, the AM creates a new conn, it's to a new socket, and closes the conn when done. Causing
each conn to not be pooled, rather opened then closed to the DB box. As verified with lsof and
netstat, checking the ephemeral port # on the DB box side, always changes, meaning it's a
new socket and not an old pooled conn socket.
???? What the heck??
Surely if the AM conn check out / return code works properly, OC4J's pooling JDBC driver would
pool and not close the socket??
Has anywone gotten JDBC Datasource connections in BC4J to actually be pooled under OC4J??
Since I couldn't get this to work in my early 902 oc4j testing, and now can't get it to work
still under 903 OC4J, either it's my config or BC4J AM's code or OC4J?
Any thoughts on how to figure out what's not configed correctly or has a bug?
Thanks, curt -
[cross posted to the j2ee forum]
I have several BC4J ears deployed to a 903 instance of OC4J being configured as a standalone
instance. I've had this problem since I started deploying in development on 902. So it's
some basic problem that I've not mastered.
I can't get data-sources.xml managed connection pooling to actually pool conn's. I'm wanting
to declare my jndi jdbc source connection pool in j2ee/home/config/data-sources.xml and
have all BC4J apps get conns from this JNDI JDBC pool. I've removed all data-sources.xml from
my BC4J ears, and published the jndi jdbc source in my oc4j common data-sources.xml.
I've tested that this is the place controlling the conn URL/login passwd by commenting it
out of config/data-sources.xml and my BC4J apps then throw exceptions, can't get conn.
I've set the oc4j startup cmd line with the BC4J property to enabled connection pooling:
-Djbo.doconnectionpooling=true
symptom
Connections are created and closed. Instead of being put back into the pool managed by oc4j,
what ever BC4J is doing or my data-sources.xml is doing, the connections are just being created and
closed.
I can verify this via (solaris) lsof and netstat, where I see my oc4j instance under test load
with only 1 or 2 conns to the db box, and the ephemeral port is tumbling, meaning a new socket is
being opened for each conn. ;( grrrrrrr
Does anyone have a clue as to why this is happening?
Thanks, curt
my data-sources.xml
<data-sources>
<data-source
class="com.evermind.sql.DriverManagerDataSource"
connection-driver="oracle.jdbc.driver.OracleDriver"
ejb-location="jdbc/DEVDS"
location="jdbc/DEVCoreDS"
name="DEVDS"
password="j2train"
pooled-location="jdbc/DEVPooledDS"
url="jdbc:oracle:thin:@10.2.1.30:1521:GDOC"
username="jscribe"
xa-location="jdbc/xa/DEVXADS"
inactivity-timeout="300"
max-connections="50"
min-connections="40"
/>
</data-sources>Thanks Leif,
Yes, set it to the location jndi path.
A piece of info is that the 903 oc4j release notes states that global conn pooling doesn't
work. Infering that the j2ee/home/config/data-sources.xml data sources aren't pooled or ??
I just tested so called local connection pooling, where I edited the data-sources.xml that
gets packaged in the ear, to include the min/max params and re-ran my test.
Still, the AM creates a new conn, it's to a new socket, and closes the conn when done. Causing
each conn to not be pooled, rather opened then closed to the DB box. As verified with lsof and
netstat, checking the ephemeral port # on the DB box side, always changes, meaning it's a
new socket and not an old pooled conn socket.
???? What the heck??
Surely if the AM conn check out / return code works properly, OC4J's pooling JDBC driver would
pool and not close the socket??
Has anywone gotten JDBC Datasource connections in BC4J to actually be pooled under OC4J??
Since I couldn't get this to work in my early 902 oc4j testing, and now can't get it to work
still under 903 OC4J, either it's my config or BC4J AM's code or OC4J?
Any thoughts on how to figure out what's not configed correctly or has a bug?
Thanks, curt -
SPM : Integration with External Data Sources
Dear Experts,
Can you let me know with your comments or by sharing any link or documentation, as to how to Integrate SPM with External Data Sources.
And how many or what all external Data Sources, can SPM Connect with ?
Regards
PankajHi Pankaj,
There are no limitations of external data you can bring into BW and visualise in the SPM UI - you can expose custom bex queries as "datasources" in the user interface, and these can show anything you like. Its just a question about what makes sense to show in SPM.
Are you looking to bring in anything specific?
Thanks
Neil
Maybe you are looking for
-
Using Kodak AiO 5500 over Airport Express- works on my Mac, but not on PC
The subject says it all, folks. Just got a new Airport Express 802.11n and hooked up both printers (Samsung ML-1740 and Kodak AiO 5500) with a powered USB hub. Both printers are visible in Airport Utility (and Bonjour Printer Services in Windows). I'
-
My Classic IPod had been working perfectly with Windows Vista OS and on a dock. I left it unattended for 10 days, recharged it and tried to play music on the dock. All that shows on the screen is the Apple Logo and I am unable to restart or update th
-
Finding File Name And Using It To Place The Graphic Using VBscript
I'm trying to find a file name (example, <place:E:\logo.tif>) in each text frame if it's there, then remove the text from the frame and then place the file in the frame. This is to get around the feature missing from InDesign that is in PageMaker tha
-
Some TITLES are not modifiable
Why is it that when I choose titles like Lens Flare and Boogie Lights (and others) the SHOW FONTS tab in the upper left isnt there?? You can't modify these? That seems like a very odd limitation
-
Hello All, In process request I am querying the VO to display data on page. Pls note: At the end of Process request when I check dirty sttus of VO using following code then it is not dirty. But If I check at the very begining of process form request,