I am trying to build a simple pipeline that moves data from our Cloud SQL (MySQL) into BigQuery. All the JDBC driver stuff is working fine (if I use the trash can as a sink, I can see the preview data) and the schema propagated.
I created the BigQuery DB and Table — but when ever I run the pipeline, I get the following error which does not tell me really anything. What is going wrong here?
java.lang.NullPointerException: null
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:877) ~[com.google.guava.guava-13.0.1.jar:na]
at com.google.common.collect.Lists$TransformingSequentialList.<init>(Lists.java:542) ~[com.google.guava.guava-13.0.1.jar:na]
at com.google.common.collect.Lists.transform(Lists.java:526) ~[com.google.guava.guava-13.0.1.jar:na]
at com.google.cloud.bigquery.FieldList.fromPb(FieldList.java:116) ~[na:na]
at com.google.cloud.bigquery.Schema.fromPb(Schema.java:107) ~[na:na]
at com.google.cloud.bigquery.TableDefinition$Builder.table(TableDefinition.java:120) ~[na:na]
at com.google.cloud.bigquery.StandardTableDefinition.fromPb(StandardTableDefinition.java:220) ~[na:na]
at com.google.cloud.bigquery.TableDefinition.fromPb(TableDefinition.java:155) ~[na:na]
at com.google.cloud.bigquery.TableInfo$BuilderImpl.<init>(TableInfo.java:183) ~[na:na]
at com.google.cloud.bigquery.Table.fromPb(Table.java:603) ~[na:na]
at com.google.cloud.bigquery.BigQueryImpl.getTable(BigQueryImpl.java:415) ~[na:na]
at io.cdap.plugin.gcp.bigquery.sink.AbstractBigQuerySink.validateSchema(AbstractBigQuerySink.java:237) ~[na:na]
at io.cdap.plugin.gcp.bigquery.sink.AbstractBigQuerySink.getBigQueryTableFields(AbstractBigQuerySink.java:316) ~[na:na]
at io.cdap.plugin.gcp.bigquery.sink.AbstractBigQuerySink.initOutput(AbstractBigQuerySink.java:126) ~[na:na]
at io.cdap.plugin.gcp.bigquery.sink.BigQuerySink.prepareRunInternal(BigQuerySink.java:83) ~[na:na]
at io.cdap.plugin.gcp.bigquery.sink.AbstractBigQuerySink.prepareRun(AbstractBigQuerySink.java:94) ~[na:na]
at io.cdap.plugin.gcp.bigquery.sink.AbstractBigQuerySink.prepareRun(AbstractBigQuerySink.java:59) ~[na:na]
at io.cdap.cdap.etl.common.plugin.WrappedBatchSink.lambda$prepareRun$0(WrappedBatchSink.java:52) ~[na:na]
at io.cdap.cdap.etl.common.plugin.Caller$1.call(Caller.java:30) ~[na:na]
at io.cdap.cdap.etl.common.plugin.StageLoggingCaller.call(StageLoggingCaller.java:40) ~[na:na]
at io.cdap.cdap.etl.common.plugin.WrappedBatchSink.prepareRun(WrappedBatchSink.java:51) ~[na:na]
at io.cdap.cdap.etl.common.plugin.WrappedBatchSink.prepareRun(WrappedBatchSink.java:37) ~[na:na]
at io.cdap.cdap.etl.common.submit.SubmitterPlugin.lambda$prepareRun$2(SubmitterPlugin.java:71) ~[na:na]
at io.cdap.cdap.internal.app.runtime.AbstractContext$2.run(AbstractContext.java:551) ~[na:na]
at io.cdap.cdap.data2.transaction.Transactions$CacheBasedTransactional.finishExecute(Transactions.java:224) ~[na:na]
at io.cdap.cdap.data2.transaction.Transactions$CacheBasedTransactional.execute(Transactions.java:211) ~[na:na]
at io.cdap.cdap.internal.app.runtime.AbstractContext.execute(AbstractContext.java:546) ~[na:na]
at io.cdap.cdap.internal.app.runtime.AbstractContext.execute(AbstractContext.java:534) ~[na:na]
at io.cdap.cdap.etl.common.submit.SubmitterPlugin.prepareRun(SubmitterPlugin.java:69) ~[na:na]
at io.cdap.cdap.etl.batch.PipelinePhasePreparer.prepare(PipelinePhasePreparer.java:111) ~[na:na]
at io.cdap.cdap.etl.batch.mapreduce.MapReducePreparer.prepare(MapReducePreparer.java:97) ~[na:na]
at io.cdap.cdap.etl.batch.mapreduce.ETLMapReduce.initialize(ETLMapReduce.java:192) ~[na:na]
at io.cdap.cdap.api.mapreduce.AbstractMapReduce.initialize(AbstractMapReduce.java:109) ~[na:na]
at io.cdap.cdap.api.mapreduce.AbstractMapReduce.initialize(AbstractMapReduce.java:32) ~[na:na]
at io.cdap.cdap.internal.app.runtime.batch.MapReduceRuntimeService$1.initialize(MapReduceRuntimeService.java:182) ~[na:na]
at io.cdap.cdap.internal.app.runtime.batch.MapReduceRuntimeService$1.initialize(MapReduceRuntimeService.java:177) ~[na:na]
at io.cdap.cdap.internal.app.runtime.AbstractContext.lambda$initializeProgram$1(AbstractContext.java:640) ~[na:na]
at io.cdap.cdap.internal.app.runtime.AbstractContext.execute(AbstractContext.java:600) ~[na:na]
at io.cdap.cdap.internal.app.runtime.AbstractContext.initializeProgram(AbstractContext.java:637) ~[na:na]
at io.cdap.cdap.internal.app.runtime.batch.MapReduceRuntimeService.beforeSubmit(MapReduceRuntimeService.java:547) ~[na:na]
at io.cdap.cdap.internal.app.runtime.batch.MapReduceRuntimeService.startUp(MapReduceRuntimeService.java:226) ~[na:na]
at com.google.common.util.concurrent.AbstractExecutionThreadService$1$1.run(AbstractExecutionThreadService.java:47) ~[com.google.guava.guava-13.0.1.jar:na]
at io.cdap.cdap.internal.app.runtime.batch.MapReduceRuntimeService$2$1.run(MapReduceRuntimeService.java:450) [na:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]
Related
I got this error trying to implement NearbySelector in Local Search.
The Local Search configuration. I tried with both random and original selection orders:
<changeMoveSelector>
<entitySelector id="entitySelector1"/>
<selectionOrder>ORIGINAL</selectionOrder>
<valueSelector>
<nearbySelection>
<originEntitySelector mimicSelectorRef="entitySelector1"/>
<nearbyDistanceMeterClass>NearbyGrainMeter</nearbyDistanceMeterClass>
<parabolicDistributionSizeMaximum>40</parabolicDistributionSizeMaximum>
</nearbySelection>
</valueSelector>
</changeMoveSelector>
Error:
java.lang.IllegalArgumentException: The nearbySelectorConfig (NearbySelectionConfig()) with randomSelection (false) has distribution parameters.
at org.optaplanner.core.config.heuristic.selector.common.nearby.NearbySelectionConfig.buildNearbyRandom(NearbySelectionConfig.java:226)
at org.optaplanner.core.config.heuristic.selector.common.nearby.NearbySelectionConfig.applyNearbyValueSelector(NearbySelectionConfig.java:205)
at org.optaplanner.core.config.heuristic.selector.value.ValueSelectorConfig.buildValueSelector(ValueSelectorConfig.java:293)
at org.optaplanner.core.config.heuristic.selector.move.generic.ChangeMoveSelectorConfig.buildBaseMoveSelector(ChangeMoveSelectorConfig.java:84)
at org.optaplanner.core.config.heuristic.selector.move.MoveSelectorConfig.buildMoveSelector(MoveSelectorConfig.java:252)
at org.optaplanner.core.config.heuristic.selector.move.MoveSelectorConfig.buildMoveSelector(MoveSelectorConfig.java:241)
at org.optaplanner.core.config.heuristic.selector.move.composite.UnionMoveSelectorConfig.buildBaseMoveSelector(UnionMoveSelectorConfig.java:77)
at org.optaplanner.core.config.heuristic.selector.move.MoveSelectorConfig.buildMoveSelector(MoveSelectorConfig.java:252)
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildMoveSelector(LocalSearchPhaseConfig.java:289)
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildDecider(LocalSearchPhaseConfig.java:155)
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildPhase(LocalSearchPhaseConfig.java:141)
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildPhase(LocalSearchPhaseConfig.java:54)
at org.optaplanner.core.config.solver.SolverConfig.buildPhaseList(SolverConfig.java:446)
at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:349)
at org.optaplanner.core.impl.solver.AbstractSolverFactory.buildSolver(AbstractSolverFactory.java:61)
at App.main(App.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.lang.Thread.run(Thread.java:748)```
Does anyone understand what is happening?
The nearby selection requires a RANDOM selection order, while your configuration of the ChangeMoveSelector specifies <selectionOrder>ORIGINAL</selectionOrder>.
Would you try changing it to: <selectionOrder>RANDOM</selectionOrder> ?
I have a problem trying to configure filter on queue through config for ArtemisMQ (broker.xml):
<address name="foo">
<multicast>
<queue name="filtered_foo">
<durable>true</durable>
<filter string="bar <> 42"/>
</queue>
</multicast>
</address>
Trying start broker I have an error:
[Fatal Error] :207:30: The value of attribute "string" associated with an element type "filter" must not contain the '<' character.
Exception in thread "main" org.xml.sax.SAXParseException; lineNumber: 207; columnNumber: 30; The value of attribute "string" associated with an element type "filter" must not contain the '<' character.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at org.apache.activemq.artemis.utils.XMLUtil.readerToElement(XMLUtil.java:90)
at org.apache.activemq.artemis.utils.XMLUtil.stringToElement(XMLUtil.java:55)
at org.apache.activemq.artemis.core.config.FileDeploymentManager.readConfiguration(FileDeploymentManager.java:76)
at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:68)
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:82)
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149)
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:97)
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129)
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49)
If I set selector on consumer with same filter string it works:
auto consumer = session->createConsumer("foo::filtered_foo", "bar <> 42");
According to Artemis documentation syntax for config must be the same as for selectors. What's the problem?
The issue here is that the filter is being defined in XML which has its own rules for what characters are allowed and what characters are not allowed. Simply put, your XML isn't valid. Try using this:
<filter string="bar <> 42"/>
By escaping the < character the XML should parse correctly.
The error when running:
Caused by: org.xml.sax.SAXParseException; lineNumber: 34; columnNumber: 30; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'constructor-arg'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
The source:
<spring:bean id="HandlerA_id" name="HandlerA" class="Handler">
<constructor-arg>
<ref bean="BeanA"></ref>
</constructor-arg>
</spring:bean>
The editor recognizes the constructor-arg tag and gives a summary upon roll-over.
In the config file, xsi:schemaLocation value contains (among others):
"...http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd..."
If you examine the xsd at that URL, you can see that the constructor-arg tag is valid for group beanElements which is one of the complex types allowed in 'bean'
Does the runtime not properly validate XML under some conditions?
Include the spring: prefix in the tag. Same for the ref tag.
I'm composing a dynamic SQL query that contains named parameters, one of the them is signerName. It's used in the query as the following:
"LOWER(`CG_TRANSACTIONSIGNER`.`FIRSTNAME`) LIKE :signerName"
When setting the parameter as params.put("signerName", signerName);, the Query::executeWithMap(Map parameters) method will return a collection of [Ljava.lang.Object; which is wrong. It's supposed to return a collection of Transaction. This is the complete stack trace:
org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The class "The class "[Ljava.lang.Object;" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found." is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data for the class is not found.
at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:241)
at org.datanucleus.jdo.JDOPersistenceManager.jdoDetachCopy(JDOPersistenceManager.java:1110)
at org.datanucleus.jdo.JDOPersistenceManager.detachCopyAll(JDOPersistenceManager.java:1183)
at org.datanucleus.jdo.JDOPersistenceManagerProxy.detachCopyAll(JDOPersistenceManagerProxy.java:166)
at com.cryptolog.universign.sign.impl.ContractSignStore.getTransactionsBySQL(ContractSignStore.java:274)
at com.cryptolog.universign.sign.impl.ContractSignStoreTest.testSqlFilterEquivalentToJdqlFilter(ContractSignStoreTest.java:531)
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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
NestedThrowablesStackTrace:
The class "[Ljava.lang.Object;" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found.
org.datanucleus.exceptions.ClassNotPersistableException: The class "[Ljava.lang.Object;" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found.
at org.datanucleus.ObjectManagerImpl.assertClassPersistable(ObjectManagerImpl.java:3890)
at org.datanucleus.ObjectManagerImpl.detachObjectCopy(ObjectManagerImpl.java:1840)
at org.datanucleus.jdo.JDOPersistenceManager.jdoDetachCopy(JDOPersistenceManager.java:1105)
at org.datanucleus.jdo.JDOPersistenceManager.detachCopyAll(JDOPersistenceManager.java:1183)
at org.datanucleus.jdo.JDOPersistenceManagerProxy.detachCopyAll(JDOPersistenceManagerProxy.java:166)
at com.cryptolog.universign.sign.impl.ContractSignStore.getTransactionsBySQL(ContractSignStore.java:274)
at com.cryptolog.universign.sign.impl.ContractSignStoreTest.testSqlFilterEquivalentToJdqlFilter(ContractSignStoreTest.java:531)
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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I figured out what was going wrong. Actually the result returned by the Query::executeWithMap(Map parameters), the collection of [Ljava.lang.Object;, is a normal result. the [Ljava.lang.Object; type is an array of java.lang.Object which was the result of executing the SQL query. This type is not persistable and that's why the ClassNotPersistenceCapableException exception will be thrown when calling the PersistenceManager::detachCopy(Transaction pc) method.
While trying to execute a changeset that should add a column to a table :
<changeSet id="2013.06.25_2" author="ama">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="T_FORCED_DATA" columnName="TRADE_KEY_ID"/>
</not>
</preConditions>
<comment>Add column T_FORCED_DATA.TRADE_KEY_ID</comment>
<addColumn tableName="T_FORCED_DATA">
<column name="TRADE_KEY_ID" type="numeric(10,0)" defaultValue="NULL">
<constraints nullable="true" references="T_TRADE_KEY" foreignKeyName="TRADE_KEY_ID" />
</column>
</addColumn>
</changeSet>
I get the following error :
SEVERE 6/25/13 5:35 PM:liquibase: Change Set db/changelog/_2013/_06/_05/update_T_FORCED_DATA.xml::2013.06.25_2::ama failed. Error: Don't know how to find table and column names from T_TRADE_KEY liquibase.exception.UnexpectedLiquibaseException: Don't know how to find table and column names from T_TRADE_KEY
at liquibase.sqlgenerator.core.AddColumnGenerator.addForeignKeyStatements(AddColumnGenerator.java:93)
at liquibase.sqlgenerator.core.AddColumnGeneratorDefaultClauseBeforeNotNull.generateSql(AddColumnGeneratorDefaultClauseBeforeNotNull.java:91)
at liquibase.sqlgenerator.core.AddColumnGeneratorDefaultClauseBeforeNotNull.generateSql(AddColumnGeneratorDefaultClauseBeforeNotNull.java:26)
at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:150)
at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:22)
at liquibase.executor.jvm.JdbcExecutor.access$000(JdbcExecutor.java:36)
at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:82)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)
at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)
at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
at liquibase.Liquibase.update(Liquibase.java:114)
at org.liquibase.maven.plugins.LiquibaseUpdate.doUpdate(LiquibaseUpdate.java:31)
at org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:24)
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:305)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Does anyone know why am I getting this exception ?
For info : I have a Table called T_TRADE_KEY with a column TRADE_KEY_ID.
Thanks
Looking at the liquibase code and according to the stack trace you provided liquibase is checking on the references="T_TRADE_KEY" with a regex of:
([\\w\\._]+)\\(([\\w_]+)\\).
While this does not match, the error you get is thrown.
The regex expects something with brackets.
So I guess something like:
references="T_TRADE_KEY(TRADE_KEY_ID)"
should work.
The attribute foreignKeyName is not the column name of the foreign key but just a name for the foreign key.
Maybe the documentation on the <constraint> tag also helps.