[JBoss AS 7 Development] - Problems using java service wrapper with jboss 7
by ftom2
ftom2 [https://community.jboss.org/people/ftom2] created the discussion
"Problems using java service wrapper with jboss 7"
To view the discussion, visit: https://community.jboss.org/message/723041#723041
--------------------------------------------------------------
Hi,
I'm trying to install Jboss 7.1.0-Final as a service using the Java service wrapper using this configuration (it is a draft conf so ignore the absolute paths):
# Java Application
#wrapper.java.command=java
wrapper.java.command=%JAVA_HOME%/bin/java.exe
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=%OG_HOME%/bin/wrapper-3.2.3.jar
wrapper.java.classpath.2=C:/jboss-as-7.1.0.Final/modules/org/jboss/as/server/main/jboss-as-server-7.1.0.Final.jar
wrapper.java.classpath.3=C:/jboss-as-7.1.0.Final/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar
wrapper.java.classpath.4=C:/jboss-as-7.1.0.Final/modules/org/jboss/stdio/main/jboss-stdio-1.0.1.GA.jar
wrapper.java.classpath.5=C:/jboss-as-7.1.0.Final/modules/org/jboss/as/controller/main/jboss-as-controller-7.1.0.Final.jar
wrapper.java.classpath.6=C:/jboss-as-7.1.0.Final/modules/org/jboss/logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar
wrapper.java.classpath.7=C:/jboss-as-7.1.0.Final/modules/org/apache/log4j/main/log4j-1.2.16.jar
wrapper.java.classpath.8=C:/jboss-as-7.1.0.Final/jboss-modules.jar
#wrapper.java.classpath.2=%JAVA_HOME%/lib/tools.jar
#wrapper.java.classpath.3=%JBOSS_HOME%/bin/run.jar
# used to avoid problems with quotes inside the PATH environment variable
wrapper.java.library.path.append_system_path=TRUE
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=%OG_HOME%/bin
# these are the JAVA_OPTS
wrapper.java.additional.1=-Dprogram.name=standalone.bat
wrapper.java.additional.2=-server
# environment variables - define the ones that match your desired environment
wrapper.java.additional.3=-Xms500m
wrapper.java.additional.4=-Xmx1500m
wrapper.java.additional.5=-Dsun.rmi.dgc.client.gcInterval=3600000
wrapper.java.additional.6=-Dsun.rmi.dgc.server.gcInterval=3600000
wrapper.java.additional.7=-Dsession.serialization.jboss=true
#wrapper.java.additional.8=-Djava.endorsed.dirs="%JBOSS_HOME%"/lib/endorsed
wrapper.java.additional.8=-Djava.util.logging.manager=org.jboss.logmanager.LogManager
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
# Parameters to be passed to the application (Jboss)
wrapper.app.parameter.1=org.jboss.as.server.Main
# Define server name (configuration)
wrapper.app.parameter.2=-c ace2
# Define listening IP - If you have more than one IP or want to indicate to listen on a specific IP
wrapper.app.parameter.3=-b 0.0.0.0
# Location of ACE2 log definitions file
wrapper.app.parameter.4=-Dlog4j.ace.path="%OG_HOME%/bin/log4j.xml"
# Location of OG log folder
wrapper.app.parameter.5=-Dog.server.log.dir="%OG_HOME%/log"
# Data source definitions are needed for the wait for DB Service
# Location of datasource definition file
wrapper.app.parameter.6=-Dwait.for.db.ds.path="%JBOSS_HOME%/server/ace2/deploy/ace2-ds.xml"
# Name of DS
wrapper.app.parameter.7=-Dwait.for.db.ds.name="DefaultDS"
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# wrapper log location
wrapper.logfile=%OG_HOME%/log/ace2_wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=10mb
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=10
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=ACE2 on JBOSS Service Wrapper console
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=JbossServiceForACE2
# Display name of the service
wrapper.ntservice.displayname=Oblicore - ACE2 on JBOSS Application Server
# Description of the service
wrapper.ntservice.description=JEE Application Server Running ACE2 Manager
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
But i'm getting this error:
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | org.jboss.modules.ModuleNotFoundException: Module org.jboss.vfs:main
is not found in local module loader @cb6009 (roots: )
jvm 1 | at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoa
der.java:126)
jvm 1 | at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.j
ava:275)
jvm 1 | at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.jav
a:222)
jvm 1 | at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModule
Loader.java:94)
jvm 1 | at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:2
04)
jvm 1 | at org.jboss.as.server.Main.main(Main.java:82)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:597)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimple
App.java:240)
jvm 1 | at java.lang.Thread.run(Thread.java:619)
wrapper | CTRL-C trapped. Shutting down.
wrapper | <-- Wrapper Stopped
Couldn't find anything on the web so any help would be highly appreciated...
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/723041#723041]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[JBoss AS 7 Development] - Remote EJB Client Security (Jboss7.1)
by rathm1
rathm1 [https://community.jboss.org/people/rathm1] created the discussion
"Remote EJB Client Security (Jboss7.1)"
To view the discussion, visit: https://community.jboss.org/message/720288#720288
--------------------------------------------------------------
Hello there,
I am having an issue that when I specify a username/password programatically using the InitialContext the authentication is not working but when I hardcode the username/password into the jboss-ejb-client.properties the authentication is successful.
I am using a custom security domain connecting to an ldap but that seems to be configured correctly since I can successfully authenticate to it with having the username/password in jboss-ejb-client.properties.
The working configuration is:
jboss-ejb-client.properties
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=localhost
remote.connection.default.port=4447
remote.connection.default.username=myUsername
remote.connection.default.password=myPassword
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER
local.jboss.jndi.properties
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
Client Application Code:
jndiProperties.put("jboss.naming.client.ejb.context", true);
jndiProperties.put(Context.SECURITY_PRINCIPAL, username);
jndiProperties.put(Context.SECURITY_CREDENTIALS, password);
jndiProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", false);
Context context = new InitialContext(jndiProperties);
String lookUp = "ejb:" + appName + "/" + moduleName + "/" + beanName + "!" + interfaceClassName;
TestEJB facade = (TestEJB)context.lookup(lookUp);
boolean connectionSuccessful = facade.canConnect();
It does not matter what I set in the jndiProperties for the username and password, it will always use the username and password that were set in the jboss-ejb-client.properties.
If I remove the username and password from jboss-ejb-client.properties and leave everything else the same, the lookup is successful but when the service is called an exception thrown on the client side is:
java.lang.IllegalStateException: No EJB receiver available for handling [appName:MyAppEar, moduleName:MyAppJar,distinctname:] combination.
I have looked through many other discussion items and it seems that everyone that has gotten security working, has the username and password in the jboss-ejb-client.properties.
If anyone has any suggestions that would be great.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/720288#720288]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years