on 04-25-2007 1:43 PM
Hi folks,
1. I am trying to connect to MAXDB through the portal we have.
2. To do that I have defined a system with all the necessary connection params:
- URL : jdbc:sapdb://localhost/MAXDB1
- jdbc driver: com.sap.dbtech.jdbc.DriverSapDB
3. I also defined a user and password to be used when connecting to the DB
4. The jdbc driver has also been referenced in the CLASSPATH of the host
where the server resides
5. If I use the connection tests within the portal I get the following exception:
#1#: Could not get connection
java.lang.Exception
at com.sap.exception.BaseExceptionInfo.traceAutomatically(BaseExceptionInfo.java:1141)
at com.sap.exception.BaseExceptionInfo.<init>(BaseExceptionInfo.java:413)
at com.sapportals.connector.ConnectorException.<init>(ConnectorException.java:55)
at com.sapportals.connector.connection.ConnectionFailedException.<init>(ConnectionFailedException.java:37)
at com.sapportals.jdbcconnector.connection.JDBCManagedConnectionFactory.createManagedConnection(JDBCManagedConnectionFactory.java:210)
at com.sap.engine.services.connector.jca.ConnectionHashSet.match(ConnectionHashSet.java:320)
at com.sap.engine.services.connector.jca.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189)
at com.sapportals.jdbcconnector.connection.CCIConnectionFactory.getConnectionEx(CCIConnectionFactory.java:135)
at com.sap.portal.ivs.internalconnector.ConnectionProvider.getConnection(ConnectionProvider.java:302)
at com.sap.portal.ivs.internalconnector.ConnectionProvider.getConnection(ConnectionProvider.java:259)
at com.sapportals.portal.ivs.cg.ConnectorService.getConnection(ConnectorService.java:458)
at com.sapportals.portal.ivs.cg.ConnectorService.getConnection(ConnectorService.java:87)
at com.sap.portal.ivs.slcockpit.tests.TestConnectorConnection.isConnectionOK(TestConnectorConnection.java:257)
at com.sap.portal.ivs.slcockpit.tests.TestConnectorConnection.startTest(TestConnectorConnection.java:209)
at com.sap.portal.ivs.slcockpit.editor.panes.SLCockpitTestPane.setResults(SLCockpitTestPane.java:205)
at com.sap.portal.ivs.slcockpit.editor.panes.SLCockpitTestPane.createUI(SLCockpitTestPane.java:165)
at com.sap.portal.admin.editor.pane.EditorPaneProxy.createUI(EditorPaneProxy.java:130)
at com.sap.portal.admin.editor.pane.OutPane.setupComponent(OutPane.java:122)
at com.sap.portal.admin.editor.pane.EditorPaneWrapper.mySetupComponent(EditorPaneWrapper.java:143)
at com.sapportals.admin.wizardframework.components.FlowContainer.setupComponent(FlowContainer.java:83)
at com.sapportals.admin.wizardframework.core.TrivialPaneFactory.getComponent(TrivialPaneFactory.java:35)
at com.sapportals.admin.wizardframework.core.WizardInstance.doWizard(WizardInstance.java:229)
at com.sap.portal.admin.editor.Editor.doWizard(Editor.java:605)
at com.sap.portal.admin.editor.Editor.run(Editor.java:150)
at com.sap.portal.admin.editor.AbstractEditorComponent.doContent(AbstractEditorComponent.java:59)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.ClassCastException
at com.sapportals.jdbcconnector.connection.JDBCManagedConnectionFactory.createManagedConnection(JDBCManagedConnectionFactory.java:154)
Any idea how this can be solved?
I am desperate!
regards
yuval
Hi,
Can you try out this combination?
<b>jdbc/pool/SID/Classname : com.sap.dbtech.jdbc.driverSapDB.
jdbc/pool/SID/Url : jdbc:sapdb://IPadressof the machine to be connected/SID/timeout=0&sapceoption=true&unicode=true.
rdbms driver location : /sapdb/programs/runtime/jar/sapdbc.jar
rdbms connection =/jdbc/pool/SID</b>
hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yuval,
Try to use this connection URL:
jdbc:sapdb://localhost:7210/MAXDB1
(7210 is the port number for MaxDB.)
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If I run the following snippet I have no difficulty accessing the database:
import java.sql.*;
public class HelloMaxDB
{
public static void main(String[] args)
throws ClassNotFoundException, SQLException
{
String username = "MONA";
String password = "WELCOME";
String host = "localhost";
String dbname = "MAXDB1";
/*
Load JDBC Driver
*/
Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");
/*
Define Connection URL
*/
String url = "jdbc:sapdb://" + host + "/" + dbname;
/*
Connect to the Database Instance
*/
Connection connection = DriverManager.getConnection (url, username, password);
/*
Execute SQL Statements
*/
Statement stmt = connection.createStatement ();
ResultSet resultSet = stmt.executeQuery ("SELECT * FROM WORKERS");
while(resultSet.next ())
{
String col1= resultSet.getString (1);
String col2= resultSet.getString (2);
String col3= resultSet.getString (3);
String col4= resultSet.getString (4);
System.out.println(col1 + " " + col2 + " " + col3 + " " + col4);
}
/*
close all objects
*/
resultSet.close ();
stmt.close();
connection.close ();
}
}
Thanks
yuval
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Can you connect to the maxdb with the user and password u have created through DB manager?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.