# ClassNotFoundEx for customChangeSet even on not matching context

**URL:** <https://forum.liquibase.org/t/classnotfoundex-for-customchangeset-even-on-not-matching-context/9965>\
**Category:** General Discussion\
**Created:** [November 22, 2024, 7:27am UTC](https://forum.liquibase.org/t/classnotfoundex-for-customchangeset-even-on-not-matching-context/9965 "2024-11-22T07:27:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![todo42](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/todo42/32/1276_2.png) [@todo42](https://forum.liquibase.org/u/todo42)\
**Post date:** [November 22, 2024, 7:27am UTC](https://forum.liquibase.org/t/classnotfoundex-for-customchangeset-even-on-not-matching-context/9965/1 "2024-11-22T07:27:26Z")

</div>

I’m using liquibase since 12+ years and totally happy with it.  
In my latest project, I have a custom changeset for a given context:

```auto
    <changeSet id="migrateUserSettings" author="dominik" context="!ci">
        <customChange class="de.hub28.hwg.isplaner.usersettings.MigrateUsersettingsLiquibaseChange">
        </customChange>
        <rollback>
        </rollback>
    </changeSet>

```

If I run Liquibase locally, the class was already compiled by the IDE into target/classes directory, is picked up by liquibase and executed successfully. ✅

Within my CI pipeline, I don’t need this changeset run, so therefore I declare the

```
context="!ci"

```

part. The command used by the pipeline is

```
   mvn liquibase:update -Dliquibase.contexts=ci 

```

in order to EXCLUDE the mentioned CI context. But I got an ClassNotFoundException. (see below)

```auto
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:4.29.0:update (default-cli) on project isplaner:
[ERROR] Error setting up or running Liquibase:
[ERROR] liquibase.exception.ChangeLogParseException: liquibase.parser.core.ParsedNodeException: liquibase.exception.CustomChangeException: java.lang.ClassNotFoundException: de.hub28.hwg.isplaner.usersettings.MigrateUsersettingsLiquibaseChange
[ERROR] -> [Help 1]` `org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:4.29.0:update (default-cli) on project isplaner: ` `Error setting up or running Liquibase:` `liquibase.exception.ChangeLogParseException: liquibase.parser.core.ParsedNodeException: liquibase.exception.CustomChangeException: java.lang.ClassNotFoundException: de.hub28.hwg.isplaner.usersettings.MigrateUsersettingsLiquibaseChange

```

How can I remain that changeset in the changelog.xml but prevent execution in the CI pipeline ?

Kind ragrds  
Dominik
