Create Glassfish windows service error - windows-services

I have created glassfish service on window but could not start the service. I have checked the domain service error log and getting the following errors:
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
could not find java.dll
Could not find Java SE Runtime Environment.
I have upgraded from Java 7 to Java 8 and after upgrading service could no be started. How can I solve this poroblem

Ok! I had to delete the following files: java.exe, javaw.exe and javaws.exe
from System32 in order to work. Its working fine now.

If you're using any version of GlassFish below 4.1, it won't run on Java 8. You need to upgrade your GlassFish as well or, if that's not an option, revert to Java 7.

Related

Grails 2.4.4 compatibility with Java 8

I am having a legacy grails application that uses Grails 2.4.4 & has a runtime of Java7 / Tomcat7. We are planning to take it to Azure app service but azure supports runtime starting from java 8 / tc 8.5.
We are looking to upgrade the application to grails 2.5 as that seems to be supporting jdk8. Are there any pointers on how a 2.4.4 application could be migrated to 2.5 ?
I have done this already. There were some issues i had to solve but the error-logs and stackoverflow were my friends. I cannot provide a howto but if you just try it and send the errors you get i would be pleased to help you.
I was able to successfully get the application with a stack of grails 2.2.4 , java 1.7 , tomcat 7 migrated to grails 2.5.6 , Java 1.8 (compile) , tomcat 9 ( runtime java 11). Some of the hurdles i encountered are:
If your app uses JAXB , make sure that is available in app's runtime. With java 8 runtimes, they were available by default.
mailService Bean creation issues - Ran to issues with instantiating the mailService Bean & was resolved by setting the poolSize to 1 in the configuration.
txManager , sessionFactory instantiating issues - those were are settled by having the runtime jars - JaxB , marshaller etc. Though the stacktrace was misleading.

Spring security not working with Grails project on JBoss Application Server

I have a big(multiple custom plugin based) Grails project, which runs perfectly fine on Tomcat server.
Now for a new customer we need to deploy it on JBoss Application server. It seems to deploy fine without any error but when I try to login on the first page which is implemented using Spring Security plugin. It does not log me in. I have tried going to a valid URL to check if its a problem of redirecting but it is not the case.
Please note it is not showing any error on the log. And since it is not properly executable in development environment so each time I need to build a WAR file to test it.
Grails version: 2.4.4
Spring security version: ':spring-security-core:2.0-RC4'
JBoss version: wildfly-9.0.2.Final
I tried some setups, and they all worked as a simple new project.
I used grails 2.4.4 and spring-security 2.0-RC4.
Here are a few things you could try:
Use latest spring-security version 2.0.0
compile "org.grails.plugins:spring-security-core:2.0.0"
Add jboss plugin and generate deployment xmls (this is needed for grails 2.5.4)
build ':jbossas:1.0'
$grails generate-boss-deploy 6
Create a brand new Wildfly install and deploy your app.
I can only think about a infrastructure problem, since I got no problem with the same setup. I running on Mac, with java 8 and Wildfly 9.0.2 final. Tested grails 2.4.4 and 2.5.4, spring security 2.0-RC4 and 2.0.0.
Best,
Eder

IBM Worklight application builder error

I am using eclipse juno 4.2.1 and IBM worklight 6.0 on my mac mini. since yesterday I am trying to build and deploy my application but its giving me "Worklight application builder" error.
here is the log:
An internal error occurred during: "Worklight application builder".
loader constraint violation: when resolving method "org.apache.commons.io.FileUtils.iterateFiles(Ljava/io/File;Lorg/apache/commons/io/filefilter/IOFileFilter;Lorg/apache/commons/io/filefilter/IOFileFilter;)Ljava/util/Iterator;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, com/worklight/builder/skins/impl/SkinBuilderImpl, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/apache/commons/io/FileUtils, have different Class objects for the type o/filefilter/IOFileFilter;Lorg/apache/commons/io/filefilter/IOFileFilter;)Ljava/util/Iterator; used in the signature
and console shows this message :
[2013-09-25 15:18:46] Starting build process: application 'TestApp', all environments
[2013-09-25 15:18:46] com.worklight.shared.common.messages:tgn309.trigyn.com: tgn309.trigyn.com: nodename nor servname provided, or not known
java.net.InetAddress.getLocalHost(InetAddress.java:1466)
com.worklight.common.util.GeneralUtil.scanIPAddresses(GeneralUtil.java:581)
com.worklight.common.util.GeneralUtil.scanIPAddresses(GeneralUtil.java:549)
com.worklight.common.util.GeneralUtil.getIPscanResults(GeneralUtil.java:642)
com.worklight.studio.plugin.utils.WSTServers.getServerHost(WSTServers.java:174)
com.worklight.studio.plugin.utils.WSTServers.getServerURL(WSTServers.java:661)
com.worklight.studio.plugin.launch.build.apps.WorkspaceApplicationBuilder.buildApplication(WorkspaceApplicationBuilder.java:325)
com.worklight.studio.plugin.launch.build.apps.WorkspaceApplicationBuilder.runInWorkspace(WorkspaceApplicationBuilder.java:158)
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
[2013-09-25 15:18:46] FWLPL0010W: "localhost" was detected from the target server configuration. Using the primary IP address of the host machine, 10.30.1.102, to build the Worklight application(s). Consider using a fully qualified hostname (avoid using "localhost") or a valid IP address instead. The value can be modified by opening the configuration editor of Worklight Development Server from the "Servers" view.
Any help would be appreciated.
Try the suggestion given in the following answer, as it seems somewhat related based on the error in your question: IBM Worklight 6.0 - Migration Issue after importing a project
Copy/paste:
Please try to find if you have apache commons IO installed in your
Eclipse plugin directory. That's the source of the conflict.
If you can, please try to:
stop the Eclipse
move the apache commons IO out of the plugin dir
start Eclipse, then close it
move the commons IO back into the plugin dir
Start Eclipse

Grails deployment error

I've manage to deploy my Grails app on my local pc on Tomcat and database is on MySql server but I cant manage to do it on remote server in the same enviroment.
This is the begining of stacktrace:
java.lang.UnsupportedClassVersionError: org/codehaus/groovy/grails/plugins/springsecurity/SpringSecurityUtils : Unsupported major.minor version 51.0 (unable to load class org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils)
Either use the same JVM version on the server as you are using on your local pc OR use a higher version on the server. Typically, that should solve your problem
You're compiling and running with different JVM versions.
The JDK version on your computer should be the same that is installed on the remote server.

Glassfish doesnot start from Eclipse Helios SR2

I am trying to run Glassfish V3 Opens source edition from eclipse using the glassfish adapter.It gives me port conflict error.I have checked both 8080 as well as 4848 and both are free and not used by any process.I have disabled my firewall(NOD 32).
No matter what i do the external server just wont start.I deleted everything under the OSGI folder under the domain,i tried different verison of driver,nuthing seems to work.
I even downloaded Indigo and tried using the same, but i get the same error.
Somebody please Help!!
Ok this problem got solved when i placed the glassfish directory right beside the eclipse folder.The server started immediately after i copied the glassfish right beside the eclipse folder.As a precaution i created the workspace also on the same drive.Not sure if this is a bug.
The best is always to check if you have the latest plugin from this download center:
http://download.java.net/glassfish/eclipse/helios
Relative path of a GlassFish server should not matter at all...

Resources