Select to view content in your preferred language

java.lang.NullPointerException

6910
4
11-02-2010 11:50 PM
PrimozKogovsek
Emerging Contributor
Hello

I have problem setting up geoportal extension 10

Server description:
OS: Windows server 2008 32-bit
ESRI: ArcGIS Desktop 10, ArcGis Server 10, Geoportal 10
Database: Oracle 11g rac
Java: jdk 6.0.21
Servlet: Tomcat 6.0.29 (location c:\Program Files\Apache Software Foundation\Tomcat 6.0\)
ldap: windows active directory

I put up geoportal and run in to problem when try to administer data, when I open administration tab I get message: java.lang.NullPointerException

Log looks like this:
28.10.2010 13:31:34 com.esri.gpt.framework.jsf.BaseActionListener handleException
SEVERE: Exception raised.
java.lang.NullPointerException
at com.esri.gpt.framework.sql.DatabaseReference.openJndiConnection(DatabaseReference.java:269)
at com.esri.gpt.framework.sql.DatabaseReference.openConnection(DatabaseReference.java:223)
at com.esri.gpt.framework.sql.ManagedConnection.<init>(ManagedConnection.java:41)
at com.esri.gpt.framework.sql.ManagedConnections.returnConnection(ManagedConnections.java:121)
at com.esri.gpt.framework.sql.ConnectionBroker.returnConnection(ConnectionBroker.java:85)
at com.esri.gpt.framework.sql.BaseDao.returnConnection(BaseDao.java:157)
at com.esri.gpt.framework.security.identity.local.LocalDao.ensureReferenceToRemoteUser(LocalDao.java:94)
at com.esri.gpt.framework.security.identity.ldap.LdapClient.populateUser(LdapClient.java:416)
at com.esri.gpt.framework.security.identity.ldap.LdapClient.authenticate(LdapClient.java:244)
at com.esri.gpt.framework.security.identity.ldap.LdapIdentityAdapter.authenticate(LdapIdentityAdapter.java:64)
at com.esri.gpt.control.identity.LoginController.processSubAction(LoginController.java:132)
at com.esri.gpt.framework.jsf.BaseActionListener.processAction(BaseActionListener.java:271)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
at javax.faces.component.UICommand.broadcast(UICommand.java:305)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.esri.gpt.control.filter.EncodingFilter.doFilter(EncodingFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
28.10.2010 13:31:38 com.esri.gpt.framework.jsf.BaseActionListener handleException
SEVERE: Exception raised.
java.lang.NullPointerException
at com.esri.gpt.framework.sql.DatabaseReference.openJndiConnection(DatabaseReference.java:269)
at com.esri.gpt.framework.sql.DatabaseReference.openConnection(DatabaseReference.java:223)
at com.esri.gpt.framework.sql.ManagedConnection.<init>(ManagedConnection.java:41)
at com.esri.gpt.framework.sql.ManagedConnections.returnConnection(ManagedConnections.java:121)
at com.esri.gpt.framework.sql.ConnectionBroker.returnConnection(ConnectionBroker.java:85)
at com.esri.gpt.framework.sql.BaseDao.returnConnection(BaseDao.java:157)
at com.esri.gpt.framework.security.identity.local.LocalDao.ensureReferenceToRemoteUser(LocalDao.java:94)
at com.esri.gpt.catalog.arcims.ImsPermissionDao.preparePublisher(ImsPermissionDao.java:125)
at com.esri.gpt.framework.security.principal.Publisher.<init>(Publisher.java:72)
at com.esri.gpt.control.publication.ManageMetadataController.processSubAction(ManageMetadataController.java:539)
at com.esri.gpt.framework.jsf.BaseActionListener.processAction(BaseActionListener.java:271)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
at javax.faces.component.UICommand.broadcast(UICommand.java:305)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.esri.gpt.control.filter.EncodingFilter.doFilter(EncodingFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)

I cannot import metadata (from file and catalog) neither create it using geoportal templates.
Database schema has only empty tables.

Did I get wrong somewhere in configuring geoportal or it is something ellse? (see attached files)

thanks,
Primoz
0 Kudos
4 Replies
MartenHogeweg
Esri Contributor
hi,

couple of questions:

are you able to log in to your configuration?
can you increase the logging to FINEST and retry?
can you share the metadata you are trying to publish?

regards,

Marten
0 Kudos
CliveReece
Esri Contributor
Primoz,
Please let us know the outcome from Marten's questions above.

I would also suggest making sure you start with clean logs for troubleshooting: Shutdown Tomcat; Go to the Tomcat logs directory; delete the logs (archive them somewhere else if you need); Restart Tomcat.

Now that you have clean logs, *wait* (don't connect to geoportal) and go inspect the logs for any errors. Then sequentially proceed with connecting to geoportal, and checking the logs for new messages after *each* interaction with geoportal. This troubleshooting procedure helps me narrow down issues quickly.

The only oddity I noticed in your gpt.xml file is in the ldapAdapter section where you define the gptRegisteredUser group:
[INDENT]<role
key="gptRegisteredUser"
groupDN="CN=gptRegisteredUser,CN=Users,DC=nt,DC=arso,DC=sigov,DC="/>
[/INDENT]
The last 'DC=' is missing an entry. All the other DNs end with a 'DC=si' in your configuration. Could you check that?

Clive
0 Kudos
PrimozKogovsek
Emerging Contributor
Ok
In attachment i left you the tomcat logs.
It seems the problem is in connection to oracle trough JDBC.
I google it up a little and found this:
http://codingexplorer.wordpress.com/2009/05/07/the-reason-behind-oracle-11g-severe-error-while-regis...

@ clive
Thanks i will reper this

any ideas?
Thanks,
Primoz
0 Kudos
PrimozKogovsek
Emerging Contributor
Success!

The problem was in jdbc configuration. This configuration works fine for me:

<Context docBase="geoportal" path="/geoportal" debug="0" reloadable="true" crossContext="true">
          <Resource name="jdbc/gpt" auth="Container" type="javax.sql.DataSource"
                 driverClassName="oracle.jdbc.driver.OracleDriver"
                 url="jdbc:oracle:thin:@host:port/service name"
                 username="username"
                 password="password"
                 maxActive="20"
                 maxIdle="10"
                 maxWait="-1" />
         </Context>

Now i have to test everything...
Primoz

P.S. didn`t mean to post smilies, but i dont know hov to get rid of them
0 Kudos