Java.lang.ExceptionInInitializerError,Could not instantiate TransactionMana

hi all,
<b>i am using SAP Netweaver Developer studio. have problem using hibernate in a EJB Modul Project. i have create a stateless session bean to writie the bussiness logic using my hibernate mapping classes, but somehow i get the error:</b>
Details: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method createPerson.
     at src.ejb.HibernateLocalLocalObjectImpl0.createPerson(HibernateLocalLocalObjectImpl0.java:407)
     at com.servlet.TestServlet.doPost(TestServlet.java:66)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
     at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
     at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
     at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
     at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
Caused by: java.lang.ExceptionInInitializerError
     at src.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:29)
     at src.ejb.HibernateBean.createPerson(HibernateBean.java:158)
     at src.ejb.HibernateLocalLocalObjectImpl0.createPerson(HibernateLocalLocalObjectImpl0.java:391)
     ... 17 more
Caused by: org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup
     at org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(TransactionManagerLookupFactory.java:47)
     at org.hibernate.transaction.JTATransactionFactory.configure(JTATransactionFactory.java:48)
     at org.hibernate.transaction.TransactionFactoryFactory.buildTransactionFactory(TransactionFactoryFactory.java:51)
     at org.hibernate.cfg.SettingsFactory.createTransactionFactory(SettingsFactory.java:401)
     at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:129)
     at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
     at src.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:24)
     ... 19 more
<b>is there  anybody can tell me why i am getting this error? i was sitting in front of the computer for days now, but could find out where i am doing wrong.
i have tested my hibernate classes without session beans(in a normal java Project, every thing works fine. and i tried to do exactly what they have done in the HibernateExampleEHCache examples, to combine my hibernate with session beans together, but couldn't get the programm running.  </b>

Are you sure this is the right value for the class name?
org.hibernate.transaction.SAPWebASTransactionManagerLookup
<b>No, i am not sure. i just copied it from a example. but i think i will not need it. so i have deleted them now.</b>
Looks as well like you have implemented a primary index scheme (next value) that is not supported by your DB ?
See error on DUAL
<b>I just used sequence for the primary key in my Person.hbm.xml.  even i change it to native, it comes back with the same error too.</b>
<b>Person.hbm.xml:</b>
<class name="src.hibernate.Person" table="TMP_PERSON">
<id name="id" column="PERSONID">
<generator class="native"/>
<b>java class:</b>
public class Person {
     private Long id;
                getter and setter
<b>my method in a stateless session bean:</b>
public Long createPerson(
          String surname,
          String firstname,
          String tel,
          String email) {
          Session session = null;
          Transaction tx = null;
          try {
               session = HibernateSessionFactory.openSession();
               tx = session.beginTransaction();
               Person aPerson = new Person();
               aPerson.setSurname(surname);
               aPerson.setFirstname(firstname);
               aPerson.setTelNr(tel);
               aPerson.setEmail(email);
               Long personId = (Long)session.save(aPerson);
               tx.commit();
               return personId;
          } catch (HibernateException e) {
               if (tx != null)
                    tx.rollback();
               throw new HibernateException(e);
          } finally {
               HibernateSessionFactory.closeSession(session);

Similar Messages

  • Java.lang.RuntimeException: Could not find the OffLine WLST class

    Installation of OIM On weblogic.
    oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
    /oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Tried to run this command ./wlst.sh
    shows
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/oracle/weblogic/server/server/bin:/home/oracle/bea/modules/org.apache.ant_1.6.5/bin:/oracle/jdk/jre/bin:/oracle/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/oracle/jdk/bin
    Your environment has been set.
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/oracle/weblogic/server/common/eval/pointbase/lib/pbembedded57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbtools57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbclient57.jar
    Initializing WebLogic Scripting Tool (WLST) ...
    Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class

    try Problem invoking WLST - Could not find the OffLine WLST class the last post on this thread, he claims to solve the problem...

  • OIM Installn :java.lang.RuntimeException: Could not find OffLine WLST class

    Installation of OIM On weblogic.
    oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
    /oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
         at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
         at org.apache.tools.ant.Main.runBuild(Main.java:668)
         at org.apache.tools.ant.Main.startAnt(Main.java:187)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Tried to run this command ./wlst.sh
    shows
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/oracle/weblogic/server/server/bin:/home/oracle/bea/modules/org.apache.ant_1.6.5/bin:/oracle/jdk/jre/bin:/oracle/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/oracle/jdk/bin
    Your environment has been set.
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/oracle/weblogic/server/common/eval/pointbase/lib/pbembedded57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbtools57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbclient57.jar
    Initializing WebLogic Scripting Tool (WLST) ...
    Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class
    Edited by: user10213645 on Mar 9, 2010 3:37 PM

    There is an existing Bug 8431390 - WLST NOT WORKING IF WE USE NON-DEFAULT INSTALLATION (WL_HOME OUTSIDE BEA_HOME)
    As per this bug, the issue can be reproduced as follows:
    Steps to reproduce:
    1. Install WLS 10.3GA (essex) kit in a non-default fashion (WL_HOME outside BEA_HOME)
    2. Go to ur $WL_HOME/common/bin directory and execute wlst.cmd
    3. It exits with the following exception:
    java.lang.RuntimeException:could not find the OffLine WLST class
    Hope this helps.
    For more details, refer: http://idm-oracle.blogspot.com/2010/03/javalangruntimeexception-could-not-find.html

  • Java.lang.Exception: Could not get name for DC project

    Hello Experts,
    We have a code which is downloaded from SVN repository.
    I have imported the code from my desktop into NWDS and when I try to deploy it throws,
    java.lang.Exception: Could not get name for DC project
    I have referred few threads in SCN and solution suggested is to change the workspace and create a new DC & copy the _comp from old DC.
    I tried the above solution but there are lot of build errors as we have few RFC models and it is throwing build errors for missing model reference.
    Kindly help me on how to fix the error.
    Thanks, Swarnaprakash

    Dear Swarnaprakash,
    The Web Dynpro DCs Import C:\----\user\.dtc\LocalDevelopment\DCs\sap.com\test and
    the related package for DC  is missing once check it after try to import.
    Depending on which Java compiler preferences are set, you may see some
    warnings in the "Task" view after importing the project. If the severity level for problems of type "Unused imports" (set in Preferences – Java – Compiler) has the value "Warning", the compiler will issue a warning for unused import references. Ignore these warnings!
    Still You getting means delete your .metadata before take the backup.after open the NWDS again it will set new configurations in your system.
    Thanks & Regards,
    Durga Rao.

  • Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP

    Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP. I am using the Design Studio 4.3.2 for building the O2A 2.1.0 PIP. Please let me know how to resolve this issue. Here I am enclosing the log file .

    We have basically the same issue when we try to create the interpreter using the embedded method..
    I was able to use the interpreter embedded in a java client as long as the weblogic jars were located in a weblogic install if I tried to use them from a maven repository no luck at all...
    All of this worked easily in 9.2 now in 10.3 it seems more error prone and less documented.
    I have seen close to a 100 posts on issues related to this so is there a document which outlines specifics....
    We / I have used weblogic now for almost 10 years and moving from 8.1 to 9.2 was painful and we expected the move from 9.2 to 10.3 not to be soo bad but its proving to be as painful if not more painful than moving to 9.2. We seem to spend a good bit of our time working around issues in the next new release that were not in the previous one..
    Any help would be appreciated I think we will open a support case but even that is more painful...
    Any help would be greatly appreciated..
    PS: We confirmed that all jars in the startweblogic classpath were in the startup. The server we have the embedded wlst instance is a managed server and we are using the component in a war... Are there any restrictions which we are unaware of.
    Error we get is
    1 [ERROR] com.tfn.autex.order.weblogic.QueueMaintenanceUtility.addQueue():217 Error Adding Queue wowsers JNDI Name wowsers Exception: Invocation Target exception while getting the WLSTOffLineScript path

  • Failed to load servlet: java.lang.ExceptionInInitializerError

    Hi everybody,
    I got this webapp developed in Websphere Studio that generates this weird error when I fire up the test server.
    Everything else works fine, no errors.
    Any suggestions/advices??
    [Servlet.LOG]: JSP 1.2 Processor: init
    [Servlet.LOG]: FormLoginServlet: init
    [Servlet.LOG]: FormLogoutServlet: init
    [Servlet.LOG]: SimpleFileServlet: init
    [Servlet.LOG]: InvokerServlet: init
    [Servlet Error]-[action]: Failed to load servlet: java.lang.ExceptionInInitializerError
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:79)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled Code))
         at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled Code))
         at java.lang.Class.newInstance3(Class.java(Compiled Code))
         at java.lang.Class.newInstance(Class.java(Compiled Code))
         at java.beans.Beans.instantiate(Beans.java:218)
         at java.beans.Beans.instantiate(Beans.java:62)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:188)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
         at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
         at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
         at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
         at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
         at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1005)
         at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
         at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:505)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
         at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:299)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:256)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:128)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
         at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
         at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
         at java.lang.reflect.Method.invoke(Method.java:386)
         at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:105)
         at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
    Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException: com.ibm.ws.commons.logging.TrLogFactory
         at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:609)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:561)
         at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:352)
         at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
         at      at org.apache.struts.action.ActionServlet.<clinit>(ActionServlet.java:375).null(Unknown Source)
         ... 37 more
    Caused by: java.lang.ClassCastException: com.ibm.ws.commons.logging.TrLogFactory
         at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:571)
         ... 42 more
    [11/5/04 10:56:20:833 CST] 3cbe53b6 TraceNLS u No message text associated with key Servlet.[action]:.could.not.be.loaded in bundle com.ibm.ejs.resources.seriousMessages
    [11/5/04 10:56:20:833 CST] 3cbe53b6 WebAppServlet E Servlet [action]: could not be loaded
    Thanks for all time you took to look over this mess ! :-)

    Actually, best thing to do is switch to use internal commons-logging, or if you have to use another implementation such as log4j, you'll need to configure your server .. see http://www-1.ibm.com/support/docview.wss?uid=swg27004610
    to switch to internal commons-logging is easy
    change all
    import org.apache.log4j.Logger;to
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;and then go
    private static Log logger = LogFactory.getLog(Whatever.class);to get the logger

  • Java.lang.ExceptionInInitializerError while deploying

    Hi,
    I have an ear file.I ran java weblogic.appc -verbose edm_app-ear.ear on it.It ran successfully.But when I deploy this ear file in weblogic 8.1,I get the following exception:
    java.lang.ExceptionInInitializerError.
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:822)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    ervletContext.java:3236)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
    ServletContext.java:3181)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
    pServletContext.java:3154)
    at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java
    :654)
    at weblogic.servlet.internal.WebService.preloadResources(WebService.java
    :483)
    at weblogic.servlet.internal.ServletInitService.resume(ServletInitServic
    e.java:30)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
    at weblogic.Server.main(Server.java:32)
    Can anybody help me in solving this problem??
    Thanks in advance..
    -Sameer Gijare

    Hi,
    I got a error messege: java.lang.OutOfMemoryError. I try to increase the memory for my application by using the following command:
    java -Xms512m -Xmx512m d:\Users\All_Users\Maxd\MaxdLoad\maxdLoad_1_8_0.jar
    It apparantely does not work. Could you tell me the right format for this. BTW, I don't know java.
    Thanks.
    Jack

  • Urgent Help:java.lang.ExceptionInInitializerError in JasperReports

    the following is the java code:
    Map params = new HashMap();
    params.put("order_type", "This is Test Print");
    JRXmlDataSource ds = new JRXmlDataSource(outXML, "/Order");
    InputStream is =Class.forName(                    "com.w3c.dom.Document").getResourceAsStream
    "/TestPrint.jasper");
    net.sf.jasperreports.engine.JasperPrint jp =
                   JasperFillManager.fillReport(is, params, ds);
    JasperExportManager.exportReportToPdf(jp);
    i reckon iam getting this error in the above highlighted code...
    i have all the necessary jars in weblogic's classpath!!
    just a thought...is this because of any mismatch in the jar version?
    on refreshing the page the cause becomes java.lang.NoClassDefFoundError
    ANY POINTERS TO WHY THIS IS HAPPENING???
    java.lang.ExceptionInInitializerError
    at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getStaticText(JRFillObjectFactory.java:494)
    at net.sf.jasperreports.engine.base.JRBaseStaticText.getCopy(JRBaseStaticText.java:93)
    at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:88)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:88)
    at net.sf.jasperreports.engine.fill.JRFillBand.<init>(JRFillBand.java:77)
    at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:374)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:386)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:92)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:74)
    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:582)
    at com.yantra.interop.services.flowcomponents.TestPrint1.testPrint(TestPrint1.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.yantra.interop.services.api.ApiHelper.invoke(ApiHelper.java:155)
    at com.yantra.interop.services.flowcomponents.ApiFlowComponent.execute(ApiFlowComponent.java:161)
    at com.yantra.interop.services.flowcomponents.ApiFlowComponent.send(ApiFlowComponent.java:200)
    at com.yantra.integration.adapter.FlowExecutor.execute(FlowExecutor.java:359)
    at com.yantra.integration.adapter.SynchronousIntegrationFlow.executeFlow(SynchronousIntegrationFlow.java:215)
    at com.yantra.interop.services.api.ApiRequestDispatcher.executeFlow(ApiRequestDispatcher.java:90)
    at com.yantra.interop.client.InteropHttpServlet.processRequest(InteropHttpServlet.java:156)
    at com.yantra.interop.client.InteropHttpServlet.doPost(InteropHttpServlet.java:80)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.getB64StrProp(PolicyRuntime.java:188)
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.<init>(PolicyRuntime.java:91)
    at com.trend.iwss.jscan.appscan.runtime.MiscPolicyRuntime.<init>(MiscPolicyRuntime.java:132)
    at com.trend.iwss.jscan.appscan.runtime.MiscPolicyRuntime$Factory.make(MiscPolicyRuntime.java:254)
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.accessInstance(PolicyRuntime.java:225)
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.preFilter(PolicyRuntime.java:127)
    at com.trend.iwss.jscan.appscan.runtime.MiscPolicyRuntime.preFilter(MiscPolicyRuntime.java:142)
    at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:277)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
    at net.sf.jasperreports.engine.fill.JRFillTextElement.<clinit>(JRFillTextElement.java:61)
    ... 38 more
    java.lang.ExceptionInInitializerError
    at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getStaticText(JRFillObjectFactory.java:494)
    at net.sf.jasperreports.engine.base.JRBaseStaticText.getCopy(JRBaseStaticText.java:93)
    at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:88)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:88)
    at net.sf.jasperreports.engine.fill.JRFillBand.<init>(JRFillBand.java:77)
    at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:374)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:386)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:92)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:74)
    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:582)
    at com.yantra.interop.services.flowcomponents.TestPrint1.testPrint(TestPrint1.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.yantra.interop.services.api.ApiHelper.invoke(ApiHelper.java:155)
    at com.yantra.interop.services.flowcomponents.ApiFlowComponent.execute(ApiFlowComponent.java:161)
    at com.yantra.interop.services.flowcomponents.ApiFlowComponent.send(ApiFlowComponent.java:200)
    at com.yantra.integration.adapter.FlowExecutor.execute(FlowExecutor.java:359)
    at com.yantra.integration.adapter.SynchronousIntegrationFlow.executeFlow(SynchronousIntegrationFlow.java:215)
    at com.yantra.interop.services.api.ApiRequestDispatcher.executeFlow(ApiRequestDispatcher.java:90)
    at com.yantra.interop.client.InteropHttpServlet.processRequest(InteropHttpServlet.java:156)
    at com.yantra.interop.client.InteropHttpServlet.doPost(InteropHttpServlet.java:80)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.getB64StrProp(PolicyRuntime.java:188)
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.<init>(PolicyRuntime.java:91)
    at com.trend.iwss.jscan.appscan.runtime.MiscPolicyRuntime.<init>(MiscPolicyRuntime.java:132)
    at com.trend.iwss.jscan.appscan.runtime.MiscPolicyRuntime$Factory.make(MiscPolicyRuntime.java:254)
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.accessInstance(PolicyRuntime.java:225)
    at com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.preFilter(PolicyRuntime.java:127)
    at com.trend.iwss.jscan.appscan.runtime.MiscPolicyRuntime.preFilter(MiscPolicyRuntime.java:142)
    at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:277)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
    at net.sf.jasperreports.engine.fill.JRFillTextElement.<clinit>(JRFillTextElement.java:61)
    ... 38 more

    Patrick-
    My best guess is that you did not include some required library in the
    runtime "required libraries" for your project. My first guess is that
    you missed the JDO library jar, since missing that would certainly
    result in an ExceptionInInitializerError when loading your persistent
    classes.
    You might also run the program in the debugger and see if you get a more
    telling stack trace.
    In article <bkuuef$9di$[email protected]>, Patrick Pracht wrote:
    Hello all,
    I am currently developing a webapp using Kodo-2.5.3, MySQL-DB, JBuilder9,
    Tomcat4.1.
    Everything worked as expected until I have been running the Metadata tool
    and Schematool from within JBuilder for a new class.
    After doing this , when I attempt to run the webapp from within JBuilder,
    the build process stops with the following message displayed in the
    build-panel of JBuilder: java.lang.ExceptionInInitializerError
    Since I have no further indication of what causes the problem (Filename,
    location, Stacktrace, etc.) I really don't know how to proceed. The only
    thing that I can see by looking at the kodo msg panel is, that Kodo did not
    parse all the persistent classes.
    Can anybody tell me how this problem could be tracked down?
    Is there any log-file I could have a look at?
    Thanks in advance for your help.
    regards
    Patrick
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Java.lang.ExceptionInInitializerError in JBuilder9

    Hello all,
    I am currently developing a webapp using Kodo-2.5.3, MySQL-DB, JBuilder9,
    Tomcat4.1.
    Everything worked as expected until I have been running the Metadata tool
    and Schematool from within JBuilder for a new class.
    After doing this , when I attempt to run the webapp from within JBuilder,
    the build process stops with the following message displayed in the
    build-panel of JBuilder: java.lang.ExceptionInInitializerError
    Since I have no further indication of what causes the problem (Filename,
    location, Stacktrace, etc.) I really don't know how to proceed. The only
    thing that I can see by looking at the kodo msg panel is, that Kodo did not
    parse all the persistent classes.
    Can anybody tell me how this problem could be tracked down?
    Is there any log-file I could have a look at?
    Thanks in advance for your help.
    regards
    Patrick

    Patrick-
    My best guess is that you did not include some required library in the
    runtime "required libraries" for your project. My first guess is that
    you missed the JDO library jar, since missing that would certainly
    result in an ExceptionInInitializerError when loading your persistent
    classes.
    You might also run the program in the debugger and see if you get a more
    telling stack trace.
    In article <bkuuef$9di$[email protected]>, Patrick Pracht wrote:
    Hello all,
    I am currently developing a webapp using Kodo-2.5.3, MySQL-DB, JBuilder9,
    Tomcat4.1.
    Everything worked as expected until I have been running the Metadata tool
    and Schematool from within JBuilder for a new class.
    After doing this , when I attempt to run the webapp from within JBuilder,
    the build process stops with the following message displayed in the
    build-panel of JBuilder: java.lang.ExceptionInInitializerError
    Since I have no further indication of what causes the problem (Filename,
    location, Stacktrace, etc.) I really don't know how to proceed. The only
    thing that I can see by looking at the kodo msg panel is, that Kodo did not
    parse all the persistent classes.
    Can anybody tell me how this problem could be tracked down?
    Is there any log-file I could have a look at?
    Thanks in advance for your help.
    regards
    Patrick
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Java.lang.ExceptionInInitializerError ~~~~ AXIS

    Hi I am trying to call my webservice from a web application my code is below:
    public void useService(){
    try{
    HelloService serv = new HelloServiceLocator(); // error thrown here
    Hello test = serv.getHello();
    String msg = test.greet("Hi");
    System.out.println("Reply FROM WEBSERVICE: " + msg);
    catch(Exception e){
    System.out.println("error");
    e.printStackTrace();
    But when this panel loads I get the following error:
    java.lang.ExceptionInInitializerError
    at org.apache.axis.client.Service.<init>Service.java(109)
    When I run it from netbeans it works fine but on the web appilcation I get the above error. I have cached all the required jars etc, pls if sum 1 could help...

    FIXED! You need to put a file called
    commons-logging.properties in your WEB-INF\classes
    directory *. That file should have one line:
    org.apache.commons.logging.LogFactory=org.apache
    .commons.logging.impl.LogFactoryImplThat fixed my problem, and it may fix yours. Good
    luck!
    * Or somewhere where it will be copied to
    WEB-INF\classes. For example, I'm using the IBM
    Rational Software Development Platform, and what
    works for me is to put commons-logging.properties in
    my JavaSource folder so that it gets copied to
    WEB-INF\classes on build.REALLY, I'M DESPERATED!!!!
    PLEASE! HELP! I'm desperated to create a portlet that accesses to .NET web service!! On Portal server 5.0!!! THE SAME AS YOU!!
    PLEASE HELP ME!!! How do you make it? Proxy classes generated with WSAD 5.1.2 doesn't works correctly! If I try to use JNDI I've got this error!!
    javax.naming.NameNotFoundException: Name comp/env/service not found in context "java:".
    when proxy class executes this code:
    simpleWebServiceSoap = ((org.tempuri.SimpleWebService)ctx.lookup("java:comp/env/service/SimpleWebService")).getSimpleWebServiceSoap();
    BUT IF I TRY TO USE without JNDI, using LOCATOR CLASS, I get the same error that you! How you solve this!! Where Can I obtain this file!!!
    commons-logging.properties.
    And What I have to do? To solve My problem!!
    REALLY, I'M DESPERATED!!!!
    And . Why you don't try to use JNDI?

  • I get java.lang.ExceptionInInitializerError

    Here is the code:
    public class m2q8 {
    static int[] a;
    static { a[0]=2; }
    public static void main( String[] args) {}
        }java.lang.ExceptionInInitializerError
    Caused by: java.lang.NullPointerException
    at m2q8.<clinit>(m2q8.java:3)
    Could not find the main class: m2q8. Program will exit.
    Exception in thread "main"
    Process completed.
    I don't get it...

    JavaMessi wrote:
    how would the code looks like if I want to initialize it first?It does not matter - you never use it.
    public class M2q8 {
        static int[] A;
        static { A = new int[]{2}; /* A[0]=2; */ }
        public static final void main(final String[] arg) {
            System.out.println(java.util.Arrays.toString(A));
    JavaMessi wrote: [in reply 15|http://forums.sun.com/thread.jspa?messageID=11014537#11014537]
    I need to take the scjp test You need to review your career options.

  • LocalSessionFactoryBean - Could not instantiate bean class

    Hello,
    I am facing a problem with the instantiation of the LocaSessionFactoryBean in a sample Spring 3.0.4 - Hibernate 3.2.6, WebLogic 10.3.3 and Oracle 10g. I am run an web application using JDeveloper 11.1.1.3.0 with the integrated WebLogic Server 11gR1. Trying to make the existing web application that is currently running on Oracle Web Server to run on WebLogic.
    I have gone through other LocalSessionFactoryBean related postings but could not find any solutions for my problem.
    Here's the server.log during web application deployment and startup -
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'pocDaoTarget' defined in class path resource [spring-chbs.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in ServletContext resource [WEB-INF/xml/spring/spring-j2eeservices.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFac toryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in ServletContext resource [WEB-INF/xml/spring/spring-j2eeservices.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFac toryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.j
    Caused by: org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFac toryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
    at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:115)
    Caused by: java.lang.NoClassDefFoundError
    at org.springframework.orm.hibernate3.LocalSessionFac toryBean.class$(LocalSessionFactoryBean.java:174)
    (Note : I have verified that org.springframework.orm.hibernate3.LocalSessionFactoryBean.class exists in org.springframework.orm-3.0.4.RELEASE.jar)
    Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    (Note : I have verified that org.hibrnate.cfg.Configuration.class exists in hibernate-3.2.6.ga.jar)
    spring-chbs.xml:
    Code:
    <bean id="pocDaoTarget"
    class="myproj.component.chbs.dao.PocDaoImpl">
    <property name="sessionFactory">
    <ref bean="sessionFactory"/>
    </property>
    </bean>
    spring-j2eeservices.xml :
    Code:
    <!-- JNDI DataSource for J2EE environments -->
    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="java:comp/env/jdbc/J2EEDS"/>
    </bean>
    <bean id="sessionFactory"
    class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="dataSource">
    <ref bean="dataSource"/>
    </property>
    <property name="mappingJarLocations">
    <list>
    <value>WEB-INF/lib/hibernate-config.jar</value>
    <!--value>classpath:hibernate-config.jar</value-->
    </list>
    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="session_factory_name">HibernateSessionFactory</prop>
    <prop key="jndi.class">weblogic.jndi.WLInitialContextFactory</prop>
    <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
    <prop key="hibernate.show_sql">true</prop>
    </props>
    </property>
    </bean>
    Any help would be greatly appreciated.
    Thanks

    Hi Raphael,
    Thanks for your response.
    The last part of the console log output during run –
    Error creating bean with name 'pocDaoTarget' defined in class path resource [spring-chbs.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [WEB-INF/xml/spring/spring-j2eeservices.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
    Servlet Path: C:\Documents and Settings\tariq.ahsan\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\AppServerConversion\MaWebWebApp.warBegin Initialize Spring ApplicationContext for MA
    End Initialize Spring ApplicationContext for MA
    Servlet Path: C:\Documents and Settings\tariq.ahsan\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\AppServerConversion\PaWebWebApp.warBegin Initialize Spring ApplicationContext for PA
    End Initialize Spring ApplicationContext for PA
    [10:35:57 AM] Application Redeployed Successfully.
    [10:35:57 AM] The following URL context root(s) were defined and can be used as a starting point to test your application:
    [10:35:57 AM] http://192.168.11.207:7101/MaWeb
    [10:35:57 AM] http://192.168.11.207:7101/paweb
    [10:35:57 AM] http://192.168.11.207:7101/CFMSWeb
    [10:35:57 AM] Elapsed time for deployment: 28 seconds
    [10:35:57 AM] ---- Deployment finished. ----
    Run startup time: 28203 ms.
    [Application AppServerConversion deployed to Server Instance IntegratedWebLogicServer]
    Target URL -- http://127.0.0.1:7101/CFMSWeb/login.jsp
    Is one of the above folder - C:\Documents and Settings\tariq.ahsan\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\AppServerConversion\MaWebWebApp.war (MaWebWebApp.war is a folder) part of the IntegratedWebLogicServer deployment? Do you mean the spring and possibly the hibernate jars need to be in the WEB-INF/lib under the above folder path?
    Thanks

  • Javax.ejb.EJBException: Could not instantiate bean

    Hi All,
    I get the following exception when i run my EJB Client code.
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.ServerException: EJBException:; nested exception is:
    javax.ejb.EJBException: Could not instantiate bean
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    at java.lang.Thread.run(Thread.java:595)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
    at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
    at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
    at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
    at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
    at $Proxy1.create(Unknown Source)
    Caused by: javax.ejb.EJBException: Could not instantiate bean
    at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:180)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:78)
    at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:300)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
    at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
    at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
    My Client Code is as follows:
    package com.css.sample.client;
    import com.css.sample.MyHome;
    import com.css.sample.MyRemote;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class MyClient {
    /** Creates a new instance of MyClient */
    public MyClient() { }
    public static void main(String args[]) throws Exception {
    Context ctx = new InitialContext();
    Object objRef = ctx.lookup("MyBean");
    MyHome home = (MyHome) PortableRemoteObject.narrow(objRef, MyHome.class);
    MyRemote remote = home.create();
    String name = remote.printName("Test");
    System.out.println("Name : " + name);
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>MySampleEjbBean</display-name>
    <enterprise-beans>
    <session>
    <display-name>MyEjbBean</display-name>
    <ejb-name>MyEjbBean</ejb-name>
    <home>com.css.sample.MyHome</home>
    <remote>com.css.sample.MyRemote</remote>
    <ejb-class>com.css.sample.MyEjb</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MyEjbBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    jboss.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss>
    <enterprise-beans>
    <session>
    <ejb-name>MyEjbBean</ejb-name>
    <jndi-name>MyBean</jndi-name>
    <configuration-name>Standard Stateless SessionBean</configuration-name>
    </session>
    </enterprise-beans>
    </jboss>
    I dont know where the problem occurs. Please help.

    There should be a 'caused by' entry in your stack.
    If your ejbCreate() method is connecting to the DB and this error only occurs when the DB is down - what exactly is your question?
    m

  • Java.lang.ExceptionInInitializerError when trying to deploy my app

    I am trying to port my application from weblogic 8.1.0 to 8.1.1 with SP1. When
    I port the application I get this "error java.lang.ExceptionInInitializerError".
    The detail of the error is given below. The "LoanGeniusFrontControllerServlet"
    refered to in the error is my startup servlet. It extends from struts ActionServlet.....
    Any help on this regard is very welcome...
    <Dec 18, 2003 6:24:46 PM PST> <Error> <HTTP> <BEA-101254> <[ServletContext(id=4934480,name
    =LoanGeniusWeb,context-path=/LoanGeniusWeb)]: Servlet class com.tavant.lg.controller.servl
    et.LoanGeniusFrontControllerServlet for servlet LoanGeniusFrontControllerServlet
    could not
    be handled by the classloader with classpath......

    ExceptionInInitializerError indicates that your static initializer
    failed. Check your static {} blocks in the class or static variables
    which are assigned.
    -- Rob
    Balavenu Nuti wrote:
    I am trying to port my application from weblogic 8.1.0 to 8.1.1 with SP1. When
    I port the application I get this "error java.lang.ExceptionInInitializerError".
    The detail of the error is given below. The "LoanGeniusFrontControllerServlet"
    refered to in the error is my startup servlet. It extends from struts ActionServlet.....
    Any help on this regard is very welcome...
    <Dec 18, 2003 6:24:46 PM PST> <Error> <HTTP> <BEA-101254> <[ServletContext(id=4934480,name
    =LoanGeniusWeb,context-path=/LoanGeniusWeb)]: Servlet class com.tavant.lg.controller.servl
    et.LoanGeniusFrontControllerServlet for servlet LoanGeniusFrontControllerServlet
    could not
    be handled by the classloader with classpath......

  • Jasperreports JRException: Could not instantiate report compiler :

    I am getting the following error while trying run a jasperreport application that makes a connection to a database and retrieves values based on a parameter passed. I am using eclipse 3.1 and the jetty server.
    net.sf.jasperreports.engine.JRException: Could not instantiate report compiler : net.sf.jasperreports.engine.design.JRJavacCompiler
         at net.sf.jasperreports.engine.design.JRDefaultCompiler.getCompiler(JRDefaultCompiler.java:205)
         at net.sf.jasperreports.engine.design.JRDefaultCompiler.loadEvaluator(JRDefaultCompiler.java:216)
         at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:404)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:354)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:92)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:74)
         at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:363)
         at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:163)
         at net.ensode.jasperbook.FirstReportSendToBrowserServlet.doGet(FirstReportSendToBrowserServlet.java:36)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
         at org.mortbay.jetty.Server.handle(Server.java:303)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:721)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:509)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:320)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
    Caused by: java.lang.ClassCastException
         at net.sf.jasperreports.engine.design.JRDefaultCompiler.getCompiler(JRDefaultCompiler.java:201)
         ... 29 more
    The servlet code is given below:
    package net.ensode.jasperbook;
    import java.sql.*;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.HashMap;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import net.sf.jasperreports.engine.JREmptyDataSource;
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperRunManager;
    public class FirstReportSendToBrowserServlet extends HttpServlet {
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              HashMap parameterMap = new HashMap();
              parameterMap.put("value", new Integer(1));
              Connection con;
              try {
                   ServletOutputStream servletOutputStream = response.getOutputStream();
                   InputStream reportStream = getServletConfig().getServletContext()
                             .getResourceAsStream("/reports/FirstReport.jasper");
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:att", "att_report", "jasper");
                   JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, parameterMap, con);
                   con.close();
                   response.setContentType("application/pdf");
                   servletOutputStream.flush();
                   servletOutputStream.close();
              } catch (JRException e) {
                   // display stack trace in the browser
                   StringWriter stringWriter = new StringWriter();
                   PrintWriter printWriter = new PrintWriter(stringWriter);
                   e.printStackTrace(printWriter);
                   response.setContentType("text/plain");
                   response.getOutputStream().print(stringWriter.toString());
              catch (SQLException e1){
                   StringWriter stringWriter = new StringWriter();
                   PrintWriter printWriter = new PrintWriter(stringWriter);
                   e1.printStackTrace(printWriter);
                   response.setContentType("text/plain");
                   response.getOutputStream().print(stringWriter.toString());
              catch (ClassNotFoundException e2){
                   StringWriter stringWriter = new StringWriter();
                   PrintWriter printWriter = new PrintWriter(stringWriter);
                   e2.printStackTrace(printWriter);
                   response.setContentType("text/plain");
                   response.getOutputStream().print(stringWriter.toString());
    Could anyone please try and find me a solution.

    the jasper report , instructions and examples work
    just fine on Creator Studio
    Give Creator Studio a Try and you will be relieved of your frustrations
    (of course following the sun provided tutorial)

Maybe you are looking for

  • Don't see photo files in time machine

    I'm new to mac/brand new time machine user. I just backed up for the first time. I had no apps open. I can't seem to view photos in time machine. Other files seem to be there. but in the iphoto library I can only see a placeholder for 430 MB. I have

  • Connect 1 macbook(2 users) with 1 PC(1 user)

    Hi, I have arranged a network between my PC (one user-administrator) and my Mac (2 users-one administrator and one standard), but I don't know how to access files of the standard Mac user from my PC. I can only see the Mac administrator's files. Any

  • What files need to be deleted to start fresh with iCal?

    Friends: What files need to be deleted from places like the library to start with a fresh blank copy of iCal? Thanks amigos! Migs

  • Creating formatted search using DI API

    Dear All, Please let me know if we can implement/create formatted search on a UDF textbox using DI API. Is it possible to create formatted search through code using DI API ? Regards, Noor Hussain

  • HP Scanjet Professional 1000 Mobile Scanner not recognised snow leopard

    hi I have purchased a HP Scanjet Professional 1000 Mobile Scanner The scanner however does not seem to work with ANY recognised scanner software for MAC. I have expensive Readyiris and Adobe X software with scan functionality but the scanner does not