Project

General

Profile

[Compilation Error] error: package Repository does not exist

Gaurav Gupta
Added over 4 years ago

Hi,

I tried to install tigase mongodb from git clone https://repository.tigase.org/git/tigase-mongodb.git

but while compilation maven is throwing an error.

Procedure:

  1. Clone the project from url {https://repository.tigase.org/git/tigase-mongodb.git}

  2. Import it as maven project.

  3. RightClick --> Run As---> Maven build...

  4. Set clean install in goal section of window.

  5. Run [Now as maven should clean and install the project, at the time of compilation of project maven throws an error]

Error:

[INFO] -------------------------------------------------------------

[ERROR] COMPILATION ERROR :

[INFO] -------------------------------------------------------------

[ERROR] /home/gaurav/Gaurav-Drive/Devlopment/code/Offc-Test-Workspace/tigase-mongodb/src/main/java/tigase/mongodb/archive/MongoMessageArchiveRepository.java:[60,11] error: package Repository does not exist

[ERROR] /home/gaurav/Gaurav-Drive/Devlopment/code/Offc-Test-Workspace/tigase-mongodb/src/main/java/tigase/mongodb/cluster/ClConMongoRepository.java:[46,11] error: package Repository does not exist

[INFO] 2 errors

How to make it compile first and then i need to run it on tigase5.3


Replies (5)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 4 years ago

I tried to replicate this issue but I was not able to replicate as compilation succeeded. I suppose that this issue occured as before trying to compile Tigase MongoDB support library you compiled Tigase XMPP Server from it's repository from master branch which contains slightly older version of Tigase XMPP Server 5.3 as we moved current development of Tigase XMPP Server 5.3 to devel branch of it's repository.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Right, make sure you use the devel branch of the Tigase XMPP Server.

Added by Gaurav Gupta over 4 years ago

Yes it was devel branch only. I reconfirmed it using 'git branch' command.

Can you mention the steps you followed in-order to successful compilation of the mongodb. So that i will follow them and that will help other people too.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

This is what I did (step by step):

kobit@t2:~$
kobit@t2:~$ mkdir tmp
kobit@t2:~$ cd tmp/
kobit@t2:~/tmp$ git clone https://repository.tigase.org/git/tigase-mongodb.git tigase-mongodb
Cloning into 'tigase-mongodb'...
remote: Counting objects: 217, done.
remote: Compressing objects: 100% (141/141), done.
remote: Total 217 (delta 62), reused 0 (delta 0)
Receiving objects: 100% (217/217), 44.90 KiB, done.
Resolving deltas: 100% (62/62), done.
kobit@t2:~/tmp$ cd tigase-mongodb/
kobit@t2:~/tmp/tigase-mongodb$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tigase MongoDB 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running tigase.mongodb.MongoRepositoryTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.013 sec - in tigase.mongodb.MongoRepositoryTest
Running tigase.mongodb.MongoHistoryProviderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 sec - in tigase.mongodb.MongoHistoryProviderTest
Running tigase.mongodb.MongoMessageArchiveRepositoryTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 sec - in tigase.mongodb.MongoMessageArchiveRepositoryTest
Running tigase.mongodb.PubSubDAOMongoTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 sec - in tigase.mongodb.PubSubDAOMongoTest

Results :

Tests run: 4, Failures: 0, Errors: 0, Skipped: 4

[INFO]
[INFO] --- maven-bundle-plugin:2.4.0:bundle (default-bundle) @ tigase-mongodb ---
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (dist) @ tigase-mongodb ---
[INFO]
[INFO] Building jar: /home/kobit/tmp/tigase-mongodb/dist/tigase-mongodb-1.0.0-SNAPSHOT-b22-javadoc.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.894s
[INFO] Finished at: Fri Oct 10 13:51:52 EDT 2014
[INFO] Final Memory: 25M/207M
[INFO] ------------------------------------------------------------------------
kobit@t2:~/tmp/tigase-mongodb$

I cut off some of the maven output.

Please note, if you have Tigase XMPP Server build using command:

mvn clean package install

And you did this for the master branch, compilation of the mongodb sources may fail, also if you have devel branch sources compiled but not the most recent version the mongodb compilation may fail. So make sure you have up to date sources, if you have a locally compiled copy of the Tigase server to do something like this:

kobit@t2:~/tmp/tigase-mongodb$ cd ..
kobit@t2:~/tmp$ git clone https://repository.tigase.org/git/tigase-server.git tigase-server
Cloning into 'tigase-server'...
remote: Counting objects: 37130, done.
remote: Compressing objects: 100% (9486/9486), done.
remote: Total 37130 (delta 24674), reused 33085 (delta 21731)
Receiving objects: 100% (37130/37130), 33.26 MiB | 21.96 MiB/s, done.
Resolving deltas: 100% (24674/24674), done.
kobit@t2:~/tmp$ cd tigase-server/
kobit@t2:~/tmp/tigase-server$ mvn clean package install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tigase XMPP Server 5.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running tigase.io.SSLContextContainerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec - in tigase.io.SSLContextContainerTest
Running tigase.xmpp.impl.JabberIqPrivacyTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec - in tigase.xmpp.impl.JabberIqPrivacyTest
Running tigase.server.xmppclient.StreamManagementIOProcessorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec - in tigase.server.xmppclient.StreamManagementIOProcessorTest
Running tigase.cluster.api.ClusterElementTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec - in tigase.cluster.api.ClusterElementTest
Running tigase.auth.mechanisms.SaslPLAINTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec - in tigase.auth.mechanisms.SaslPLAINTest
Running tigase.auth.mechanisms.SaslANONYMOUSTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec - in tigase.auth.mechanisms.SaslANONYMOUSTest

Results :

Tests run: 24, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.513s
[INFO] Finished at: Fri Oct 10 13:56:50 EDT 2014
[INFO] Final Memory: 34M/588M
[INFO] ------------------------------------------------------------------------

Then let's try building mongodb again:

kobit@t2:~/tmp/tigase-server$ cd ../tigase-mongodb/
obit@t2:~/tmp/tigase-mongodb$ mvn clean package install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tigase MongoDB 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/muc/MongoHistoryProvider.java:[42,16] error: cannot find symbol
[ERROR]   symbol:   class Repository
  location: package tigase.db
/home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/muc/MongoHistoryProvider.java:[59,7] error: cannot access Repository
[ERROR]   class file for tigase.db.Repository not found
/home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/archive/MongoMessageArchiveRepository.java:[59,11] error: package Repository does not exist
[ERROR] /home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/MongoRepository.java:[51,11] error: package Repository does not exist
[ERROR] /home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/MongoMsgRepository.java:[58,24] error: cannot find symbol
[ERROR]   symbol:   class JDBCMsgRepository
  location: package tigase.server.amp
/home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/MongoMsgRepository.java:[72,53] error: type MsgRepository does not take parameters
[ERROR] /home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/MongoMsgRepository.java:[71,11] error: package Repository does not exist
[ERROR] /home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/pubsub/PubSubDAOMongo.java:[66,11] error: package Repository does not exist
[ERROR] /home/kobit/tmp/tigase-mongodb/src/main/java/tigase/mongodb/cluster/ClConMongoRepository.java:[47,11] error: package Repository does not exist
[INFO] 9 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.110s
[INFO] Finished at: Fri Oct 10 13:58:28 EDT 2014
[INFO] Final Memory: 21M/217M
[INFO] ------------------------------------------------------------------------

To fix this we need to compile devel branch of the Tigase server:

obit@t2:~/tmp/tigase-mongodb$ cd ../tigase-server/
kobit@t2:~/tmp/tigase-server$ git checkout devel
Branch devel set up to track remote branch devel from origin.
Switched to a new branch 'devel'
kobit@t2:~/tmp/tigase-server$ mvn clean package install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tigase XMPP Server 5.3.0-SNAPSHOT

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running tigase.xmpp.impl.MobileV3Test
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.095 sec - in tigase.xmpp.impl.MobileV3Test
Running tigase.xmpp.impl.JabberIqPrivacyTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec - in tigase.xmpp.impl.JabberIqPrivacyTest
Running tigase.xmpp.impl.JabberIqRegisterWhitelistTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.064 sec - in tigase.xmpp.impl.JabberIqRegisterWhitelistTest
Running tigase.server.websocket.WebSocketHybiTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 sec - in tigase.server.websocket.WebSocketHybiTest
Running tigase.server.websocket.WebSocketHixie76Test
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in tigase.server.websocket.WebSocketHixie76Test
Running tigase.server.xmppclient.StreamManagementIOProcessorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in tigase.server.xmppclient.StreamManagementIOProcessorTest
Running tigase.cluster.api.ClusterElementTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in tigase.cluster.api.ClusterElementTest
Running tigase.auth.mechanisms.SaslPLAINTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in tigase.auth.mechanisms.SaslPLAINTest
Running tigase.auth.mechanisms.SaslANONYMOUSTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in tigase.auth.mechanisms.SaslANONYMOUSTest
Running tigase.io.SSLContextContainerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec - in tigase.io.SSLContextContainerTest
Running tigase.auth.mechanisms.SaslSCRAMTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.198 sec - in tigase.auth.mechanisms.SaslSCRAMTest

Results :

Tests run: 54, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.341s
[INFO] Finished at: Fri Oct 10 14:37:57 EDT 2014
[INFO] Final Memory: 38M/592M
[INFO] ------------------------------------------------------------------------

And then mongodb again:

kobit@t2:~/tmp/tigase-server$ cd -
/home/kobit/tmp/tigase-mongodb
kobit@t2:~/tmp/tigase-mongodb$ mvn clean package install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tigase MongoDB 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running tigase.mongodb.MongoRepositoryTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.006 sec - in tigase.mongodb.MongoRepositoryTest
Running tigase.mongodb.MongoHistoryProviderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec - in tigase.mongodb.MongoHistoryProviderTest
Running tigase.mongodb.MongoMessageArchiveRepositoryTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec - in tigase.mongodb.MongoMessageArchiveRepositoryTest
Running tigase.mongodb.PubSubDAOMongoTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec - in tigase.mongodb.PubSubDAOMongoTest

Results :

Tests run: 4, Failures: 0, Errors: 0, Skipped: 4

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.842s
[INFO] Finished at: Fri Oct 10 14:38:17 EDT 2014
[INFO] Final Memory: 34M/348M
[INFO] ------------------------------------------------------------------------
kobit@t2:~/tmp/tigase-mongodb$

I cannot comment on building packages under IDE (Eclipse or NB or something other) as this is really out of scope and depends a lot on environment you use and projects you have loaded and configured.

Added by Gaurav Gupta over 4 years ago

Thanks that worked like charm.

Thanks Artur Hefczyc for explaining my mistake as well.

    (1-5/5)