Hi there,
we would like to evaulate your bitbucket plugin.
Uploading the jar file gitx-bitbucket-1.0.0-beta3-1487.4488d88.jar was working in the “Mange App” dialog of bitbcuket
But if I click then on the CONFIGURE button, nothing happens
In atlassian-bitbucket.log I can see the following error traces:
{noformat}
2021-04-14 09:12:02,245 ERROR [active-objects-init-compatibility-tenant-0] userID *1JAILSSx551x114313x0 1qrez45 10.142.67.162,10.139.12.50 “POST /rest/plugins/1.0/ HTTP/1.1” net.java.ao.sql Exception executing SQL update <CREATE TABLE “AO_CCAD84_SCOPES” (
“PARENT_SCOPE_ID” NUMBER(20) DEFAULT 0,
“SCOPE_ID” NUMBER(20) DEFAULT 0 CONSTRAINT U_AO_CCAD84_SCOPES_SCOPE_ID UNIQUE NOT NULL,
“STATE” VARCHAR(255),
PRIMARY KEY(“SCOPE_ID”)
)>
java.sql.SQLSyntaxErrorException: ORA-02261: such unique or primary key already exists in the table
{noformat}
Hi Dmitry,
I am not an SQL expert, but for me it looks like as if the SQL statement is doubled referring to a primary key.
line
“SCOPE_ID” NUMBER(20) DEFAULT 0 CONSTRAINT U_AO_CCAD84_SCOPES_SCOPE_ID UNIQUE NOT NULL,
is already defining the primary key using the CONSTRAINT keyword.
Then later on, there is again
PRIMARY KEY(“SCOPE_ID”) , where of course, the Primary key has been already defined before
as I said, I am not sure.
Are you testing maybe not with ORACLE but with another database ( e.g. mySQL) and there it works ?
Could be that ORACLE complains about this ?
thanks Dmitry,
I was able to install the plugin now.
still got the followoing error messages though:
2021-04-21 10:24:07,490 WARN [hz.hazelcast.event-5] com.hazelcast.spi.EventService [10.4.6.239]:5701 [bitbucket] [3.11.1] Error while logging processing event
java.lang.NullPointerException: message
at java.util.Objects.requireNonNull(Objects.java:228)
at com.atlassian.stash.internal.topic.DefaultMessageEvent.(DefaultMessageEvent.java:19)
at com.atlassian.stash.internal.topic.HazelcastTopicService$DefaultTopic.lambda$register$2(HazelcastTopicService.java:388)
at com.hazelcast.topic.impl.TopicService.dispatchEvent(TopicService.java:136)
at com.hazelcast.spi.impl.eventservice.impl.EventProcessor.process(EventProcessor.java:61)
at com.hazelcast.spi.impl.eventservice.impl.RemoteEventProcessor.run(RemoteEventProcessor.java:47)
at com.hazelcast.util.executor.StripedExecutor$Worker.process(StripedExecutor.java:226)
at com.hazelcast.util.executor.StripedExecutor$Worker.run(StripedExecutor.java:209)
2021-04-21 10:24:12,424 WARN [topic-dispatcher:thread-1] c.a.s.i.topic.HazelcastTopicService [org.tmatesoft.gitx.gitx-bitbucket:job-records] error dispatching message to listener class org.tmatesoft.framework.bitbucket.log.GxBitbucketLogService
java.lang.ClassCastException: org.tmatesoft.framework.bitbucket.job.GxBitbucketJobRecord cannot be cast to org.tmatesoft.framework.bitbucket.job.GxBitbucketJobRecord
at org.tmatesoft.framework.bitbucket.log.GxBitbucketLogService.onMessage(GxBitbucketLogService.java:188)
at com.atlassian.stash.internal.topic.HazelcastTopicService$DefaultTopic.dispatchNextMessage(HazelcastTopicService.java:339)
at com.atlassian.stash.internal.topic.HazelcastTopicService$DefaultTopic.access$000(HazelcastTopicService.java:226)
at com.atlassian.stash.internal.topic.HazelcastTopicService.dispatchNextMessage(HazelcastTopicService.java:142)
at com.atlassian.stash.internal.topic.HazelcastTopicService.lambda$scheduleDispatch$3(HazelcastTopicService.java:178)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:748)
… 1 frame trimmed
2021-04-21 10:24:12,425 WARN [topic-dispatcher:thread-1] c.a.s.i.topic.HazelcastTopicService [org.tmatesoft.gitx.gitx-bitbucket:job-records] error dispatching message to listener class org.tmatesoft.framework.bitbucket.log.GxBitbucketLogService
java.lang.ClassCastException: org.tmatesoft.framework.bitbucket.job.GxBitbucketJobRecord cannot be cast to org.tmatesoft.framework.bitbucket.job.GxBitbucketJobRecord
at org.tmatesoft.framework.bitbucket.log.GxBitbucketLogService.onMessage(GxBitbucketLogService.java:188)
at com.atlassian.stash.internal.topic.HazelcastTopicService$DefaultTopic.dispatchNextMessage(HazelcastTopicService.java:339)
at com.atlassian.stash.internal.topic.HazelcastTopicService$DefaultTopic.access$000(HazelcastTopicService.java:226)
at com.atlassian.stash.internal.topic.HazelcastTopicService.dispatchNextMessage(HazelcastTopicService.java:142)
at com.atlassian.stash.internal.topic.HazelcastTopicService.lambda$scheduleDispatch$3(HazelcastTopicService.java:178)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:748)
… 1 frame trimmed
2021-04-21 10:24:12,425 WARN [topic-dispatcher:thread-1] c.a.s.i.topic.HazelcastTopicService [org.tmatesoft.gitx.gitx-bitbucket:job-records] error dispatching message to listener class org.tmatesoft.framework.bitbucket.log.GxBitbucketLogService
java.lang.ClassCastException: org.tmatesoft.framework.bitbucket.job.GxBitbucketJobRecord cannot be cast to org.tmatesoft.framework.bitbucket.job.GxBitbucketJobRecord
at org.tmatesoft.framework.bitbucket.log.GxBitbucketLogService.onMessage(GxBitbucketLogService.java:188)
at com.atlassian.stash.internal.topic.HazelcastTopicService$DefaultTopic.dispatchNextMessage(HazelcastTopicService.java:339)
at com.atlassian.stash.internal.topic.HazelcastTopicService$DefaultTopic.access$000(HazelcastTopicService.java:226)
at com.atlassian.stash.internal.topic.HazelcastTopicService.dispatchNextMessage(HazelcastTopicService.java:142)
at com.atlassian.stash.internal.topic.HazelcastTopicService.lambda$scheduleDispatch$3(HazelcastTopicService.java:178)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:748)
… 1 frame trimmed
Hazelcastservice stands for the bitbucket cluster functionality. so I guess something does not fully work yet under cluster conditions.
But at least I can open now the configure dialog and also inside a repository I may open
the gitx-x repository settings. This will allow our developers to start testing your plugins.
Thanks for the information! While we are trying to reproduce the problem, may I ask you whether this problem happens only once or does it happen all the time?
The problem happens because of the following: somewhere inside Bitbucket or hazelcast, theres’s in-memory cache of objects; and when a new version of the app is uploaded, another Java class loader is used and thus type casting fails. The easiest work-around is to restart Bitbucket, then in-memory cache will be cleared and all the objects will be with the same class loader, so no type casting error will happen.
Meanwhile we will be working on preventing the app from conflicting with its previously installed version without restarting.
May I also ask, whether you’re using Bitbucket Data Center 3.11.1? If no which Bitbucket version are you using? I was just surprised to see 3.11.1 in the log…
Hello Dmitry
I will try to restart the services today to see, if we really get rid of the error messages.
currently I get multiple ERROR log entries every 10 minutes.
Don’t get confused about the number 3.11.1 I think it is the version number of a submodule only.
We are running bitbucket data center version 6.10.7 and plan to upgrade to 7.6. soon.
We have released the new version of Git X-Modules for Bitbucket Data Center today. It includes the fix that you’ve discussed with my colleague in April, and many new features - check it out!
Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner,
Prof. Dr. Stefan Asenkerschbaumer, Filiz Albrecht, Dr. Michael Bolle, Dr. Christian Fischer,
Dr. Stefan Hartung, Dr. Markus Heyn, Harald Kröger, Rolf Najork, Uwe Raschke