• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.Nullpointer Exception

 
Nihal Sequeira
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I get this :
java.lang.NullPointerException
SystemOut O role_list_applet took 9.794 seconds
everytime i run the jsp in WSAD test environment.
Is this a JNDI name issue?
The lookup is performed by the bean as so:
obj = jndiContext.lookup("java:comp/env/ejb/Users")
where ejb/Users is the JNDI name of the bean.
This is one part of the error when I try to deploy my jar in IBM UTC I get
J2CA0114W: No container-managed authentication alias found.
11c11c62 TraceNLS No message text associated with key CREDENTIALS_NOT_FOUND in bundle IBMDataStoreAdapterNLS
11c11c62 FreePool E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of ManagedConnection for resource jdbc/IDGeneratorDB, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: Subject was not null but no valid credentials were found
I tried looking up for container managed authentication alias tab in the server configuration settings but there is no option to
define these aliases( websphere application server as such has this feature in admin console)
When I tried to port this application to the admin console ,I get this error when I try to install the application:
AppDeploymentException: [Application extensions file does not contain a reference to the deployment descriptor. Corrupt ear file. Check if META-INF/ibm-application-ext.xmi uri in the ear file contains a valid application href tag.]
Any help in this area would be appreciated.
Thanks
Gareth
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set these up in the WSAD 5.0 server editor. Open the server editor. Go to the Security Tab. Hit the "add" button under "JAAS Authentication Entries". Then you can select it from the container-managed and component-manged authentication drop-downs when you add or reconfigure a Datasource.
Kyle
 
Nihal Sequeira
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kyle,
I used your method and managed to connect to database using the datasources defined.But whe i try to export this application and try installing it again in WAS 5.0 , I still get the AppDeployment exception error posted in the previous post.Do let me know how I can get around this.
Thanks
Gareth
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So post your application extensions file and let us look at it.
Kyle
 
Nihal Sequeira
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is the error I get when i try to install the EAR using the WAS 5.0 admin console.
AppDeploymentException: [Application extensions file does not contain a reference to the deployment descriptor. Corrupt ear file. Check if META-INF/ibm-application-ext.xmi uri in the ear file contains a valid application href tag
This is my application.xml file
xml version="1.0" encoding="UTF-8"
!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd"
<application>
<display-name>test app</display-name>
<module id="EjbModule_1045093054667">
<ejb>sem_bc.jar</ejb>
</module>
<module id="WebModule_1045093055067">
<web>
<web-uri>sem_web.war</web-uri>
<context-root>/sem_web</context-root>
</web>
</module>
</application>
This is the ibm-application-ext.xmi
xml version="1.0" encoding="UTF-8"
applicationext:ApplicationExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:applicationext="applicationext.xmi" xmlns:application="application.xmi" xmi:id="ApplicationExtension_1"
<application href="META-INF/application.xml#Application_1046482093342"/>
</applicationext:ApplicationExtension>
This is the application-bnd.xmi file:
xml version="1.0" encoding="UTF-8"
applicationbnd:ApplicationBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:applicationbnd="applicationbnd.xmi" xmlns:application="application.xmi" xmi:id="ApplicationBinding_1"
<authorizationTable xmi:id="AuthorizationTable_1"/>
<application href="META-INF/application.xml#Application_ID"/>
</applicationbnd:ApplicationBinding>
This is the ibm-web-bnd.xmi file description
xml version="1.0" encoding="UTF-8"
webappbnd:WebAppBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:webappbnd="webappbnd.xmi" xmlns:webapplication="webapplication.xmi" xmlns:commonbnd="commonbnd.xmi" xmlns:common="common.xmi" xmi:id="WebAppBinding_1" virtualHostName="default_host"
webapp href="WEB-INF/web.xml#WebApp"
<ejbRefBindings xmi:id="EjbRefBinding_1045696355555" jndiName="ejb/IDGenerator">
<bindingEjbRef xmi:type="common:EJBLocalRef" href="WEB-INF/web.xml#EJBLocalRef_1045696355555"/>
</ejbRefBindings>
<ejbRefBindings xmi:id="EjbRefBinding_1045696355685" jndiName="ejb/Users">
<bindingEjbRef xmi:type="common:EJBLocalRef" href="WEB-INF/web.xml#EJBLocalRef_1045696355685"/>
</ejbRefBindings>
<ejbRefBindings xmi:id="EjbRefBinding_1045696355805" jndiName="ejb/Roles">
<bindingEjbRef xmi:type="common:EJBLocalRef" href="WEB-INF/web.xml#EJBLocalRef_1045696355805"/>
</ejbRefBindings>
</webappbnd:WebAppBinding>
ibm-web-ext.xmi file description:
<webappext:WebAppExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:id="WebAppExtension_1"<br /> reloadInterval="3"<br /> reloadingEnabled="true"<br /> additionalClassPath=""<br /> fileServingEnabled="true"<br /> directoryBrowsingEnabled="false"<br /> serveServletsByClassnameEnabled="true">
<webApp href="WEB-INF/web.xml#WebApp"/>
</webappext:WebAppExtension>
Hope this helps..
Thanks
Gareth
[ March 10, 2003: Message edited by: Nihal Sequeira ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic