Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

meka toka

Ranch Hand
+ Follow
since Dec 11, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by meka toka

Found the answer myself.

I had some XSL files which had the nodes selecting using something like below




Looks like the above way of selecting nodes was fine with JDK1.4.1 but with JDK 1.4.2 it wouldnt work as it was having problem finding a location path stop.

All I had to do was remove the trailing slash. SO I changed it to




When doing research for this, I came across alot of people looking for solutions in similar situations and are confused that its because of some problem with WL 8.1 SP3. But the main reason is because the working of the TransformerFactory has changed from JDK1.4.1 to JDK 1.4.2

Hope this helps
15 years ago
Found the answer myself.

I had some XSL files which had the nodes selecting using something like below



Looks like the above way of selecting nodes was fine with JDK1.4.1 but with JDK 1.4.2 it wouldnt work as it was having problem finding a location path stop.

All I had to do was remove the trailing slash. SO I changed it to




When doing research for this, I came across alot of people looking for solutions in similar situations and are confused that its because of some problem with WL 8.1 SP3. But the main reason is because the working of the TransformerFactory has changed from JDK1.4.1 to JDK 1.4.2

Hope this helps
We recently moved from WL 8.1 SP1 to SP3 and the application gives the following error.

javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.

when doing the following

javax.xml.transform.Templates templates = transFact.newTemplates(xslSource);

where transFact is a javax.xml.tranform.TransformFactory and xslSource is an InputSource.

SP1 is shipped with JDK1.4.1 and SP3 is shipped with JDK1.4.2
On doing some research its says its because of some bug fixes in Xalan, but then some point its with JDK1.4.2

I tried using the xalan.jar and xml-apis.jar from the xalan 2.6 distribution, by placing them on classpath before rt.jar
But, I still get the same error.

Any suggestions ??

if any one experienced this please post how you solved it
Ok it seems that its not an IOException, I am getting the following error

javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.

when doing the following

javax.xml.transform.Templates templates = transFact.newTemplates(xslSource);

where transFact is a javax.xml.tranform.TransformFactory and xslSource is a InputSpurce created as said in the first post earlier.

On doing some research its says its because of some bug fixes in Xalan, but then some point its with JDK1.4.2

if any one experienced this please post how you solved it
15 years ago
Hi all,

I have an application perfectly deployed on WL 8.1 SP1 but when I deploy the same on WL 8.1 SP3 it fails.

It is failing when I try to open a stream from a Url, that in turn has been created from a String (path of the file). Now the required resource is inside a WAR. Following is sample of code

java.io.InputStream stream = new URL(resourcePath).openStream());

The resourcePath is path to a file properties.xml to which I am trying to open and it is located in a mywar.war

WL is trying to access the jar file as zip:C:/bea/user_projects/domains/mydomain/myserver/.wlnotdelete/myproj/mywar.war!/webapp/xml/common/properties.xml

I havent come across any change in SP3 that can lead to the above error.
[ March 16, 2005: Message edited by: meka toka ]
15 years ago
This is how we solved it ....

The app server's plugin-cfg.xml didnt have the port 443 (default for https) and hence the web server was only routing the requests to the app sever when the requests were on http.

Mekatoka
15 years ago
All,

We have WAS 5.1 / IHS 1.3.x on AIX 5.1 and SSL has been configured between WAS and IHS.

The application seems to work fine with the http requests, but when https requests are sent the IHS doesnt seem to find the resources which are beneath the WEB-INF. In our case it is not able to find the servlets. It tries to look for the servlet mapping name and says it cant find it.

We have a servlet called XXXController.java and it is mapped in web.xml as /controller

However the IHS error_log has an error that it can find the file controller.

To test if the SSL was working properly we placed a sample html file in the root of the web application (outside WEB-INF) and we tried to access via https and it shows up.

Can somebody suggest anything about this ??

TIA

meka toka
15 years ago
I was able to make it work. I had to remove the entry

login.config.url.1=file:${java.home}/lib/security/jaas.conf from the java.security file.

Looks like this was blocking the java.security.auth.login.config property some how
[ September 02, 2004: Message edited by: meka toka ]
15 years ago
when i click the 'ejb-jar.xml' and 'weblogic-ejb-jar.xml' link it says "could not read descriptor file".

The reason for this is that you are deploying an ear that is generated by WSAD and to my knowledge WSAD doesnt generate descriptor files specific for Weblogic. So when you package your application you might have the generic J2EE descriptors which are application.xml, ejb-jar.xml and web.xml

i tried the command java -classpath weblogic.jar weblogic.appc UBITEST31082004.ear (ibs is my application ear file) it says weblogic/appc not found.

Where are you running the java command from ? You need to run this from the directory where the weblogic.jar is present or give the exact path where the jar file is present

You can find weblogic.jar in the location $BEA_HOME$/$WL_SERVER$/server/lib

I am assuming that in your case the location will be c:\bea\weblogic81\server\lib\weblogc.jar
15 years ago
Actually, I tried a variety of ways

(1) The java system property defined programatically, because originally the configuration file is with in a jar file

(2) Defined the location of the configuration file at command line by editing the startWebLogic.cmd and adding the -D flag.

And I confirmed that both the above ways my server log showed that the system property java.security.auth.login.config is being set.

Following is a portion of dump in the server log

java.ext.dirs = C:\JAVA\sdk\J2SDK1~1.2_0\jre\lib\ext
java.home = C:\JAVA\sdk\J2SDK1~1.2_0\jre
java.io.tmpdir = C:\DOCUME~1\rsriper\LOCALS~1\Temp\
java.library.path = C:\JAVA\sdk\J2SDK1~1.2_0\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\bea\WEBLOG~1\server\bin;C:\JAVA\sdk\J2SDK1~1.2_0\jre\bin;C:\JAVA\sdk\J2SDK1~1.2_0\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Support Tools\;c:\perl\bin;C:\Program Files\UltraEdit;C:\JAVA\apache-ant-1.6.1\bin;C:\JAVA\sdk\jdk1.3.1_12\bin;C:\Oracle\ora81\bin;C:\Program Files\GNU\WinCvs 1.3\CVSNT;C:\JAVA\ovpd\lib;C:\JAVA\ide\eclipse\workspace\MaisAuth\web\WEB-INF\lib\jaas.jar;C:\JAVA\ide\eclipse\workspace\MaisAuth\web\WEB-INF\lib\jcert.jar;C:\JAVA\ide\eclipse\workspace\MaisAuth\web\WEB-INF\libjsse.jar;C:\JAVA\ide\eclipse\workspace\MaisAuth\web\WEB-INF\lib\krb5.jar;;C:\bea\WEBLOG~1\server\bin\oci920_8
java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
java.naming.factory.url.pkgs = weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
java.protocol.handler.pkgs = weblogic.utils|weblogic.utils|weblogic.net
java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version = 1.4.2_05-b04
java.security.auth.login.config = C:\bea\user_projects\domains\Gateway\Envy\stage\_appsdir_Gateway_war\Gateway.war\WEB-INF\classes\jaas.conf
java.security.policy = C:\JAVA\sdk\J2SDK1~1.2_0\jre\lib\security\java.policy
java.specification.name = Java Platform API Specification
java.specification.vendor = Sun Microsystems Inc.
java.specification.version = 1.4
java.util.prefs.PreferencesFactory = java.util.prefs.WindowsPreferencesFactory
java.vendor = Sun Microsystems Inc.
java.vendor.url = http://java.sun.com/
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
java.version = 1.4.2_05


Even then I get the same error which says ... "No LoginModules Configured for <app -name>"

Any suggestions .....
[ September 02, 2004: Message edited by: meka toka ]
15 years ago
I see that you are setting the system property for the policy file and specifying it as test.policy

You need to give sufficient permissions in that policy file about the access that code can have.

Refer this link for further information
jjguidelines.dev.java.net/book/html/ch02s11.html

Thanks
MekaToka

[ September 01, 2004: Message edited by: meka toka ]
[ September 01, 2004: Message edited by: meka toka ]
15 years ago
Hi all,

I have WL 8.1 SP3 installed on a XP Prof box with JDK 1.4.2

I have an application that makes use of the JAAS. I keep getting the following error

javax.security.auth.login.LoginException: No LoginModules configured for <XXXXXX>
at javax.security.auth.login.LoginContext.init(LoginContext.java:189)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:350)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:465)



I know that this means that it couldnt find the login modules defined in the configuration file. But I have it defined there. The following is what I am doing

1. I have the startWebLogic.cmd as below.

%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=%JAVA_HOME%\jre\lib\security\java.policy weblogic.Server


2. In the Java policy file located in security folder of the JDK home, I changed the security file to point to config file as below

login.config.url.1=file:${java.home}/lib/security/jaas.conf

Can someone suggest me a solution ?

Thanks
meka toka
[ September 01, 2004: Message edited by: meka toka ]
15 years ago
Also can somebody clarify this
When a struts application is deployed on Tomcat server, should there be any pop ups of the Action Mapping, Success and Failure files.
If the pop up doesnt come up in stack trace when starting Tomcat, does it mean that the form-beans(ActionForms) are not properly configured in deployment descriptors ?
Does extending the ActionMapping and writing your own ActionMapping cause any of these pop ups ?
I am asking this because, when i start Tomcat no popups comeup, where as when i place storefront sample application, there are pop ups of the Form beans, and some other stuff.
Thank You
Meka Toka
16 years ago
Yes i have defined the ActionServlet in the web.xml, the reason why i didnt provide the code snippet earlier is because i was trying to show all the code related to the action mapping in both the deployment descriptors.
This looks like a problem that many beginners face, i searched but found no solution.
Any more suggestions ?
TIA
Meka Toka
[ July 24, 2003: Message edited by: meka toka ]
16 years ago
Hi,
I am new to Struts, i am facing the following a problem with the action mappings.
Here are my code snippets
In web.xml
------------
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
In login.jsp
-------------
<html:form action="/Login"
name="LoginForm"
type="com.xxx.yyy.LoginForm" >

In struts-config.xml
---------------------
FORM-BEANS
------------
<form-beans>
<form-bean name="LoginForm" type="com.xxx.yyy.LoginForm"/>
</form-beans>
GLOBAL FORWARDING
------------------
<global-forwards>
<forward name="Login" path="/login.jsp"/>
</global-forwards>
ACTION MAPINGS
----------------
<action-mappings>
<action path="/Login" type="com.xxx.yyy.LoginAction" scope="request" input="/login.jsp" name="LoginForm">
<forward name="Success" path="/welcome.jsp"/>
<forward name="Failure" path="/login.jsp"/>
</action>

With the above code, when the login.jsp is submitted the values have to be filled in LoginForm which is an ActionForm for the ActionClass LoginAction .
The associated action path is supposed to be /Login but when the jsp is submitted i get an error page saying
The requested resource (/MyApp/Login.do) is not available.
Can somebody point me where am i wrong ?
I am using Tomcat 4.1.24, Struts 1.1
TIA
Meka Toka
16 years ago