Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

JBoss startup problem with login-config.xml

Thread view: 
Andrea - 29 Nov 2005 14:23 GMT
Hi there,
   I'm using JBoss 4.0.3 SP1 and  I get the following error on starting JBoss:

4:46:45,843 WARN [XMLLoginConfigImpl] End loadConfig, failed to load config: file:/D:/jboss-4.0.3SP1/server/default/conf/login-config.xml
org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, column 1.

Was expecting one of:

<EOF>

<IDENTIFIER> ...

at org.jboss.security.auth.login.SunConfigParser.generateParseException(SunConfigParser.java:395)

at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunConfigParser.java:333)

at org.jboss.security.auth.login.SunConfigParser.config(SunConfigParser.java:98)

at org.jboss.security.auth.login.SunConfigParser.parse(SunConfigParser.java:57)

at org.jboss.security.auth.login.SunConfigParser.doParse(SunConfigParser.java:79)

at org.jboss.security.auth.login.XMLLoginConfigImpl.loadSunConfig(XMLLoginConfigImpl.java:294)

at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:278)

at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:252)

at org.jboss.security.auth.login.XMLLoginConfig.startService(XMLLoginConfig.java:162)

at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)

at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)

at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)

at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)

at $Proxy0.start(Unknown Source)

at org.jboss.system.ServiceController.start(ServiceController.java:428)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)

at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)

at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)

at $Proxy4.start(Unknown Source)

at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)

at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)

at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)

at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)

at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)

at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)

at $Proxy5.deploy(Unknown Source)

at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)

at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)

at org.jboss.Main.boot(Main.java:187)

at org.jboss.Main$1.run(Main.java:438)

at java.lang.Thread.run(Unknown Source)

I can't understand what is wrong!

Anybody can help me?

Thanks in advance.

Andrea
abrasivesponge@gmail.com - 29 Nov 2005 15:30 GMT
Looks like an XML format error....copy your login-config.xml here
Andrea - 29 Nov 2005 17:20 GMT
this is my login-config.xml file:

*** begin file ***

<?xml version='1.0'?>

<!DOCTYPE policy PUBLIC "-//JBoss//DTD JBOSS Security Config 3.0//EN" "http://www.jboss.org/j2ee/dtd/security_config.dtd">

<policy>

<!-- Used by clients within the application server VM such as

mbeans and servlets that access EJBs.

-->

<application-policy name = "client-login">

<authentication>

<login-module code = "org.jboss.security.ClientLoginModule"

flag = "required">

</login-module>

</authentication>

</application-policy>

<!-- Security domain for JBossMQ -->

<application-policy name = "jbossmq">

<authentication>

<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"

flag = "required">

<module-option name = "unauthenticatedIdentity">guest</module-option>

<module-option name = "dsJndiName">java:/DefaultDS</module-option>

<module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>

<module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>

</login-module>

</authentication>

</application-policy>

<!-- Security domain for JBossMQ when using file-state-service.xml

<application-policy name = "jbossmq">

<authentication>

<login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"

flag = "required">

<module-option name = "unauthenticatedIdentity">guest</module-option>

<module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>

</login-module>

</authentication>

</application-policy>

-->

<!-- Security domains for testing new jca framework -->

<application-policy name = "HsqlDbRealm">

<authentication>

<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"

flag = "required">

<module-option name = "principal">sa</module-option>

<module-option name = "userName">sa</module-option>

<module-option name = "password"></module-option>

<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>

</login-module>

</authentication>

</application-policy>

<application-policy name = "JmsXARealm">

<authentication>

<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"

flag = "required">

<module-option name = "principal">guest</module-option>

<module-option name = "userName">guest</module-option>

<module-option name = "password">guest</module-option>

<module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>

</login-module>

</authentication>

</application-policy>

<!-- A template configuration for the jmx-console web application. This

defaults to the UsersRolesLoginModule the same as other and should be

changed to a stronger authentication mechanism as required.

-->

<application-policy name = "jmx-console">

<authentication>

<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"

flag = "required">

<module-option name="usersProperties">props/jmx-console-users.properties</module-option>

<module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>

</login-module>

</authentication>

</application-policy>

<!-- A template configuration for the web-console web application. This

defaults to the UsersRolesLoginModule the same as other and should be

changed to a stronger authentication mechanism as required.

-->

<application-policy name = "web-console">

<authentication>

<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"

flag = "required">

<module-option name="usersProperties">web-console-users.properties</module-option>

<module-option name="rolesProperties">web-console-roles.properties</module-option>

</login-module>

</authentication>

</application-policy>

<!-- A template configuration for the JBossWS web application (and transport layer!).

This defaults to the UsersRolesLoginModule the same as other and should be

changed to a stronger authentication mechanism as required.

-->

<application-policy name="JBossWS">

<authentication>

<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"

flag="required">

<module-option name="unauthenticatedIdentity">anonymous</module-option>

</login-module>

</authentication>

</application-policy>

<!-- The default login configuration used by any security domain that

does not have a application-policy entry with a matching name

-->

<application-policy name = "other">

<!-- A simple server login module, which can be used when the number

of users is relatively small. It uses two properties files:

users.properties, which holds users (key) and their password (value).

roles.properties, which holds users (key) and a comma-separated list of

their roles (value).

The unauthenticatedIdentity property defines the name of the principal

that will be used when a null username and password are presented as is

the case for an unuathenticated web client or MDB. If you want to

allow such users to be authenticated add the property, e.g.,

unauthenticatedIdentity="nobody"

-->

<authentication>

<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"

flag = "required" />

</authentication>

</application-policy>

</policy>

*** end file ***

 Looks like an XML format error....copy your login-config.xml here
abrasivesponge@gmail.com - 29 Nov 2005 19:16 GMT
Oh sometimes this error occurs because
<?xml version="1.0"?>
is not at the top most line

or
<?xml version="1.0" encoding="UTF-8"?>
you may need an encoding, again at the top most line.

I validated your doc and looks fine.  Try those simple items.
Andrea - 30 Nov 2005 10:52 GMT
I tried to put <?xml version="1.0" encoding="UTF-8"?> at the top of the file (row 1) but I have the same problem!
I think is only a warning message... so the AS would run correctly.
What do you think about this message? is it important or no?
Thank's again.

Andrea

 Oh sometimes this error occurs because
 <?xml version="1.0"?>
 is not at the top most line

 or
 <?xml version="1.0" encoding="UTF-8"?>
 you may need an encoding, again at the top most line.

 I validated your doc and looks fine.  Try those simple items.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.