cancel
Showing results for 
Search instead for 
Did you mean: 

J2SE JDBC Adapter

Former Member
0 Kudos

Hi

I'm trying to setup a Plain J2SE JDBC adapter but i'm not sure what format the properties should have in the configuration.

What should i fill in for the JDBC driver section? I have a MS SQL implementation -

db.jdbcDriver=?????

i tried db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver but that didnt work.

The log says ERROR: Attempt to load JDBC driver failed ("java.lang.ClassNotFoundException: ")

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> i tried db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver but that didnt work.

>

> The log says ERROR: Attempt to load JDBC driver failed ("java.lang.ClassNotFoundException: ")

The parameter is correct. You have to provide the JDBC library in the clathpath of J2SE adapter command file run_adapter.bat

or run_adapter.cmd

Former Member
0 Kudos

Hi

I'm not sure what you mean about provide the JDBC library in the classpath of J2SE adapter command file run_adapter.bat or run_adapter.cmd

I'm running the J2SE adpater as a service. So which file should i edit?

Thanks

stefan_grube
Active Contributor
0 Kudos

for windows use run_adapter.bat

You can enter the library reference directly here or use the CLATHPATH variable of system environment and add the reference there.

Former Member
0 Kudos

i added it to the run_adapter.bat like this -

@echo off

setlocal > nul

set RUNADAPTER_ARGS=/supportsrestore

:loop

java -Xmx128m -classpath sqljdbc.jar;aii_msg_adapter.jar;aii_msg_runtime.jar;httpclient.jar;aii_af_trace.jar;aii_rfcadapter.jar;pmi.jar;exception.jar;jperflib.jar;guidgenerator.jar;aii_utilxi_misc.jar;aii_util_cimaccess.jar;sapxmltoolkit.jar;logging.jar;lcrclient.jar;sldclient.jar;tc_sec_core.jar;tc_sec_api.jar;jms.jar;servlet.jar;jarm.jar;%CLASSPATH%; com.sap.aii.messaging.adapter.AdapterImpl %RUNADAPTER_ARGS%

if ERRORLEVEL 42 goto restart

goto :eof

:restart

set RUNADAPTER_ARGS=/supportsrestore /restore

goto loop

:eof

endlocal > nul

Its still not working though. What am i doing wrong?

stefan_grube
Active Contributor
0 Kudos

Did you put the jar in the same folder as the other jars mentioned in the batch file?

I assume you have stopped the service and restarted again?

Former Member
0 Kudos

Hi

Yes i added the entries in the bat file and now its working perfectly.

I had to uninstall and re-install the service for it to pick up but its all good now

Thanks!

Former Member
0 Kudos

Hi

Yes i added the entries in the bat file and now its working perfectly.

I had to uninstall and re-install the service for it to pick up but its all good now

Thanks!

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>The log says ERROR: Attempt to load JDBC driver failed ("java.lang.ClassNotFoundException: ")

You did not install jdbc drivers for mssql properly or not at all. First check the installation procedure whether you did or not.

You get runtime exception: ClassNotFoundException.. This shows that your driver files are not installed or not referencing in the classpath.

Nothing problem in your jdbc communication channel. Check Drivers installation again

Question: What PI version and jdk version are you using ? This should match MSSQLDrivers version too... ?

Former Member
0 Kudos

>

> Hi

>

> I'm trying to setup a Plain J2SE JDBC adapter but i'm not sure what format the properties should have in the configuration.

>

> What should i fill in for the JDBC driver section? I have a MS SQL implementation -

>

> db.jdbcDriver=?????

>

>

> i tried db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver but that didnt work.

>

> The log says ERROR: Attempt to load JDBC driver failed ("java.lang.ClassNotFoundException: ")

>

> Thanks

Have you upload the DB Driver on PI System?

I think that you did't do this...