glassfish

jsf security-contraint to protect link when the user is not signed in?

非 Y 不嫁゛ 提交于 2019-12-24 00:07:08
问题 I have a JSF2 (GlassFish 3.0) application which security constraints defined (example below). My problem is, I have a "sign up" link that should not be accessible when the user is logged in. That is, if they try to hit "/signup.jsf" they should be able to access is if they are logged; so if the have any roles, they should not be able to see the page. Is there a way to do an "inverse" security constraint like that? Any suggestions are welcome, thanks! Rob Example constraint from my app, in

java.lang.NoSuchMethodError: com.google.common.base.CharMatcher.ascii()

自作多情 提交于 2019-12-23 23:13:49
问题 I got this error on glassfish server java.lang.NoSuchMethodError: com.google.common.base.CharMatcher.ascii()Lcom/google/common/base/CharMatcher; at com.google.common.io.BaseEncoding$Alphabet.<init>(BaseEncoding.java:453) at com.google.common.io.BaseEncoding$Base64Encoding.<init>(BaseEncoding.java:892) at com.google.common.io.BaseEncoding.<clinit>(BaseEncoding.java:317) at com.google.cloud.storage.StorageImpl.create(StorageImpl.java:133) at utils.GoogleCouldBucket_Utils.initGoogleBucket

Cannot start GlassFish in Eclipse: GlassFish error : Could not find or load main class files

南楼画角 提交于 2019-12-23 21:18:06
问题 I am attempting to start glassfish from within eclipse (juno). I get the following error: INFO: Successfully launched in 10 msec. Error: Could not find or load main class Files Command start-domain failed. The DAS was stopped. Here is the complete output in Eclipse: Aug 16, 2012 11:51:23 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info INFO: JVM invocation command line: C:\Program Files\Java\jdk1.7.0\bin\java.exe -cp C:/glassfish3-2/glassfish3/glassfish/modules/glassfish.jar -XX:

Incoming buffer size cannot be set to Tyrus client

有些话、适合烂在心里 提交于 2019-12-23 19:55:51
问题 I trying to transfer a file bigger than 4M via WebSocket. I'm using org.glassfish.tyrus:tyrus-server:1.13.1 and org.glassfish.tyrus:tyrus-container-grizzly-server:1.13.1 as dependencies. By default the incoming buffer size is about 4M (see: 8.4. Incoming buffer size). The documentation clearly says what needs to be done if I want to increase the size of the file but still can not change the incoming buffer size. Here is the essence of what I'm trying to do: CountDownLatch messageLatch = new

New thread every n minutes (java.lang.Thread.State: WAITING at sun.misc.Unsafe.park(Native Method))

六眼飞鱼酱① 提交于 2019-12-23 19:28:51
问题 I read all existing topics but I didn't find any solution to my problem. I monitor my glassfish server with VisualVM and I have noticed some strange behaviour. Here is screenshot: java.lang.Thread.State: WAITING at sun.misc.Unsafe.park(Native Method) - parking to wait for <3cb9965d> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer

Glassfish error while deploying ear web application

风流意气都作罢 提交于 2019-12-23 15:17:31
问题 I'm walking with this error several weeks, i've never work with java web applications so i'm really lost on this. My setup is: Glassfish 5.0 Netbeans IDE 8.2 Java 8 Update 181 (64-bit) Java 10.0.2 (64-bit) Java SE Development Kit 8 Update 181 (64-bit) Java(TM) SE Development Kit 10.0.2 (64-bit) The error is the following: Grave: Exception while deploying the app [ociumfinal-ear] : Cannot resolve reference [Local ejb-ref name=chat.ChatUsers/usuarioEjb,Local 3.x interface =com.eventos

This driver is not configured for integrated authentication

最后都变了- 提交于 2019-12-23 14:59:50
问题 Trying to connect my java web application with MS-SQL server using sqljdbc41 for jdk 1.8 . Here is the database connection code- Connection connection; String url = "jdbc:sqlserver://localhost:1433;databaseName=Lista;integratedSecurity=true"; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); connection = DriverManager.getConnection(url); when i am trying to insert some values to the database like- PreparedStatement ps = connection.prepareStatement("INSERT INTO user_informations

Can Glassfish 5 run with java 10 or is it only compatible with java 8?

半城伤御伤魂 提交于 2019-12-23 12:51:04
问题 getting error when installing Glassfish 5. I have jdk-10.0.2, now I want to know if this is because there is no compatibility between them. Am running "asadmin start-domain" and then am getting this error: Exception in thread "main" java.lang.NullPointerException at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.ini tializeServiceLocator(AbstractModulesRegistryImpl.java:152) at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.new ServiceLocator

IntelliJ IDEA: Webjars / Maven / Spring MVC - How to correctly import dependencies and have them work?

有些话、适合烂在心里 提交于 2019-12-23 12:38:53
问题 So I'm beginning Java Web development and I'd just like to have some libraries imported to my IntelliJ project correctly through use of Maven. I've stumbled upon making use of Webjars in order to import bootstrap and jquery, but I am having a great deal of trouble getting anything to work correctly. Wondering if someone could help out? Any suggestions are appreciated. My project currently has Maven and Spring MVC as supported frameworks. My pom.xml: <?xml version="1.0" encoding="UTF-8"?>

Strange classCastException hibernate 3.5 glassfish

拟墨画扇 提交于 2019-12-23 10:09:58
问题 Hi I have a problem that I can't solve on my own. I have a war file packaged in ear and running on glassfish 3.0.1 with hibernate 3.5 as JPA provider. I compile it with maven and deploy it with idea or manually. Every other time I get a cast exception in my DAOs: java.lang.ClassCastException: com.myproject.domain.entity.User cannot be cast to com.myproject.domain.entity.User Other times it works perfectly fine. There is no pattern in this behaviour. Could someone shine some light on what is