Problem loading jaas.config file
Hi,
i've built an rmi server that works as an authentication server.
It uses jaas and an nt login module to manage authentication on windows.
But when i try to load the jass.config file, i get errors : it tells that there is a security exception and that the file jaas.config was not found!!
I set all necessary properties in my application :
System.setProperty("java.security.auth.login.config", "jaas.config")
Do you know where do i have to put my jaas.config file for it to be found by the application?
In the classpath?
Thanks,
Philippe
HI, I am not sure this will help you, but you can try putting your .conf where your java_home is pointing.
Example : D:\j2sdk1.4\jre\lib\ext\test.conf
Similar Messages
-
PROBLEM: loading jaas.config in the web application
Hi,
my problem was load jaas.config in the web application, the way that I suppose was best it's to load a configuration file in the web.xml of my application, but I they are not a veteran of xml and I have a problem of implementation for this solution.
I hope you know a solution of my problem because I was deprived of hope!
HELP ME PLEASE!Hi,
I hope that replay me on my new quesion.
I have find a class "Configuration" that load a configuration file of jaas, but I don't understand how use it. Because I want pass it to LoginModule in the costructor.
Can you help me with an example code?
Thanks -
How to load a config file at appliaction startup
Hi
Is there a way to load a config file at application startup?
I have the DB conection info in a config file.
Right now m accessing that info by loading it using a classloader n then parsing it.
When ever i access the DB this file is loaded n parsed.
I want it to be loaded only once at startup n get cached.
Then later on whenever i refer it, i shud get the cached copy.
Is there a way to do this?Or you could just include a relevant static block.
For instance you could have a utility class for accessing your DB in which you wrap jdbc code for querying, updating etc. This class would have code like the following:
public class DBBean {
private static DataSource ds = null;
static {
loadDataSource();
public static loadDataSource() {
// load your property file with the configuration info and setup your datasource
public static void doSomething() {
Connection con = ds.getConnection();
}By placing initialization code in a public (?) method you can call this method to re-initialize your DataSource if e.g. you updated your datasource settings.
Hope this helps -
Problem with reading config file
Hello,
I have problem with reading config file from the same dir as class is. Situation is:
I have servlet which working with DB, and in confing file (config.pirms) are all info about connection (drivers, users, passw, etc.). Everything work fine if I hardcoded like:
configFileName = "C:\\config.pirms";I need to avoid such hardcoding, I tryied to use:
configFileName = Pirms.class.getClassLoader().getResourceAsStream ("/prj/config.pirms").toString();but it isn't work.
My config file is in the same directory as Pirms.class (C:\apache-tomcat-5.5.17\webapps\ROOT\WEB-INF\classes\prj)
Also I tryied BundledResources, it isn't work fo me also.
Can anybody help me to solve this problem? with any examples or other stuff?
Thanks in advance.
AndrewThanks, but I am getting error that "non-static method getServletConfig() cannot be referenced from a static context"
Maybe is it possibility to use <init-param> into web.xml file like:
<init-param>
<param-name>configFile</param-name>
<param-value>/prj/config.pirms</param-value>
</init-param>If yes can anybody explain how to do that?
I need to have that file for:
FileReader readFile = new FileReader(configFile);Thanks in advance. -
Howto include JAAS config file in jar-file?
Hello!
I need to get the UserName and Domain from unix/windows workstations my users are working on.
For this task I use JAAS, however it forces me to create my own login-configuration which looks like this:
Test
//com.sun.security.auth.NTLoginModule sufficient debug=true;
com.sun.security.auth.module.UnixLoginModule sufficient debug=true;
}; 1.) I have to hard-code the path which is quite ugly, so is it possible to pack this configuration into a jar file and how can I tell JAAS that it can find the configuration INSIDE the jar file?
2.) To use my own configuration is very ugly. I have to if(java.os).... for every configuration because on Linux of course no NTLoginModule is found and vice versa.
It also is quite anoying that the proprietary class names are hard-coded. What if I want to run this on apple or ibm jvm?
Thanks in advance, lg ClemensI found a solution: simply pass a URL in the property and jaas will load the config-fle from the url!
-
Performance problems loading an XML file into oracle database
Hello ODI Guru's,
I am trying to load and XML file into the database after doing simple business validations. But the interface takes hours to complete.
1. The XML files are large in size >200 Mb. We have an XSD file for the schema definition instead of a DTD.
2. We used the external database feature for loading these files in database.
The following configuration was used in the XML Data Server:
jdbc:snps:xml?f=D:\CustomerMasterData1\CustomerMasterInitialLoad1.xml&d=D:\CustomerMasterData1\CustomerMasterInitialLoad1.xsd&re=initialLoad&s=CM&db_props=oracle&ro=true
3. Now we reverse engineer the XML files and created models using ODI Designer
4. Similar thing was done for the target i.e. an Oracle database table as well.
5. Next we created a simple interface with one-to-one mapping from the XSD schema to the Oracle database table and executed the interface. This execution takes more than one hour to complete.
6. We are running ODI client on Windows XP Professional SP2.
7. The Oracle database server(Oracle 10g 10.2.0.3) for the target schema as well as the ODI master and work repositories are on the same machine.
8. I tried changing the following properties but it is not making much visible difference:
use_prepared_statements=Y
use_batch_update=Y
batch_update_size=510
commit_periodically=Y
num_inserts_before_commit=30000
I have another problem that when I set batch_update_size to value greater that 510 I get the following error:
java.sql.SQLException: class org.xml.sax.SAXException
class java.lang.ArrayIndexOutOfBoundsException said -32413
at com.sunopsis.jdbc.driver.xml.v.a(v.java)
The main concern is why should the interface taking so long to execute.
Please send suggestions to resolve the problem.
Thanks in advance,
Best Regards,
NikunjApproximately how many rows are you trying to insert?
One of the techniques which I found improved performance for this scenario was to extract from the xml to a flat file, then to use SQL*LOADER or external tables to load the data into Oracle. -
Odd problem with strusts config file
This morning when I started up J Developer I am unable to open my struts-config file. Last evening when I closed my application everything was working fine, I compiled and ran the app for the last time just before closing J Developer. Now I am unable to compile, open this file (it is the same with other applications, as well). I have gone back to a previous version of my app, uninstalled Jdeveloper and reinstalled. Nothing seems to solve my problem. I am working on a Windows machine. Any thoughts on what might have changed or happened would be greatly appreciated.
I think that I found the problem. Somewhere along the line I messed with the shortcut(I don't remember doing it or what I did but....) with the shortcut that I created and I got an odd path looking something like .... ...\c$\JDev\jdev\bin\jdevw.exe
I fixed that and have not had a problem since.
Thank you for your help. -
i new in jaas and stuck when develop jaas aplication using myeclipse
i have follow the tutorial, create MyCallbackHandler class, MyLoginModule class dan some principal class and auth.conf
my problem is where and how can i setting my jaas application so it can refrence to auth.conf
thxwhere must i put this code (-Djava.security.auth.login.config=jaas.conf) in my application, because i using myeclipse ?
or can i set this in web.xml? if i can how to do that? -
Perhaps the problem lies in the version of the Word file. Does anyone know what versions Pages 09 will accept? I have re-installed iWorks09, but that did not solve the problem. My operating system is 10.6.8 and I am current on updates.
The Word 2 doc is ancient. I wouldn't even know where to find one to test.
The obvious thing to test is open the documents you previously opened successfully.
If they still open successfully, then it is highly likely that the version that is the problem.
Peter -
Problems loading a text-file from a shared NT network order
Hi @ all,
I try to upload a text file in MII that is destinated in a shared order in the NT file network.
I used text_loader with URL FILE://SERVERNAME/SHARE/input.txt and I get the error message "connection refused" even if I use credentials with an authorised user.
Do you have any idea why it does not work?
Thanks in advance!
SebastianHi,
For this you need to use FTP Input Action. Put all the files(you want to upload to MII) are in shared network into your FTP server.
Then use the FTP related actions in transaction. This is the best way.
Also see the similar [Thread|Re: Saving a file to an external system from MII server] and [Help|http://help.sap.com/saphelp_mii121/helpdata/en/44/710ca09ea03abee10000000a155369/content.htm]
Hope this helps you.
-Suresh -
Problem to read config file when tomcat used as service
hi,
I have an advanced installer developed for an application and the application is working fine when
my tomcat is used in "manual" mode.But when tomcat is used in "Automatic" mode(as a service)
I'm unable to login into my application, may be unable to read the config.xml....
can any one please help me out with a solution.
Regards,
Vardhanhi,
I got a solution.Jst change the mode of tomcat and restart the system.
It's working and pls provide with any other solution if you have..
thanx,
Vardhan -
Problem Loading JDBC Enabled JSP Page
Hi all, does anyone knows that's the case of this error:
This happened when I tried to access MySQL Database from remote client. I have no problem loading normal jsp file w/o JDBC Connection. Kind of confused on what is going on
Regards,
Joe
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: com.mysql.jdbc.Driver
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
root cause
javax.servlet.ServletException: com.mysql.jdbc.Driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
at org.apache.jsp.dbquery_jsp._jspService(dbquery_jsp.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
Apache Tomcat/4.1.24Hi scsi-boy, first of all, thank you so much for your
prompt and fast response. So how do i tackle
ClassNotFoundException ?.i'm sorry coz i'm a newbie to
jsp. I hope by providing my configuration below could
aid you in understanding my problem.
I've place the setting config in /etc/profile with the
following:
JAVA_HOME=/usr/local/java
CATALINA_HOME=/usr/local/tomcat
ANT_HOME=/usr/local/ant
APACHE_HOME=/usr/local/apache
MYSQL_HOME=/usr/local/mysql
CLASSPATH=${CATALINA_HOME}/common/lib/servlet-api.jar:$
YSQL_HOME/connector/mysql_connector/mysql_connector-jav
-3.08-stable-bin.jar:${JAVA_HOME}/lib/tools.jar:${JAVA_
OME}/jre/lib/rt.jar:./
PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:
MANPATH=${JAVA_HOME}/man:${MANPATH}
export JAVA_HOME ANT_HOME APACHE_HOME MYSQL_HOME
CATALINA_HOME CLASSPATH PATH MANPATH
As you can see, i've un-tar mysql_connector in
/usr/local/mysql/connector directory and set my
classpath to point to that file. Is that the proper
way to do it?
Regards,
Joesorry not a JSP expert however just to clarify i am guessing that it is a ClassNotFoundException. it could be something else entirely and i don't really want to send you on a wild goose chase. we need to know what the root exception actually is.
i am off to sleep now but i'm sure if you can give a little more information which may involve figuring out how to get it to cough up more information someone will help you here. -
Makepkg, upgrade and config-files
Hello,
At the moment I work on a package for the programm "vdr". Without any start-parameters (in this case: -c /etc/vdr) vdr save and load its config files in the folder /mnt/vdr-recordings.
In the future i would like to use the start-parameter (-c /etc/vdr). With this parameter vdr loads its config files from /etc/vdr.
vdr creates some default config files during the make process. Afterwards I copy the files from /mnt/vdr-recordings to /etc/vdr.
This work fine
Now my problem: ;-)
If I want to update vdr with a new version (pacman -U vdr-1.3.35-2.tar.gz), pacman overwrite all config files in /etc/vdr, although I changed the config files after installing vdr the first time.
According to the pacman manual pages, pacman should decide not to overwrite the file, if I have changed the installed ones (in /etc/vdr)
And finally the question ;-)
Is there any way to declare the config files in /etc/vdr as "true config files" and handle it, like pacman should do it?
The PKGBUILD:
pkgname=vdr
pkgver=1.3.35
pkgrel=2
pkgdesc="A video disk recorder softcam-plugin support"
url="http://www.cadsoft.de/vdr/"
#license=""
#depends=(libjpeg)
#makedepends=()
#conflicts=()
#replaces=()
#backup=()
#install=
source=(ftp://ftp.cadsoft.de/vdr/Developer/$pkgname-$pkgver.tar.bz2
ci.h.patch
dvbdevice.c.patch
pat.c.patch
sclink.h.patch)
md5sums=('c47d505bdf30bed26f6e82a47bb39b98' 'e97f8f07f4465b767c1159f13778d1b3'
'5169351e752ed42b96355235fb7ca1cc' '387a7c7c56c9b6bf9e98889994a3f159'
'3f7bab8b80f440a5ab88453bd4b89b84')
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np1 -i $startdir/src/ci.h.patch || return 1
patch -Np1 -i $startdir/src/dvbdevice.c.patch || return 1
patch -Np1 -i $startdir/src/pat.c.patch || return 1
patch -Np1 -i $startdir/src/sclink.h.patch || return 1
make NO_KBD=1 || return 1
make plugins
make BINDIR=$startdir/pkg/usr/bin/ MANDIR=$startdir/pkg/usr/man/ VIDEODIR=$startdir/pkg/mnt/vdr-recordings/ install
mkdir -p $startdir/pkg/etc/vdr/plugins
mkdir -p $startdir/pkg/usr/lib/vdr
cd $startdir/pkg/mnt/vdr-recordings/
install -D -m644 ca.conf $startdir/pkg/etc/vdr/ca.conf
install -D -m644 channels.conf $startdir/pkg/etc/vdr/channels.conf
install -D -m644 diseqc.conf $startdir/pkg/etc/vdr/diseqc.conf
install -D -m644 keymacros.conf $startdir/pkg/etc/vdr/keymacros.conf
install -D -m644 sources.conf $startdir/pkg/etc/vdr/sources.conf
install -D -m644 svdrphosts.conf $startdir/pkg/etc/vdr/svdrphosts.conf
rm ca.conf channels.conf diseqc.conf keymacros.conf sources.conf svdrphosts.conf
cd /usr/src/
rm -rf $pkgname-$pkgver/
mkdir -p $pkgname-$pkgver/
cp -r $startdir/src/$pkgname-$pkgver/* $pkgname-$pkgver/
rm -f vdr
ln -s $pkgname-$pkgver vdr
Thanks for your answers
Greetings
FlasherYou need to use the backup field.
List the config files you don't want pacman to overwrite:
backup=(etc/vdr/configfile1 etc/vdr/configfile2)
And do not put the leading / because it won't work. -
Weblogic7 not locating the defined jaas.config
I am having problems getting weblogic to reconizing my command line options to
my login configuration. Here is my Java_Options settings found in my startweblogic.cmd
file :
set JAVA_OPTIONS=-Dweblogic.security.SSL.trustedCAKeyStore=C:\bea700\weblogic700\server\lib\cacerts
-Dlogin.configuration.provider=com.sun.security.auth.login.ConfigFile -Dlogin.config.url.1=file:C:\bea\user_projectss\bomdomain\wamiconf\jaas.config
When my jaasModule is executed it is not able to locate my LoginModule defined
in my jaas.config file.
I am however to get this to work when I put these two -D entries into my java.security
file -- I know this works, but I would rather have the ability to use the command
line approach.
Has anyone run into this problem before.
Thanks for the help.Ok, I got it.
I had to add the path:
-Djava.security.auth.login.config==c:/test/src/jaas.config
_leela -
Hi,
my customer wanted set InitialPhoneSelection to deskphone mode, when users firs run Jabber for Windows (ver. 9.2.1).
I created custom config (configurationfile=jabber-config-deskphone.xml) but it doesn't work.
Policies>
<InitialPhoneSelection>deskphone</InitialPhoneSelection>
</Policies>
I tested it couple times and at the end I tried put configuration to default jabber-config.xml and ... this functionality start working...
Could you check guys if you have same problem with custom config file? I think that it is bug. Maybe other option don't work in custom config file.
Thanks a lot
PavelHi Pavel,
This setting is only when the client is installed and started by the user for the first time. After that the client will save the user preference (what was the phone selection when the user exited the client) and use it in subsequent logins.
Having said that, can you please specify in details how exactly you did your tests or maybe test again taking the above into consideration ?
Thanks,
Christos
Maybe you are looking for
-
Unable to connect to MySQL database
Hello, I have written a DatabaseManager class that controls access to a locally stored database, implemented in mysql. In theory, client request should be passed to the DatabaseManager through RMI, but I cannot even create a connection to the databas
-
IM DESPERATE!!! ANYTHING i will rate as helpful. just please help me.
Hello. CAn anyone pleaase help me!!?I had my ipod video for a while now. I never really had trouble with it. Today..I was downloading some new music to it. I click on my ipod from the source menu and i looked at all the songs that I have on it. SO fa
-
Hi I am doing a Proxy to File scenario. My mapping sheet is like this. Only output this record if MARA.A is not blank. Then I have four fields, of which one is MARA.A Again it's like this. Only output this record if MARA.B is not blank. Then under th
-
Skipping Animations in Slide Show
Does anyone know if there is a way to skip through all of the animations on a slide? Often in presentations one needs to go back to a particular slide, and one would like the option of skipping all of the builds to obtain the final state of the slide
-
Hi: I am having a unique problem. Hi: I am having a unique problem. This has to do with 0PROFIT_CTR which has a componding char 0CONTROLLING_AREA. This is what i have in the Cube: Controlling Area/Profit Center Amount 0001/100000