I am new to EHcache. I recently installed EHcache-2.6.0 on my Ubuntu 12.04 system. I have been trying to run a simple cache put,get program in java, but it is giving me following error:
We couldn't load configuration data from the server at 'localhost:9510'; retrying. (Error: Connection refused.)
Can anybody please help me to fix this problem?
Thanks.
Ehcache when used as a single-JVM cache does not need to connect to a remote server.
So you should begin by coding a simple ehcahe (many documentation can be found on Google).
When your single-JVM works, move to a distributed one.
Edit :
here are some simple code examples : http://ehcache.org/documentation/code-samples
Quickly :
create a ehcache.xml containing the config of your caches.
Instanciate one CacheManager.
Use the CacheManager to retrieve one Cache.
Use this Cache to do put, get, etc...
Related
I try to use the MongoDB in the spring-boot project.
I tried a different of non-usable tutorial and stopped on the official documentation
I created cluster and now I ready to use MongoDB in my project.
Documentation says:
As I understand the pwd - this is the password, so my application.properties looks like:
spring.data.mongodb.uri=mongodb+srv://root:pass#88.155.XX.XXX.mongodb.net/mygrocerylist
spring.data.mongodb.database=mygrocerylist
this is all what I added to the application.properties - there are no other information in the tutorial.
After I started project, I receive error, that repeats every several seconds (however project still launched - I receive error even during system logging):
com.mongodb.MongoConfigurationException: No SRV records available for
host 88.155.21.126 at
com.mongodb.internal.dns.DefaultDnsResolver.resolveHostFromSrvRecords(DefaultDnsResolver.java:64)
~[mongodb-driver-core-4.4.2.jar:na] at
com.mongodb.internal.connection.DefaultDnsSrvRecordMonitor$DnsSrvRecordMonitorRunnable.run(DefaultDnsSrvRecordMonitor.java:78)
~[mongodb-driver-core-4.4.2.jar:na] at
java.base/java.lang.Thread.run(Thread.java:829) ~[na:an]
please, can anyone to explain how to exactly add MongoDB to the spring project?
I prefer to use such solution, since I need to complete the task and launch my project in the another PC. In any case - I tried to use mongoDb in the docker and this way also not work for me, and I not sure the other side use MongoDB locally.
I would like to know if I can start a ignite cache from java client . I am using Cassandra as the persistence store and use POJO configurations to work with the cache and Cassandra. With out providing any named cache configuration in server side is it possible ?
Please share your thoughts.
Cache itself can be dynamically started using Ignite#createCache method. However, classes that are required for this cache need to be deployed explicitly in advance, before servers are started.
In your case you will have to deploy POJO classes because they are currently required by Cassandra store. You will be able to skip this step though after this ticket is implemented: https://issues.apache.org/jira/browse/IGNITE-5270
I have created a database pool on WASCE 3.0.0.3 (WebSphere Application Server Community Edition) which i am using through JNDI. I want to set oracle network data encryption and integrity properties for this database pool. The properties i want to set in particular are oracle.net.encryption_client and oracle.net.encryption_types_client.
How can I set these properties? I do not see any option to set these properties while creating the connection pool and I cannot find any documentation related to the same.
You probably cannot find any documentation on how to do this because WAS 3.0 went out of service in 2003, so any documentation for it is long gone.
If you upgrade to a newer version of WAS traditional (or Liberty), you will find much more documentation and people willing to help you. Additionally, in WAS 6.1 an admin console (UI) was added, which will probably walk you through what you are trying to do.
I have not been able to find any documentation on how to setup an ehCache server embedded inside an existing application. Does anyone know of a way of doing this?
It is working not as a server but it is simple library. In this case usage is pretty simple:
http://www.ehcache.org/documentation/2.8/code-samples.html
All you need - configure ehcache.xml.
Yes, there is also a server, in form of separate web-app. So you can just take this web-app and run on embdeded jetty.
I'm trying to deploy an application to my GlassFish Server environment. I've set it up so that GlassFish creates a connection pool to a postgreSQL database on another server (not localhost) where the database is located. I test the connection and then try to deploy the application. It fails with a java.lang.RuntimeException: EJB Container initialization error, and my error log contains the following: http://ideone.com/UlZXut (put it here due to its size). There were other warnings above these, but they only referred to tables already existing.
As according to this, I thought that the required sun-cmp-mappings.xml file (the one I assume would be necessary for this correct mapping) would be automatically generated upon deployment, but it seems I was wrong. Could anyone shed some light on this situation?
My apologies if this is not the absolute best part of SE to post this, but it is related to development tools and I did see a number of related posts.
Your error log indicates that you are trying to create table(s) with DOUBLE as a datatype. In Postgresql, that datatype is actually called "double precision". What happens if you revise the table definition to use "double precision" instead?
on startup Glassfish tries to create the DB tables for your java code. It fails to do that and it fails to startup.
Check the configuration of your ORM mapper.