This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Amit Chauhan

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

Recent posts by Amit Chauhan

hi all ,
Please can suggest me some good web resource where I can find good programming puzzles or sort of exercises where from I can practice core Java programming ......
Need quick help

Regards
12 years ago
Hi ,
I am badly stuck . I have the system RAM 1 GB and when I start the BPEM server then this is the snapshot of netstat command that I get
***************************************************************************


***************But soon there is error in the BPEL prompt :****************




*********AND then the prompt hangs at this place******************


**At this if I run the BPEL Prompt then this message I get at the explorer Window :*********************




***********At this moment the Netstat command gives this output *********



*********Please can anybody help me figure out this error****************
12 years ago
Hi All,
I am facing a problem in putting a check on a given String whether it is in a valid 12-hour format or not.
for eg the string : 11/22/2007 14:27:00
should say that this is invalid date because there is 14 out there in hour position.
12 years ago
Hi All ,
I am quite new to the jBPM tool and I want to figure out if there is anyway to configure the jbpm tool with a billing application . to be more precise , I want to define the work flow in the jBPM interface and then want my billing app to follow the rules defined at the jBPM interface i.e. how to interconnect the JBPM tool and the billing app.
I am awaiting for a relief soon .Kindly help me figure it out.
Regards
13 years ago
Hi All ,
I am trying to deploy a stateless bean and an entity bean and along with it I am using Hibernate as persistence provider but to my surprise , the code works fine with default data source(the one embedded in JBoss) but when I use the jndi name that I have used with the orcale-ds.xml file (in persistence.xml) file the deployment just throws up this exception and code does not works out . This is the exception that I am getting :



Please can anybody provide me some pointer on this .

Regards....
13 years ago
Hi Sumit ,
Thnaks a lot for the Kind reply . I have already changed the code now as you said .But now there is a different exception thrown up during the deployment :




Do you have any guesses as to why this problem may be cropping up now .......
HI,
I am again so sorry that even with the suggested change the code didnt worked out . It still displays the same error message .

Regards
Hi ,
By default sequence I mean that I have not created it using sql at the database rather I am creating it directly while code .

Here is the entity bean code :



*******The most strange thing is that I find the value of sequence being incremented by 2 and not by 1 .


Kindly help me out .
Hi All ,
I am trying to persist an object and also generating the primary key using a default sequence . But the problem is that the Primary key is getting incremented by 2 instead of 1 . My code looks like this :
----------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------

Please provide me with some pointer as to know where the things are going wrong.
Hi ,
I changed the code as you said but still it throws up the error message as this :






The code for the bean now looks like this :

Code for the Session Bean
Hi All ...
I am getting this exception while deploying an ear which contains a call to the entity bean from a session bean , does anybody have an idea where the things are going wrong :



My code goes like this (I have put it in a servlet) ::











Code to call the beans :
mport java.util.HashMap;

import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;



import src.FirstSession;

public @Stateless class FirstSessionBean implements FirstSession {

@Resource(mappedName="java:/my-ejb-test")
@PersistenceContext(unitName = "testApp")
private EntityManagerFactory emf;


@Resource
@PersistenceContext(unitName="testApp" ,type=PersistenceContextType.EXTENDED)
private EntityManager em;


public String sayHello(String Name, String Age , String Dept) {


try {
//begin the transaction
this.emf =
Persistence.createEntityManagerFactory("testApp",
new HashMap());
javax.persistence.EntityManager em = emf.createEntityManager();
EntityTransaction tx = em.getTransaction();
tx.begin();
em.persist(new Employee(Name , Age , Dept));
tx.commit();
em.close();
// // close the transaction
} catch (RuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Hi All ,
I am using JBOss 4.2.0 server and toplink aling with Oracle 10g to persist the entity bean and on deployment I get this warning :


12:39:16,187 INFO [STDOUT] [TopLink Warning]: 2007.07.05 12:39:16.125--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class src.Employee. The class is ignored.
12:39:16,187 INFO [STDOUT] [TopLink Warning]: 2007.07.05 12:39:16.187--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class src.FirstSessionBean. The class is ignored.


I guess , perhaps because of this problem later on making a call to persist the entities I get this error as :


12:42:35,640 ERROR [STDERR] java.lang.RuntimeException: url = [file:/C:/jboss-4.2.0.GA/server/default/tmp/persist.jar]
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getClassNamesFromURL(PersistenceUnitProcessor.java:272)
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.buildClassSet(PersistenceUnitProcessor.java:181)
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:124)
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:226)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:242)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:278)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:81)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:119)
12:42:36,203 ERROR [STDERR] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
12:42:36,203 ERROR [STDERR] at src.FirstSessionBean.sayHello(FirstSessionBean.java:21)
12:42:36,203 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:42:36,203 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:42:36,203 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:42:36,203 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:79)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:70)
12:42:36,218 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,218 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
12:42:36,218 ERROR [STDERR] at $Proxy71.sayHello(Unknown Source)
12:42:36,218 ERROR [STDERR] at TestServlet.doPost(TestServlet.java:79)
12:42:36,218 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
12:42:36,218 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
12:42:36,218 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
12:42:36,218 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
12:42:36,218 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
12:42:36,218 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)



Please can anybody be kind enough to bring me out of this problem . I am badly stuck.
Hi All ,
I am using ejb3 along with JBoss 4.2.0 , Java5 and Oracle Toplink as the persistence provider and Oracle 10g . After having deployed my datasource successfully , when I deploy my ear file , I get this error :
Please help me out .



11:17:51,078 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=persist.jar
java.lang.RuntimeException: No container configured with name 'Stateless Bean''
at org.jboss.ejb3.Ejb3AnnotationHandler.getStatelessContainer(Ejb3AnnotationHandler.java:249)
at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:145)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:468)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:424)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:405)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:366)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:321)
at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:77)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.create(Unknown Source)
at org.jboss.system.ServiceController.create(ServiceController.java:330)
at org.jboss.system.ServiceController.create(ServiceController.java:273)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy33.create(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:492)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:73)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:959)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)