Sunday, July 18, 2010 |
|
| 47 views
(Eclipse, J2EE, JBoss, Programming/Coding)
There can be some problem as commit failed during execution of a hibernate operation. It can be avoided by modifying cfg file for accommodating JPA operations in JBoss. Solution is listed below the following error.
19:30:43,113 ERROR [JDBCTransaction] JDBC commit failed
java.sql.SQLException: You cannot commit during a managed transaction!
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:659)
at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:486)
at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:170)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:146)
…
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:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
at sun.reflect.GeneratedMethodAccessor350.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
…
Update your abc.cfg.xml file and add following lines after
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
Now if your problem is fixed, just smile and take a break. I know you might have already been working quite hard for quite long time 
No Comments » | Spread the word: 
Sunday, July 18, 2010 |
|
| 155 views
(Eclipse, J2EE, JBoss, Programming/Coding)
While running JBoss 5.1.0 inside Eclipse 3.5 (Galileo) with “all” profile as selected, following error popped up. Solution is provided below the error.
java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(ReflectionUtils.java:153)
at org.jboss.reflect.plugins.introspection.ReflectConstructorInfoImpl.newInstance(ReflectConstructorInfoImpl.java:106)
at org.jboss.joinpoint.plugins.BasicConstructorJoinPoint.dispatch(BasicConstructorJoinPoint.java:80)
at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.createTarget(AOPConstructorJoinpoint.java:282)
at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:103)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:66)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:319)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:297)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
at org.jboss.bootstrap.microcontainer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:91)
at org.jboss.bootstrap.microcontainer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:161)
at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:138)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Unknown Source)
Failed to boot JBoss:
java.lang.IllegalStateException: Incompletely deployed:
DEPLOYMENTS IN ERROR:
Deployment "AttachmentStore" is in error due to: java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "ProfileServiceDeployer" is missing the following dependencies:
Dependency "AttachmentStore" (should be in state "Installed", but is actually in state "**ERROR**")
Deployment "ProfileServicePersistenceDeployer" is missing the following dependencies:
Dependency "AttachmentStore" (should be in state "Installed", but is actually in state "**ERROR**")
Deployment "ProfileService" is missing the following dependencies:
Dependency "jboss.kernel:service=KernelController" (should be in state "Installed", but is actually in state "**ERROR**")
Dependency "ProfileServiceDeployer" (should be in state "Installed", but is actually in state "Instantiated")
Deployment "ProfileServiceBootstrap" is missing the following dependencies:
Dependency "ProfileService" (should be in state "Installed", but is actually in state "Instantiated")
Dependency "jboss.kernel:service=Kernel" (should be in state "Installed", but is actually in state "**ERROR**")
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)
at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:142)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Unknown Source)
…
Update jboss-5.1.0.GA\server\all\conf\bootstrap\profile.xml: replace line
<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
BELOW
<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
TO
<constructor><parameter class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
No Comments » | Spread the word: 
Friday, July 16, 2010 |
|
| 190 views
(Eclipse, J2EE, Programming/Coding)
Eclipse has always been my preferred IDE for application design and development. There have always been my interest in new developments going behind the scenes on eclipse evolution. The latest version of Eclipse, named as Helios, has been released this year on June 23, named as Eclipse Helios.
As an overview, Eclipse Helios is versioned as Eclipse 3.6 after previous releases of Eclipse Galileo and Eclipse Gynamade as 3.5 and 3.4 respectively. This release is made possible by 490 contributors and about 33 million lines of codes resulting into total 39 projects in this release. Compared to this, last year’s release contained 33 projects.
The different packages and their comparison is summarized in following table as made available over Eclipse website -

Some of the significant features and functionalities which I have liked in this new version from my perspective of using Eclipse mainly as Java, J2EE and PHP design and development IDE are -
- Eclipse Marketplace is now available in Eclipse itself. You don’t need to go to web-browser for searching and downloading the eclipse plugins. With few clicks, you can find and install plug-ins after looking at its features from within the IDE (Help > Eclipse Market Place).
- Apache Tomcat 7 support has been added.
- For all those REST services lovers who hated Eclipse Galileo’s discrimination for its integrated support to SOAP based Apache AXIS2 only, Helios includes Apache CXF support.
- JavaScript JSDT project has been added as framework for managing the JavaScript web development in better. Also integrated are Firebug and Rhino – dedicated to java-script development.
- Support for Git.
- For those command screen lovers, Eclipse can now be opened from command line as well. This has been made possible through SWT and native launcher interface (cmd > eclipse).
- EMF Edit UI support in RAP (Rich Ajax Platform) aka EMF on Web is integrated.
- A brand new section on download page named as Linux is added for Linux flavors. It is a huge leap for Linux lovers. I remember doing development over Linux based Eclipse while totally disliking its interface over Ubuntu. Newest interface is lot more improved.
- OSGi console has been introduced with name Host OSGi Console (Console View > View > select ‘Host OSGi Console’).
- Package names can be abbreviated for convenience (Window > Preferences > Java > Appearance).
Latest version can be downloaded over Eclipse Download page.
In case, you are Eclipse plugin developer and starting thinking of migrating your plugins to this latest version of Eclipse, this migration tutorial available over Eclipse website can prove to be helpful.
No Comments » | Spread the word: 
Monday, July 13, 2009 |
|
| 816 views
(Eclipse, J2EE, Programming/Coding, Softwares, Tech)
For those Java developers who think that Eclipse is best Java community could ever get out of Open Source other than Java itself, here is the latest release code-named Galileo. Galileo is this year’s release from Eclipse with 33 projects. Last year’s release Ganymede contained 23 projects in comparison.
Of course this release is not only meant for JEE developers but for lot many others developers in different domains. Galileo has come in different packages like its predecessors. Different packages have different capabilities and are targeted for specific developer communities. The summary can be found in following table available over Eclipse website -
Being much into Java, JEE, Modeling and PHP development and little lesser into Plugin Development, Reports, Mobile or C/C++ on different OSs, following are my review comments on latest Eclipse release.
Highlighted functionalities added in Eclipse platform are -
- Brand new update manager and plugin-installation UI referred to as p2
- CDT package has got new and improved debugger for managing parallel programming.
- Shortcut keys for going between different opened editors and multiple tabs in same editor simplified – along-with Ctrl+F6/Ctrl+Shift+F6, Ctrl+PgDn/Ctrl+PgUp for previous or next editor and Alt+PgDn/Alt+PgUp for previous or next tab.
- Rectangular selection can be done in editor. Use default shortcut key Alt+Shift+A and you can select any text in rectangular pattern –
- In XMLs, fully qualified class-names are hyperlinked.
- Hyperlinked method calls inside code provide option to go to declaration or implementation –
- Auto-completion for constructors is included-
- Hyperlinks in JavaDoc headers (Java / JEE)
- inheritDoc tag support is included for JavaDoc.
- The Validation model works quite well as compared to its annoying behavior at some times in Ganymede
- Compare view is updated and now it includes many new features like hyperlinks, hover displays JavaDoc and outlining etc.
- Word document comparison includes Word compare support for showing changes as per revisions
- New toString() generator has been included
- Breadcrumb in Debug mode has been enhanced and now it shows active debug context
- Modeling is one thing which I liked a lot in this release (EMP) showing the emergence of Modeling in pragmatic approach.
- Now PDT provides internal support for PHP 5.3. PDT has been one of the ambitious projects from Eclipse Development team for quite long time and it has nurtured very well since its first release. Have been using it now and then and realize its power for development of full-fledged PHP web projects.
I was little disappointed on finding some of my favorite plugins not working in Galileo – Eclipse team should get serious about downward compatibility of plugins. Also you can face problems while doing development in emf where you might get errors referring to line numbers while there are no line numbers in source code and there will be errors which appear in dialog boxes than in panes.
No Comments » | Spread the word: 
Tuesday, June 2, 2009 |
|
| 141 views
(Corporates, Eclipse, Infy, J2EE, Just like that!, Personal, Programming/Coding, Work)
Sometimes it is frustrating to remain stuck in a problem which you thought is as simple as can be overcome in couple of minutes but you spend almost whole day in figuring out that problem. A problem which makes you recall your old stupid days once again, the one which might make you feel as if you have wasted your day in resolving it. In the end, when you find out the solution which was actually that simple, you might think that it is right to to call it as a day wasted.
In my case, I preferred to call it a day well utilized to learn something basic which we generally prefer to forget or put in backside of memory. This was the day when I wasn’t able to find solution to a problem which might have not taken more than 10 minutes to a software kid if he had been knowing what exactly has to be done. For me, it went on and on for more than 8 hours as parallel activity with my work to find out the dead simple solution.
The problem in my case was that a specific file type wasn’t opening in the way it should have opened in my favorite IDE (Eclipse). It was being opened in different color syntax and I wasn’t able to get code assist/content assist in the way I was expecting for JSP files. I copied/recopied/re-re-copied and so on… the fresh installation of IDE, tried to compare it with the one I was working on, exchanged the core files and experiments in as many different ways as I could but still the problem remained the same. Yeah, of course, (I know you are brilliant enough to have already thought that out) – googled again and again and again in all these hours. Also tried to migrate my existing setup to fresh setup but of no use. Finally (or perhaps not) I had started thinking of giving up on all my tries. Just then this simple piece of code over web brought sparkle in my eyes –
You have missed out one thing that we have to make the ABC viewer as the default viewer for *.xyz files under Windows->Preferences->general->Editors->File Associations.
Thanks to the brilliant lady who provided the unwanted and perhaps not so important solution to that problem – not to forget it was what exactly I wanted and hence wasn’t useless in my case at all. Once again many thanks to this intelligent gal for this simple looking but generally overlooked solution. In this specific case, I had to go to File Associations inside Eclipse and change the association of my file to different/default editor. Stupid me!
In general for any file, if we aren’t able to view a file in the way we want it to appear, all we have to do is to change the editor in which it opens.
..........
This is a preview of
A Day wasted or A Day utilized
.
Read the full post (651 words)
No Comments » | Spread the word: 