WSO2 not connect with Sybase

leprado's picture
Hi, must connect the WSO2 DataService with Sybase 12.5, I'm using the JDBC driver jconn2.jar. put the driver in the wso2/wso2dataservices-2.0/lib/extensions and when I start the server error is below: leprado@ICI-53026:~/wso2/wso2dataservices-2.0/bin$ ./wso2server.sh 28/09/2009 14:44:47 org.wso2.carbon.server.Main main INFO: Starting WSO2 Carbon... 28/09/2009 14:44:47 org.wso2.carbon.server.Main main INFO: Using Java Home : /usr/lib/jvm/java-6-sun-1.6.0.16/jre 28/09/2009 14:44:47 org.wso2.carbon.server.Main main INFO: Using Java Version : 1.6.0_16 28/09/2009 14:44:47 org.wso2.carbon.server.Main main INFO: Using Carbon Home : /home/leprado/wso2/wso2dataservices-2.0 28/09/2009 14:44:47 org.apache.catalina.startup.Embedded start INFO: Starting tomcat server 28/09/2009 14:44:47 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.23 28/09/2009 14:44:47 org.apache.catalina.core.StandardHost start INFO: XML validation disabled 28/09/2009 14:44:48 org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-9763 28/09/2009 14:44:48 org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-9763 28/09/2009 14:44:49 org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-9443 28/09/2009 14:44:49 org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-9443 28/09/2009 14:44:50 org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet / threw load() exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1937) at org.wso2.carbon.bridge.BundleExtensionProvider.parseJar(BundleExtensionProvider.java:94) at org.wso2.carbon.bridge.BundleExtensionProvider.provideExtensions(BundleExtensionProvider.java:61) at org.wso2.carbon.bridge.EquinoxFrameworkLauncher.deploy(EquinoxFrameworkLauncher.java:174) at org.wso2.carbon.bridge.BridgeServlet.init(BridgeServlet.java:62) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.wso2.carbon.server.TomcatRepositoryListener.run(TomcatRepositoryListener.java:72) at java.lang.Thread.run(Thread.java:619) this driver (jconn2.jar) is correct? using WSO2 DataServices with Sybase 12.5??? Thank You Leandro Prado
kalpanie's picture

Hi Leandro, Thanks for

Hi Leandro, Thanks for posting your queries and seems you have over come the problem according to the JIRA you have raised (https://wso2.org/jira/browse/DS-494). Happy to help on your future problems too. Thanks /Kalpanie.
daggett's picture

I tried the sybase

I tried the sybase connection with data services 2.2.0 and everything is ok.
You have to copy jconn2.jar jTDS2.jar libraries into
./repository/components/lib
Then create your dbs file (change connection parameters):
<?xml version="1.0" encoding="UTF-8"?>
<data name="TestSybase" baseURI="http://my.namespace">            
    <config>                        
        <property name="org.wso2.ws.dataservice.driver">com.sybase.jdbc2.jdbc.SybDriver</property>                        
        <property name="org.wso2.ws.dataservice.protocol">jdbc:sybase:Tds:HOSTNAME:5000/DATABASE</property>                        
        <property name="org.wso2.ws.dataservice.user">root</property>
        <property name="org.wso2.ws.dataservice.password">123456</property>
    </config>

    <operation name="getSysUsers">                        
        <call-query href="getSysUsers" />
    </operation>
    <query id="getSysUsers">
        <sql>select  uid, name from sysusers</sql>
        <result element="getSysUsersResponse" rowName="sysUser">
            <element name="id" column="uid"     sqlType="INTEGER"/>
            <element name="name" column="name"  sqlType="STRING" />
        </result>
    </query>
</data>
Regards, Dmitry
sumedha's picture

Hi Dmitry, Thanks for

Hi Dmitry,

Thanks for sharing your example with everyone. I have linked this comment to our Data Services HOWTOs page[1] under 'Example on Connecting to a Sybase Server'.

Thanks,

/sumedha

[1] http://wso2.org/library/3183

library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)