Welcome to my website. I am always posting links to photo albums, art, technology and other creations. Everything that you will see on my numerous personal sites is powered by the formVistaTM Website Management Engine.

icon.linkedin.jpgicon.twitter.jpg

  • Subscribe to this RSS Feed
  • Using bash Shell to Rename Files With Spaces
    04/20/2011 10:01AM

    The following is a shell command that you can use to rename any file that contains spaces.? Without the quotes surrounding the $file reference and the echo command it will fail.

    In this example, we rename anything that is .htm to .html

    for file in *.htm ; do mv "$file" "`echo "$file" | sed 's/\(.*\.\)htm/\1html/'`" ; done

  • java.lang.reflect.UndeclaredThrowableException When Attempting to Invoke a Remote Method on an EJB Singleton Instance
    03/15/2011 9:55PM

    I am building an EJB Singleton that generates and maintains data that I want accessible to multple clients. Since the data is not based on any client interaction but based on the status of a single server-side application I went with an EJB Singleton.

    When attempting to invoke a method via the Remote interface on the bean instance from a servlet in a separate .war which was returning a LinkedList of a custom Object that I wrote, I was getting the following error:

    2011-03-15 13:17:59,232 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DocumentRoot].[ServletClass]] (http-localhost%2F127.0.0.1-8080-3) Servlet.service() for servlet ServletClass threw exception: java.lang.reflect.UndeclaredThrowableException
           at $Proxy236.ejbRemoteMethod(Unknown Source)    at ServletClass.doGet(ServletClass.java:52) [:]
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
           at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
           at java.lang.Thread.run(Thread.java:636) [:1.6.0_17]
    Caused by: java.io.IOException
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:107) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:269) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845) [:6.0.0.Final]
           at org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60) [:6.0.0.Final]
           at org.jboss.ejb3.remoting.IsLocalInterceptor.marshallOrPass(IsLocalInterceptor.java:117) [:1.7.17]
           at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:91) [:1.7.17]
           at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:75) [:1.7.17]
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
           at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62) [:1.0.1.GA]
           at $Proxy181.invoke(Unknown Source)    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185) [:1.0.11]
           ... 23 more
    Caused by: java.lang.reflect.InvocationTargetException
           at sun.reflect.GeneratedMethodAccessor409.invoke(Unknown Source) [:1.6.0_17]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_17]
           at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_17]
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103) [:6.0.0.Final]
           ... 36 more
    Caused by: java.io.IOException
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:107) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:269) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845) [:6.0.0.Final]
           at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68) [:6.0.0.Final]
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362) [:1.6.0_17]
           at java.util.HashMap.readObject(HashMap.java:1047) [:1.6.0_17]
           ... 40 more
    Caused by: java.lang.reflect.InvocationTargetException
           at sun.reflect.GeneratedMethodAccessor408.invoke(Unknown Source) [:1.6.0_17]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_17]
           at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_17]
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103) [:6.0.0.Final]
           ... 48 more
    Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of org.jboss.logmanager.log4j.BridgeLogger - org.jboss.logmanager.log4j.BridgeLogger
           at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:342) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273) [:6.0.0.Final]
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82) [:6.0.0.Final]
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845) [:6.0.0.Final]
           at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68) [:6.0.0.Final]
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362) [:1.6.0_17]
           at java.util.LinkedList.readObject(LinkedList.java:981) [:1.6.0_17]
           ... 52 more
    Caused by: java.lang.InstantiationException: org.jboss.logmanager.log4j.BridgeLogger
           at java.lang.Class.newInstance0(Class.java:357) [:1.6.0_17]
           at java.lang.Class.newInstance(Class.java:325) [:1.6.0_17]
           at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:334) [:6.0.0.Final]
           ... 65 more

    After some fairly extensive experimentation I determined that the error was the result of a composed instance org.apache.log4j.Logger. Even though I included the same version of the log4.jar file in both the ejb.jar and the .war file it seems as though the class loader was having problems marshalling the Logger instance.

    Had I the time to fully get it sorted out so that I could use the Logger instance in the custom class that I was returning I would, but alas . . . the rest of the project awaits.

  • Updating the URL of a Subversion Repository in a Currently Checked Out Copy of Your Repository
    03/14/2011 8:23PM

    Let's say you have a server who's IP address or domain name changes on which you have a Subversion repository.? Furthermore, you have checked out the copy over an ssh connection using svn+ssh.

    If you have checked-out copies of your repo, and the path to the repo on the file system hasn't changed, but only the IP or domain name has changed you need to issue the following command in the root of your checked out copy:

    svn switch --relocate svn+ssh://user@old.domain/ svn+ssh://user@new.domain/

    Authenticate to the new machine.

    svn update

    Authenticate again.

    Done.

  • Setting the Screen Resolution of a Linux Guest in VMWare vSphere Client
    03/03/2011 3:32PM

    I am currently working with virtual machines via Vmware vSphere on a Windows 2008 server. Initially I was unable to get the guest to render full screen and did not have all of the screen resolutions that I would have thought I should. What I was trying to do was have the guest Linux (in this case RedHat Enterprise Linux 6) run full-screen. It was not as straight forward as setting the screen resolution in the VM guest settings dialog.

    After much trial and error the way to do it is to crank up the amount of ram allocated for the virtual video card. The guest will then have enough resources to render at full screen and you will have a wide array of screen resolution choices.

  • Import javax.ejb cannot be resolved Error in Eclipse Helios
    03/03/2011 2:28PM

    If you have installed the latest and greatest JBossAS tools into eclipse, try using the following version instead:

    ?2.2.0.v20110216-175

    It seems as though there are some problems with the latest and greatest that causes compilation problems.

Advanced Search

Categories

Archives