5 Replies Latest reply on Dec 17, 2013 5:49 PM by gCubed

    Invalid database instance

    dmiska

      Hi everyone,

       

      I'm getting following error message when trying to login into database:

       

      Application Error

      Invalid database instance while checking authentication mode.

       

      I'm using .net application, p6 web service and following code to authenticate into DB:

       

      Private Const gTransportUrl As [String] = "http://<hostname>:<p6WsPort number>/p6ws/services/AuthenticationService"

             Private ReadOnly gLogin As Login

              Private gAuthService As AuthenticationService.AuthenticationService

              Public ReadOnly Property AuthService As AuthenticationService.AuthenticationService

                  Get

                      Return gAuthService

                  End Get

              End Property

       

      Public Sub New()

                  gLogin = New Login()

                  gAuthService = New AuthenticationService.AuthenticationService()

                  IsLoggedOn = False

              End Sub

       

              Public Sub New(p6WsServer As [String], p6WsPort As [Int32])

                  Me.New()

                  Server = p6WsServer

                  Port = p6WsPort

                  gAuthService.Url = UpdateP6HostUrl()

                  gAuthService.CookieContainer = New CookieContainer()

              End Sub

       

              Public Function UpdateP6HostUrl() As [String]

                  Return gTransportUrl.Replace("<hostname>", Server).Replace("<p6WsPort number>", Port.ToString(CultureInfo.InvariantCulture))

              End Function

       

      Public Function Login(p6Username As String, p6Password As String) As [Boolean]

                  Dim dbinstances = AuthService.ReadDatabaseInstances(New Object())

                  gLogin.UserName = p6Username

                  gLogin.Password = p6Password

                  If gAuthService Is Nothing Then

                      Return False

                  End If

                  gAuthService.Login(gLogin)

                  CookieContainer = gAuthService.CookieContainer

                  IsLoggedOn = True

                  Return True

              End Function

       

       

       

       

       

      Also, I'm getting following error message in WebLogic console:

       

      Dec 13, 2013 2:39:35 PM com.primavera.ws.jaxws.JAXWSFacade readDatabaseInstances

       

       

      INFO: readDatabaseInstances called.

      SEVERE ERROR:

           YOUR DATABASE  SCHEMA TYPE DID NOT MATCH THE SCHEMA TYPE EXPECTED BY PRIMAV

      ERA

           EXPECTING: PMDB FOUND: PPMDB

           FOR DATABASE: jdbc:sqlserver://Pimsdev3:1433;authenticationScheme=nativeAut

      hentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=fal

      se;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adap

      tive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;la

      stUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=Prima

      vera;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=read

      write;

           DATABASE WILL NOT BE AVAILABLE

       

       

      SEVERE ERROR:

           YOUR DATABASE  SCHEMA TYPE DID NOT MATCH THE SCHEMA TYPE EXPECTED BY PRIMAV

      ERA

           EXPECTING: PMDB FOUND: PPMDB

           FOR DATABASE: jdbc:sqlserver://Pimsdev3:1433;authenticationScheme=nativeAut

      hentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=fal

      se;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adap

      tive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;la

      stUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=Prima

      vera;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=read

      write;

           DATABASE WILL NOT BE AVAILABLE

       

       

      Dec 13, 2013 2:39:35 PM com.primavera.ws.jaxws.JAXWSFacade login

      INFO: login called.

      SEVERE ERROR:

           YOUR DATABASE  SCHEMA TYPE DID NOT MATCH THE SCHEMA TYPE EXPECTED BY PRIMAV

      ERA

           EXPECTING: PMDB FOUND: PPMDB

           FOR DATABASE: jdbc:sqlserver://Pimsdev3:1433;authenticationScheme=nativeAut

      hentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=fal

      se;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adap

      tive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;la

      stUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=Prima

      vera;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=read

      write;

           DATABASE WILL NOT BE AVAILABLE

       

       

      Dec 13, 2013 2:39:35 PM com.primavera.ws.jaxws.provider.AuthenticationProviderDe

      legate invoke

      SEVERE: Exception caught in Authentication Provider:

      com.primavera.bo.common.InvalidInstanceLoginException: Invalid database instance

      while checking authentication mode.

              at com.primavera.bo.common.LoginHelper.login(LoginHelper.java:111)

              at com.primavera.bo.remotable.SessionLifetime.login(SessionLifetime.java

      :57)

              at com.primavera.bo.remotable.qproxy.SessionLifetime.login(SessionLifeti

      me.java:76)

              at com.primavera.bo.DBSessionLifetime.login(DBSessionLifetime.java:28)

              at com.primavera.integration.server.ServerFacadeBase.login(ServerFacadeB

      ase.java:434)

              at com.primavera.integration.server.ServerFacade.login(ServerFacade.java

      :11)

              at com.primavera.integration.client.LocalSession.login(LocalSession.java

      :94)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

      java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

      sorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at com.primavera.integration.client.Session.doLogin(Session.java:359)

              at com.primavera.integration.client.Session.login(Session.java:347)

              at com.primavera.ws.security.impl.WSLoginHelper.login(WSLoginHelper.java

      :13)

              at com.primavera.ws.jaxws.JAXWSFacade.login(JAXWSFacade.java:120)

              at com.primavera.ws.jaxws.provider.AuthenticationProviderDelegate.invoke

      (AuthenticationProviderDelegate.java:79)

              at com.primavera.ws.jaxws.provider.AuthenticationProvider.invoke(Authent

      icationProvider.java:33)

              at com.primavera.ws.jaxws.provider.AuthenticationProvider.invoke(Authent

      icationProvider.java:11)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

      java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

      sorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Abst

      ractInvoker.java:173)

              at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker

      .java:89)

              at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.jav

      a:60)

              at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker

      .java:75)

              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInv

      okerInterceptor.java:58)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47

      1)

              at java.util.concurrent.FutureTask.run(FutureTask.java:262)

              at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecu

      tor.java:37)

              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Se

      rviceInvokerInterceptor.java:106)

              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept

      orChain.java:243)

              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti

      ationObserver.java:110)

              at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes

      tination.java:98)

              at org.apache.cxf.transport.servlet.ServletController.invokeDestination(

      ServletController.java:423)

              at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont

      roller.java:178)

              at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX

      FServlet.java:142)

              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Ab

      stractHTTPServlet.java:179)

              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractH

      TTPServlet.java:103)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)

              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstract

      HTTPServlet.java:159)

              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run

      (StubSecurityHelper.java:280)

              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run

      (StubSecurityHelper.java:254)

              at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri

      tyHelper.java:136)

              at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav

      a:341)

              at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav

      a:238)

              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio

      n.wrapRun(WebAppServletContext.java:3363)

              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio

      n.run(WebAppServletContext.java:3333)

              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate

      dSubject.java:321)

              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:

      120)

              at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:

      57)

              at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAp

      pServletContext.java:2220)

              at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS

      ervletContext.java:2146)

              at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC

      ontext.java:2124)

              at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j

      ava:1564)

              at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExec

      utor.run(ContainerSupportProviderImpl.java:254)

              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)

              at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

       

       

      Best regards,

      Dmitrij

        • 1. Re: Invalid database instance
          gCubed

          You pointed your P6WS to a P6 Professional database not a P6 EPPM database.

           

          If you need project data from the P6 Professional database, you can export the projects via the P6 Professional client and import them into the EPPM database.

           

          V/r,

          Gene

          • 2. Re: Invalid database instance
            dmiska

            Hi Gene,

             

            I made another thing: Downloaded Integration API v.8.3, installed it, configured to use for Primavera professional DB. (As suggested in oracle support)

             

            But now in my application i'm getting following error message when trying to get all EPS records:

             

            com.primavera.integration.client.bo.InternalBOHelper.getWSDLVersion()Ljava/lang/String;

            SEVERE: Exception caught in CRUD Provider:

            java.lang.NoSuchMethodError: com.primavera.integration.client.bo.InternalBOHelper.getWSDLVersion()Ljava/lang/String;

                    at com.primavera.ws.common.WSHelper.getServiceNamespace(WSHelper.java:242)

                    at com.primavera.ws.common.WSHelper.getServiceNamespace(WSHelper.java:270)

                    at com.primavera.ws.jaxws.provider.ProviderBase.invokeBase(ProviderBase.java:53)

                    at com.primavera.ws.jaxws.provider.generated.EPSProvider.invoke(EPSProvider.java:30)

                    at com.primavera.ws.jaxws.provider.generated.EPSProvider.invoke(EPSProvider.java:14)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

             

            It seems the code which I used when everything was configured for EPPM database is not working anymore. And probably there are another p6 web service which I could use with P6 professional v8.3

             

            But I don't know if this web service exists.

             

            Best regards,

            Dmitrij

            • 3. Re: Invalid database instance
              gCubed

              The Integration API v.8.3 is base on Java Remote Method Invocation  which isn't a web service technology.  If you want to used this API you need to either write you application in JAVA or use IKVM.NET.


              Another thing you might try is to update the P6WS.ear with the (As suggested in oracle support) document.


              Gene

              • 4. Re: Invalid database instance
                dmiska

                Hi Gene,

                 

                So there are only 3 ways if I want to get data from Professional PM:

                1. To create java application

                2. Or create application with IKVM.net

                3. Or to update p6ws.ear.

                 

                Another thing: is there any windows client application for EPPM?

                When I installed EPPM with database, I could not find, how I can see the data in UI. Only in SQL or by using my web application.

                 

                Best regards,

                Dmitrij

                • 5. Re: Invalid database instance
                  gCubed

                  Typically the P6 Profession uses the SDK or the Integration API using the Oracle Support Doc method to talk to a P6 Professional Schema.

                   

                  For EPPM, you can used the Integration API or P6 Web Services.  The P6WS uses the Integration API to service client request, so in theory one should be able to make the P6WS work with the Professional Schema by using the Oracle Support Doc method.  I haven't tried this as I haven't spent much time dealing with writing code around the P6 Professional Schema.

                   

                  If you look inside your P6 EPPM download, you should find a P6 Professional Client that works with the P6 EPPM Schema.  I look and feels just like the P6 Professional Client (expect most of the administration function are only available in the web client).

                   

                  Gebe