# Gateaway faulted on projet startup (Error during context startup)

**URL:** <https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486>\
**Category:** Ignition\
**Created:** [December 12, 2022, 9:27am UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486 "2022-12-12T09:27:21Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephane\_Boneff](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stephane\_Boneff](https://forum.inductiveautomation.com/u/Stephane_Boneff)\
**Post date:** [December 12, 2022, 9:27am UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/1 "2022-12-12T09:27:21Z")

</div>

Hello,

During the start on my PC with a gateaway installed, I have this morning a problem with the gateaway starting : java.lang.NullPointerException: null on project startup :  
What can I do ?  
Rebooting don't change anything. The PC was shutdown normaly before the weekend.  
I didn't find any topic on that problem.

windows 10, gateaway V 8.1.11, JV : 11.0.11+9-LTS

Thanks for any help !

```auto
INFO | jvm 1 | 2022/12/12 08:28:52 | I [Project] [07:28:52]: Starting project: IU_Perspective_Tests project=IU_Perspective_Tests
INFO | jvm 1 | 2022/12/12 08:28:52 | I [Project] [07:28:52]: Starting project: global project=global
INFO | jvm 1 | 2022/12/12 08:28:53 | E [IgnitionGateway] [07:28:53]: Error during context startup. 
INFO | jvm 1 | 2022/12/12 08:28:53 | java.lang.NullPointerException: null
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.io.ByteArrayInputStream.<init>(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.common.xmlserialization.deserialization.XMLDeserializer.deserialize(XMLDeserializer.java:248)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.db.namedquery.NamedQueryExecutor.lambda$initializeQueries$0(NamedQueryExecutor.java:96)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.ArrayList.forEach(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.db.namedquery.NamedQueryExecutor.initializeQueries(NamedQueryExecutor.java:92)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.db.namedquery.NamedQueryExecutor.initializeQueries(NamedQueryExecutor.java:82)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.db.namedquery.NamedQueryExecutor.<init>(NamedQueryExecutor.java:76)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.db.namedquery.GatewayNamedQueryManager$NamedQueryLifeCycle.onStartup(GatewayNamedQueryManager.java:326)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.project.ProjectLifecycle.onStartup(ProjectLifecycle.java:38)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle.startup(AbstractLifecycle.java:18)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.project.ProjectLifecycleFactory$1.maybeStartLifecycle(ProjectLifecycleFactory.java:234)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.project.ProjectLifecycleFactory$1.lambda$projectAdded$0(ProjectLifecycleFactory.java:124)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.Optional.ifPresent(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.project.ProjectLifecycleFactory$1.projectAdded(ProjectLifecycleFactory.java:124)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.ArrayList.forEach(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.project.ProjectLifecycleFactory.onStartup(ProjectLifecycleFactory.java:47)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle.startup(AbstractLifecycle.java:18)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.db.namedquery.GatewayNamedQueryManager.onStartup(GatewayNamedQueryManager.java:57)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle.startup(AbstractLifecycle.java:18)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.IgnitionGateway.startupInternal(IgnitionGateway.java:1113)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.startup(RedundancyManagerImpl.java:293)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.IgnitionGateway.initRedundancy(IgnitionGateway.java:724)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.gateway.IgnitionGateway.lambda$initInternal$0(IgnitionGateway.java:658)
INFO | jvm 1 | 2022/12/12 08:28:53 | at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:518)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | at java.base/java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2022/12/12 08:28:53 | I [IgnitionGateway] [07:28:53]: Ignition[state=STARTING] ContextState = FAULTED 

```

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [December 12, 2022, 2:09pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/2 "2022-12-12T14:09:42Z")

</div>

Did you recently import named queries from a newer version? Are you certain you're running version 8.1.11? I've only ever seen this error come up when moving named queries from 8.1.6+ to a gateway running 8.1.5 or older. If you can't point to any specific named queries that were recently imported, it may be best to reach out to [support](https://support.inductiveautomation.com/hc/en-us) to take a look at the system.

---

<div class="post-metadata">

**Author:** ![Stephane\_Boneff](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stephane\_Boneff](https://forum.inductiveautomation.com/u/Stephane_Boneff)\
**Post date:** [December 12, 2022, 2:33pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/3 "2022-12-12T14:33:11Z")

</div>

Version 8.1.1 in fact.  
A project was imported from 8.1.17. It worked fine last friday. The project that seems is the problem : "global"

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [December 12, 2022, 2:36pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/4 "2022-12-12T14:36:48Z")

</div>

In that case, the easiest solution is to upgrade to 8.1.7+ or preferably 8.1.17 or newer since that's where the resources came from. The alternative is to find the named queries that were imported from the install directory and delete or move those files out of the install directory and then restart the Ignition service. You should be able to navigate to the projects folder and search for all .sql files (new format as of 8.1.6) as those will be what needs to be removed.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 12, 2022, 2:39pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/5 "2022-12-12T14:39:51Z")

</div>

> [@Stephane\_Boneff](#):
>
> A project was imported from 8.1.17

Huh. How did that happen? (Projects have version numbers in them, and historically Ignition rejected attempts to import from newer files.)

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [December 12, 2022, 2:49pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/6 "2022-12-12T14:49:56Z")

</div>

Unless it's in one of the serialized resources I'm not seeing anything in a project export that indicates a version like you see in a gateway backup. I'll take a look and see if I can find if that changed at some point.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 12, 2022, 2:59pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/7 "2022-12-12T14:59:27Z")

</div>

Hmm. Apparently it changed from v7.9 to v8.0 when they became zip files. I just never noticed, and never had cause to try to force a project to go backwards.

Dropping that version check seems spectacularly unwise. How much of support's reports are traced back to loading newer resources into older gateways?

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [December 12, 2022, 3:07pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/8 "2022-12-12T15:07:51Z")

</div>

> [@pturmel](#):
>
> Apparently it changed from v7.9 to v8.0 when they became zip files

That's good to know. I'll bring it up as something to potentially add back.

> [@pturmel](#):
>
> How much of support's reports are traced back to loading newer resources into older gateways?

The only issue I've seen get traced back is this issue specifically with moving named queries from newer gateways post 8.1.6. Even this has only come up a handful of times.

---

<div class="post-metadata">

**Author:** ![Stephane\_Boneff](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stephane\_Boneff](https://forum.inductiveautomation.com/u/Stephane_Boneff)\
**Post date:** [December 12, 2022, 3:58pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/9 "2022-12-12T15:58:24Z")

</div>

thanks to all for the help !

I try fist by deleting the named query of the lastest imported project but windows don't let me do that. Despite GW is offline, the files seem to be locked.  
java.exe still alive a files are locked.

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [December 12, 2022, 4:02pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/10 "2022-12-12T16:02:57Z")

</div>

The service is probably still running even though the gateway is faulted. You can try stopping the service by running the `stop-ignition.bat` file or by going to services and locating the Ignition service and selecting to stop it. Then once it's stopped try deleting the files again.

---

<div class="post-metadata">

**Author:** ![Stephane\_Boneff](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stephane\_Boneff](https://forum.inductiveautomation.com/u/Stephane_Boneff)\
**Post date:** [December 12, 2022, 4:17pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/11 "2022-12-12T16:17:32Z")

</div>

Yes I've thought to stop the service but despite it's stopped, the files are still locked ☹ The files are not visibles in perfmon.  
No more java process in memory

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [December 12, 2022, 4:19pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/12 "2022-12-12T16:19:57Z")

</div>

At this point, it may be best to reach out to [support](https://support.inductiveautomation.com/hc/en-us) for further assistance.

---

<div class="post-metadata">

**Author:** ![Stephane\_Boneff](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stephane\_Boneff](https://forum.inductiveautomation.com/u/Stephane_Boneff)\
**Post date:** [December 12, 2022, 4:22pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/13 "2022-12-12T16:22:18Z")

</div>

I will try upgrade in 8.1.17. More news on Wednesday, not before.

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [December 12, 2022, 4:25pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/14 "2022-12-12T16:25:26Z")

</div>

If the files are locked, you may have issues running the installer as well. A full server reboot may be a good idea.

---

<div class="post-metadata">

**Author:** ![Stephane\_Boneff](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Stephane\_Boneff](https://forum.inductiveautomation.com/u/Stephane_Boneff)\
**Post date:** [December 12, 2022, 4:34pm UTC](https://forum.inductiveautomation.com/t/gateaway-faulted-on-projet-startup-error-during-context-startup/67486/15 "2022-12-12T16:34:41Z")

</div>

great news : Upgrade to 8.1.17 solves the problem !  
The gateaway works fine now. The named query from 8.1.17 GW imported in 8.1.1 GW was surely the root cause.  
Thanks to all for the help !
