Lookups in external datasource
Hello,
Is it possible to create lookup field in data object with external data-source?? If not then what is the alternative??
you mean creating table in other db?
if yes, i think it is not possible for sap java dictionary.
Similar Messages
-
External datasource problem(tns error)
hi,
i got and error while working with external datasource in BAM architect, how to fix it? Moreover i got tns error when i use tnsping utility for my XE db from command prompt
======================================
C:\Documents and Settings\rehanfa>tnsping xe
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-JUN-2
008 15:26:18
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\OracleBAM\ClientForBAM\network\admin\sqlnet.ora
TNS-03505: Failed to resolve name
======================================
and BAM archtect error while viewing contents of data model based on this external datasource
========================================
ADC Server exception in OpenViewset().
Details <<
ADC Server exception in OpenViewset().
Source: "ActiveDataCache" ID: "ADCServerException"
ERROR [08001] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
Source: ""
Internal debugging information >>
Oracle.BAM.ActiveDataCache.Common.Exceptions.CacheException: ADC Server exception in OpenViewset(). ---> System.Data.Odbc.OdbcException: ERROR [08001] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
at System.Data.Odbc.OdbcConnection.Open()
at Oracle.BAM.ActiveDataCache.ExternalDataSources.ODBC.Open(String strXml)
at Oracle.BAM.ActiveDataCache.Kernel.Datasets.ExternalStorageEngine.GetDataReader(DSEQuery oDseQuery)
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.DataImporter.ExecuteQuery()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.ExternalDataManager.ImportExternalData(String strDatasetID, String strTempName, FilterExpression filter)
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.ExternalDataManager.ImportExternalFactData()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.ExternalDataManager.GetExternalData()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Viewset.LoadData()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetBase.Initialize()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Viewset.Initialize()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetBase.Open()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetManager.InitViewset(Modifier oModifier, ViewsetOptions oViewsetOptions, Boolean bSynchronized, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetManager.OpenViewset(Modifier modifier, ViewsetOptions options, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Kernel.Server.DataStoreServer.OpenViewset(Modifier modifier, ViewsetOptions options, Int32 iTransactionID)
--- End of inner exception stack trace ---
Server stack trace:
at Oracle.BAM.ActiveDataCache.Kernel.Server.DataStoreServer.OpenViewset(Modifier modifier, ViewsetOptions options, Int32 iTransactionID)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Oracle.BAM.ActiveDataCache.Common.Core.IDataStore.OpenViewset(Modifier oModifier, ViewsetOptions options, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Remoting.ServerWrapper.OpenViewset(Modifier oModifier, ViewsetOptions options, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Viewset.Open(Context ctxAdcContext, Modifier oModifier, ViewsetOptions options)
at Oracle.BAM.Architect.DataObjectsContents.InternalContentsByRowID(String strEventParam, Boolean bEdit, Int64 lHighlightRowID, Boolean bAddBegin)
==========================================================Dear, I am facing that problem and I need some help. please tell me how the issue was resolved
-
Get default audit field behavior with an external datasource
Others have posted and blogged extensively about creating a robust audit trail for LightSwitch. However, if you are looking to achieve the default behavior with an external datasource, you could simply add the fields to your database
and write code in every entity's Inserting() and Updating() method. However, if you have many tables in your app this can be a lot of work. Here is a very easy way to DRY this up.
1. Add the audit fields to your tables
- CreatedBy
- DateCreated
- UpdatedBy
- DateUpdated
2. Use this code in the DataService class for your datasource.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Security.Server;
namespace LightSwitchApplication
public partial class ApplicationDataService
partial void SaveChanges_Executing()
EntityChangeSet changes = this.Details.GetChanges();
IReadOnlyCollection<IEntityObject> addedEntities = changes.AddedEntities;
IReadOnlyCollection<IEntityObject> modifiedEntities = changes.ModifiedEntities;
if (addedEntities.Any())
foreach (IEntityObject entity in addedEntities)
InsertAuditFields(entity);
if (modifiedEntities.Any())
foreach (IEntityObject entity in modifiedEntities)
UpdateAuditFields(entity);
private void InsertAuditFields(IEntityObject entity)
string userName = this.Application.User.FullName;
DateTimeOffset currentDateTime = DateTimeOffset.Now;
entity.Details.Properties["CreatedBy"].Value = userName;
entity.Details.Properties["DateCreated"].Value = currentDateTime;
entity.Details.Properties["UpdatedBy"].Value = userName;
entity.Details.Properties["DateUpdated"].Value = currentDateTime;
private void UpdateAuditFields(IEntityObject entity)
string userName = this.Application.User.FullName;
DateTimeOffset currentDateTime = DateTimeOffset.Now;
entity.Details.Properties["UpdatedBy"].Value = userName;
entity.Details.Properties["DateUpdated"].Value = currentDateTime;
Hopefully this helps someone.This version will check whether the table has the audit properties, thus allowing you to opt in. Paul's solution is going to be better in the long run because it checks at compile time. This was meant to be a quick way to get the default behavior.
This is not a substitute for a full audit capability (see Paul's blog) if that is your requirement.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Security.Server;
using Microsoft.LightSwitch.Details;
namespace LightSwitchApplication
public partial class ApplicationDataService
partial void SaveChanges_Executing()
EntityChangeSet changes = this.Details.GetChanges();
IReadOnlyCollection<IEntityObject> addedEntities = changes.AddedEntities;
IReadOnlyCollection<IEntityObject> modifiedEntities = changes.ModifiedEntities;
if (addedEntities.Any())
foreach (IEntityObject entity in addedEntities)
if (AuditProperties(entity))
InsertAuditFields(entity);
if (modifiedEntities.Any())
foreach (IEntityObject entity in modifiedEntities)
if (AuditProperties(entity))
UpdateAuditFields(entity);
private bool AuditProperties(IEntityObject entity)
bool hasAuditProperties = true;
bool createdBy = entity.Details.Properties.Contains("CreatedBy");
bool dateCreated = entity.Details.Properties.Contains("DateCreated");
bool updatedBy = entity.Details.Properties.Contains("UpdatedBy");
bool dateUpdated = entity.Details.Properties.Contains("DateUpdated");
bool[] checkForAuditProperties = new bool[]
createdBy,
dateCreated,
updatedBy,
dateUpdated
if (checkForAuditProperties.Any(a => a == false))
hasAuditProperties = false;
return hasAuditProperties;
private void InsertAuditFields(IEntityObject entity)
string userName = this.Application.User.FullName;
DateTimeOffset currentDateTime = DateTimeOffset.Now;
entity.Details.Properties["CreatedBy"].Value = userName;
entity.Details.Properties["DateCreated"].Value = currentDateTime;
entity.Details.Properties["UpdatedBy"].Value = userName;
entity.Details.Properties["DateUpdated"].Value = currentDateTime;
private void UpdateAuditFields(IEntityObject entity)
string userName = this.Application.User.FullName;
DateTimeOffset currentDateTime = DateTimeOffset.Now;
entity.Details.Properties["UpdatedBy"].Value = userName;
entity.Details.Properties["DateUpdated"].Value = currentDateTime; -
Hi All,
I have created an external datasource to sql server from BAM (Version is 11g- 11.1.1.5). Datasource test was successful.
Configuration
==========
Owner --- Weblogic
type --- JDBC
Driver --- weblogic.jdbc.sqlserver.SQLServerDriver
User --- <user>
Password --- <pwd>
Connection String ---- jdbc:weblogic:sqlserver://<ip>:1433;User=<user>;Password=<pwd>
===========================================================
I was creating a DataObject using this External datasource, but External Table Name is not showing any Tables...
Please let me know your suggestion on this..
Thanks,
ManikandanI created the user with the wizard Administration Assistant for windowsNT.thru I created the external user successfully but the problem is while I am connecting to sqlplus Iam unable to connect to the schema. I given connect and resource privilege to the exeternal user.
After creation of external user I entered into window with that user name and while I am connecting sqlplus at command prompt it is giving error. I given like at commond promp sqlplus "/ as sysdba". it is giving protocol error and how to connect to exeternal user with dba privilege.
what my doubt is how to connect to external user and is it necessary that external user should have the sysdba privileges. -
Hi
I have created an external datasource.I completed all steps as given in
http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_ExternalDataSource.pdf
Problem is : While verifying data in BAM architect console it is giving error saying
ADC Server exception in OpenViewset().
Source: "ActiveDataCache" ID: "ADCServerException"
Format of the initialization string does not conform to specification starting at index 82.
Source: "System.Data".
what is the error in this kindly revert back
,Thankshi,
i get the same error, ho you fixed it.Moreover i get an tns error when i use tnsping utility for my XE db from command prompt
ADC Server exception in OpenViewset().
Details <<
ADC Server exception in OpenViewset().
Source: "ActiveDataCache" ID: "ADCServerException"
ERROR [08001] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
Source: ""
Internal debugging information >>
Oracle.BAM.ActiveDataCache.Common.Exceptions.CacheException: ADC Server exception in OpenViewset(). ---> System.Data.Odbc.OdbcException: ERROR [08001] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
at System.Data.Odbc.OdbcConnection.Open()
at Oracle.BAM.ActiveDataCache.ExternalDataSources.ODBC.Open(String strXml)
at Oracle.BAM.ActiveDataCache.Kernel.Datasets.ExternalStorageEngine.GetDataReader(DSEQuery oDseQuery)
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.DataImporter.ExecuteQuery()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.ExternalDataManager.ImportExternalData(String strDatasetID, String strTempName, FilterExpression filter)
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.ExternalDataManager.ImportExternalFactData()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Utilities.ExternalData.ExternalDataManager.GetExternalData()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Viewset.LoadData()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetBase.Initialize()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.Viewset.Initialize()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetBase.Open()
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetManager.InitViewset(Modifier oModifier, ViewsetOptions oViewsetOptions, Boolean bSynchronized, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Kernel.Viewsets.ViewsetManager.OpenViewset(Modifier modifier, ViewsetOptions options, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Kernel.Server.DataStoreServer.OpenViewset(Modifier modifier, ViewsetOptions options, Int32 iTransactionID)
--- End of inner exception stack trace ---
Server stack trace:
at Oracle.BAM.ActiveDataCache.Kernel.Server.DataStoreServer.OpenViewset(Modifier modifier, ViewsetOptions options, Int32 iTransactionID)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Oracle.BAM.ActiveDataCache.Common.Core.IDataStore.OpenViewset(Modifier oModifier, ViewsetOptions options, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Remoting.ServerWrapper.OpenViewset(Modifier oModifier, ViewsetOptions options, Int32 iTransactionID)
at Oracle.BAM.ActiveDataCache.Viewset.Open(Context ctxAdcContext, Modifier oModifier, ViewsetOptions options)
at Oracle.BAM.Architect.DataObjectsContents.InternalContentsByRowID(String strEventParam, Boolean bEdit, Int64 lHighlightRowID, Boolean bAddBegin) -
Address Lookup in External LDAP
I did changes in my $OH/j2ee/OC4J_UM/config/oc4j.properties file in order to Lookup in a external LDAP:
toolkit.ldap.dir.1.label=Contacts
toolkit.ldap.dir.1.url=ldap://OtherLinuxHost.mydomain.com:389
toolkit.ldap.dir.1.searchbase=ou=Contacts,dc=mydomain,dc=com
toolkit.ldap.dir.1.filter=objectClass=inetOrgPerson
toolkit.ldap.dir.1.attribute.mail=mail
toolkit.ldap.dir.1.attribute.lname=sn
toolkit.ldap.dir.1.attribute.fname=givenName
toolkit.ldap.dir.1.attribute.alias=uid
In my Collaboration Suite - Messages when I am creating
New Message, click in Blue Torch,
Select from list the "Contactss" directory
Select "Email Address" "contains" * => Go
UM shows the contacts from the External Ldap, but when I try to bcc, or cc or to, it is not updating my destination fileds (bcc/ cc/ to). But if instead of select the List "Contacts" I select the Internal Directory (OID) it works fine?
Which argument I miss ? or how I configure UM for export the email address from the AddrLookup Window to the Message_compose Window in the destination fields (bcc or cc or to) ?
Thanks alot for any help.It is happening to us as well, we have OCS release 2 9.0.4.2 on Linux trying to access an external OpenLDAP linux server for shared contacts.
After we get the results of the search on the external LDAP, no button works on the Address Lookup window except "Close". It doesn't matter is we select the "Corporate Book" or other Oracle internal address books; we have to close the window and open it again to do a new search.
Are you seeing the same behavior?
I will have a phone conference today (5/11/05) with Oracle support to talk about this issue, we have had a TAR open for about 20 days now.
I'll keep you posted with the results. -
Lookups to External Data Sources
Is it possible to create data object lookup fields that point to data objects that are External Data Sources rather than Internal Data Objects.
Thanks,
Mark.Thanks for you reply Matt.
Yes I did mean creating lookup fields to External Data Objects. I believe our issue is actually that we were trying to create a lookup from an External Data Object to another External Data Object - which doesn't seem to work.
We have confirmed that we can lookup from an Internal Data Object to an External Data Object which will cater for the majority of the use cases. For any other cases (external looking up external) we will produce a new Internal Data Object and flatten out the lookup levels.
Mark. -
Lookup a MySQL Datasource with a EntityBean EJB with jboss
Hy all,
For a few days, i have problems to instance a datasource from my Entitybean
EJB
jboss release is 3.2.2 , MySQL 3.23.38
i use mysql-connector-java-3.0.9-stable-bin.jar for jdbc connectivity
Here is the source of my datasource mysql-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>MySQLmydbDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/mydb</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>mylogin</user-name>
<password>mypass</password>
</local-tx-datasource>
</datasources>
The datasource is deployed in jboss cause i see the ligne as followed in the
administration console
http://localhost:8080/jmx-console
a.. name=MySQLmydbDS,service=LocalTxCM
a.. name=MySQLmydbDS,service=ManagedConnectionFactory
a.. name=MySQLmydbDS,service=ManagedConnectionPool
My EJB deploy without problems when i put the jar in the deploy directory
Here is the part of the source of my EJB causing Exception
public void setEntityContext(EntityContext context) {
this.context = context;
try {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/ClientDB");
/* ----> ERROR */
connexionBD = ds.getConnection();
catch (Exception e) {
throw new EJBException("Connexion � la base de donn�es impossible : "
+ e.getMessage());
Here my ejb-jar.xml
<ejb-jar>
<description>Descripteur de d�ploiement pour l'EJB client</description>
<display-name>EJB Client</display-name>
<enterprise-beans>
<entity>
<description>EJB Client ( BMP )</description>
<ejb-name>Client</ejb-name>
<home>com.foobar.ejbs.ClientHome</home>
<remote>com.foobar.ejbs.Client</remote>
<ejb-class>com.foobar.ejbs.ClientBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<resource-ref>
<res-ref-name>jdbc/ClientDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Client</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
And finally the jboss.xml
<jboss>
<enterprise-beans>
<entity>
<ejb-name>Client</ejb-name>
<jndi-name>ejb/Client</jndi-name>
<resource-ref>
<res-ref-name>jdbc/ClientDB</res-ref-name>
<jndi-name>MySQLmydbDS</jndi-name>
</resource-ref>
</entity>
</enterprise-beans>
</jboss>
The error message when i execute my client :
java.rmi.ServerException : RemoteException occured in server Thread; nested
exception is :
java.rmi.ServerException: EJBException:; nested exception is :
javax.ejb.EJBException: Connexion � la base de donn�e impossible : Could not
dereference object
Thanks in advance if you've already seen this problem.
AntoineI uses MSSQLERVER 2000,<res-ref-name>jdbc/MSSQLDS</res-ref-name>
<jndi-name>java:/java:/MSSQLDS</jndi-name>
but DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/MSSQLDS")cann't be execute throwing execption:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: RuntimeException; nested exception is:
java.lang.NullPointerException
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy1.loginUser(Unknown Source)
at au.com.tusc.client.SessionBMPClient.testBean(SessionBMPClient.java:55)
at au.com.tusc.client.SessionBMPClient.main(SessionBMPClient.java:77)
Caused by: java.rmi.ServerException: RuntimeException; nested exception is:
java.lang.NullPointerException
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:361)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NullPointerException
at au.com.tusc.dao.StoreAccessDAOImpl.loginUser(StoreAccessDAOImpl.java:82)
at au.com.tusc.session.StoreAccessSession.loginUser(StoreAccessSession.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
... 21 more
you said:"Also, when you get a change I believe it recommended that the name and password are placed in the login-config.xml ".
How where to set up name and password in the login-config.xml .
additionally,i uses jboss3.2.3,on the jmx-console management,i cann't find "jboss;service=Hypersonic SQL",why? -
Fill Grid with external datasource
Someone to loaded data from external database to a grid in SAP BO with SDK
I need to show data from a external system with MySQL to transfer the purchase orders to SAP
Best Regards
ClaudioHere's a little piece of code to work with. You have to code your part for loading for your datasource and then pass the value to each UserDataSource.
Try
Dim oForm As SAPbouiCOM.Form
Dim oMatrix As SAPbouiCOM.Matrix
'Load your Data on a DataSet or other DataSource method
oMatrix.Clear()
For Each oColumn As SAPbouiCOM.Column In oMatrix.Columns 'Bind your columns
Dim strColumn As String = Replace(Replace(oColumn.UniqueID, "U_", ""), "UD", "")
If oColumn.UniqueID = "#" Or Left(oColumn.UniqueID, 2) = "V_" Then
Else
Try
oForm.DataSources.UserDataSources.Item("UD" & Replace(strCOlumn, "U_", ""))
Catch ex As Exception
Select Case rst.Fields.Item(strCOlumn).Type
Case SAPbobsCOM.BoFieldTypes.db_Alpha : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_SHORT_TEXT, rst.Fields.Item(strCOlumn).Size)
Case SAPbobsCOM.BoFieldTypes.db_Memo : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_LONG_TEXT, rst.Fields.Item(strCOlumn).Size)
Case SAPbobsCOM.BoFieldTypes.db_Date : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_DATE, rst.Fields.Item(strCOlumn).Size)
Case SAPbobsCOM.BoFieldTypes.db_Float
Select Case rst.Fields.Item(strCOlumn).SubType
Case SAPbobsCOM.BoFldSubTypes.st_None : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_QUANTITY, rst.Fields.Item(strCOlumn).Size)
Case SAPbobsCOM.BoFldSubTypes.st_Measurement : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_MEASURE, rst.Fields.Item(strCOlumn).Size)
Case SAPbobsCOM.BoFldSubTypes.st_Percentage : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_PERCENT, rst.Fields.Item(strColumn).Size)
Case SAPbobsCOM.BoFldSubTypes.st_Price : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_PRICE, rst.Fields.Item(strColumn).Size)
Case SAPbobsCOM.BoFldSubTypes.st_Quantity : oForm.DataSources.UserDataSources.Add("UD" & Replace(strColumn, "U_", ""), SAPbouiCOM.BoDataType.dt_QUANTITY, rst.Fields.Item(strCOlumn).Size)
Case SAPbobsCOM.BoFldSubTypes.st_Rate : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_RATE, rst.Fields.Item(strCOlumn).Size)
Case SAPbobsCOM.BoFldSubTypes.st_Sum : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_SUM, rst.Fields.Item(strCOlumn).Size)
End Select
Case SAPbobsCOM.BoFieldTypes.db_Numeric : oForm.DataSources.UserDataSources.Add("UD" & Replace(strCOlumn, "U_", ""), SAPbouiCOM.BoDataType.dt_SHORT_NUMBER, rst.Fields.Item(strCOlumn).Size)
End Select
End Try
oColumn.DataBind.SetBound(True, "", "UD" & oColumn.UniqueID)
oForm.DataSources.UserDataSources.Item("UD" & Replace(strCOlumn, "U_", "")).Value = ""
End If
Next
For i As Int32 = 1 To rst.RecordCount 'load your data here
For Each oColumn As SAPbouiCOM.Column In oMatrix.Columns
If oColumn.UniqueID = "#" Or Left(oColumn.UniqueID, 2) = "V_" Then
'do nothing
Else
If Len(oColumn.DataBind.Alias) > 0 Then
Select Case rst.Fields.Item(strFieldName).Type
Case SAPbobsCOM.BoFieldTypes.db_Date
oForm.DataSources.UserDataSources.Item(oColumn.DataBind.Alias).Value = rst.Fields.Item(strFieldName)
Case Else
oForm.DataSources.UserDataSources.Item(oColumn.DataBind.Alias).Value = rst.Fields.Item(strFieldName).Value
End Select
End If
End If
Next
oMatrix.AddRow(1)
oMatrix.SetLineData(i)
rst.MoveNext()
Next
Catch ex As Exception
SBO_Application.MessageBox("Error on column : " & " - " & ex.Message)
End Try -
Can XI Pro link to external datasources to validate data?
I am testing out XI Pro and FormsCentral and wondering if XI Pro is able to either automatically number a form field (like invoice number) or can it pull from a datasource to know that a number has already been used...no duplicates etc?
Thanks,
DYou can only append SSOToken in the URL...
Then in your external web app:
1. Validate SSO Token and you can get current login if the token hasn't expired
2. SSO Token login. It will return a jessionid
3. Establish a session in your app or use stateless web service call
Please refer to OnDemWebSvcs.pdf to find detailed usage. The latest version is R19.
Thanks,
P -
Personal Communicator Incorrect lookup info external numbers
Hello,
We're in the process of deploying Personal Communicator 8 with Presence 8 and have had some strange things happen. At certian times if someone dials an outside number that has the same last 4 digits as an internal person, CUPC will show the internal name and number. This also happens for incoming external calls as well. CUPS is LDAP integrated to AD and the telephone number it uses is the 4 digit extension. I'm guessing some directory look up rules need to be defined but I've not found and good documentation to explain how to properly configure them. I've already created appliciation dial rules to allow people to dial out.
Suggestions?
Thanks!Make sure you are testing with CUPC 8.0 MR2 aka 8.0(3), version below that are affected by CSCtf29722 Directory Lookup Rules used for outbound calls. Though from what you are describing it seems to be a display issue rather than a call failure
For how application dial rules work there are some good examples in the cucimoc documentation. The principle remains the same regardless of the product you use. Keep in mind that application dial rules are for translation number from the directory format to the format CallManager understands and directory lookup rules do the opposite: from CallManager number format to the format that the directory will understand. Also remember that a dial rule will stop processing once it matches a hit. -
How to sync from a external datasource on a timed interval ?
Every 30 minutes, I want to pull data from an external data source.
I want to avoid letting the user see partial data.
The only thing I can think of is to truncate / load table A. Then do a t-sql 'merge to Table B' <-- table B is permanent data that can be accessed by users.
Is there a different approach where I don't truncate Table A?
Thanks, PeterI want to avoid letting the user see partial data.
That statement can mean many things. In addition, you only refer to a single table - and it is unusual for a database to consist of a single table so there may be aspects of your system are not obvious to the outsider. Ignoring that, the answer
to your question relies on a better understanding of "external data source" and what capabilities it supports. Obviously you don't WANT to duplicate data if you do not need to - so have you considered referencing this data directly without importing
it?
SSIS is the general tool for importing and exporting - so that is an option. Is there any particular reason behind the current implementation choice? If you need to do any significant validation or error checking or error logging, you will
find that the capabilities of plain tsql (and bcp or bulk insert) are limited. You will also need to consider what portion of data in your database is affected by this process - a real data analysis process will help you understand the scope of work
here. -
JNDI lookup for external SessionBean fails
Hello, i have a problem i've been trying to solve all day and would appreciate it if you could help me.
I have an Ear file with an EJB Session Bean(EAR: EigenlijstenEar/EJB: EigenlijstenEJB) which i am attempting to use in a servlet in another web/ear (Web: HagaPortalWeb/EAR: HagaPortalEar). I have read and followed the guidance of http://help.sap.com/saphelp_nw04/helpdata/en/55/29ed5eff965448941c0b42f01b9804/frameset.htm, but to no avail.
The error i get is: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name webContainer/applications/hagaziekenhuis.nl/HagaPortalEar/HagaPortalWeb/java:comp/env/ejb/EigenlijstenSessionBean, cannot resolve object reference. [Root exception is com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at EigenlijstenEar, the whole lookup name is localejbs/hagaziekenhuis.nl/EigenlijstenEar/EigenlijstenSessionBean.]
my lookup code in a servlet in HagaPortalWeb:
Context ctx = new InitialContext();
EigenlijstenSessionLocalHome eigenlijstenHome =
(EigenlijstenSessionLocalHome) ctx.lookup(
"java:comp/env/ejb/EigenlijstenSessionBean");
content of my web.xml in HagaPortalWeb:
<ejb-local-ref>
<ejb-ref-name>ejb/EigenlijstenSessionBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>nl.hagaziekenhuis.medisurf.ejbs.eigenlijsten.EigenlijstenSessionLocalHome</local-home>
<local>nl.hagaziekenhuis.medisurf.ejbs.eigenlijsten.EigenlijstenSessionLocal</local>
<ejb-link/>
</ejb-local-ref>
content of my application-j2ee-engine.xml in Ear project HagaPortalEar:
<reference
reference-type="hard">
<reference-target
provider-name="hagaziekenhuis.nl"
target-type="application">EigenlijstenEAR</reference-target>
</reference>HI Arie,
If you are accessing enterprise beans with J2EE clients (servlets, JSP, other enterprise beans, J2EE application clients), do not specify and use this arbitrary JNDI name. Instead, define EJB references in the clientsu2019 deployment descriptors and access the beans using these references. For more information, check the following link
http://help.sap.com/saphelp_nw04/helpdata/en/a0/019b3e25f95f14e10000000a114084/content.htm
if the above does not work try the following:--
Try to lookup the Ejb by its JNDI name given in the EJB-J2ee-engine.xml file if it does not exist there give any valid name and try to lookUp.
or try to lookup the ejb by its default jndi name.
"localejbs/bean name>"
http://help.sap.com/saphelp_nw04/helpdata/en/38/3e5a4201301453e10000000a155106/frameset.htm
in the Above link refer the second option "Lookup from a Non-J2EE Java Application"
Siddharth
Edited by: Siddharth Jain on Aug 22, 2008 7:13 AM -
Javax.naming.NameNotFoundException while trying to lookup for the Datasourc
I get following exception when the datasource is looked up after redeployment.
javax.naming.NameNotFoundException: Unable to resolve 'jdbc.oracleDS' Resolved: '' Unresolved:'jdbc' ; remaining name 'jdbc.oracleDS'
But after redeployment if I restart the application server, this problem gets resolved automatically and I am able to get the connection.
So is there any specific configuration, so that I can access the Database connections without restarting the servers after re-deployment?
Connection Pool and DataSource are targetted to a Cluster.
Please let me know if there is any solution for this.
Thanks in advance !there are multiple option of creating data source.which one i should use.
should i use generic one. what is URL information for oracle xe client.what is driver name? -
Deploy Java Dictionary in external datasource
Hi Experts,
I have created a new datasource in JDBC connector via visual administrator. Through NWDS, i created a java dictionary project, and deployed the table. Every thing works fine all table objects got created, however, the deployment is happening in the default datasource, which is inside SAP database instance, instead of my new datasource.
Can anyone advice, how can i force the dictionary projet deployment to a specific datasource?
thanks in advance.
Regards,
Raviyou mean creating table in other db?
if yes, i think it is not possible for sap java dictionary.
Maybe you are looking for
-
i can't open my iPhoto, it was working very slow and now its not working at all, when i try to open it it shows this message: The application "iPhoto" unexpectedly quit while trying to restore its windows. Do you want to try to restore its windows a
-
How do I get itunes to recognise my new iphone 4..?
Hey guys, how do I get itunes to recognise my new iphone4...? Aaaaaargh!!
-
so I finally installed Leopard. Before this I had been using Super Duper to do my backups. After installing Leopard I used SD to back up my main drive before running Time Machine just to be sure I had the new OS on it. After working yesterday I ran T
-
Hello -- newbie problem/question (you can almost smell the newbie-ness) I am trying to load a SWF file (local file, in the same directory as the FLA file) into a new Flash CS3/AS3 file and, after a bit of searching, found information that led me to a
-
Start multiple services on a list of computers
I'm trying to write a PowerShell script to start multiple services for a computer list in a txt file. I know there has to be a way, but I'm running in circles trying to figure it out. My latest test is Get-ContentD:\Scripts\test.txt|Foreach-Object{