Entity Bean EJB 2.0 Deployment error
Hi !!!
I am new in EJB .
I have developed an Entity Bean (EJB 2.0) and using IDE MyEclipse and JBoss Server.
while I deploying the Application I getting the following Exceptions :
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:service=EjbModule,module=EntityExample.jar
State: FAILED
Reason: org.jboss.deployment.DeploymentException: No abstract accessors for field named 'id' found in entity class account.AccountEJB
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:service=EjbModule,module=EntityExample.jar
State: FAILED
Reason: org.jboss.deployment.DeploymentException: No abstract accessors for field named 'id' found in entity class account.AccountEJB
can any one give suggetion on it what i am doing incorrect.
thanks in Advance
There should be some error in looking up the Jndi..
In weblogic server I have been using the following code:
try
Context ctx = getContext.getInitialContext();
HelloHome home = (HelloHome)ctx.lookup("MyHello");
Hello hello = home.create();
System.out.println(hello.display());
catch(Exception e)
System.out.println("Error :");
e.printStackTrace();
static String user = null;
static String password = null;
static String url = "t3://localhost:7001";
* Gets an initial context.
* @return Context
* @exception java.lang.Exception if there is
* an error in getting a Context
static public Context getInitialContext() throws Exception
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, url);
if (user != null)
System.out.println ("user: " + user);
p.put(Context.SECURITY_PRINCIPAL, user);
if (password == null)
password = "";
p.put(Context.SECURITY_CREDENTIALS, password);
return new InitialContext(p);
this works fine in weblogic..
also check if ur classpath is ok..
Similar Messages
-
Entity bean connection with SQL Server Error! urgent
Hi,
I am working with J2EE tutorial and when i tried SavingsAccount Entity bean to connect with SQL Server 2000(other than default Cloudscape)and I'm also having SQL Server 2K JDBC Driver installed. I also made entries in Server Configuration menu of J2EE deployment tool for this MS JDBC Driver for SQL Server 2K,I will enclose my dbName and connection method in the entity bean , but i am getting error like this.
my data base name in SQL Server 2K is 'rajeshrNew'.
private String dbName="java:comp/env/jdbc/rajeshrNew"; //dbName
private void makeConnection() throws NamingException, SQLException {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
con = ds.getConnection();
and errors receiving are:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to connect to database. No suitable driver; nested exception is:
javax.ejb.EJBException: Unable to connect to database. No suitable driver
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to connect to database. No suitable driver; nested exception is:
javax.ejb.EJBException: Unable to connect to database. No suitable driver
javax.ejb.EJBException: Unable to connect to database. No suitable driver <<no stack trace available>>
Please help me to resolve this problem!!
Regards
Rajesh Ryes i do create System DSN with rajeshrNew and my default.properties file look like this..
# maximum size of message driven bean instance
# pool per mdb type
messagebean.pool.size=3
# maximum size of a "bulk" message bean delivery
messagebean.max.serversessionmsgs=1
# message-bean container resource cleanup interval
messagebean.cleanup.interval=600
passivation.threshold.memory=128000000
idle.resource.threshold=600
log.directory=logs
log.output.file=output.log
log.error.file=error.log
log.event.file=event.log
distributed.transaction.recovery=false
transaction.timeout=0
transaction.nonXA.optimization=true
sessionbean.timeout=0
# validating parser values
# validating.perser is used when archive file are loaded by
# any of the J2EE Reference Implementation tools.
# deployment.validating.parser is used when deploying an
# archive on the J2EE AppServer.
validating.parser=false
deployment.validating.parser=true
now u tell me what i have to change..
with regards
Rajesh -
Insert data into table from JSP page using Entity Beans(EJB 3.0)
I want to insert data into a database table from JSP page using Entity Beans(EJB 3.0).
1. I have a table 'FRIENDS', (in Oracle 10g database).
2. It has two columns, 'NAME' and 'CITY'. Both have datatype strings(varchar2).
3. Now from a JSP page, having two textfields, 'NAME' and 'CITY', I want to insert data into table 'FRIENDS'.
4. In between JSP and database is a Entity Bean(EJB 3.0) and a stateless session bean.
5. I am using JDev as editor.
Please provide me code ASAP or link with similar example.
Thank you.
AnuragHi,
I am also trying that scenario. So u can
Post the jsp form data to a Servlet which will act as a Controller.
In the servlet invoke the business method.
Similar kind of app is in www.roseindia.net
Hope this would help u.
Meanwhile if u get any optimal solution, pls post it.
Thanks,
Happy Java Coding. -
Error while using sybase trigger with the CMP entity bean,ejb version 2.1
Hi All,
I am using ejb version 2.1 and using entity bean (Transaction required) ,i am trying to update data in sybase(ver 12.3) database table
I am using session bean(Transaction required) to update the multiple entity beans in a while loop.It is working fine .But when i am trying to run it with the trigger which updates multiple tables in different sybase databases on update of each entity.Then it throws NoSuchEntityException and it rollback the whole transaction.
My trigger has only few simple update statements and the trigger runs fine without my CMP entity bean.is the CMP does not support the update triggers in sybase or is it the problem with the transaction.
Please help
Thanks
AnshuIf you can have a look at a cmp example in the samples that ship with the server. My guess is that the weblogic-ejb-jar.xml file is missing the <persistence-use> element which for 810 would look like:
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
I seem to recall that the elements might be slightly different in structure for the wls700 version of the DTD, so please check that (I cannot, I'm at home and don't have everything here).
Give that a try and see if it doesn't solve your compilation failure.
Also, the compilation should not be throwing a null pointer exception in a case like that, I consider that to be a bug.
-thorick -
Hello, we were forwarded to this forum from TAR section of Metalink. We are facing a problem with JDev-RC2/OC4J-9.0.3 and seems that we are hitting Bug 2276197. The BUG is marked as internal and therefore we can't see it. So, it's not clear where the problem is, if in JDev or OC4J or both ?
Testcase Step-by-step:
1. Invoke JDeveloper 9.0.3.815
2. Create a workspace & a project.
3. Create an default Container-managed Entity Beans frim Tables.
4. Create Sample Java Client with "Connect to OC4J Embedded in Jdeveloper" and run it, it gives above error.
You can download a testcase that is part of TAR-2125538.995, that we opened on Metalink.
Please help. Thanks in advance.Hi Radim,
Personally, I have played a little with JDeveloper, but I am not
actively using it for my development -- I prefer to do most things
myself. True, the JDeveloper wizards do a lot of the work for you,
but at least (with my way), when something goes wrong, I have a
better idea of where to look.
So I can't help you much on the JDeveloper side, but an app is an
app regardless of how you develop it, so I'll offer a list of things
to check (just in case you haven't already done so :-).
I haven't looked at your test case, but from your description, I
assume you have a standalone java client. Again, I assume JDeveloper
handles the details for you (and it may be doing it wrong -- as
you suggest), but the way you do your JNDI lookup depends on the
type of client you use. For a standalone java client (that is also
deployed to OC4J), your "initial context factory" class should be:
com.evermind.server.ApplicationClientInitialContextFactory
and your "provider URL" should be:
ormi://<host>/<app-name>
where <host> is the name of the computer where OC4J is running
(you can also use "localhost") and <app-name> is the name given
to your application at deployment time. Again, JDeveloper handles
the deployment, but the "app-name" should also appear in the
"server.xml" configuration file which is usually located in the
"config" subdirectory of the OC4J home directory.
The lookup string for your entity bean should be the "logical"
name, meaning the name of your bean prefixed with "java:comp/env".
Again, I guess JDeveloper handles the bean name part for you,
but the bean name appears in the "ejb-jar.xml" file under the
"ejb-name" element.
So if you've already checked all of the above, then please excuse
me for not telling you anything you don't already know.
Good Luck,
Avi. -
Example of client/servelt calling an Entity Bean(EJB 2.0)
Hi !!
Can somebody give any code of servlet or client calling an entity bean...please give any sample code... I am getting error while calling an entity bean in Servlet....
It says that the Jndi name not found
SERVLET CODE----------
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import sfms.mtk.*;
import sfms.sec.*;
import java.util.*;
public class TestServletExample extends HttpServlet
SecDbSecUserHome home;
public void init(ServletConfig config)throws ServletException{
//Look up home interface
try
Properties props = new Properties();
System.out.println("Looking for Jndi ----->>");
InitialContext ctx = new javax.naming.InitialContext();
home = (SecDbSecUserHome)javax.rmi.PortableRemoteObject.narrow(ctx.lookup("SecUserJndi"), SecDbSecUserHome.class);
System.out.println("Lookup is over ----->>");
catch (Exception NamingException)
NamingException.printStackTrace();
public void doGet (HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException
MTKDataObject objDataObject = null;
PrintWriter out;
response.setContentType("text/html");
String title = "EJB Example";
out = response.getWriter();
out.println("<HTML><HEAD><TITLE>");
out.println(title);
out.println("</TITLE></HEAD><BODY>");
try
System.out.println("*************STARTING NOW*************");
Collection coll = home.findAllUsers();
Iterator i =coll.iterator();
while(i.hasNext())
SecDbSecUserRemote remote = (SecDbSecUserRemote)i.next();
System.out.println("User ID "+remote.getUserId());
System.out.println("FirstName "+remote.getFirstName());
catch(Exception CreateException)
CreateException.printStackTrace();
out.close();
public void destroy()
System.out.println("Destroy");
javax.naming.NameNotFoundException: SecUserJndi not found
<<no stack trace available>>
*************STARTING NOW*************
java.lang.NullPointerException
at TestServletExample.doGet(TestServletExample.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)
PLEASE DO REPLY ME BACK (ASAP)
BhumikaThere should be some error in looking up the Jndi..
In weblogic server I have been using the following code:
try
Context ctx = getContext.getInitialContext();
HelloHome home = (HelloHome)ctx.lookup("MyHello");
Hello hello = home.create();
System.out.println(hello.display());
catch(Exception e)
System.out.println("Error :");
e.printStackTrace();
static String user = null;
static String password = null;
static String url = "t3://localhost:7001";
* Gets an initial context.
* @return Context
* @exception java.lang.Exception if there is
* an error in getting a Context
static public Context getInitialContext() throws Exception
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, url);
if (user != null)
System.out.println ("user: " + user);
p.put(Context.SECURITY_PRINCIPAL, user);
if (password == null)
password = "";
p.put(Context.SECURITY_CREDENTIALS, password);
return new InitialContext(p);
this works fine in weblogic..
also check if ur classpath is ok.. -
Entity beans(EJB 3.0) replication in IAS 10.1.3
Hi,
I have a application with webservices, having a few stateless session beans and a few entity beans. The application has to be deployed in a grid environment, on 2 machines.
My problem is that a change in an entity needs to be replicated on both machines. Right now, with the application deployed on 2 machines, in a load balanced non-cluster environment, I have stale data. I have reviewed the option of cache coordination, but the toplink essentials don't have this feature.
As a temp solution, one of the machines was stopped. Another option is to disable the entity beans cache completely, but that's not what I'm looking for.
I have done some digging in the documentation, and it's clear that stateful beans can be replicated in a clustered environment. In this configuration, are the entity beans replicated too?Thanks for your reply. I'm actually interested in the entities, not the web session. I need to make sure that the entities cache stays synchronized between the nodes.
Example:
I have entity "customer" for example.. I do an update from one of the nodes, changing the customer name, and do commit. This happens in node 1. I want to make sure that the node 2 knows this happened. -
Bean Managed Entity Beans(EJB) using Tangosol.
I am trying to use Bean Managed Entity Beans using Tangosol Coherence.
The entity bean is currently configured in the weblogic-ejb-jar.xml with:
<max-beans-in-cache>200</max-beans-in-cache>
In the public void ejbLoad() method, I am calling the Tangosol Cache to load the entity bean.
If we have have more that 200 request coming at the same time, we get an OutOfMemoryError exception.
Is there anyway to overcome this limitation by somehow having the ejb cache to use the tangosol cache?
Thanks for any help in advance.
KrishanSo far, it's not immediately obvious to us what the exact problem is that you are seeing. It sounds like the VM would be using at least 200MB just for the application server's own internal cache, for example, and that you are also using Coherence within the application server to provide additional caching.
If possible, we should set up a phone call with you and your team, and we could get an engineer from our end to walk through your specific use case with you, so that we could understand what the exact technical challenge(s) is(are) in this particular application.
Peace.
p.s. You can email [email protected] directly to schedule a call. -
Max number of entity beans that can be deployed
We deploy one EAR file in Oracle 9i Application Server using OC4J_home of Oracle Enterprise Manager Website. When we deployed it takes only 25 entity beans.
Our Application contains 27 Entity beans. Is there any settings regarding maximum entity beans. How can I change the default settings for the entity beans.'I had this same problem before. If you enlarge the initial heap size you should be ok. Just set your java-options to a value of "-Xmx512M" or whatever you choose. Hope this helps!
-
ACME Video EJB Oracle 8i deployment error.
An error occurs while stub compilation.
Tested using both 1.1.8 and 1.2.2 versions.
How can I solve this?
Thanks,
Sean
AppAccelerator(tm) 1.1.8 for Java (JDK 1.1), x86 version.
Copyright (c) 1997-1998 Borland International. All Rights
Reserved.
Copyright (c) 1997-1999 Oracle Corporation. All Rights Reserved.
Reading Deployment Descriptor...done
Verifying Deployment Descriptor...done
Gathering users...done
Generating Comm
Stubs.............................................done
Compiling Stubs...Errors compiling the communication stubs
AppAccelerator(tm) 1.1.8 for Java (JDK 1.1), x86 version.
Copyright (c) 1997-1998 Borland International. All Rights
Reserved.
Copyright (c) 1997-1999 Oracle Corporation. All Rights Reserved.
java.lang.NoClassDefFoundError: java/util/ArrayList
at sun.tools.util.CommandLine.parse
(CommandLine.java:42)
at sun.tools.javac.Main.compile(Compiled Code)
at sun.tools.javac.Main.main(Compiled Code)
*** Errors occurred while deploying the EJB to JServer ***
*** Deployment completed ***
nullWhen I add java 1.2 rt.jar to library list of deployment, this
problem can be solved.
However, then, insufficient privelege error occurs when
deployment program seems to try to load rt.jar file to the
Oralce 8i JServer.
How should I configure environment to make ACME video EJB sample
to run?
Thanks,
Sean
Sean (guest) wrote:
: An error occurs while stub compilation.
: Tested using both 1.1.8 and 1.2.2 versions.
: How can I solve this?
: Thanks,
: Sean
: AppAccelerator(tm) 1.1.8 for Java (JDK 1.1), x86 version.
: Copyright (c) 1997-1998 Borland International. All Rights
: Reserved.
: Copyright (c) 1997-1999 Oracle Corporation. All Rights
Reserved.
: Reading Deployment Descriptor...done
: Verifying Deployment Descriptor...done
: Gathering users...done
: Generating Comm
: Stubs.............................................done
: Compiling Stubs...Errors compiling the communication stubs
: AppAccelerator(tm) 1.1.8 for Java (JDK 1.1), x86 version.
: Copyright (c) 1997-1998 Borland International. All Rights
: Reserved.
: Copyright (c) 1997-1999 Oracle Corporation. All Rights
Reserved.
: java.lang.NoClassDefFoundError: java/util/ArrayList
: at sun.tools.util.CommandLine.parse
: (CommandLine.java:42)
: at sun.tools.javac.Main.compile(Compiled Code)
: at sun.tools.javac.Main.main(Compiled Code)
: *** Errors occurred while deploying the EJB to JServer ***
: *** Deployment completed ***
null -
Entity bean (ejb 3.0) refactoring problem
I didn't find a better method than regenerating an entity bean after modifying the table definition and renaming the class after deleting the old one.
I'm not sure i can delete the old class representing the entity bean before regenerating it without any effects into the others entity beans.
It work fine but still a little problem. The refactoring process didn't change the name of the entity bean into the select clauses into queynamed injection.I am facing a similar problem. Does JDeveloper 10g (10.1.3.3.0) provide an automatic process to update an Entity Bean definition when the underlying database table definition changes?
I also noticed that for JDeveloper to create all the relationships (i.e. @OneToMany, @ManyToOne) between multiple Entity beans, I need to create all the Entity beans together in one pass using the wizard. If two entities depend on each other, and not created together, JDeveloper will not create the relationships between them. Is there a way around that?
Thank you -
Netbeans 6.9 Glassfish server 3 EJB application client deployment error
I have an example that I downloaded from the Netbeans docs and whenever I try to run it on my machine, the application client that is supposed to print out a hello message gives me the following error.
post-dist:
dist-directory-deploy:
pre-run-deploy:
Initial deploying EntAppClient to D:\SCT400\LIFESPRING EE\EntAppClient\dist\gfdeploy\EntAppClient
Completed initial distribution of EntAppClient
deploy?path=D:\SCT400\LIFESPRING EE\EntAppClient\dist\gfdeploy\EntAppClient&name=EntAppClient&force=true failed on GlassFish Server 3
D:\SCT400\LIFESPRING EE\EntAppClient\nbproject\build-impl.xml:257: The module has not been deployed.
BUILD FAILED (total time: 1 second)
The full example of the project is found in the following url [Netbeans project|http://netbeans.org/kb/docs/javaee/javaee-gettingstarted.htm]
my JDK is 6 update 21 and I'm using Java EE6. Help me through this because my project is anchored on being distributed and I cannot proceed until I get this right.I got the same problem, the error log detail is below, I have checked the gf-client.jar, it is right in the folder.
SEVERE: Exception while loading the app
java.lang.RuntimeException: java.io.FileNotFoundException: C:\Program%20Files\glassfish-3.0.1\glassfish\modules\gf-client.jar (The system cannot find the path specified)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo$1.run(JavaWebStartInfo.java:259)
at org.glassfish.appclient.server.core.jws.JavaWebStartState.transition(JavaWebStartState.java:84)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.start(JavaWebStartInfo.java:253)
at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:134)
at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:126)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: C:\Program%20Files\glassfish-3.0.1\glassfish\modules\gf-client.jar (The system cannot find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:133)
at java.util.jar.JarFile.<init>(JarFile.java:97)
at org.glassfish.appclient.server.core.jws.JWSAdapterManager.getGFClientModuleClassPath(JWSAdapterManager.java:612)
at org.glassfish.appclient.server.core.jws.JWSAdapterManager.addStaticSystemContent(JWSAdapterManager.java:243)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.addSignedSystemContent(JavaWebStartInfo.java:497)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.initClientStaticContent(JavaWebStartInfo.java:478)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.addClientContentToHTTPAdapters(JavaWebStartInfo.java:420)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.startJWSServices(JavaWebStartInfo.java:312)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.access$100(JavaWebStartInfo.java:96)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo$1.run(JavaWebStartInfo.java:257)
... 35 more
WARNING: Exception while cleaning module 'org.glassfish.internal.data.EngineRef@f185b0'java.lang.NullPointerException
java.lang.NullPointerException
at org.glassfish.appclient.server.core.AppClientDeployer.clean(AppClientDeployer.java:265)
at org.glassfish.internal.data.EngineInfo.clean(EngineInfo.java:114)
at org.glassfish.internal.data.EngineRef.clean(EngineRef.java:171)
at com.sun.enterprise.v3.server.ApplicationLifecycle$1.actOn(ApplicaPEa�POST /forums/post!post.jspa?forumID=972, I got the same problem, the error log detail is below, I have checked the gf-client.jar, it is right in the folder.
SEVERE: Exception while loading the app
java.lang.RuntimeException: java.io.FileNotFoundException: C:\Program%20Files\glassfish-3.0.1\glassfish\modules\gf-client.jar (The system cannot find the path specified)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo$1.run(JavaWebStartInfo.java:259)
at org.glassfish.appclient.server.core.jws.JavaWebStartState.transition(JavaWebStartState.java:84)
at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.start(JavaWebStartInfo.java:253)
at org.glassfish.appclient.server.core.AppClientServerApplication.start( -
Error in deploying entity beans - migration from JBoss to Weblogic 10.3.4
Hi,
I am migrating EJB2.x code from JBoss to Weblogic 10.3.4. As a first step, I am tyring to deploy just Entity beans. I get following error when deploying to server.
'weblogic.application.ModuleException: Exception preparing module: EJBModule(myEJB.jar)
Unable to deploy EJB: CollMetaData from myEJB.jar:
[EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
There are 1 nested errors:
java.lang.NullPointerException
at weblogic.ejb.container.cmp.rdbms.finders.EjbqlFinder.setMethods(EjbqlFinder.java:288)
at weblogic.ejb.container.cmp.rdbms.Deployer.processFinders(Deployer.java:744)
at weblogic.ejb.container.cmp.rdbms.Deployer.readTypeSpecificData(Deployer.java:446)
at weblogic.ejb.container.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.java:506)
at weblogic.ejb.container.persistence.PersistenceType.setupDeployer(PersistenceType.java:455)
at weblogic.ejb.container.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:118)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1214)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:442)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Can someone help me fixing the issue?
I changed schema locations of descriptor files as suggested at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13706/overview.htm#i1074199 (see the third category for '*Enterprise Bean 2.1*' in the listing Table 1-1). Alternatively, you may see the schema locations for EJB2.0 directly at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13719/dd_reference.htm#EJBPG481JRE version in JBoss is 1.6.0_16. JVM in web logic is pointing to jrockit_160_22_D1.1.1-3 which is come in the package. It doesn't seem to be related to JVM version mismatch.
I think it is an issue with definitions in weblogic-cmp-rdbms-jar.xml file. How should be the definition of entity-descriptor appear for entity bean which has finder methods in ejb-jar.xml?
Please see the snippets from corresponding descriptor files below.
ejb-jar.xml
=========
<entity>
<display-name>EmpBean</display-name>
<ejb-name>EmpBean</ejb-name>
<local-home>LocalEmpBeanHome</local-home>
<local>LocalEmpBean</local>
<ejb-class>EmpBeanBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>EmpBean</abstract-schema-name>
<cmp-field>
<field-name>firstName</field-name>
</cmp-field>
<cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<cmp-field>
<field-name>phone</field-name>
</cmp-field>
<cmp-field>
<field-name>address</field-name>
</cmp-field>
<primkey-field>lastName</primkey-field>
<query>
<query-method>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT Object(o) FROM EmpBean o WHERE o.lastName= ?1</ejb-ql>
</query>
</entity>
weblogic-jar.xml
============
<weblogic-enterprise-bean>
<ejb-name>EmpBean</ejb-name>
<entity-descriptor>
<pool>
<max-beans-in-free-pool>20</max-beans-in-free-pool>
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
</pool>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>meta-inf/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
<finders-load-bean>true</finders-load-bean>
</persistence>
</entity-descriptor>
<local-jndi-name>ejb/EmpBean</local-jndi-name>
</weblogic-enterprise-bean>
weblogic-cmp-rdbms-jar.xml
====================
<weblogic-rdbms-bean>
<ejb-name>EmpBean</ejb-name>
<data-source-jndi-name>mysqlDS</data-source-jndi-name>
<table-map>
<table-name>emp</table-name>
<field-map>
<cmp-field>firstName</cmp-field>
<dbms-column>first_namel</dbms-column>
</field-map>
<field-map>
<cmp-field>lastName</cmp-field>
<dbms-column>last_name</dbms-column>
</field-map>
<field-map>
<cmp-field>phone</cmp-field>
<dbms-column>phone</dbms-column>
</field-map>
<field-map>
<cmp-field>address</cmp-field>
<dbms-column>address</dbms-column>
</field-map>
</table-map>
<weblogic-rdbms-bean>
Please ignore any typos that you may notice in above sample descriptions (because I just typed it here changing original names).
When I try to deploy the application, I get error message as posted in my first post above in this thread. Please correct me if I am making any erros in descriptor files.
Edited by: 839281 on Feb 25, 2011 10:55 AM
Edited by: venkatp on Mar 1, 2011 9:31 AM -
Exception while accessing deployed entity bean (CMP)
Hi
PSB for the exception i get when i try to access a delpoyed entity bean
(CMP).
If any of you have got this exception and fixed it or have any idea of how
to fix it then please reply asap.
thanks.
java.lang.NullPointerException
at
com.netscape.server.deployment.PersistenceDeploymentDescriptorImpl.getBeanPr
operty(Unk
n Source)
at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:357)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
[04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
com.netscape.server.ejb.PersistenceException
at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:357)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
got the Entity bean found ***************
got the Entity bean***************
[04/Dec/2001 11:16:51:8] error: EBFP-marshal_internal: internal exception
caught in kcp skeleton,
ception = java.lang.NullPointerException
[04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:321)
at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
Source)
at
com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
own Source
at
com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
Source)
at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
Source)
at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
at
samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
ByPrimaryK
ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
at
samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
s_test_ejb
tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
stubTest
ityHome.java:338)
at
samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
stEntityHo
java:85)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
I could not find the Entity bean
java.rmi.RemoteException: internal error; nested exception is:
java.lang.NullPointerException
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:321)
at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
Source)
at
com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
own Source
at
com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
Source)
at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
Source)
at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
at
samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
ByPrimaryK
ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
at
samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
s_test_ejb
tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
stubTest
ityHome.java:338)
at
samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
stEntityHo
java:85)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
Regards
Sandhya SeetharamHi,
This seems to be the Hello world EJB application with a small
modification(probably an addition of test directory or a java file). I would
recomend you to go through every line of the document on deploying this
application. There is another posting regarding the same issue in this forum.
Regards
Raj
akhila wrote:
Hi
PSB for the exception i get when i try to access a delpoyed entity bean
(CMP).
If any of you have got this exception and fixed it or have any idea of how
to fix it then please reply asap.
thanks.
java.lang.NullPointerException
at
com.netscape.server.deployment.PersistenceDeploymentDescriptorImpl.getBeanPr
operty(Unk
n Source)
at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:357)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
[04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
com.netscape.server.ejb.PersistenceException
at com.netscape.server.ejb.SQLPersistenceManager.init(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.addHome(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initMeta(Unknown Source)
at com.kivasoft.eb.EBHomeBase.initTransport(Unknown Source)
at com.kivasoft.eb.EBActivatorCB.getEBHomenative(Native Method)
at com.kivasoft.eb.EBActivatorCB.getEBHome(Unknown Source)
at com.netscape.server.ejb.EjbContext.createHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.getHomeRef(Unknown Source)
at com.netscape.server.ejb.EjbContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at com.netscape.server.jndi.RootContext.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:357)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:45)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
got the Entity bean found ***************
got the Entity bean***************
[04/Dec/2001 11:16:51:8] error: EBFP-marshal_internal: internal exception
caught in kcp skeleton,
ception = java.lang.NullPointerException
[04/Dec/2001 11:16:51:8] error: Exception Stack Trace:
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:321)
at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
Source)
at
com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
own Source
at
com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
Source)
at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
Source)
at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
at
samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
ByPrimaryK
ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
at
samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
s_test_ejb
tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
stubTest
ityHome.java:338)
at
samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
stEntityHo
java:85)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
I could not find the Entity bean
java.rmi.RemoteException: internal error; nested exception is:
java.lang.NullPointerException
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:321)
at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown
Source)
at
com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
Source)
at
com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unkn
own Source
at
com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
Source)
at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown
Source)
at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
at
samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.find
ByPrimaryK
ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
at
samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__sample
s_test_ejb
tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp
stubTest
ityHome.java:338)
at
samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_Te
stEntityHo
java:85)
at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
at java.lang.reflect.Method.invoke(Native Method)
at
samples.test.ejb.ejb_skel_samples_test_ejb_TestEJB.getGreeting(ejb_skel_samp
les_test_e
TestEJB.java:80)
at
samples.test.ejb.ejb_kcp_skel_Test.getGreeting__indir_wstring__indir_wstring
(ejb_kcp_s
_Test.java:220)
at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
at
samples.test.ejb.ejb_kcp_stub_Test.getGreeting(ejb_kcp_stub_Test.java:327)
at samples.test.ejb.ejb_stub_Test.getGreeting(ejb_stub_Test.java:71)
at samples.test.servlet.TestServlet.doGet(TestServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
Regards
Sandhya Seetharam -
CMP Entity Bean with ejb-ql finder methods and INFORMIX database
Hi,
I have some CMP Entity Beans with finder methods defined in ejb-ql. In my ejb-jar, within <entity> definitions I have something like:
<entity>
<abstract-schema-name>BeanName</abstract-schema-name>
<cmp-field><field-name>fieldOne</field-name></cmp-field>
<cmp-field><field-name>fieldTwo</field-name></cmp-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>SELECT OBJECT(o) FROM BeanName o</ejb-ql>
</query>
<entity>
And in persistent.xml:
<db-properties>
<data-source-name>datasource_name</data-source-name>
</db-properties>
<entity-bean>
<ejb-name>BeanName</ejb-name>
<table-name>table_name</table-name>
<field-map key-type="NoKey">
<field-name>fieldOne</field-name>
<column><column-name>column_one</column-name></column>
</field-map>
<field-map key-type="NoKey">
<field-name>fieldTwo</field-name>
<column><column-name>column_two</column-name></column>
</field-map>
<finder-descriptor>
<method-name>findAll</method-name>
<method-params/>
</finder-descriptor>
Once deployed, on server side, I can found a java source file (with corresponding compiled class file) in path:
j2ee/cluster/server0/apps/companyName/MyEARApp/EJBContainer/temp/temp38837373733/route/to/package/
with names:
BeanName0_0pm.java
BeanName0_0PM.class
and the generated java file contains this code:
public java.util.Enumeration ejbFindAll() throws javax.ejb.FinderException, javax.ejb.EJBException {
TransactionContext tc = pm.getTransactionContext();
Connection conn = null;
PreparedStatement pSt = null;
ResultSet ejb_rs = null;
int status = javax.transaction.xa.XAResource.TMSUCCESS;
try {
conn = pm.getConnectionForFindMethod();
pSt = conn.prepareStatement("SELECT \"O\".\"COLUMN_ONE\",\"O\".\"COLUMN_TWO\", FROM \"TABLE_NAME\" \"O\"");
ejb_rs = pSt.executeQuery();
I'm trying to call this method but it throws a SQLException when preparing the statement.
It seems that Informix does not like this SQL syntax because of upper case names, doble quotes on table alias, or something else.
When editing persistent.xml in netweaver, I can define the element <datasource-vendor> as ORACLE, SAPDB, MS_SQL_SERVER, DB2_UDB_AS400 or DB2_UDB_OS390 but INFORMIX is not an accepted value.
Is there any way to define how this SQL query is build?
Thanks in advance.The return type of the finder method defined in the remote home interface is either the entity bean's remote interface or a collection of objects implementing the entity bean's remote interface. The return type of the finder method defined in the local home interface is either the entity bean's local interface or a collection of objects implementing the entity bean's local interface
Maybe you are looking for
-
hi there i have some BPs that have more than one address assigned to their page it means that they have two factorys for example how can i get only the first address(only the country) from my BP;s contact card? SELECT T0.[DocNum]'A/R inv', T1.[visord
-
IPhone 3G randomly freezing after 3.1.2 upgrade
I have suffered from 3.1.2 Freezing for many weeks. My wife's iPhone only recently came down with it as well. 1.) Apple, if you are reading this - can you at least acknowledge the problem and that you're working on a fix? This device WAS great but no
-
I recently upgraded to Acrobat Pro 11 and I have been attempting to use the FormsCentral desktop app; however I get a "A connection with the FormsCentral Server could not be established." My office does utilize a proxy server. How would you setup For
-
How to revive a dead 9600/300 and 8500/120 Powermac
I now have a 9600/300 and a 8500/120 Powermac. Both ran perfect when I bought them used for a day after I updated their system software to 8.6 for many hours. After shutting them down both would not restart (completely dead). I did the usual procedur
-
Imovie is very basic - need better software to be more productive
I have Imovie and I wanted to compress some .avi files. I could not import any .avi files. Then I tried to import a .mov file and it seems that the file was too large so I could not import it. I'm trying to compress these files so I can upload them t