"Internal Server Error" after AppWorks server machine restarts

Options

I installed AppWorks appworks_gateway_1.1.0 on my local machine running apache-tomcat-7.0.42 with Oracle 11g. I followed the installation instructions and everything worked fine before I restarted my computer (not the tomcat server).

However, if I restarted the computer and tried to login to the gateway as the user otag/otag, I received an error message “Internal Server Error” and could not login.

I reinstalled the gateway two times and the problem repeated. It worked before I restarted the computer.

I checked the tomcat7-stdout log file and found that the server tried to recreate some database objects after the server restarted.

Some error messages look like:

Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object

Error Code: 955
Call: CREATE TABLE CLIENT (ID VARCHAR2(255) NOT NULL, APP VARCHAR2(255) NULL, APPID VARCHAR2(255) NULL, BITNESS VARCHAR2(255) NULL, CLOUDPUSHKEY VARCHAR2(255) NULL, DEVICEID VARCHAR2(255) NULL, EXTRAINFO VARCHAR2(255) NULL, FIRSTCONNECT TIMESTAMP NULL, IP VARCHAR2(255) NULL, JAILBREAKSTATUS NUMBER(1) default 0 NULL, LANGUAGE VARCHAR2(255) NULL, LASTCONNECT TIMESTAMP NULL, LOCATION VARCHAR2(255) NULL, MODEL VARCHAR2(255) NULL, OS VARCHAR2(255) NULL, OSVERSION VARCHAR2(255) NULL, RUNTIME VARCHAR2(255) NULL, STATUS VARCHAR2(255) NULL, TYPE VARCHAR2(255) NULL, USERID VARCHAR2(255) NULL, USERNAME VARCHAR2(255) NULL, VERSION VARCHAR2(255) NULL, WIPE VARCHAR2(255) NULL, PRIMARY KEY (ID))
Query: DataModifyQuery(sql="CREATE TABLE CLIENT (ID VARCHAR2(255) NOT NULL, APP VARCHAR2(255) NULL, APPID VARCHAR2(255) NULL, BITNESS VARCHAR2(255) NULL, CLOUDPUSHKEY VARCHAR2(255) NULL, DEVICEID VARCHAR2(255) NULL, EXTRAINFO VARCHAR2(255) NULL, FIRSTCONNECT TIMESTAMP NULL, IP VARCHAR2(255) NULL, JAILBREAKSTATUS NUMBER(1) default 0 NULL, LANGUAGE VARCHAR2(255) NULL, LASTCONNECT TIMESTAMP NULL, LOCATION VARCHAR2(255) NULL, MODEL VARCHAR2(255) NULL, OS VARCHAR2(255) NULL, OSVERSION VARCHAR2(255) NULL, RUNTIME VARCHAR2(255) NULL, STATUS VARCHAR2(255) NULL, TYPE VARCHAR2(255) NULL, USERID VARCHAR2(255) NULL, USERNAME VARCHAR2(255) NULL, VERSION VARCHAR2(255) NULL, WIPE VARCHAR2(255) NULL, PRIMARY KEY (ID))")
[EL Warning]: 2013-12-19 01:18:13.527--ServerSession(1865984348)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object

Error Code: 955
Call: CREATE TABLE APP (NAME VARCHAR2(150) NOT NULL, DESCRIPTION CLOB NULL, DISPLAYNAME VARCHAR2(255) NULL, DISPLAYVERSION VARCHAR2(255) NULL, INITIALINSTALLDATE TIMESTAMP NULL, INSTALLDATE TIMESTAMP NULL, ISDELETED NUMBER(1) default 0 NULL, ISENABLED NUMBER(1) default 0 NULL, ISFORALLRUNTIMES NUMBER(1) default 0 NULL, ISFOREVERYONE NUMBER(1) default 0 NULL, ISINSTALLED NUMBER(1) default 0 NULL, ISMOBILEAVAILABLE NUMBER(1) default 0 NULL, ISPROXYSERVICE NUMBER(1) default 0 NULL, ISWEBAVAILABLE NUMBER(1) default 0 NULL, ISWEBACCESSTAB NUMBER(1) default 0 NULL, MINIMUMCLIENTVERSION NUMBER(10) NULL, RELEASENUMBER NUMBER(10) NULL, TYPE NUMBER(10) NULL, UPGRADERELEASENUMBER NUMBER(10) NULL, UPGRADEVERSION VARCHAR2(255) NULL, PRIMARY KEY (NAME))
Query: DataModifyQuery(sql="CREATE TABLE APP (NAME VARCHAR2(150) NOT NULL, DESCRIPTION CLOB NULL, DISPLAYNAME VARCHAR2(255) NULL, DISPLAYVERSION VARCHAR2(255) NULL, INITIALINSTALLDATE TIMESTAMP NULL, INSTALLDATE TIMESTAMP NULL, ISDELETED NUMBER(1) default 0 NULL, ISENABLED NUMBER(1) default 0 NULL, ISFORALLRUNTIMES NUMBER(1) default 0 NULL, ISFOREVERYONE NUMBER(1) default 0 NULL, ISINSTALLED NUMBER(1) default 0 NULL, ISMOBILEAVAILABLE NUMBER(1) default 0 NULL, ISPROXYSERVICE NUMBER(1) default 0 NULL, ISWEBAVAILABLE NUMBER(1) default 0 NULL, ISWEBACCESSTAB NUMBER(1) default 0 NULL, MINIMUMCLIENTVERSION NUMBER(10) NULL, RELEASENUMBER NUMBER(10) NULL, TYPE NUMBER(10) NULL, UPGRADERELEASENUMBER NUMBER(10) NULL, UPGRADEVERSION VARCHAR2(255) NULL, PRIMARY KEY (NAME))")
[EL Warning]: 2013-12-19 01:18:13.588--ServerSession(1865984348)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object

Error Code: 955

Any ideas?

Comments

  • You can ignore any Eclipselink error messages like those during startup. Eclipselink attempts to create all the necessary tables and sequences on startup and continues past any errors. Why these are logged as warnings is unclear, as it is entirely expected.

    I would suggest looking for 'SEVERE' and 'Internal Server Error' in your logs; the actual problem should be found in that area of the log.

  • Thank you, John. I checked the server log file and found an error message below when I tried to login:

    `SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
    java.lang.IllegalArgumentException: Illegal character in path at index 0:  
        at java.net.URI.create(URI.java:859)
        at org.apache.http.client.methods.HttpPost.<init>(HttpPost.java:76)
        at com.opentext.otag.api.HttpClient.getPostRequest(HttpClient.java:187)
        at com.opentext.otag.api.HttpClient.post(HttpClient.java:140)
        at com.opentext.otag.api.HttpClient.post(HttpClient.java:137)
        at com.opentext.otag.auth.CSIdentityService.auth(CSIdentityService.java:81)
        at com.opentext.otag.auth.CSIntegration.auth(CSIntegration.java:21)
        at com.opentext.otag.auth.IdentityService.authorize(IdentityService.java:141)
        at com.opentext.otag.rest.impl.AuthImpl.auth(AuthImpl.java:92)
        at com.opentext.otag.rest.v1.Auth.auth(Auth.java:57)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
        at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
        at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
        at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.opentext.otag.rest.util.JsonpFilter.doFilter(JsonpFilter.java:67)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
    Caused by: java.net.URISyntaxException: Illegal character in path at index 0:  
        at java.net.URI$Parser.fail(URI.java:2829)
        at java.net.URI$Parser.checkChars(URI.java:3002)
        at java.net.URI$Parser.parseHierarchical(URI.java:3086)
        at java.net.URI$Parser.parse(URI.java:3044)
        at java.net.URI.<init>(URI.java:595)
        at java.net.URI.create(URI.java:857)
        ... 47 more'
    

    This seems to be caused by jersey, I do not know why it happens only after I restart my machine.

  • I just upgraded my Appworks Gateway to the latest version 1.1.5. The problem happened again after I restarted the Tomcat service. Also saw additional messages below:

    INFO: A warning about POST requests is expected due to jsonp filtering, and can be safely ignored.
    Dec 20, 2013 11:49:14 AM com.sun.jersey.spi.container.servlet.WebComponent filterFormParameters
    WARNING: A servlet request, to the URI http://mytestserverhost:8081/gateway/v1/auth, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
    Dec 20, 2013 11:49:14 AM com.opentext.otds.messagebroker.audit.AuditHandler log
    INFO: ,2013/12/20 11:49:14 EST,0,0,Authentication Service,Success Access,27,Initial authentication successful,otag@otag,,Authentication success: otag@otag from host 127.0.0.1 with address 127.0.0.1 for resource 76111e0b-5de0-46f1-82fc-0527239a6d58
    Dec 20, 2013 11:49:14 AM com.opentext.otds.messagebroker.audit.AuditHandler log
    INFO: ,2013/12/20 11:49:14 EST,0,0,Authentication Service,Success Access,56,Ticket Created,otag@otag,,User name [otag@otag] in resource ID [76111e0b-5de0-46f1-82fc-0527239a6d58]
    Dec 20, 2013 11:49:14 AM com.opentext.otds.messagebroker.audit.AuditHandler log
    INFO: ,2013/12/20 11:49:14 EST,0,0,Authentication Service,Success Access,27,Initial authentication successful,otag@otag,,Authentication success: otag@otag from host 127.0.0.1 with address 127.0.0.1 for resource __OTDS_AS__
    Dec 20, 2013 11:49:14 AM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
    SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
    ...
    
  • Those new messages are expected.

    It looks as though you have somehow got invalid data in your Content Server URL setting, perhaps just a space character. Since you can't log on in order to change it, you'll have to delete that row from the database. With tomcat shut down, run the following sql (or equivalent):

    DELETE from SETTING where skey = 'contentserver.url'

    Then start tomcat again and I suspect you will be fine. Please let us know if this resolves the issue for you.

  • Thank you, John. Yes. It works after I delete 'contentserver.url'. I do not have a new content server to support Appworks and so I did not set it. Is it required?

  • If you are not using the OTE/Tempo Box services, this setting is not required.