Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build project from master branch #367

Open
devrishal opened this issue Jan 14, 2023 · 5 comments
Open

Unable to build project from master branch #367

devrishal opened this issue Jan 14, 2023 · 5 comments

Comments

@devrishal
Copy link

Hi,
I have cloned the project from master branch and tried running mvn clean install. But unable to do so as getting the below error.

Could not transfer artifact io.confluent:common:pom:7.4.0-886 from/to confluent (${confluent.maven.repo}): Cannot access ${confluent.maven.repo} with type default using the available connector factories: BasicRepositoryConnectorFactory

Please suggest if there is any configuration needed.

@DangHT
Copy link

DangHT commented Mar 9, 2023

You can try install all the jars to the local maven repository from confluencinc/kafka

@james-johnston-thumbtack

Here is how I was able to build this repo from master:

This could be a helpful addition to the README.md file...

@krish7919
Copy link

Tried the above steps, but fails while building common with:


[INFO] --- surefire:3.0.0-M7:test (default-test) @ common-logging ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[WARNING] Couldn't load group class 'io.confluent.common.utils.IntegrationTest' in Surefire|Failsafe plugin. The group class is ignored!
[WARNING] Couldn't load group class 'IntegrationTest' in Surefire|Failsafe plugin. The group class is ignored!
[INFO] Running io.confluent.common.logging.LogRecordStructBuilderTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 s - in io.confluent.common.logging.LogRecordStructBuilderTest
[INFO] Running io.confluent.common.logging.StructuredLoggerFactoryTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.382 s - in io.confluent.common.logging.StructuredLoggerFactoryTest
[INFO] Running io.confluent.common.logging.LogRecordStringBuilderTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 s <<< FAILURE! - in io.confluent.common.logging.LogRecordStringBuilderTest
[ERROR] io.confluent.common.logging.LogRecordStringBuilderTest.shouldSerializeRecordCorrectly  Time elapsed: 0.001 s  <<< ERROR!
java.lang.Error: 
Unresolved compilation problems: 
	The import com.fasterxml cannot be resolved
	The import com.fasterxml cannot be resolved
	The import com.fasterxml cannot be resolved
	The import com.fasterxml cannot be resolved
	ObjectMapper cannot be resolved to a type
	ObjectMapper cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonRawValue cannot be resolved to a type
	ObjectMapper cannot be resolved to a type
	JsonProcessingException cannot be resolved to a type

	at io.confluent.common.logging.LogRecordStringBuilder$LogRecord.<init>(LogRecordStringBuilder.java:19)
	at io.confluent.common.logging.LogRecordStringBuilder.build(LogRecordStringBuilder.java:85)
	at io.confluent.common.logging.LogRecordStringBuilder.build(LogRecordStringBuilder.java:25)
	at io.confluent.common.logging.LogRecordStringBuilderTest.shouldSerializeRecordCorrectly(LogRecordStringBuilderTest.java:43)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)

[INFO] Running io.confluent.common.logging.StructuredLoggerImplTest
[MockitoHint] StructuredLoggerImplTest.shouldLogInfoMessage (see javadoc for MockitoHint):
[MockitoHint] 1. Unused -> at io.confluent.common.logging.StructuredLoggerImplTest.setup(StructuredLoggerImplTest.java:69)

[MockitoHint] StructuredLoggerImplTest.shouldLogErrorMessage (see javadoc for MockitoHint):
[MockitoHint] 1. Unused -> at io.confluent.common.logging.StructuredLoggerImplTest.setup(StructuredLoggerImplTest.java:69)

[MockitoHint] StructuredLoggerImplTest.shouldNotGetMessageIfLoggerDisabledForDebug (see javadoc for MockitoHint):
[MockitoHint] 1. Unused -> at io.confluent.common.logging.StructuredLoggerImplTest.setup(StructuredLoggerImplTest.java:69)

[MockitoHint] StructuredLoggerImplTest.shouldNotGetMessageIfLoggerDisabledForError (see javadoc for MockitoHint):
[MockitoHint] 1. Unused -> at io.confluent.common.logging.StructuredLoggerImplTest.setup(StructuredLoggerImplTest.java:69)

[MockitoHint] StructuredLoggerImplTest.shouldLogDebugMessage (see javadoc for MockitoHint):
[MockitoHint] 1. Unused -> at io.confluent.common.logging.StructuredLoggerImplTest.setup(StructuredLoggerImplTest.java:69)

[MockitoHint] StructuredLoggerImplTest.shouldNotGetMessageIfLoggerDisabledForInfo (see javadoc for MockitoHint):
[MockitoHint] 1. Unused -> at io.confluent.common.logging.StructuredLoggerImplTest.setup(StructuredLoggerImplTest.java:69)

[MockitoHint] StructuredLoggerImplTest.shouldSerializeMessageToJsonString (see javadoc for MockitoHint):
[MockitoHint] 1. Unused -> at io.confluent.common.logging.StructuredLoggerImplTest.setup(StructuredLoggerImplTest.java:69)

[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 s - in io.confluent.common.logging.StructuredLoggerImplTest
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   LogRecordStringBuilderTest.shouldSerializeRecordCorrectly:43 »  Unresolved compilation problems: 
	The import com.fasterxml cannot be resolved
	The import com.fasterxml cannot be resolved
	The import com.fasterxml cannot be resolved
	The import com.fasterxml cannot be resolved
	ObjectMapper cannot be resolved to a type
	ObjectMapper cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonProperty cannot be resolved to a type
	JsonRawValue cannot be resolved to a type
	ObjectMapper cannot be resolved to a type
	JsonProcessingException cannot be resolved to a type

[INFO] 
[ERROR] Tests run: 14, Failures: 0, Errors: 1, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for common 7.7.0-286:
[INFO] 
[INFO] assembly-plugin-boilerplate ........................ SUCCESS [  0.399 s]
[INFO] Build Tools ........................................ SUCCESS [  0.416 s]
[INFO] common ............................................. SUCCESS [ 11.566 s]
[INFO] utils .............................................. SUCCESS [  1.274 s]
[INFO] metrics ............................................ SUCCESS [ 12.220 s]
[INFO] config ............................................. SUCCESS [  0.981 s]
[INFO] common-logging ..................................... FAILURE [  1.491 s]
[INFO] confluent-log4j-extensions ......................... SKIPPED
[INFO] confluent-log4j2-extensions ........................ SKIPPED
[INFO] package ............................................ SKIPPED
[INFO] Common ............................................. SKIPPED
[INFO] disk-usage-agent ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  28.561 s
[INFO] Finished at: 2024-01-17T11:52:29Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-test) on project common-logging: 
[ERROR] 
[ERROR] Please refer to /Users/krish7919/workspace/github.com/confluentinc/common/logging/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :common-logging

@krish7919
Copy link

Went beyond the earlier error, it was a transient error. Now building rest-utils fails with:

...
...
If you're not sure why you're getting this error, please report to the mailing list.


Java               : 21
JVM vendor name    : Homebrew
JVM vendor version : 21.0.1
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 21.0.1
JVM info           : mixed mode, sharing
OS name            : Mac OS X
OS version         : 13.6.3


You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.io.Closeable, interface java.lang.AutoCloseable, class java.lang.Object, class org.apache.kafka.common.metrics.Metrics]
[ERROR]   Jetty429MetricsDosFilterListenerTest.<init>:54 Mockito 
Mockito cannot mock this class: class org.apache.kafka.common.metrics.Metrics.

If you're not sure why you're getting this error, please report to the mailing list.


Java               : 21
JVM vendor name    : Homebrew
JVM vendor version : 21.0.1
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 21.0.1
JVM info           : mixed mode, sharing
OS name            : Mac OS X
OS version         : 13.6.3


You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.io.Closeable, interface java.lang.AutoCloseable, class java.lang.Object, class org.apache.kafka.common.metrics.Metrics]
[ERROR]   JettyRequestMetricsFilterTest.<init>:51 Mockito 
Mockito cannot mock this class: class org.apache.kafka.common.metrics.Metrics.

If you're not sure why you're getting this error, please report to the mailing list.


Java               : 21
JVM vendor name    : Homebrew
JVM vendor version : 21.0.1
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 21.0.1
JVM info           : mixed mode, sharing
OS name            : Mac OS X
OS version         : 13.6.3


You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.io.Closeable, interface java.lang.AutoCloseable, class java.lang.Object, class org.apache.kafka.common.metrics.Metrics]
[ERROR]   JettyRequestMetricsFilterTest.<init>:51 Mockito 
Mockito cannot mock this class: class org.apache.kafka.common.metrics.Metrics.

If you're not sure why you're getting this error, please report to the mailing list.


Java               : 21
JVM vendor name    : Homebrew
JVM vendor version : 21.0.1
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 21.0.1
JVM info           : mixed mode, sharing
OS name            : Mac OS X
OS version         : 13.6.3


You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.io.Closeable, interface java.lang.AutoCloseable, class java.lang.Object, class org.apache.kafka.common.metrics.Metrics]
[INFO] 
[ERROR] Tests run: 170, Failures: 0, Errors: 11, Skipped: 1
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for rest-utils-parent 7.7.0-213:
[INFO] 
[INFO] rest-utils-parent .................................. SUCCESS [  4.648 s]
[INFO] rest-utils ......................................... FAILURE [01:02 min]
[INFO] rest-utils-test .................................... SKIPPED
[INFO] rest-utils-example ................................. SKIPPED
[INFO] rest-utils-package ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:07 min
[INFO] Finished at: 2024-01-17T12:01:19Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-test) on project rest-utils: 
[ERROR] 
[ERROR] Please refer to /Users/krish.iyer/Desktop/workspace/curve/src/github.com/confluentinc/rest-utils/core/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :rest-utils

@devrishal
Copy link
Author

devrishal commented Jan 30, 2024

Here is how I was able to build this repo from master:

This could be a helpful addition to the README.md file...

Thanks for the helpful steps as a guide.

But, thats lot of configuration and attention left for the end users and developers. it should be more simplistic approach :) It seems it need some fix/changes in the pom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants