glassfish-4

SimpleFormatter ignoring the java.util.logging.SimpleFormatter.format property

你。 提交于 2019-12-17 13:54:22
问题 I'm using java.util.logging on GlassFish 4. I'm defining my own class to initialize the LogManager by defining the System property: -Djava.util.logging.config.class . My class loads the logging.properties file, merges it with some other property file and does some custom replacement. The following is the relevant part of my logging.properties file: java.util.logging.FileHandler.pattern=C:/Work/server/glassfish/domains/domain1/logs/JMSFileHandler%g.log java.util.logging.FileHandler.limit

Hibernate: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]

与世无争的帅哥 提交于 2019-12-13 20:51:47
问题 I am attempting to deploy an application on a glassfish 4 server on my local machine. When I copy the .war file into the autodeploy directory, the glassfish log returns exceptions and the application does not appear in the list of applications, on the server's admin console. I've consulted with a local colleague on this and based on comparisons to working instances, we believe the traces from the Glassfish server, shown below, may have something to do with the cause: Server Trace: Caused by:

Glassfish 4 Grizzly Threads Heavy CPU usage

天大地大妈咪最大 提交于 2019-12-13 13:33:29
问题 I have a Jersey application running on Glassfish 4 (4.1 build 13), JDK 1.7 update 67 and AWS Linux AMI and I'm noticing that after some hours running it, CPU usage goes up and stays up even though clients are stopped. Running "top -H" identifies 2 http-listener-1-kernel threads with high CPU usage (from a total of 16). I then took a thread dump to check these two threads: "http-listener-1-kernel(3) SelectorRunner" daemon prio=10 tid=0x00007fbc68251000 nid=0xaee runnable [0x00007fbcb55ce000]

Get NullPointerException in java EE application on Intellij Idea IDE

风格不统一 提交于 2019-12-13 11:23:52
问题 I'm trying to run this simple and small application but I don't understand which is the problem and consequently how to fix it. Here it is the code. It is very simple. One bean invoked by a client application in order to print out in the client terminal the well-known message Hello World. I have created the application by using Intellij Idea 13.0.3 IDE with Server GlassFish 4.0.0, Java JDK 8.0 and Java EE 7. EDIT I think I got those errors because I didn't deployed correctly my application. I

Writing HK2 components in GlassFish 4?

烈酒焚心 提交于 2019-12-13 04:42:00
问题 In version 3 there is this guide on how to write components(including HK2 components): Oracle GlassFish Server 3.0.1 Add-On Component Development Guide This documentation is not available with GF4. Why not? Why am I asking? Because I want to write a custom Logging Handler, as documented in Chapter 7 of the administration guide(https://glassfish.java.net/docs/4.0/administration-guide.pdf). "Note: The custom handler class should be packaged in an OSGi module and the JAR file placed in the as

What causes “java.lang.IllegalArgumentException: Can not set java.lang.Integer field”

送分小仙女□ 提交于 2019-12-13 02:04:32
问题 I cannot resolve these new exceptions Can not set java.lang.Integer field GcmRegistraionIdentity.gcmId to GcmRegistraionIdentity org.hibernate.PropertyAccessException: could not get a field value by reflection getter of GcmRegistraionIdentity.gcmId My Dynamic Web Project (Jee7) targeted to GlassFish Server Open Source Edition 4.1 (build 13) Hibernate Hibernate Core {4.3.7.Final} My Persistence.xml <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www

java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistry

帅比萌擦擦* 提交于 2019-12-12 13:49:44
问题 I am using hibernate-search 5.5.4.Final with hibernate-entitymanager 5.0.9 (matched with hibernate-core 5.0.9). But when i deployed the ejb maven module on glassfish 4.1. I obtained the following exception: Grave: java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistry at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:34) at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:165) at

Eclipse Glassfish launch configuration - VM arguments are ignored

爷,独闯天下 提交于 2019-12-12 13:32:05
问题 I am struggling to set up Glassfish 4 with Eclipse Kepler. No matter what I do, the VM arguments of the Glassfish launch configuration are not passed on to the VM running the server. Not even the argument (-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009) that is put into the launch configuration by default by the Glassfish Tools for Eclipse plugin. The running server has all system properties set according to the domain.xml of the started domain. The VM arguments specified

How to list all JNDI entries in “java:global” namespace

时光总嘲笑我的痴心妄想 提交于 2019-12-12 10:42:57
问题 Goal is to list all the JNDI entries programmatically. new InitialContext().list("java:global") doesn't work. EJB 3.1, Wildfly or Glassfish 4 回答1: I think that the safer way to navigate in JNDI namespace is first to lookup its root and then list its content. I've tried this way in WildFly 8.1.0 and it worked : Context root = (Context) new InitialContext().lookup("java:global"); NamingEnumeration<NameClassPair> names = root.list(""); 来源: https://stackoverflow.com/questions/26463970/how-to-list

JDBC Realm not working : Login failed: No LoginModules configured for jdbcAuth

百般思念 提交于 2019-12-12 05:12:27
问题 Getting the following error while i try to login : Warning: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: No LoginModules configured for jdbcAuth My Glassfish server version is 4 I am working on jdbc auth realm with oracle 12c as database for user authentication. i have created a jdbc connection pool with name Oracle pool by the following properties : Then connected the resource with the pool by name jdbc/OracleConnection : created the