-
1. Re: MongoDB using issue
kcbabo May 22, 2013 9:38 AM (in response to anikulin)We didn't make any direct changes w/r/t MongoDB between those versions. What is the bean in question here? Is it a CDI bean service? Beans are constructed by CDI and not by SY directly. One change between those versions was the move to DeltaSpike from Weld, so that is one possibility. Have you tried deferring the MongoClient creation to a service method instead of doing it in the constructor?
-
2. Re: MongoDB using issue
anikulin May 23, 2013 5:34 PM (in response to kcbabo)Yes, this is a CDI bean service. Have tried to move MongoClient connection to a service method, but there is still no result. It just starts connecting and hangs up.
-
3. Re: MongoDB using issue
anikulin May 23, 2013 6:50 PM (in response to kcbabo)Moreover, if i use objects from mongoDB in CDI service methods, it hangs at the stage of weld deploying, and the last log i see is
01:43:07,623 INFO [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016008: Starting weld service for deployment barService.jar
Smth really strange.
-
4. Re: MongoDB using issue
mageshbk May 23, 2013 11:59 PM (in response to anikulin)Hi Anton,
Could you enable TRACE logging on org.switchyard package and see if that shows anything? You should be able to see TRACE messages in server.log.
-
5. Re: MongoDB using issue
anikulin May 24, 2013 3:54 AM (in response to mageshbk)Hi Magesh
Yes, sure. I've turned on TRACE logging, but still can't find there smth that can explain app deployment rollback. Could you please take a loot at it?
Thanks a lot
-
server.log.zip 4.2 KB
-
-
6. Re: MongoDB using issue
mageshbk May 24, 2013 4:17 AM (in response to anikulin)Anton,
One simple and silly question, do you have the MongoDB driver in the classpath of the server like the SY-0.6 server setup? Have you configured that in a similar way in SY-0.8? There could be a possibility that the config files were overriden when you installed SY-0.8. Can you turn TRACE/DEBUG level for the entire server and see if that shows anything?
regards,
Magesh
-
7. Re: MongoDB using issue
mageshbk May 24, 2013 4:18 AM (in response to anikulin)BTW, I could not see anything from the attached log.
-
8. Re: MongoDB using issue
anikulin May 24, 2013 5:18 AM (in response to mageshbk)Yes, everything is the same. I just change SY version in pom.xml and with 0.6 on AS7-SY-0.6 it works, but with 0.8 on AS7-SY-0.8 doesn't. As for logs, I turned on TRACE for the whole log system and that attached file was already with this configuration.
I created kind of a simple example for working with MongoDB, could you please try to deploy it on your server. Probably, that's smth wrong with my instance.
Thanks a lot, Anton.
-
switchyard-mongo.7z.zip 2.5 KB
-
-
9. Re: MongoDB using issue
mageshbk May 25, 2013 12:24 AM (in response to anikulin)Hi Anton,
It definitely should be your environment. I modified your code to initialize and add some data like this:
public MongoServiceBean() { initializeMongoDB(); addResult(new Result(true, "One")); addResult(new Result(false, "Two")); }
The server said:
INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "switchyard-mongo-0.0.1-SNAPSHOT.jar"
And the shell shows now:
> use resultDB switched to db resultDB > db.results.find() { "_id" : ObjectId("51a03ba79a478b9de516d267"), "success" : true, "discription" : "One" } { "_id" : ObjectId("51a03ba99a478b9de516d268"), "success" : false, "discription" : "Two" }
regards,
Magesh
-
10. Re: MongoDB using issue
anikulin May 26, 2013 2:58 PM (in response to mageshbk)Thanks a lot, Magesh!
My problem was missing java.net module in AS7. MongoDB requires SocketFactory class, do i added dependency on java.net in main.xml, but forgot to add this module to modules folder, and AS didn't write any messages about its missing.
-
11. Re: MongoDB using issue
cirix Aug 24, 2013 6:36 AM (in response to anikulin)When you say you added the <module name="java.net" /> deps in module.xml what do you mean and that you installed the java.net module.The required class is part of the jdk(part of the rt.jar). I have some problems also because I have defined the module but when I another module reference it it's never deployed correctly.It would be nice if you could post the module.xml of the mongo module.