Wednesday, 16 January 2008
|
| was.policy and Spring FrameWork NIrving 16:40:20 |
| | Hi I am after some advice on how to best secure an EAR I am deploying. I have Java 2 Security enabled on WAS 5.1.1.3 and my app requires the use of the spring framework, so I started adding permissions to the was.policy file and ended up with something like this.
grant codeBase "file {application}" { permission java.lang.RuntimePermission "getClassLoader"; permission java.io.FilePermission "${app.installed.path}/-", "read"; };
this is bad because I am granting any JAR the ability to get the class loader. So I started reorganising it, to get to
grant codeBase "file:spring-1.2.8.jar" { permission java.lang.RuntimePermission "getClassLoader"; };
grant codeBase "file:EchoServiceWEB.war" { permission java.lang.RuntimePermission "getClassLoader"; };
grant codeBase "file {was.install.root}/lib/classloader.jar" { permission java.io.FilePermission "${app.installed.path}/-", "read"; };
However the last grant does not seem to be picked up and I get the following
[4/08/06 13:09:56:833 EST] 76f798b7 SecurityManag W SECJ0314W: Current Java 2 Security policy reported a potential violation of Java 2 Security Permission. Please refer to Problem Determination Guide for further information.
Permission:
\C:\IBM\WebSphere\AppServer\installedApps\blah\EchoServiceEAR.ear\EchoServiceEJB.jar : access denied (java.io.FilePermission \C:\IBM\WebSphere\AppServer\installedApps\blah\EchoServiceEAR.ear\EchoServiceEJB.jar read)
Code:
com.ibm.ws.classloader.SinglePathClassProvider in {file:/C:/IBM/WebSphere/AppServer/lib/classloader.jar}
Any ideas?
Thanks
|
| | 1 answer | Add comment |
Monday, 10 December 2007
|
| DCS Stack unknown at Member unknown! Mangalaganesh Balasubramanian 13:42:24 |
| | Hi,
I added a new Server called TMBillServer01-CBJ and deleted it after a point in time.
I had saved the configuration.
Now in other server's systemout.log i see these entries which points to this server. (see below)
WHy woudl that happen?
What is the impact?
THanks, manglu
[12/1/05 20:37:38:303 SGT] 00000014 QueueTHandler W DCSV0002W: DCS Stack unkno wn at Member unknown: An unexpected programming state has occurred. Internal det ails: "Can't open Async QueueT because DCS got null member address from the Add ressResolver" {Method=QueueTHandler.openQTonIpPort(), PtpRmmNode=PtpRmmNode|APP- BRF01Cell01\APP-CBJ01Node01\TMBillServer01-CBJ|null|11, TopicName=[B@74a055} . T he exception is <null>. [12/1/05 20:38:40:064 SGT] 00000013 QueueTHandler W DCSV0002W: DCS Stack unkno wn at Member unknown: An unexpected programming state has occurred. Internal det ails: "Can't open Async QueueT because DCS got null member address from the Add ressResolver" {Method=QueueTHandler.openQTonIpPort(), PtpRmmNode=PtpRmmNode|APP- BRF01Cell01\APP-CBJ01Node01\TMBillServer01-CBJ|null|11, TopicName=[B@27f977} . T he exception is <null>. [12/1/05 20:39:42:794 SGT] 00000012 QueueTHandler W DCSV0002W: DCS Stack unkno wn at Member unknown: An unexpected programming state has occurred. Internal det ails: "Can't open Async QueueT because DCS got null member address from the Add ressResolver" {Method=QueueTHandler.openQTonIpPort(), PtpRmmNode=PtpRmmNode|APP- BRF01Cell01\APP-CBJ01Node01\TMBillServer01-CBJ|null|11, TopicName=[B@1938724} . The exception is <null>.
|
| | 1 answer | Add comment |
Tuesday, 4 December 2007
|
| failed to install new application Cristine Neria 21:27:12 |
| | I am using WAS 6.0 right now and while installing a new application in the admin console, I got this error message:
The EAR file might be corrupt or incomplete. com.ibm.etools.j2ee.commonarchivecore.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml
I've found several topics regarding this matter and I think it's because of the order of the deployment descriptors. So I arranged them according to web-app_2_2.dtd standard.
Here goes my web.xml:
<web-app> <display-name>Struts Blank Application</display-name> <!--Standard Action Servlet Configuration (with debugging)--> <context-param> <param-name>log-init-file</param-name> <param-value>/WEB-INF/log4j.properties</param-value> <description>Logger Settings</description> </context-param> <listener> <listener-class>com.globecel.portal.utils.LoggerInitListener</listener-class> </listener> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!-- The Usual Welcome File List --> <session-config> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!-- Struts Tag Library Descriptors --> <taglib> <taglib-uri>/tags/struts-bean</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-html</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-logic</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-nested</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-tiles</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib> <resource-ref> <description>Tomcat DBCP</description> <res-ref-name>jdbc/portalmaindb</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </web-app>
Does anyone here knows what have I been doing wrong? Is this the standard used in WAS 6? I'll appreciate some help. I'm new to IBM WAS. Thanks a lot.
|
| | 5 answers | Add comment |
Tuesday, 16 October 2007
|
| JAAS Help Guest 19:29:37 |
| | Hi!
I developed a little test web application, and i've implemented an application level custom JAAS login module. The JAAS login module running order is the next:
1. My own module 2. com.ibm.ws.security.server.lm.ltpaLoginModule 3. com.ibm.ws.security.server.lm.wsMapDefaultInboundLoginModule
My JAAS login module is:
/* * Created on 2006.06.20. * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package hu.afsz;
import java.io.*; import java.rmi.*; import java.util.*;
import javax.naming.*; import javax.security.auth.*; import javax.security.auth.callback.*; import javax.security.auth.login.*; import javax.security.auth.spi.*; import javax.servlet.http.*;
import com.ibm.websphere.security.*; import com.ibm.websphere.security.auth.*; import com.ibm.ws.security.common.auth.*; import com.ibm.wsspi.security.auth.callback.*; import com.ibm.wsspi.security.token.*;
/** * @author Administrator * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */ public class MyLoginModule implements LoginModule { private Subject subject; private CallbackHandler callbackHandler; private Map sharedState; private Map options; private boolean succeeded; private boolean commitSucceeded; private WSPrincipalImpl principal; private String userName; private Hashtable hashTable;
public void initialize(Subject aSubject, CallbackHandler aCallackHandler, Map aSharedState, Map aOptions) { System.out.println("MyLoginModule: INITIALIZE"); this.subject = aSubject; this.callbackHandler = aCallackHandler; System.out.println("MyLoginModule callbackhandler class: " + aCallackHandler.getClass().getName()); this.sharedState = aSharedState; this.options = aOptions; this.userName = "wid"; }
public boolean login() throws LoginException { System.out.println("MyLoginModule: LOGIN"); if (callbackHandler == null) throw new LoginException("Error: no CallbackHandler available!"); Callback[] callBacks = new Callback[1]; callBacks[0] = new WSServletRequestCallback("HttpServletRequest: "); try { callbackHandler.handle(callBacks); HttpServletRequest request = ((WSServletRequestCallback) callBacks[0]) .getHttpServletRequest(); if (request == null) throw new LoginException( "There is no httpServletRequest object specified."); userName = (String) request.getAttribute("userName"); //userName = request.getRemoteUser(); } catch (IOException e) { throw new LoginException(e.getMessage()); } catch (UnsupportedCallbackException e) { throw new LoginException(e.getMessage()); } if (userName == null || "".equals(userName)) throw new LoginException("There is no username specified."); try { InitialContext initialContext = new InitialContext(); UserRegistry userRegistry = (UserRegistry) initialContext .lookup("UserRegistry"); succeeded = userRegistry.isValidUser(userName); if (succeeded) { hashTable = new Hashtable(); String uniqueId = userRegistry.getUniqueUserId(userName); System.out.println("UNIQUE ID: " + uniqueId); String displayName = userRegistry.getUserDisplayName(userName); System.out.println("DISPLAY NAME: " + userRegistry.getUserDisplayName(userName));
hashTable.put(AttributeNameConstants.WSCREDENTIAL_UNIQUEID, uniqueId); System.out.println("SECURITY NAME: " + userName); hashTable.put(AttributeNameConstants.WSCREDENTIAL_SECURITYNAME, userName); System.out.println("ITT1"); List groups = userRegistry.getGroupsForUser(userName); Iterator it = groups.iterator(); while (it.hasNext()) { System.out.println(it.next()); } hashTable.put(AttributeNameConstants.WSCREDENTIAL_GROUPS, groups); System.out.println("ITT2"); hashTable.put(AttributeNameConstants.WSCREDENTIAL_CACHE_KEY, uniqueId + "MyLoginModule"); System.out.println("ITT3"); sharedState.put( AttributeNameConstants.WSCREDENTIAL_PROPERTIES_KEY, hashTable); principal = new WSPrincipalImpl(userName); WSPrincipal principal = new WSPrincipalImpl(userName); sharedState.put("WSPrincipal", principal); sharedState.put("WSCredential", userRegistry .createCredential(userName)); //subject.getPrincipals().add(principal); //subject.getPublicCredentials().add(hashTable); System.out.println("ITT4"); return true; } return false; } catch (NamingException e) { System.out.println(e.getClass().getName()); throw new LoginException(e.getMessage()); } catch (CustomRegistryException e) { System.out.println(e.getClass().getName()); throw new LoginException(e.getMessage()); } catch (EntryNotFoundException e) { System.out.println(e.getClass().getName()); throw new LoginException(e.getMessage()); } catch (NotImplementedException e) { System.out.println(e.getClass().getName()); throw new LoginException(e.getMessage()); } catch (RemoteException e) { System.out.println(e.getClass().getName()); throw new LoginException(e.getMessage()); } }
public boolean commit() throws LoginException { System.out.println("MyLoginModule: COMMIT"); if (!succeeded) return false; userName = null; commitSucceeded = true; return true; }
public boolean abort() throws LoginException { System.out.println("MyLoginModule: ABORT"); if (!succeeded) return false; if (commitSucceeded) { succeeded = false; userName = null; principal = null; hashTable = null; } else { logout(); } return true; }
public boolean logout() throws LoginException { System.out.println("MyLoginModule: LOGOUT"); subject.getPrincipals().remove(principal); subject.getPublicCredentials().remove(hashTable); succeeded = false; succeeded = commitSucceeded; userName = null; principal = null; hashTable = null; return true; } }
I've created a jsp page to test JAAS and a SCA call role based authorization
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML> <HEAD> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="com.ibm.websphere.sca.ServiceManager" %> <%@ page import="commonj.sdo.DataObject" %> <%@ page import="com.ibm.websphere.bo.BOFactory" %> <%@ page import="module.sca.approval.credit.credit.approval.CreditApproval" %> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META name="GENERATOR" content="IBM Software Development Platform"> <META http-equiv="Content-Style-Type" content="text/css"> <LINK href="theme/Master.css" rel="stylesheet" type="text/css"> <TITLE>JAASTeszt.jsp</TITLE> </HEAD> <BODY> <% javax.security.auth.Subject subject = (javax.security.auth.Subject) session.getAttribute("subject"); boolean isAuthenticated = subject != null; if (!isAuthenticated) { request.setAttribute("userName", "wid"); javax.security.auth.login.LoginContext lc = null; try { //lc = new javax.security.auth.login.LoginContext("NTLMLogin", callbackHandler); lc = new javax.security.auth.login.LoginContext("NTLMLogin", com.ibm.wsspi.security.auth.callback.WSCallbackHandlerFactory.getInstance().getCallbackHandler( "auth1", null, null, request, response, null)); } catch (javax.security.auth.login.LoginException e) { System.out.println("Cannot create LoginContext: " + e.getMessage()); } catch (SecurityException e) { System.out.println("Cannot create LoginContext: " + e.getMessage()); } try { lc.login(); %> <a href="http://localhost:9081/JAASTest/JAASTeszt.jsp">Link</a> <% } catch (javax.security.auth.login.LoginException e) { System.out.println("Failed to create Subject: " + e.getMessage()); }
subject = lc.getSubject(); if (subject != null) { session.setAttribute("subject", subject); com.ibm.websphere.security.auth.WSSubject.setRunAsSubject(subject); isAuthenticated = true; %> <br>Authentication successful. <% } else { %> No subject <% } } if (isAuthenticated) { try { ServiceManager serviceManager = new ServiceManager(); BOFactory bof = (BOFactory)serviceManager.locateService("com/ibm/websphere/bo/BOFactory"); DataObject creditApp = bof.create("http://CreditApprovalSCAModule", "CreditApplication"); creditApp.setString("firstName", "wom"); creditApp.setString("lastName", "wom"); creditApp.setString("customerId", "wom");
CreditApproval creditApproval = (CreditApproval) serviceManager.locateService("creditApprovalPartner1"); creditApproval.calculateCreditRating(creditApp); %> <br>Process invoke successful. <% } catch (Exception e) { System.out.println(e.getMessage()); } } %> </BODY> </HTML>
The authentication works fine every time, but the authorization of service invocation works only at first view of page, and it doesn't work when i click the anchor (which links same page)
If i put com.ibm.websphere.security.auth.WSSubject.setRunAsSubject(subject); to before sca invocation everything is fine.
Second question:
How can i authorize a user to see a jsp (role base authorization) when i use custom JAAS login module. I set the security role, constraints and a pattern in the WAR, i join a user to the defined role in the ear, and it's not working.
Thx any help.
wombat
|
| | 5 answers | Add comment |
Thursday, 11 October 2007
|
| WSAD 5.1 : Calling a Web Service from an EJB with SSL Adrian 12:42:19 |
| | Hello,
I'm using WSAD IE 5.1 on windows. I try to call a Web Service from an EJB (I've generated the propxy in the EJB module by pasting some files from a Web module).
The HTTP invocation works fine.
But when I try using HTTPS it's KO, even if : - I've specified a correct SSL directory in th webservicesclient.xml file (localhost/DefaultSSLClient). - I've set this directory in the WTE configuration. - I've specified an endpoint like https://lcoalhost:9443/xxx for calling my WS.
Has anyone had a similar problem ?
Thanks for your help.
Here's a sample of the ibm-webservicesclient-bnd.xmi : <?xml version="1.0" encoding="UTF-8"?> <com.ibm.etools.webservice.wscbnd:ClientBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:com.ibm.etools.webservice.wscbnd="http://www.ibm.com/websphere/appserver/schemas/5.0.2/wscbnd.xmi" xmi:id="ClientBinding_1099482930062"> <serviceRefs xmi:id="ServiceRef_1099487029078" serviceRefLink="service/nbp.ibpnbp.service.portefeuille.v2.Portefeuille2"> <portQnameBindings xmi:id="PortQnameBinding_1099487029078" portQnameLocalNameLink="Portefeuille2SOAPJMSBindingPort"> <sslConfig xmi:id="SSLConfig_1100796107328" name="localhost/DefaultSSLClient"/> </portQnameBindings> </serviceRefs> </com.ibm.etools.webservice.wscbnd:ClientBinding>
And here a sample fot the webservicesclient.xml file : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE webservicesclient PUBLIC "-//IBM Corporation, Inc.//DTD J2EE Web services client 1.0//EN" "http://www.ibm.com/webservices/dtd/j2ee_web_services_client_1_0.dtd">
<webservicesclient id="WebServicesClient_1099487028593"> <component-scoped-refs id="ComponentScopedRefs_1097676591809"> <component-name>WSClient</component-name> <service-ref id="ServiceRef_1099487028593"> <description>WSDL Service nbp.ibpnbp.service.portefeuille.v2.Portefeuille2</description> <service-ref-name>service/nbp.ibpnbp.service.portefeuille.v2.Portefeuille2</service-ref-name> <service-interface>nxbp.NbpIbpnbpServicePortefeuilleV2Portefeuille2</service-interface> <wsdl-file>META-INF/wsdl/ServiceDefinition.name=nbp.ibpnbp.service.portefeuille.v2.Portefeuille2.wsdl</wsdl-file> <jaxrpc-mapping-file>META-INF/ServiceDefinition.name=nbp.ibpnbp.service.portefeuille.v2.Portefeuille2_mapping.xml</jaxrpc-mapping-file> <service-qname id="ServiceQname_1099487028593"> <namespaceURI>urn:nxbp</namespaceURI> <localpart>nbp.ibpnbp.service.portefeuille.v2.Portefeuille2</localpart> </service-qname> <port-component-ref id="PortComponentRef_1099487028593"> <service-endpoint-interface>nbp.def.service.portefeuille.v2.Portefeuille2</service-endpoint-interface> </port-component-ref> </service-ref> </component-scoped-refs> </webservicesclient>
|
| | 2 answer | Add comment |
Monday, 10 September 2007
|
| flv to avi file converter Teti Garf 15:52:46 |
| | I'd like to convert short flv video files into avi on a PC. Could someone please advise on a suitable program, so far all my attempts have failed and what I get is a Nero mp3.
Many thanks in advance.
T.G.
|
| | 1 answer | Add comment |
Saturday, 8 September 2007
|
| installing quicken Guest 19:49:56 |
| | I cannpt install either Quicken Starter Edition of 2007 Deluxe .....
both come up with errors and say they cannot uninstall old Quicken already on the computer...
old Quicken is a backkup which was placed there by my late husband and i'm trying to continue on with the home checkbook .. downloaded from bank. can anyone help me one of these programs to install completely and download.... thanks |
| | Add comment |
Thursday, 6 September 2007
|
WINDOWS MEDIA PLAYER FOR WEBCAM CosyKat 21:02:35 |
| | Hey Is it possible to send what ever video is playing in windowes media player through msn as a webcam video? so i can let people watch what i am watching? or is there a program i can use? or could someone on here who has made msn adons mybe make a program that can do this?
|
| | 3 answer | Add comment |
Tuesday, 14 August 2007
|
| Unable to Burn to or Erase a DVD+RW Disc Fruity Cool 01:08:55 |
| | Hi, guys.
I have a problem. I had this problem before of being unable to burn to a DVD+RW disc when using Ulead DVD MovieFactory or Ulead Videostudio. I did install the patches seen at this link, http://www.ulead.com/tech/general/burning_engine.htm and it did solve my problem.
But, a couple of months ago, I was again unable to burn to a DVD+RW disc when using these two programs, and it comes up and says the drive is not ready, and ejects the disc. I even went as far as to format my hard drive and reinstall the programs again and the burning engine. It did nothing. The problem was still there.
The only way I am able to successfully burn to a DVD+RW now is to start off by using Videostudio or DVD MovieFactory, and when I'm on the screen that enables me to burn the DVD, I put a check mark beside the box that creates video folders on the hard drive. I also put a check mark beside record to disc. After the burn fails, I go to the location of the AUDIO_TS and VIDEO_TS on my hard drive, and put them into a burning program I use called "RecordNow!" and burn them as a data disc. This creates a DVD with some audio/video synch issues. So, it would be so much easier to do the whole job with either DVD MovieFactory or Videostudio. In the last day, I have also been unable to erase a DVD+RW disc in the "RecordNow!" program or using Windows Explorer when this was possible before. Any ideas?
fruity
|
| | 3 answer | Add comment |
Friday, 29 June 2007
|
| A question about Video Recorders Buchetamo 08:39:17 |
| | I just bought a new DVD Recorder, a Pioneer 630H with HDD & plenty of extras. I must confess that I don't know much about DVD Recorders & bought this appliance hoping I could record TV programs & watch them later in any DVD Player... but that is not the case. So far the recordings I have made can only be watched in the new Pioneer. I have tried DVD players in three different computers & another stand alone DVD player (LG) but no luck. By the way this Pioneer plays all types of DVDs but records only on DVD-Rs & -RWs Could you, please, tell me: DVD recordings from these appliances, other brands included, do not playback in other DVD players? or I bought the wrong brand?
|
| | 17 answers | Add comment |
Wednesday, 20 June 2007
|
| Re: UNUSED CREDIT - how to remove TObject 13:40:17 |
| | "Wayne" <xeroid@kos.net> wrote in message news:6jhpj3-d7g.ln1@apollo.kos.net...> I have one client in my QB that show they have an unused credit that I want> to get rid of. Is there an easy way to do this?
Sure, issue an invoice for the amount and apply the credit against the invoice.
If you just want to cleanup the AR but keep the credit for the customer, then issue a credit memo.
|
| | 9 answers | Add comment |
Wednesday, 30 May 2007
|
| Quicktime mov to VCD Kajeel 06:13:04 |
| | I have a Quicktime .mov file (from still camera) that I would like to put on CD so it can be viewed via a DVD player. I assume VCD is probably the way to go. I have Nero 6. What format do I have to convert the .mov file to....to enable it to be burned to disc and viewed through a DVD player. A brief outline of the procedure would be appreciated. TIA.
Regards Kaj
|
| | 2 answer | Add comment |
Friday, 13 April 2007
|
| Strange ArrayIndexOutOfBoundsException exception Kapweb 16:36:45 |
| | Hi,
In our application we are facing one strange problem. We are using j2ee struts framework.
As part of struts, the flow is: Action layer calls -->BD-->EJB--->DAO--->Database....
I will try to explain the problem in brief. There is one hyperlink on one of the jsp page. Corresponsing Action calls a stored procedure on click on that hyperlink. Sometime, when we click on that hyperlink we are getting below mentioned exception. This is not happening always.
ea4a9a71 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "getDetails" on bean "BeanId(GFE#GFEEJBAP.jar#MyEJB, null)". Exception data: java.lang.ArrayIndexOutOfBoundsException at com.ibm.as400.access.JDServerRow.setRowIndex(JDServerRow.java:271) at com.ibm.as400.access.AS400JDBCPreparedStatement.commonExecuteAfter(AS400JDBCPreparedStatement.java:467) at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:978) at com.ibm.as400.access.AS400JDBCPreparedStatement.execute(AS400JDBCPreparedStatement.java:780) at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:584) at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:386) at com.polo.gfe.apps.ap.aap.dao.MyDAO.getDetails(MyDAO.java:788) at com.polo.gfe.apps.ap.aap.ejb.servicebean.MyEJBBean.getDetails(MyEJBBean.java:351) at
The DAO's code is: ------------------
String strSqlQuery = resourceManager.getString( AAPDBConstant.My_Stored_Procedure, GFESysConstant.GFE_DB_SCHEMA_NAME);
CallableStatement stmtStoredProc = connection.prepareCall(strSqlQuery);
//Set aap id as input parameter stmtStoredProc.setInt(1, myFirstVO.getId()); stmtStoredProc.registerOutParameter(2, java.sql.Types.VARCHAR); stmtStoredProc.registerOutParameter(3, java.sql.Types.INTEGER); stmtStoredProc.registerOutParameter(4, java.sql.Types.INTEGER); stmtStoredProc.registerOutParameter(5, java.sql.Types.DOUBLE, 2); stmtStoredProc.registerOutParameter(6, java.sql.Types.DOUBLE, 2); stmtStoredProc.registerOutParameter(7, java.sql.Types.INTEGER); stmtStoredProc.registerOutParameter(8, java.sql.Types.VARCHAR); stmtStoredProc.registerOutParameter(9, java.sql.Types.VARCHAR); stmtStoredProc.registerOutParameter(10, java.sql.Types.VARCHAR); //Execute stored procedure and process the result sets
----> Getting Error here----->if (stmtStoredProc.execute()) { objMyVO.setMyParamter1(stmtStoredProc.getInt(2)); objMyVO.setMyParamter1(stmtStoredProc.getInt(3)); objMyVO.setMyParamter1(stmtStoredProc.getDouble(4)); . . . . .
It would be great if you give me some clue to resolve this issue. This issue is happening only in Production Environment. DEV and QA environments are working fine.
Technology used: Web sphere 5.1.0, DB2, AS/400, IBM Jdk 4.2
My Mail id is - Kapweb@yahoo.com
-- kapweb ------------------------------------------------------------------------ Posted via http://www.webservertalk.com ------------------------------------------------------------------------ View this thread: http://www.webservertalk.com/message1349532.html
|
| | 2 answer | Add comment |
Wednesday, 21 March 2007
|
| NullPointerException on ear-Startup Guest 14:11:49 |
| | Hello,
I've got a very strange NPE when I am starting my ear. I've an ear-File which contains two .war's, I also wrote a simple Servlet. If I deploy the servlet inside the first war, everything is OK, if I deploy the same servlet inside the second war, I get the following NPE on startup of the Application:
Any hints? Thanks Wolfgang
[27.04.06 17:23:11:789 CEST] 00000056 MBeanHelper E Could not invoke an operation on object: WebSphere latform=dynamicproxy,cell=xp-gsi1Node01Cell,version=6.0.2.1,name=ApplicationManager,mbeanIdentifier=ApplicationManager,type=ApplicationManager,node=xp-gsi1Node01,process=server1 because of an mbean exception: com.ibm.ws.exception.RuntimeError: java.lang.NullPointerException [27.04.06 17:23:14:676 CEST] 0000005a ServletWrappe A SRVE0242I: [adminconsole] [/ibm/console] [/secure/javascriptToSession.jsp]: Initialisierung erfolgreich. [27.04.06 17:23:11:805 CEST] 00000056 SystemErr R com.ibm.ws.exception.RuntimeError: java.lang.NullPointerException at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:792) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:868) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1388) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code)) at java.lang.reflect.Method.invoke(Method.java(Compiled Code)) at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1366) at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1012) at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:233) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128) at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:167) at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1249) at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:916) at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code)) at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:832) at com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:186) at com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.execute(ApplicationDeploymentCollectionAction.java:480) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:275) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:265) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1070) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:273) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:319) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136) at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:306) at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:185) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2905) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220) at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1829) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:469) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:408) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:286) at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:933) at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete( | |