java.util.zip.ZipException when calling a Java adapter - ibm-mobilefirst

I have an ZipException (zip file is empty) when calling an adapter. IBM MobileFirst Platform seems to have problems to load classes that is deployed and compiled in the adapter file (I checked the compiled .adapter file, all classes are there and OK). I've tryed to delete/recreated the server, re-re-redeploy, ...
There's no error when deploying and in the operations console everything is OK (adapter, methods,urls).
the exception:
[9/30/15 15:09:37:821 CEST] 000000d0 SystemErr R java.util.zip.ZipException: zip file is empty
[9/30/15 15:09:37:821 CEST] 000000d0 SystemErr R at java.util.zip.ZipFile.open(Native Method)
[9/30/15 15:09:37:822 CEST] 000000d0 SystemErr R at java.util.zip.ZipFile.<init>(ZipFile.java:215)
[9/30/15 15:09:37:822 CEST] 000000d0 SystemErr R at java.util.zip.ZipFile.<init>(ZipFile.java:145)
[9/30/15 15:09:37:822 CEST] 000000d0 SystemErr R at java.util.jar.JarFile.<init>(JarFile.java:154)
[9/30/15 15:09:37:822 CEST] 000000d0 SystemErr R at java.util.jar.JarFile.<init>(JarFile.java:118)
[9/30/15 15:09:37:822 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.ParentLastClassLoader.findResourceInURL(ParentLastClassLoader.java:522)
[9/30/15 15:09:37:822 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.ParentLastClassLoader.internalFindResource(ParentLastClassLoader.java:472)
[9/30/15 15:09:37:823 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.ParentLastClassLoader.internalFindClass(ParentLastClassLoader.java:212)
[9/30/15 15:09:37:823 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.ParentLastClassLoader.loadClass(ParentLastClassLoader.java:128)
[9/30/15 15:09:37:823 CEST] 000000d0 SystemErr R at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[9/30/15 15:09:37:823 CEST] 000000d0 SystemErr R at javax.xml.datatype.FactoryFinder.getProviderClass(FactoryFinder.java:115)
[9/30/15 15:09:37:823 CEST] 000000d0 SystemErr R at javax.xml.datatype.FactoryFinder.newInstance(FactoryFinder.java:181)
[9/30/15 15:09:37:823 CEST] 000000d0 SystemErr R at javax.xml.datatype.FactoryFinder.newInstance(FactoryFinder.java:150)
[9/30/15 15:09:37:824 CEST] 000000d0 SystemErr R at javax.xml.datatype.FactoryFinder.find(FactoryFinder.java:268)
[9/30/15 15:09:37:824 CEST] 000000d0 SystemErr R at javax.xml.datatype.DatatypeFactory.newInstance(DatatypeFactory.java:129)
[9/30/15 15:09:37:824 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.DatatypeConverterImpl.getDatatypeFactory(DatatypeConverterImpl.java:741)
[9/30/15 15:09:37:824 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$13.parse(RuntimeBuiltinLeafInfoImpl.java:575)
[9/30/15 15:09:37:824 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$13.parse(RuntimeBuiltinLeafInfoImpl.java:551)
[9/30/15 15:09:37:824 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.FilterTransducer.parse(FilterTransducer.java:69)
[9/30/15 15:09:37:825 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:230)
[9/30/15 15:09:37:825 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:50)
[9/30/15 15:09:37:825 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:549)
[9/30/15 15:09:37:825 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.text(InterningXmlVisitor.java:78)
[9/30/15 15:09:37:825 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:323)
[9/30/15 15:09:37:825 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:201)
[9/30/15 15:09:37:826 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:170)
[9/30/15 15:09:37:826 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
[9/30/15 15:09:37:826 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:109)
[9/30/15 15:09:37:826 CEST] 000000d0 SystemErr R at com.sun.xml.internal.bind.api.Bridge.unmarshal(Bridge.java:222)
[9/30/15 15:09:37:826 CEST] 000000d0 SystemErr R at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:539)
[9/30/15 15:09:37:827 CEST] 000000d0 SystemErr R at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:110)
[9/30/15 15:09:37:827 CEST] 000000d0 SystemErr R at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
[9/30/15 15:09:37:827 CEST] 000000d0 SystemErr R at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
[9/30/15 15:09:37:827 CEST] 000000d0 SystemErr R at com.sun.proxy.$Proxy213.rechercherContrats(Unknown Source)
[9/30/15 15:09:37:827 CEST] 000000d0 SystemErr R at fr.sma.prod.adapter.ContratResource.rechercherContrats(Unknown Source)
[9/30/15 15:09:37:828 CEST] 000000d0 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[9/30/15 15:09:37:828 CEST] 000000d0 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[9/30/15 15:09:37:828 CEST] 000000d0 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[9/30/15 15:09:37:828 CEST] 000000d0 SystemErr R at java.lang.reflect.Method.invoke(Method.java:606)
[9/30/15 15:09:37:828 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
[9/30/15 15:09:37:828 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)
[9/30/15 15:09:37:829 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:829 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:829 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:829 CEST] 000000d0 SystemErr R at com.worklight.wink.extensions.WorklightWinkHandler$1.run(WorklightWinkHandler.java:50)
[9/30/15 15:09:37:829 CEST] 000000d0 SystemErr R at com.worklight.wink.extensions.WorklightWinkHandler$1.run(WorklightWinkHandler.java:45)
[9/30/15 15:09:37:829 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.accessTheResourceWithIdentity(JAXRSAdapterRequestInterceptor.java:96)
[9/30/15 15:09:37:830 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.access$000(JAXRSAdapterRequestInterceptor.java:39)
[9/30/15 15:09:37:830 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:84)
[9/30/15 15:09:37:830 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:81)
[9/30/15 15:09:37:830 CEST] 000000d0 SystemErr R at com.worklight.core.auth.impl.OAuthValidatorFilter$1.run(OAuthValidatorFilter.java:154)
[9/30/15 15:09:37:830 CEST] 000000d0 SystemErr R at com.worklight.core.auth.impl.OAuthValidatorFilter$1.run(OAuthValidatorFilter.java:145)
[9/30/15 15:09:37:830 CEST] 000000d0 SystemErr R at java.security.AccessController.doPrivileged(Native Method)
[9/30/15 15:09:37:831 CEST] 000000d0 SystemErr R at javax.security.auth.Subject.doAs(Subject.java:415)
[9/30/15 15:09:37:831 CEST] 000000d0 SystemErr R at com.worklight.oauth.validation.ValidationFilterHelper.filterRequest(ValidationFilterHelper.java:65)
[9/30/15 15:09:37:831 CEST] 000000d0 SystemErr R at com.worklight.core.auth.impl.OAuthValidatorFilter.securedAccessToResource(OAuthValidatorFilter.java:145)
[9/30/15 15:09:37:831 CEST] 000000d0 SystemErr R at com.worklight.core.auth.impl.OAuthValidatorFilter.filterRequest(OAuthValidatorFilter.java:112)
[9/30/15 15:09:37:831 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.handleRequest(JAXRSAdapterRequestInterceptor.java:81)
[9/30/15 15:09:37:832 CEST] 000000d0 SystemErr R at com.worklight.wink.extensions.WorklightWinkHandler.handleRequest(WorklightWinkHandler.java:45)
[9/30/15 15:09:37:832 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:832 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:832 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:832 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)
[9/30/15 15:09:37:832 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:833 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:833 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:833 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleResourceMethod(FindResourceMethodHandler.java:151)
[9/30/15 15:09:37:833 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:65)
[9/30/15 15:09:37:833 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:833 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:834 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:834 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
[9/30/15 15:09:37:834 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:834 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:834 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:834 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
[9/30/15 15:09:37:835 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:835 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:835 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:835 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleRequest(OptionsMethodHandler.java:46)
[9/30/15 15:09:37:835 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:835 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:836 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:836 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
[9/30/15 15:09:37:836 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:836 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:836 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:836 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
[9/30/15 15:09:37:837 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:837 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:837 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:837 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
[9/30/15 15:09:37:837 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
[9/30/15 15:09:37:837 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
[9/30/15 15:09:37:838 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
[9/30/15 15:09:37:838 CEST] 000000d0 SystemErr R at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:48)
[9/30/15 15:09:37:839 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
[9/30/15 15:09:37:839 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
[9/30/15 15:09:37:839 CEST] 000000d0 SystemErr R at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
[9/30/15 15:09:37:839 CEST] 000000d0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[9/30/15 15:09:37:839 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.JAXRSSandbox$2.doFilter(JAXRSSandbox.java:347)
[9/30/15 15:09:37:839 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.FilterChainImpl.doFilter(FilterChainImpl.java:84)
[9/30/15 15:09:37:840 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.JAXRSSandbox.handleRequest(JAXRSSandbox.java:352)
[9/30/15 15:09:37:840 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.RESTAdaptersServiceServlet.doService(RESTAdaptersServiceServlet.java:69)
[9/30/15 15:09:37:840 CEST] 000000d0 SystemErr R at com.worklight.adapters.rest.RESTAdaptersServlet.service(RESTAdaptersServlet.java:59)
[9/30/15 15:09:37:840 CEST] 000000d0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[9/30/15 15:09:37:840 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1285)
[9/30/15 15:09:37:840 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:776)
[9/30/15 15:09:37:841 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:473)
[9/30/15 15:09:37:841 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:135)
[9/30/15 15:09:37:841 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
[9/30/15 15:09:37:841 CEST] 000000d0 SystemErr R at com.worklight.analytics.AnalyticsFilter.doFilter(AnalyticsFilter.java:124)
[9/30/15 15:09:37:841 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:206)
[9/30/15 15:09:37:841 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:86)
[9/30/15 15:09:37:842 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:978)
[9/30/15 15:09:37:842 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1100)
[9/30/15 15:09:37:842 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
[9/30/15 15:09:37:842 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:912)
[9/30/15 15:09:37:843 CEST] 000000d0 SystemErr R at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
[9/30/15 15:09:37:843 CEST] 000000d0 SystemErr R at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
[9/30/15 15:09:37:843 CEST] 000000d0 SystemErr R at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[9/30/15 15:09:37:843 CEST] 000000d0 SystemErr R at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[9/30/15 15:09:37:843 CEST] 000000d0 SystemErr R at java.lang.Thread.run(Thread.java:745)
I'm completly stuck with this. Has anyone an idea what could that be? (it's odd because it worked before).
my configuration:
product = WebSphere Application Server 8.5.5.5 (wlp-1.0.8.cl50520150305-2202)
wlp.install.dir = C:/Users/axxxx/.ibm/mobilefirst/7.1.0.00.20150807-0630/server/wlp/
java.home = C:\Program Files\Java\jdk1.7.0_79\jre
java.version = 1.7.0_79
java.runtime = Java(TM) SE Runtime Environment (1.7.0_79-b15)
os = Windows 7 (6.1; amd64) (en_US)

MobileFirst Studio in Eclipse sometimes acts strangely with class loading in adapters. One suggestion you may try is the following:
Backup your Studio
Create a new Eclipse workspace
Import a backup of your project
Re-build and deploy the project
Verify that the issue has been resolved.

Related

Using VBA to add active cell address to a range

I'm trying to use this answer to apply my own sort of adding active cell address to a range so I can select the whole range later to a apply a conditional formatting. Below is my code but I'm not sure what is wrong. It came up with the error "Compile Error: Type Mismatch"
p/s: I have recorded my macro on this particular set of cells and then editted it.
Sub Macro1()
Dim rng2 As Range
Range("B3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("D3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("F3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("H3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("J3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("L3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("N3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("P3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("R3").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("R7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("P7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("N7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("L7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("J7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("H7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("F7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("D7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("B7").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("B11").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("D11").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("F11").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range("J11").Select
Set rng2 = Union(rng2, ActiveCell.Address)
Range(rng2).Select
End Sub
Your first Set rng2 = Union(rng2, ActiveCell.Address) should be Set rng2 = ActiveCell. You cannot union to a range object that is nothing and rng2 is nothing until it is set to something so it cannot be part of the union statement.
Each subsequent Set rng2 = Union(rng2, ActiveCell.Address) should be Set rng2 = Union(rng2, ActiveCell). You cannot union to a range object's string address; you must union to a range object.
rng2 is now a valid range object and does not require further definition. Range(rng2).Select is invalid; simply use rng2.Select.
For all intents and purposes, you could have just stated,
Range("B3, D3, F3, H3, J3, L3, N3, P3, R3, R7, P7, N7, L7, J7, H7, F7, D7, B7, B11, D11, F11, J11").Select
You mentioned in a comment that you cut off your code due to space restrictions. Consider the following loop.
dim i as long, rng2 as range
Set rng2 = Range("B3, D3, F3, H3, J3, L3, N3, P3, R3")
For i = 7 To 23 Step 4
Set rng2 = Union(rng2, Intersect(rng2.EntireColumn, Rows(i)))
Next i
rng2.select
rng2.interior.color = vbred
Debug.Print rng2.Address(0, 0)
'B3,D3,F3,H3,J3,L3,N3,P3,R3,B7,D7,F7,H7,J7,L7,N7,P7,R7,B11,D11,F11,H11,J11,L11,N11,P11,R11,B15,D15,F15,H15,J15,L15,N15,P15,R15,B19,D19,F19,H19,J19,L19,N19,P19,R19,B23,D23,F23,H23,J23,L23,N23,P23,R23
The debug.print messages go to the VBE's Immediate window.

I am trying to insert a VLOOKUP formula using VBA but it throws an error

I am trying to insert a VLOOKUP formula using VBA but I keep getting an error.
Sub CCC()
Dim Lastrow As Long 'Used for the formulas
Lastrow = Range("D" & Rows.Count).End(xlUp).Row
Range("B2").formula = "=IFERROR(VLOOKUP(F2,'C:\Users\aNTHONY\[cLASS.xlsx]cLASS'!$B$2:$F$1048576,2,FALSE)"
Range("B2").AutoFill Destination:=Range("B2:B" & Lastrow)
End Sub
But it throws an error at the line:
Range("B2").formula = "=IFERROR(VLOOKUP(F2,'C:\Users\aNTHONY\[cLASS.xlsx]cLASS'!$B$2:$F$1048576,2,FALSE)"
and the error is saying "application-defined or object-defined error"

Object defined error - copying range till the last row of information

I'm trying to open a workbook and then select and copy a range from A7 to L7 until the last row of information (in a downward direction). I think the variable isn't properly defined. Any help?
Sub Subtotals()
Dim DT As Workbook
Dim lRowDT As Integer
Set DT = Workbooks.Open("C:\Users\ricardo\Desktop\Data Fuel.xls")
lRowDT = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Workbooks("Data Fuel.xls").Worksheets("Data").Activate
Worksheets("Data").Range("A7:L" & lRowDT).Copy
End sub
If there is not data over colums L , then this code is suitable.
Sub Subtotals()
Dim DT As Workbook
Dim lRowDT As Integer
Dim Ws As Worksheet
Dim rngDB As Range, r As Long, c As Long
Set DT = Workbooks.Open("C:\Users\ricardo\Desktop\Data Fuel.xls")
'lRowDT = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Set Ws = Workbooks("Data Fuel.xls").Worksheets("Data")
With Ws
r = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
c = .Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
Set rngDB = .Range("a7", .Cells(r, "L"))
End With
rngDB.Copy
End Sub

Worklight appcenter Log

I working using Maximo Anywhere 7.5.1
when i am trying to login using the default app -Work Execution- the application didnt login and i got the following exception in Work-light Server Log
> [7/7/15 1:37:05:093 GST] 0000008a SystemErr R java.net.ConnectException: Connection refused: connect
[7/7/15 1:37:05:102 GST] 0000008a SystemErr R at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:412)
[7/7/15 1:37:05:102 GST] 0000008a SystemErr R at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:271)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:258)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:376)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at java.net.Socket.connect(Socket.java:546)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at java.net.Socket.connect(Socket.java:495)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at sun.net.www.http.HttpClient.openServer(HttpClient.java:437)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at sun.net.www.http.HttpClient.openServer(HttpClient.java:551)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at sun.net.www.http.HttpClient.<init>(HttpClient.java:227)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at sun.net.www.http.HttpClient.New(HttpClient.java:313)
[7/7/15 1:37:05:103 GST] 0000008a SystemErr R at sun.net.www.http.HttpClient.New(HttpClient.java:332)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:999)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:935)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:853)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1207)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:390)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at com.ibm.tivoli.si.auth.TpaeCustomLoginModule.authenticate(Unknown Source)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at com.ibm.tivoli.si.auth.TpaeCustomLoginModule.login(Unknown Source)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at com.worklight.core.auth.impl.LoginContext.invokeLoginModule(LoginContext.java:236)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at com.worklight.core.auth.impl.LoginContext.processRequest(LoginContext.java:200)
[7/7/15 1:37:05:104 GST] 0000008a SystemErr R at com.worklight.core.auth.impl.AuthenticationContext.processRequest(AuthenticationContext.java:274)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:148)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3878)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:461)
[7/7/15 1:37:05:105 GST] 0000008a SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:528)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:314)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[7/7/15 1:37:05:106 GST] 0000008a SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
A Worklight application will not be trying to communicate with the AppCenter Server. It will only try to communicate with the Worklight Server. So, your question makes no sense... please put some more effort when asking questions and properly describe your scenario.
Additionally, java.net.ConnectException: Connection refused: connect typically refers to a network error, such as pointing to the wrong server, port, etc...
I suggest that you will double-check where to you are pointing your application, and again - better describe what you've done.

EXCEL 2010 Run-time error '50290' Method "_Evaluate' of object'_Worksheet' failed

Then i double click on cell with data validation and then try to select from dropdown I get error Runtime error Run-time error '50290'. Method "_Evaluate' of object'_Worksheet' failed
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Case Is < 5
LastRow = 5: CountRow = 0: R = 1
Case Is > 5
LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row: CountRow = LastRow - 4: R = 0
Case 5
LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row: CountRow = LastRow - 4: R = 1
End Select
End Sub
on
Select Case Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
case 1
msgbox "hello"
end select
Runtime error Run-time error '50290'. Application-defined or object-defined error.
on
Select Case Cells.Find(What:="*", After:=Range("A1"), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Why this happens?
Try using:
After:=Range("A1")
rather than:
After:=[A1]
Edit: neither of these fixes it in 2010. However a simple error handler seems to resolve the first change event issue (the double-click then selecting the DV dropdown actually fires two change events:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo err_handle
Select Case Cells.Find(What:="*", after:=[A1] SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Case Is < 5
lastrow = 5: CountRow = 0: R = 1
Case Is > 5
lastrow = Cells.Find(What:="*", after:=[a1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row: CountRow = lastrow - 4: R = 0
Case 5
lastrow = Cells.Find(What:="*", after:=[a1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row: CountRow = lastrow - 4: R = 1
End Select
err_handle:
End Sub
I ran into error 50290 in a spreadsheet using WinHTTP in async mode to check links/download data. According to this www.pcreview.co.uk thread, this error comes up when a script tries to write to a workbook when Excel is not ready. You can test the ready state of the Excel application with Application.Ready.
Using this code before writing to the workbook worked in my script:
Do While Not Application.Ready
DoEvents
Loop