SAP NetWeaver Application Server for Java

To OpenSQL or Native on JAVA

Over the last year and a half we have been developing our SAP PI/PO testing application, Integration Regression Tool. Which is a tool to test SAP PI/PO applications. The application is a Spring based application where we are using some of the different components of the Spring framework as MVC, JDBC, Security and etc. We have med the application to native Java application that can be deployed using  SCA on …

Read More »

ADS Configuration in Netweaver 7.5

Hi, In this blog, We are doing Adobe document service configuration in SAP netweaver 7.5 Prerequisites– 1) SAP Netweaver 7.5 As Java System (ADS should be installed). 2) SAP S4HANA  system Login on to the portal system. Create ADSUSER  and assign the SAP_ADSCALLER and SAP_ADSMONITOR in the role tab. Login to S/4HANA System and enter transaction “sm59” to maintain RFC Connection enter the user created in portal system. ADSuser Go to PFCG tcode …

Read More »

Authentication with either Logon ID or E-Mail Address

In the Identity management of NetWeaver Application Server Java there are different user related information stored, like Logon ID, Last Name, First Name, E-mail Address etc. Since the logon IDs may not be user friendly, there is a need to enable authentication of the users with another unique identifier of the user, for example with their e-mail address. This option is possible by adding the UserMappingMode=Email parameter to the BasicPasswordLoginModule. …

Read More »

SAP NW JAVA Support Tool

Introduction When communicating with SAP Product Support, on some occasions you may be asked to capture & provide traces along with system component information. Without adequate guidance and knowledge the process of collecting such information data can prove to be time consuming. SAP Product Support has developed & released the SAP NW Java Support Tool to help simplify the process of collecting traces, logs, and system component information.  The SAP …

Read More »

HANA Hibernate Exception.

I am trying to connect to HANA via hibernate java, i am using reverse engineering method. First there is no driver in existing drivers for HANA, so i use generic jdbc and set the properties for HANA db, but an exception is thrown: com.sap.db.jdbc.exceptions.jdbc40.SQLInvalidAuthorizationSpecException: [10]: authentication failed     at com.sap.db.jdbc.exceptions.jdbc40.SQLInvalidAuthorizationSpecException.createException(SQLInvalidAuthorizationSpecException.java:40)     at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:301)     at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185)     at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:102)     at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1030)     at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:820)     at com.sap.db.util.security.AbstractAuthenticationManager.connect(AbstractAuthenticationManager.java:43)     at …

Read More »

How to resolve ‘Source not found’ when debugging in Eclipse

When you are debugging in Eclipse, sometimes when you debug into a method, you will meet with “Source not found” message, for example below. In my example, this is because the corresponding source code for AbstractTypeHierarchyTraversingFilter does not exist in local workspace. The source code could not be automatically downloaded via “Maven -> Download Sources”. [Note] This very issue in this example could also be resolved by changing dependency configuration …

Read More »

How does component-scan work in Spring Framework

In Spring configuration xml file, we can define a package for tag component-scan, which tells Spring framework to search all classes within this specified package, to look for those classes which are annotated with @Named or @Component. I am very curious about how Spring framework achieves this scan, so I have made some debugging to figure it out. In this blog How to find the exact location where bean configuration …

Read More »

How does @Autowired work in Spring framework

Suppose I have a bean named HelloWorld which has a member attribute points to another bean User. With annotation @Autowired, as long as getBean is called in the runtime, the returned HelloWorld instance will automatically have user attribute injected with User instance. How is this behavior implemented by Spring framework? 1. in Spring container implementation’s refresh method, all singleton beans will be initialized by default. When the HelloWorld bean is …

Read More »

How to find the exact location where bean configuration file is parsed in Spring framework

We can define bean configuration in xml and then can get instantiated bean instance with help of all kinds of containers for example ClassPathXmlApplicationContext as displayed below: The content of Beans.xml: <?xml version="1.0" encoding="UTF-8"?> <!-- http://stackoverflow.com/questions/18802982/no-declaration-can-be-found-for-element-contextannotation-config --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <bean id="helloWorld" class="main.java.com.sap.HelloWorld"> <property name="message" value="sss"/> <property name="testMin" value="2"/> <property name="phone" value="1"/> </bean> </beans> Where can we set breakpoint to start? No hint. Here is …

Read More »

A real example of using volatile keyword in Java

Consider the following example: package thread; public class ThreadVerify { public static boolean stop = false; public static void main(String args[]) throws InterruptedException { Thread testThread = new Thread(){ @Override public void run(){ int i = 1; while(!stop){ //System.out.println("in thread: " + Thread.currentThread() + " i: " + i); i++; } System.out.println("Thread stop i="+ i); } }; testThread.start(); Thread.sleep(1000); stop = true; System.out.println("now, in main thread stop is: " + …

Read More »