JPA ClassNotFoundExceptiona at runtime in J2EE application

I created a JPA project for my Web application in IBM Rational Application Developer v7.5. JPA project classes are NOT FOUND at run time when those are referred from web application. I followed the below steps to create Web/JPA project in RAD 7.5. Please look at my RAD project structure in the link - [Project Structure|http://img690.imageshack.us/img690/8831/rad75webjpaprojectsetup.jpg]
1. Created a EAR project called MySampleEAR
2. Created a dynamic web project
- project name: MySampleWeb
- Target Runtime: Websphere Application Server 7.0
- Dynamic Web module version 2.5
- Configuration : Default configuration for WAS 7.0
- Selected "Add project to EAR" and selected the EAR - MySampleEAR
- Finished it
3. Created JPA Project
- Project name : MySampleJpa
- Target Runtime : WAS7
- Configuration : Utility JPA Project with 5.0
- Selected Add project to an EAR : MySampleEAR
- In the next screen, Platform: RAD JPA platform
- Use implementation provided by runtime
- Left rest as default options
4. Created a very basic class in JPA project under src dir
package com.mysample.persistence;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table (name="USERS")
public class Users implements Serializable {
     @Id
     @Column(name="USER_ID")
     private long userId;
     private static final long serialVersionUID = 1L;
     public Users() {
          super();
     public long getUserId() {
          return this.userId;
     public void setUserId(long userId) {
          this.userId = userId;
}5. Added MySampleJpa project into web project's (MySampleWeb) build path.
6. Created a simple Servlet in the web project and mapping the web.xml file is created by RAD. When I import import com.mysample.persistence.Users, no compilation error and able to refer Users object.
My Servlet code is below:
package com.mysample.web;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mysample.persistence.Users;
* Servlet implementation class SampleServlet
public class SampleServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          new Users();
}Now, run/deploy the ear file into WAS 7, Try to load the servlet uri in the browser: http://localhost:9081/mysampleweb/sampleservlet/
Getting the below ClassNotFoundE in the server console.
[9/11/10 10:24:04:218 EDT] 0000001f servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet SampleServlet in application MySampleEar. Exception created : java.lang.NoClassDefFoundError: com.mysample.persistence.Users
     at com.mysample.web.SampleServlet.doGet(SampleServlet.java:19)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
     at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by: java.lang.ClassNotFoundException: com.mysample.persistence.Users
     at java.net.URLClassLoader.findClass(URLClassLoader.java:419)
     at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:150)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
     at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:90)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
     at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
     at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
     at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
     at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
     ... 25 more

I created a JPA project for my Web application in IBM Rational Application Developer v7.5. JPA project classes are NOT FOUND at run time when those are referred from web application. I followed the below steps to create Web/JPA project in RAD 7.5. Please look at my RAD project structure in the link - [Project Structure|http://img690.imageshack.us/img690/8831/rad75webjpaprojectsetup.jpg]
1. Created a EAR project called MySampleEAR
2. Created a dynamic web project
- project name: MySampleWeb
- Target Runtime: Websphere Application Server 7.0
- Dynamic Web module version 2.5
- Configuration : Default configuration for WAS 7.0
- Selected "Add project to EAR" and selected the EAR - MySampleEAR
- Finished it
3. Created JPA Project
- Project name : MySampleJpa
- Target Runtime : WAS7
- Configuration : Utility JPA Project with 5.0
- Selected Add project to an EAR : MySampleEAR
- In the next screen, Platform: RAD JPA platform
- Use implementation provided by runtime
- Left rest as default options
4. Created a very basic class in JPA project under src dir
package com.mysample.persistence;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table (name="USERS")
public class Users implements Serializable {
     @Id
     @Column(name="USER_ID")
     private long userId;
     private static final long serialVersionUID = 1L;
     public Users() {
          super();
     public long getUserId() {
          return this.userId;
     public void setUserId(long userId) {
          this.userId = userId;
}5. Added MySampleJpa project into web project's (MySampleWeb) build path.
6. Created a simple Servlet in the web project and mapping the web.xml file is created by RAD. When I import import com.mysample.persistence.Users, no compilation error and able to refer Users object.
My Servlet code is below:
package com.mysample.web;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mysample.persistence.Users;
* Servlet implementation class SampleServlet
public class SampleServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          new Users();
}Now, run/deploy the ear file into WAS 7, Try to load the servlet uri in the browser: http://localhost:9081/mysampleweb/sampleservlet/
Getting the below ClassNotFoundE in the server console.
[9/11/10 10:24:04:218 EDT] 0000001f servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet SampleServlet in application MySampleEar. Exception created : java.lang.NoClassDefFoundError: com.mysample.persistence.Users
     at com.mysample.web.SampleServlet.doGet(SampleServlet.java:19)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
     at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by: java.lang.ClassNotFoundException: com.mysample.persistence.Users
     at java.net.URLClassLoader.findClass(URLClassLoader.java:419)
     at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:150)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
     at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:90)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
     at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
     at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
     at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
     at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
     ... 25 more

Similar Messages

  • Runtime#exec() from within a J2EE application

    I've got a batch processing task running on a timer as part of my J2EE application on WebLogic 8.1 and I'm experiencing problems with invoking Runtime#exec().
    To be more accurate, this is what I'm trying to do:
    * Moves a file in the filesystem using native shell commands.
    * @param src The file to move.
    * @param dst The destination file.
    public void move(String src, String dst) {
        Runtime runtime = Runtime.getRuntime();
        Process p = runtime.exec(new String[] { "mv", "-f", src, dst });
    }Now, this piece of code works perfectly when run manually ("java Move foo.txt bar.txt") but when it's run within the J2EE application -- as the same user as in the manual case -- the file's won't get moved anywhere.
    I suppose it's a permission/policy issue. If that's the case, how should I edit the policy file?
    I already tried to add the following lines to weblogic.policy:
    grant codeBase "file:${user.domain}/myServer/.internal/-" {
      permission java.security.AllPermission;
    grant codeBase "file:${user.domain}/myServer/.wlnotdelete/-" {
      permission java.security.AllPermission;
    };...but that didn't seem to help at all.

    Ok. I managed to solve this one by myself. The solution was to read the "stdout" and "stderr" streams from the process.
    Any idea why reading the streams helped?

  • How to dynamically configure JPA setting at runtime using java code?

    Hi,
    I am new to EJB 3.0 and JPA. I am trying to help my company to deploy the use of JPA in EJB3.0. Currently, i am trying out with OpenJPA in IBM Webshpere Application Server 7.0. We have four different WAS servers running for testing, system integration testing, user testing and production respectively, and in each region, the configurations for data source, JDBC username and password, schema, etc are different. So i think i would need to configure the JPA setting during runtime using Java code that determines which is the environment. And apparently i am stuck with the limited knowledge i have.
    1) I understand that i could override the JDBC in the persistence xml by creating entity manager using entity manager factory. But is it possible that i do similar thing by using inejction of persistence context on entity manager to obtain a container managed entity manager?
    2) Alternatively, it is possible to create multiple persistence unit in the XML and inject different PU to the entity manager, am i right? But how to inject dynamically since @PersistenceContext(unitName="xxx") only accepts constant declaration.
    3) Is it possible that the JDBC username and password are read from properties file?
    Thanks for your help in advance!

    Hi
    Thanks for the reply.
    Are you saying that i have to configure the data source authentication to the backend DB2 using the JAAS-J2C? Correct me if i am mistaken. I guess i am unable to do so as the application server setup only contains one data source, and the server hosted a number of applications. Every applications has their own JDBC username and password supply to the data source (the ID supplied at the DB2 side will decide which resource can access) and thus, i have to supply the username and password at runtime. Talked to the server guy and seems that it is not feasible to have seperate datasource for each applications as considered to the volume of applications hosted inside the server.
    Any suggestion?

  • JNDI lookup fails in a thread created by J2EE application on WAS 8.0.0.4 running on Red Hat Enterprise Server 5.8(2.6.18-308.e15).

    I am using Jackrabbit Repository (jcr's implementation) as backend in my Web Appl.Whose data persists on Oracle Database. To make connection with Oracle database jackrabbit provide provision of JNDI Lookup to read the data source defined in WAS (using WAS 8.0.0.4 as App Server).
    I am able to perform JNDI Lookup everywhere in my application,But in a flow where i am creating a Thread using Java Concurrent Api and insidethread's call() method when I am trying for JNDI Look following exception occurs –
    [8/20/13 10:57:35:163 IST] 000000dd System Out     O ERROR 20-08 10:57:35,163 (DatabaseFileSystem.java:init:209)            failed to initialize file system
    javax.jcr.RepositoryException: JNDI name not found: java:comp/env/jdbc/ofsds
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:295)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:233)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:166)
    at org.apache.jackrabbit.core.fs.db.DbFileSystem.getDataSource(DbFileSystem.java:226)
    at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
    at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
    at org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
    at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
    at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
    at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
    at com.mmpnc.icm.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:408)
    at com.mmpnc.icm.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:355)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.RepositoryStartupService_$$_javassist_1.newSession(RepositoryStartupService_$$_javassist_1.java)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingSessionManager.create(ICMHouseKeepingSessionManager.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingSessionManager_$$_javassist_8.create(ICMHouseKeepingSessionManager_$$_javassist_8.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2271)
    at org.jboss.seam.Component.getValueToInject(Component.java:2223)
    at org.jboss.seam.Component.injectAttributes(Component.java:1663)
    at org.jboss.seam.Component.inject(Component.java:1481)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingRepository_$$_javassist_7.create(ICMHouseKeepingRepository_$$_javassist_7.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2271)
    at org.jboss.seam.Component.getValueToInject(Component.java:2223)
    at org.jboss.seam.Component.injectAttributes(Component.java:1663)
    at org.jboss.seam.Component.inject(Component.java:1481)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingManager_$$_javassist_6.create(ICMHouseKeepingManager_$$_javassist_6.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstance(Component.java:1899)
    at com.mmpnc.icm.server.concurrent.PerformCloseTask.call(PerformCloseTask.java:136)
    at com.mmpnc.icm.server.concurrent.PerformCloseTask.call(PerformCloseTask.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
    at java.util.concurrent.FutureTask.run(FutureTask.java:149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
    at java.lang.Thread.run(Thread.java:770)
    Caused by:
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component.  This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request.  Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application.  Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
    at com.ibm.ws.naming.java.javaURLContextImpl.throwExceptionIfDefaultJavaNS(javaURLContextImpl.java:522)
    at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:552)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:481)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookupExt(javaURLContextRoot.java:485)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:370)
    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:280)
    ... 114 more
    Caused by:
    javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
    at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1969)
    at com.ibm.ws.naming.ipbase.NameSpace.retrieveBinding(NameSpace.java:1376)
    at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1219)
    at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:1141)
    at com.ibm.ws.naming.urlbase.UrlContextImpl.lookupExt(UrlContextImpl.java:1436)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:477)
    ... 119 more

    Okay "damorgan", you seem to have me confused with a newbie. All I'm posting is the info that I got from my Sys Admin on the fix to my problem I encountered when trying to install Oracle 11g (11.2.0.0) on Red Hat Linux Enterprise 5. Since we're mouting onto an NFS, these are the steps he took. I'm not trying to "hide" information or post as little as possible. What other info do you want? I don't know what you are referring to when you mention "Filer, make, model, software version"? Please elaborate. I was just trying to post to others that may have encountered this problem, and I get somewhat attacked by you. I don't assume anyone can read my mind (especially you).

  • Get InstanceNumber at Runtime of J2EE-App in 2004s

    I wrote a J2EE Application for 2004s and this application needs a at runtime the http-port/InstanceNumber. How can I get this on runtime?

    Hi Remo,
    Am not sure what u mean by Standard port. In my understanding, Ports can be changed in SMICM transcation code.
    The J2EE ports are created via the following formula. Port Number = 50000100*instance_numberport_index
    Am very sure the following Threads will answer your question...
    Re: Get server and client ip address and port
    How to obtain J2EE instance port number from Java?
    Dont forget to grant me points Remo!!
    Thanks
    Subu

  • Get j2ee application directory

    Hi,
    Is there a way to get the disk path to the current
    j2ee application home at runtime. (i.e. .../j2ee/home/applications/myapp)
    I am generating html/csv files there and then redirecting
    to them.
    The same application is being deployed to multiple homes, so
    hardcoding the disk path in a properties file or anywhere else doen't work too well.
    thanks

    you can try using the getRealPath(...) method on the SevletContext

  • Obtaining SAP User information from J2EE Application

    Hi All,
    I am using SAP NetWeaver Developer Studio to create a J2EE Application, which requires accessing user information from SAP coming from Windows Active Directory.
    My question is as follows;
    Is there a possibility in a J2EE application to use an API to obtain user information (ie. from com.sap.security.api.jar) just like in a regular WebDyn Pro Application?
    For Archive Build Info (compile time), do I need to import specific JARs? For runtime, do I need to load any project reference?
    Thanks in advance,
    Michael

    Yes, I have added 'Run time' as well as 'Build time' for the com.sap.security.api.sda DC as well as for com.sap.tc.Logging DC.
    I have also added the following references to application-j2ee-engine.xml file:
    <application-j2ee-engine>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">com.sap.security.api.sda</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">com.sap.tc.Logging</reference-target>
         </reference>
         <provider-name>srl.com</provider-name>
         <fail-over-enable
              mode="disable"/>
    </application-j2ee-engine>
    I am still experiencing the same problem:
    java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:178)
         at srl.com.birthday.daemon.BirthdaysDaemon.loadEmployeesUser(BirthdaysDaemon.java:114)
         at srl.com.birthday.daemon.BirthdaysDaemon.run(BirthdaysDaemon.java:72)
         at java.lang.Thread.run(Thread.java:534)
    Is there any other JAR I forgot to add to my used DC? Is the security JAR dependant on something else?
    Thanks,
    Michael

  • SaxParser error when deploying J2EE application on 10gAS for IBM AIX 5.2

    Hello,
    We have problems deploying J2EE application on 10gAS 9.0.4.0.0, on IBM AIX 5.2. We deployed it on 10gAS for Windows 9.4.0.0 and 9.0.4.0.1, and on 10gAS 9.0.4.0.0 for Linux, without any trouble (installed ADF runtime, etc.).
    Application architecture is JSP/Struts/ADF BC4J. We used JHeadstart 10g framework.
    As soon as we start the application, we get the message described bellow. We saw that J2SE version, shipped with the AS is 1.4.1? On all the other AS versions, and in embedded JDeveloper OC4J is 1.4.2.
    We also use the Xerces library xercesImpl.jar, which is located in .../WEB-INF/lib directory (which contains SaxParser implementation), if that is important. But the application fails right on the beginning.
    The complete error message follows:
    javax.xml.parsers.FactoryConfigurationError: Provider null could not be
    instantiated: java.lang.NullPointerException at
    javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:30) at
    org.apache.commons.digester.Digester.getFactory(Digester.java:512) at
    org.apache.commons.digester.Digester.getParser(Digester.java:686) at
    org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) at
    org.apache.commons.digester.Digester.parse(Digester.java:1567) at
    org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433) at
    org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at
    oracle.jheadstart.controller.struts.JhsActionServlet.init(JhsActionServlet.java:219) at
    com.evermind[Oracle Application Server Containers for J2EE 10g
    (9.0.4.0.0)].server.http.HttpApplication.loadServlet(HttpApplication.java:2094)
    at com.evermind[Oracle Application Server Containers for J2EE 10g
    (9.0.4.0.0)].server.http.HttpApplication.findServlet(HttpApplication.java:4523)
    at com.evermind[Oracle Application Server Containers for J2EE 10g
    (9.0.4.0.0)].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2561)
    at com.evermind[Oracle Application Server Containers for J2EE 10g
    (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:640)
    at com.evermind[Oracle Application Server Containers for J2EE 10g
    (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
    at com.evermind[Oracle Application Server Containers for J2EE 10g
    (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
    at com.evermind[Oracle Application Server Containers for J2EE 10g
    (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:568)
    Any information would be helpful,
    Vladimir,
    MAOP d.o.o., Slovenia

    Figures, I've been fighting with this for the past day and a half and I figure it out shortly after I post the question.
    It turns out the tiles.jar that was in our WEB-INF/lib directory was an old one. It looks like the newer struts.jar (from jdeveloper) we're using includes the tiles information. Once I removed tiles.jar, commons-dbcp, pool, resources, and services, it works now.
    It looks like jdeveloper overwrites most of those files with it's built in struts integration, and we've just been lucky before that struts.jar was being loaded before tiles.jar and something with oas 10.1.3 is loading the jars in a different order--but I'm just guessing here.

  • Web Dynpro API directly from within a J2EE application

    hello,
    Can we call webdynpro API directly from a J2EE application.
    If it is possible, what all will be required at compile time and runtime.
    Please advice, If an additional configuration is also required.
    Thanks in advance
    Mona

    Hi,
    Check the below link u will get an idea...
    Configuration about J2EE engine
    http://help.sap.com/saphelp_nw70/helpdata/en/a6/6980424dd7d665e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/4a/b62640632cec01e10000000a155106/frameset.htm
    Sample applications,
    http://help.sap.com/saphelp_nw70/helpdata/en/f6/4345e8238fcd418197d6692e59d673/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/f6/baba3eb645dc61e10000000a114084/frameset.htm

  • Error while running a J2EE application on Oracle10gAS

    Hi,
    I am receiving an error when trying to run a J2EE application on Oracle10gAS. The application runs successfully on Oracle9iAS, but throws the following exception on 10g application server:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>com.evermind.server.rmi.OrionRemoteException: Error in createInstance(): null; nested exception is: java.lang.NoClassDefFoundError</faultstring>
    <faultactor>/STAR-TicketBroker-context-root/TicketBrokerWS</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Does anyone have any idea why I would be receiving this
    error? We are using Session EJBs in our J2EE application. Are there any changes needed in the code in order to migrate a J2EE application from 9i to 10g ???
    Please help.
    Thanks,
    -Prashant

    Hi Somil,
    I've just had this same error message, and it was because I had a bogus character in my JSP sources.  I'd cut-and-pasted the text from a Word document, and it included the "registered trademark" sign (an R in a circle) as a single character.  This worked in my test environment, but not in my production environment (where presumably the default encoding is different).  I replaced the character with the equivalent HTML entity &amp;reg; (ie. the five characters & r e g ; ) and it all worked.
    Have a look through the offending JSPs and see whether you have any characters that might be incompatible with your default encoding (anything that isn't plain old 7-bit ASCII is potentially a problem).  Change them to HTML entities and you should be fine.
    Hope this helps,
    Richie

  • SSO to J2EE application from SAP Portal

    Hi
    I am trying to do SSO from SAP Portal to a J2EE engine which runs on SAP Web AS.
    Here are my queries
    1. When I deploy a J2EE application on Web AS , I dont get any login screen. How can I make sure that if a user wants to access this J2EE application he should get a login screen and provide his login credentials first, only then would he be able to access the J2EE application.
    2.When I am done with Part 1. If a user tries to access this J2EE application from the Portal (asuming the user Id's in Portal and J2EE application are same and both are in the same domain) , I should not get any login screen and should be able to view the J2EE application.
    3.I want to use SAP Logon tickets generated by the Portal to enable SSO.
    I have done all the necessary configurations in the J2EE server.
    1. Imported the Portal's verify.der certificate.
    2. Adjusted the login modules stack for the application accordingly.
    Can anyone please help me out with this or throw some light.
    Please help.
    Thanks in advance,
    Vivek
    PS - Points will be definitely rewarded

    Hi Vivek,
    Let me give you the solution for both questions differently.
    <b>Ques 1. When I deploy a J2EE application on Web AS , I dont get any login screen. How can I make sure that if a user wants to access this J2EE application he should get a login screen and provide his login credentials first, only then would he be able to access the J2EE application.</b>
    <b>Ans:</b> For doing this in the code of your J2EE application you have to write a if statement which will check if the user ID is coming from the backend or not. If yes then you display that logon page else you just pass that username which is coming from backend and displ;ay the page accordingly.
    <b>Ques 2.When I am done with Part 1. If a user tries to access this J2EE application from the Portal (asuming the user Id's in Portal and J2EE application are same and both are in the same domain) , I should not get any login screen and should be able to view the J2EE application.</b>
    <b>Ans:</b> Yes, this is what I am explaining you. Even I had also made same kind of J2EE application in which if the user is coming from the backend then he/she will look the J2EE screen else if the username is not coming then he will se the Login screen. Exactly same as what are looking for.
    <b>3.I want to use SAP Logon tickets generated by the Portal to enable SSO.</b>
    <b>Ans:</b> I have used User Mapping instead of SAP Logon ticket. Well that is also the option for SSO but personally I think User Mapping is easy and better way for implementing SSO.
    I dont know whether this will help you or not. Please let me know. I can definately help if you want to implement SSO using User Maping.
    Regards
    Pravesh
    PS: Please dont forget to reward points.

  • SSO:Portal to J2EE Application

    Hi all,
    I have developed a simple java application that has user-id & password textboxes along with a submit button.(login.jsp)
    this is deployed as an iView in the server.
    When the submit button is clicked,it navigates 2 another JSP page(welcome.jsp) that displays the user's name if the id and passowrd matches with that present in the backend DB.
    I want 2 display this welcome page directly without prompting for a logon frm the user.
    How can i do this with AppIntegrator?I referd the following <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=95024">thread</a>I cant find the system uri,in the source code of the application!
    How should i proceed further?
    Thanks in advance.
    anticipating replies
    SwarnaDeepika

    Hi Swarna,
    Kindly try these steps..I have accumulated the points as per the discussions on mail.
    Just try all these steps..
    1) I hope you have created a J2EE application which has its own data source (i.e: tables in the Data Dictionary which has enteries for user and Password).
    2) Create a HTTP system for usermapping.
    3) After that perform all the steps as mentioned in the WebLog for the <b>App integrator</b>. (i.e: do the user mapping to the system by providing the User name and password.)
    4) In the J2EE Application write the code that If that username which you got from the URL and the userName in your data source is same then show him the main page directly, else show him the Login Page.
    5) Create a URL View in which you can put your application. Set the <b>admin,u</b>ser property from the User Management.
    I hope all these will solve your problem!! Kinldy check this!!
    Regards
    Pravesh

  • Unable to connect to the OracleForms application through a J2EE application

    Hi there,
    I have deployed a custom J2EE application in Middleware instance of my Oracle 10g AS 10.1.2
    The application is sso enabled . Once a user logs in the application he is able to see a jsp in which i display hyperlinks for him to access.
    One of these hyperlinks is pointing to the forms application.
    the url is http://psc-pc0592:7778/forms/frmservlet?config=abs_deploy[b]
    Once i click on the URL the forms applet begins to load but as the applet opens up i get the database logon screen.This should not happen
    I am already logged and have been verified by sso.
    Also the forms configuration is associated with a datasource.
    I am not able to get as to why i get that screen when it shoud directly connect to the forms application.
    Any help on this is appreciated.
    Thanks & Regards,
    Madhur Pant

    when you go through your carrier provider, there is an additional step in the SSL tunnel. Not sure how this transcribes, but it is possible that your carrier does not use the same port as the one you want it to use.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • J2EE application access from Portal - P4ObjectBroker

    hey all,
    I want to access access a J2EE application (Web Service) from a Portal Component. The documentation at http://help.sap.com/saphelp_nw04/helpdata/en/c0/a584409db95537e10000000a1550b0/content.htm shows an example.
    They import the package <b>com.sap.engine.services.rmi_p4.P4ObjectBroker</b>. I cannot find the package on my system, i.e. my local portal installation.
    Does anybody know what kind of package is required, or where I can find this package...
    many thanks in advance
    cheers Sascha

    Hey Sascha,
    the P4ObjectBroker is part of the implementation of the P4 Provider Service on the J2EE Engine. It is part of the com.sap.engine.services.rmi_p4 package.
    If you can't find it I recommend you to search it using ClassLocator, it is a plugin that indexes all your packages and locates the propar class for you.
    You can download it at this link: http://sourceforge.net/projects/classlocator
    Read the instructions of how to use it with the NWDS, it is really simple. If you need more help do tell me.
    Regards,
    Roy

  • How to access a Portal User Info from a J2EE application?

    Hi,
    I have deployed a j2ee application in portal and its running fine.
    from that application i need to assign some roles to some users.i have the user id.
    so my doubt is can i access the portal user info from this j2ee application?i have some servlets in the j2ee application....can i get the portal user info from this servlet?
    plz help me
    regards,
    Visweswar

    Hi,
    Please check out this to get the portal user information from Java -
    WdClientUser class/Interface to aciehve this.
    Please check out these links on the same -
    WDClientUser.getClientUser IUser
    help needed
    Regards
    Lekha

Maybe you are looking for

  • How can I avoid firefox resetting my browser preferences when my antivirus software scans my computer

    Starting on 2/19/2013 each time my antivirus software scans my computer (Daily), various Firefox browser preferences are being reset. (It appears Firefox may be being reset to default.) My home page is being reset to mozilla etc... I have reset Firef

  • MX02 or MX02 mini

    I need to do some color correction on a few short films, mostly for film festivals. I've explained to the producer that I would need more than my MBP screen to monitor properly. She said "What do you need to get?" My understanding is that the MX02 mi

  • [CC] Search&Replace: Bug only with Regular Expressions

    Can you confirm the following behaviour/bug? Steps to reproduce: 1 Create a new document in DW CC 2 Enter that text in the source code view: <p>€</p> 3 Open Search&Replace Field Search in: Current document Field Search: Text Field Search (3rd Field):

  • How to suppress License Information for multiple logon screen?

    Hi, While LOGIN we will get "License Information for multiple logon screen" will displayed. How to suppress that screen. Regards, Bala

  • PC-UI screen

    Dear CRM gurus, Can you please explain me: (1) Using CRM 4.0 can I use PC-UI for CRM sales scenario.  If so, how?  Can you give me step by step procedures (2) Does it need any additional software installed? (3) With just SAP CRM 4.0, can't I work wit