Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6FF032009F4 for ; Thu, 26 May 2016 10:57:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6E152160A10; Thu, 26 May 2016 08:57:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6845F160939 for ; Thu, 26 May 2016 10:57:48 +0200 (CEST) Received: (qmail 20371 invoked by uid 500); 26 May 2016 08:57:47 -0000 Mailing-List: contact dev-help@openmeetings.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openmeetings.apache.org Delivered-To: mailing list dev@openmeetings.apache.org Received: (qmail 20358 invoked by uid 99); 26 May 2016 08:57:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2016 08:57:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E31CB1804C2 for ; Thu, 26 May 2016 08:57:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 8wQNEnNC0j4l for ; Thu, 26 May 2016 08:57:43 +0000 (UTC) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E5F315F255 for ; Thu, 26 May 2016 08:57:42 +0000 (UTC) Received: by mail-it0-f46.google.com with SMTP id g126so841503ite.1 for ; Thu, 26 May 2016 01:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=C+/AjXxn0VBXhPffVLBy7p7m/o9P+VNPbONeRZ3XYz4=; b=T83AhVlAoaGUa+5ax692KFLy4VJWwyKZHu76OxWc7sKXOaAmvZm4Ynn1GKeXeZ3Qr4 A7dbWL0DUyK521QmkA4WARpAOyhJIIbMeOyL4YJP2vMqyDa+i7NQcIzuSahL0OzyI3Ef H4G4Qp29t8OSSW6pFYf/M76O4GzpPu/HFEedAtr/MpBJr+bdChKFLJJKhFF9H2g5NDsB tWpbTCJRem70z0vx+tu+Hvap8Y1kuOqa4uletWh5nZrzSNOIXp/2SuT2CNYtKh5QhHO4 05qRx3d3orbKJGZSc/YXJC7t7WJsg6B0fFWo83x7U+dfqcspmcZis1yEHim7KT3oPSWm VfuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=C+/AjXxn0VBXhPffVLBy7p7m/o9P+VNPbONeRZ3XYz4=; b=eY0KF1KK4T28jQHT9OU5TnXCDtkhfq+Wn+0YvfX0zjq85m3ekNQqCHtrpB79GdxVPn VXud0ai8OC6Hc86js62VsqOC91e2p7axSFS6JiUpe93KzX7Hd9YULd3B0S34SStHm3mt QW1wPY0LQH6HSgAqkTe1s94bwD/Z3h2j/t0ilgQrGX8dUZpg56udYyHrqXtUWaMswuNo AyOiir4TfTOCAYXn8LMXv8bUzyjURTbnGe+kbUTdjW4m/blZkZMZdzOC407Xf6FXs0D/ zV0EYUL74PgzAzAeskL+tzci5CKL1ilOoR2aYKEhxTs5uLpARtT8FoJhRp0aWmlgnLTL t8bw== X-Gm-Message-State: ALyK8tLvF2o+Arj9bx/es1g/T+AB3Nb/dOHbIDSApUW6aqJH0+D2kvetAyI5rK6Rc4LHPJIa29MG9QKz4fxHAA== MIME-Version: 1.0 X-Received: by 10.36.105.13 with SMTP id e13mr2075158itc.86.1464253061614; Thu, 26 May 2016 01:57:41 -0700 (PDT) Received: by 10.79.126.1 with HTTP; Thu, 26 May 2016 01:57:41 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 May 2016 11:57:41 +0300 Message-ID: Subject: Re: Connect to Oracle DB with Service name instead of SID From: Ioannis Vlachos To: dev@openmeetings.apache.org Content-Type: multipart/alternative; boundary=001a11452cec997a5a0533bafbf5 archived-at: Thu, 26 May 2016 08:57:49 -0000 --001a11452cec997a5a0533bafbf5 Content-Type: text/plain; charset=UTF-8 This is a big email, sorry: I was able to connect to the DB through the command line admin. I just had to remove all parameters that had to do with the database (e.g. --db-type) and then the script uses the persistence.xml as it is, so it can read the /SERVICE_NAME at the end. I used the command: admin -i -v -tz Europe/Athens -email ioannis.vlachos@gmail.com -group gspr -user admin --password admin --system-email-address noreply@gsis.gr Then I had this exception: Caused by: org.apache.openjpa.persistence.PersistenceException: ORA-00904: : invalid identifier {stmnt 251155815 CREATE TABLE appointment (id NUMBER NOT NULL, is_connected_event NUMBER, deleted NUMBER, description CLOB, end TIMESTAMP, icalId VARCHAR2(255), inserted TIMESTAMP, isdaily NUMBER, ismonthly NUMBER, isweekly NUMBER, isyearly NUMBER, language_id NUMBER, location VARCHAR2(255), password VARCHAR2(255), is_password_protected NUMBER, reminder VARCHAR2(20), is_reminder_email_send NUMBER, start TIMESTAMP, appointmentname VARCHAR2(255), updated TIMESTAMP, user_id NUMBER, room_id NUMBER, PRIMARY KEY (id))} [code=904, state=42000] ... I tried to run the create command on sql developer (directly on oracle) and I had the same error. It turns out that the error was caused by the *start TIMESTAMP* column. The word "start" is reserved by oracle and needs special treatment. So I ran the command through sql developer using *"START" TIMESTAMP* (with the ") and the table was created. I ran again the admin command line and it seemed to have created the DB. Unfortunately, it crashes later on with the stacktrace shown at the end of the mail. It seems to have something to do with the Naviglobal entity. Any ideas would be appreciated. I will send a mail to the users mailing list also, in case someone has come across the same errors . 2016-05-26 10:56:04,134 [main] ERROR org.apache.openmeetings.cli.Admin - Install failed org.springframework.orm.jpa.JpaSystemException: 10; nested exception is org.apache.openjpa.persistence.PersistenceException: 10 at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:418) at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:122) at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:521) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) at org.apache.openmeetings.db.dao.basic.NavigationDao$$EnhancerBySpringCGLIB$$b65241b9.addGlobalStructure() at org.apache.openmeetings.installation.ImportInitvalues.loadMainMenu(ImportInitvalues.java:118) at org.apache.openmeetings.installation.ImportInitvalues.loadSystem(ImportInitvalues.java:517) at org.apache.openmeetings.installation.ImportInitvalues.loadAll(ImportInitvalues.java:533) at org.apache.openmeetings.cli.Admin.process(Admin.java:278) at org.apache.openmeetings.cli.Admin.main(Admin.java:528) Caused by: org.apache.openjpa.persistence.PersistenceException: 10 at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2029) at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81) at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1526) at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:932) at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:571) at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) ... 13 common frames omitted Caused by: java.lang.ArrayIndexOutOfBoundsException: 10 at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950) at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623) at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:1212) at oracle.jdbc.driver.T4CPreparedStatement.(T4CPreparedStatement.java:28) at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3140) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:6022) at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:807) at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:807) at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:450) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:517) at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:448) at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:448) at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:441) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:288) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:113) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:79) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:100) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:88) at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550) at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106) at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:104) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:77) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131) at org.apache.openjpa.datacache.DataCacheStoreManager.flush(DataCacheStoreManager.java:668) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2205) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2103) at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2021) ... 18 common frames omitted 2016-05-25 12:08 GMT+03:00 Maxim Solodovnik : > according to the stackowerflow connection string should be > "*jdbc:oracle:thin:@//oracle.hostserver2.mydomain.ca:1522/ABCD > *" > OM requires > host > port > db > > could you please try the following: > host = "*//oracle.hostserver2.mydomain.ca > *" (don't forget "//" in the > beginning) > port = 1521 (or other valid port) > db = "Service Name" > > same options are available for command line admin > > > > On Wed, May 25, 2016 at 1:15 PM, Ioannis Vlachos < > ioannis.vlachos@gmail.com> > wrote: > > > I've done that and the web installer gives the error I've sent you. > > Command line admin doesn't work either. There is no way (?) to specify > > whether you want to use SID or Service name and the persistence.xml > created > > uses the SID syntax. > > > > 2016-05-25 9:34 GMT+03:00 Maxim Solodovnik : > > > > > Can you try to manually copy and modify oracle specific persistense.xml > > > And run installer? > > > In this case db properties should not be patched > > > > > > WBR, Maxim > > > (from mobile, sorry for the typos) > > > On May 25, 2016 12:27, "Ioannis Vlachos" > > > wrote: > > > > > > > screenshot: > https://www.dropbox.com/s/k0ocnkwitak7dq3/install.PNG?dl=0 > > > > > > > > log: https://www.dropbox.com/s/xe3jf9791j8h4bb/openmeetings.log?dl=0 > > > > > > > > > > > > > > > > 2016-05-25 9:14 GMT+03:00 Maxim Solodovnik : > > > > > > > > > Mailing list seems to drop your attachment > > > > > Can you share the image via link? > > > > > > > > > > WBR, Maxim > > > > > (from mobile, sorry for the typos) > > > > > On May 25, 2016 12:12, "Ioannis Vlachos" < > ioannis.vlachos@gmail.com> > > > > > wrote: > > > > > > > > > > > I've already tried that (I've searched before I asked). > > > > > > Unfortunately, openmeetings' web installer does not recognise > that > > > > syntax > > > > > > and shows an error when you try to set the db (see attached > image). > > > If > > > > > you > > > > > > try to fill out the form, then the connection is made with SID. > > > > > > > > > > > > I haven't tried the command line admin though. I'll try it and > come > > > > back > > > > > > with the results. > > > > > > > > > > > > > > > > > > > > > > > > 2016-05-24 14:41 GMT+03:00 Maxim Solodovnik < > solomax666@gmail.com > > >: > > > > > > > > > > > >> I believe this is the answer to your question: > > > > > >> > > > > > >> > > > > > > > > > > > > > > > http://stackoverflow.com/questions/4832056/java-jdbc-how-to-connect-to-oracle-using-service-name-instead-of-sid > > > > > >> > > > > > >> On Tue, May 24, 2016 at 3:34 PM, Ioannis Vlachos < > > > > > >> ioannis.vlachos@gmail.com> > > > > > >> wrote: > > > > > >> > > > > > >> > Hi. > > > > > >> > In my organization we use Oracle, but we can only connect > > through > > > > > >> Service > > > > > >> > Name and not SID. > > > > > >> > Is there any way to specify Service Name instead of SID in the > > > > > >> connection > > > > > >> > configuration? > > > > > >> > All the efforts I have made result in an ora-12505 error: tns > > > > listener > > > > > >> does > > > > > >> > not currently know of sid given in connect descriptor. > > > > > >> > > > > > > >> > Thanks > > > > > >> > > > > > > >> > Ioannis Vlachos > > > > > >> > > > > > > >> > > > > > >> > > > > > >> > > > > > >> -- > > > > > >> WBR > > > > > >> Maxim aka solomax > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > WBR > Maxim aka solomax > --001a11452cec997a5a0533bafbf5--