GlassFish 4.1.1 Poolconnection and Resources bug - glassfish

I'm using glassfish 4.1.1 and i can't create a JDBC-Connection-Pool or JDBC-Resources is there any solution to fix this !
While creating the connection pool
Whilte adding the Resources

Apparently the problem is in the application interface, so when i used the line commande it works !
asadmin create-jdbc-connection-pool --port {4848} --datasourceclassname org.postgresql.ds.PGSimpleDataSource --restype javax.sql.DataSource --property PortNumber={5532}:Password={password}:User={user_name}:ServerName={localhost}:DatabaseName={database_name}=org.postgresql.Driver {pool_name}

Related

Compiling with konanc behind proxy

How to specify proxy settings for konanc?
I tried to start it with
konanc hello.kt -Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800
and also tried to specify system variable at Windows
set JAVA_FLAGS=-Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800
but it fails on
Download native dependencies…
with java.net.ConnectException: Connection refused: connect
Thank you!
set JVM_OPTS=-Dhttp.proxyHost=xxx -Dhttp.proxyPort=yyy -Dhttps.proxyHost=xxx -Dhttps.proxyPort=yyy
It worked for me. Many repositories are using https, not only http.
In OS X or Linux, with kotlin native version 1.0.2, use environment variable JAVA_OPTS to append custom JVM settings.
$ export JAVA_OPTS='-Dhttp.proxyHost=proxy-host -Dhttp.proxyPort=proxy-port -Dhttps.proxyHost=proxy-host -Dhttps.proxyPort=proxy-port'

Using apache directory ldap in Servicemix

I have an osgi application running on Servicemix 6. I added some code that uses apache directory for ldap lookups (org.apache.directory.api.ldap).
I got an error when deploying the app in Servicemix:
Unresolved constraint...
(osgi.wiring.package=org.apache.directory.api.ldap.model.cursor)
Can I use this apache lib in Servicemix? How can I import it?
Or, should I use some other lib?
I ran this command, which I think wraps my dependency as osgi-compatible.
bundle:install -s wrap:mvn:org.apache.directory.api/api-all/1.0.0-M33

Glassfish won't start from Intellij unless I run Intellij with sudo

Title says it all... just trying to get glassfish up and going. This is the error I get
Detected server admin port: 4848
[2015-04-06 07:37:56,138] Artifact java_web_app:war exploded: Server is not connected. Deploy is not available.
Detected server http port: 8080
Command start-domain failed.
JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 1.
Before it died, it produced the following output:
This subcommand requires root privileges: bsexec
Surely there's a way around this? I don't really want to run Intellij with sudo every time.
Answer: GlassFish 4.1, IntelliJ IDEA 14.1
I have no idea (pun not intended) why GlassFish requires a root user account.
You need to execute something like this:
/Library/opt/payara-4.1.151/glassfish/bin/asadmin start-domain --verbose=true domain1
Go Run -> Edit Configuration -> Select configuration (acme-payara-project) -> Start Up Configuration
Edit the Startup Script and change it to add the --verbose-true parameter.
Is this a problem happening on Mac OSX 10.10.3?
If so, we were able to workaround the problem by changing the content of the file /usr/libexec/StartupItemContext to
#!/bin/sh
unset LAUNCHD_SOCKET
$#
We've also reported this workaround on the corresponding glassfish-issue: https://java.net/jira/browse/GLASSFISH-21343
Note that this will only work for glassfish 4.0. In 4.1 they changed the startup code, so this StartupItemContext file will no longer be used.
If your glassfish Version is 4.1, the only known workaround at the moment is to start glassfish with the --verbose=true param.
Solved this on OS X 10.10.4, IntelliJ 14.1.4 by adding -v to the startup script.
Changing the Startup command in the Run Configuration under the "StartUp/Connection" tab to the following worked for me:
.../glassfish-4.1/glassfish/bin/asadmin start-domain --verbose domain1

LoadError: no such file to load -- rack/handler/glassfish

I have Successfully installed glassfish-1.0.3-universal-java, but when I run Rails Server using the command Jruby -S rails server glassfish. The output is follows:
f:\Program Files\BitNami JRubyStack\jruby\depot>Jruby -S rails s glassfish
Exiting
LoadError: no such file to load -- rack/handler/glassfish
require at org/jruby/RubyKernel.java:1033
try_require at F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gem
s/rack-1.4.1/lib/rack/handler.rb:63
......
Any questions? Should I run Tomcat or Glassfish first?
You don't need to run rails server anymore, you just run glassfish.
f:\Program Files\BitNami JRubyStack\jruby\depot>glassfish
That will start up glassfish for your depot project. Check out their documentation for a little more information about this. That being said I think the glassfish project is kind of dying. From what I understand Oracle has killed glassfish (http://www.infoq.com/news/2010/04/glassfish-gem-alternatives-jruby). I would take a look at using Trinidad or Torquebox as alternatives.

Eclipse Glassfish 3.1 CREDENTIAL ERROR

I get the error "credential error" in eclipse indigo 3.7 with glassfish 3.1 when I try to start the server on Win xp. Glassfish starts normally from command line. When I start GS from eclipse I get:
[#|2011-09-29T17:30:58.386+0200|SEVERE|glassfish3.1.1|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=17;_ThreadName=Thread-2;|The log message is null.
java.rmi.NotBoundException: 127.0.0.1
at sun.rmi.registry.RegistryImpl.unbind(RegistryImpl.java:140)
at org.glassfish.admin.mbeanserver.RMIConnectorStarter.stopAndUnexport(RMIConnectorStarter.java:314)
at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.shutdown(JMXStartupService.java:191)
at org.glassfish.admin.mbeanserver.JMXStartupService.shutdown(JMXStartupService.java:146)
at org.glassfish.admin.mbeanserver.JMXStartupService.access$000(JMXStartupService.java:87)
at org.glassfish.admin.mbeanserver.JMXStartupService$ShutdownListener.event(JMXStartupService.java:115)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
at com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:435)
at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.stop(GlassFishImpl.java:88)
at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.stop(GlassFishDecorator.java:68)
at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:70)
at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.run(CommandRunnerImpl.java:383)
I assume that the problem is in RMI, the way the glassfish adapter in eclipse is trying to start GS. There is no port occupying 8686 which is the port throw which RMI is trying to get to GS. Is there a workaround. Help
I had the same problem just before. Now I started the domain like this:
%glassfish_installdir%\glassfish\bin\asadmin.bat start-domain domain1
(There should also be an startmenu entry)
It finally works.