I am very new to Geotools, Maven, and all this Java Stuff.
I am trying to add Mapinfo-File using BridjOGRDataStoreFactory follow the instruction provided by you on link OgrPlugin by using the code that I have following error please look into this:
Sep 27, 2016 6:11:46 PM org.bridj.AbstractBridJRuntime log
SEVERE: Failed to get address of method public static native org.bridj.Pointer org.geotools.data.ogr.bridj.OsrLibrary.OCTProj4Normalize(org.bridj.Pointer)
Related
I have followed given 2 tutorials to use COnfigurationAPI in a Liferay dxp plugins SDK portlet built using Ant/Ivy.
COnfiguration API 1
COnfiguration API 2.
Below is the configuration class used:
package com.preferences.interfaces;
import com.liferay.portal.configuration.metatype.annotations.ExtendedObjectClassDefinition;
import aQute.bnd.annotation.metatype.Meta;
#ExtendedObjectClassDefinition(
category = "preferences",
scope = ExtendedObjectClassDefinition.Scope.GROUP
)
#Meta.OCD(
id = "com.preferences.interfaces.UnsupportedBrowserGroupServiceConfiguration",
name = "UnsupportedBrowser.group.service.configuration.name"
)
public interface UnsupportedBrowserGroupServiceConfiguration {
#Meta.AD(deflt = "", required = false)
public String displayStyle();
#Meta.AD(deflt = "0", required = false)
public long displayStyleGroupId(long defaultDisplayStyleGroupId);
}
Post following the steps,I am getting the below error:
ERROR [CM Configuration Updater (ManagedService Update: pid=[com.preferences.interfaces.UnsupportedBrowserGroupServiceConfiguration])][org_apache_felix_configadmin:97] [org.osgi.service.cm.ManagedService, id=7082, bundle=297//com.liferay.portal.configuration.settings-2.0.15.jar?lpkgPath=C:\dev\Liferay\osgi\marketplace\Liferay Foundation.lpkg]: Unexpected problem updating configuration com.preferences.interfaces.UnsupportedBrowserGroupServiceConfiguration {org.osgi.service.cm.ConfigurationAdmin}={service.vendor=Apache Software Foundation, service.pid=org.apache.felix.cm.ConfigurationAdmin, service.description=Configuration Admin Service Specification 1.2 Implementation, service.id=56, service.bundleid=643, service.scope=bundle}
Caused by: java.lang.IllegalArgumentException: wrong number of arguments
So,does this process need a osgi module as mandatory or can we do it using plusings sdk portlet built using ant as well?
Without disecting the error message Caused by: java.lang.IllegalArgumentException: wrong number of arguments:
The way you build your plugin (Ant, Maven, Gradle, manually) doesn't make a difference, as long as you build a plugin that will be understood by the runtime. aQute.bnd.annotation.metatype.Meta points firmly into the OSGi world, and makes it almost certain that you'll need an OSGi module. You can build this with Ant, of course. Even in Ant you can embed tools like bnd, or you can write the proper Manifest.mf to include in your module manually (just kidding - you don't want to do it manually, but it would work).
Recommendation: Instead of moving everything over: Try to reproduce this with a minimal example in gradle or better Liferay Workspace (which is gradle based), just to get all the automatic wiring in. Check if it makes a difference and compare the generated output from your Ant build process with the workspace output. Pay specific attention to the Manifest.
In order to build the proper Manifest, you want to use bnd - if the Manifest turns out to be your issue: Find a way to embrace bnd - if that's by saying goodby to Ant, or by tweaking your build script remains your decision.
I'm writing tests for a rest API. I'm using property and property transfer.
When I run my TestCase using SoapUI, everything goes fine. However, when I run it using maven and the com.smartbear.soapui:soapui-maven-plugin:4.6.1 I got this error:
Status: FAILED
Time Taken: 64
Size: 0
Timestamp: Fri Dec 21 14:15:12 GMT+01:00 2018
TestStep: Property Transfer 1
Error:com.eviware.soapui.impl.wsdl.teststeps.PropertyTransferException: error: Unexpected element: CDATA
----------------- Messages ------------------------------
Error performing transfer [city] - error: Unexpected element: CDATA
----------------------------------------------------
city transferred [[error: Unexpected element: CDATA]] from [Personal_data.city] to [eligibility.Request]
------------ target path -------------
$..city
I'm thinking of using a Groovy script to do my properties transfers but first, I would realy like to understand why I have this error and if there is a way to fix it who doesn't involve a Groovy script.
After looking and looking again, I finally manage to solve the issue:
The problem was that I was using SoapUI 5.4.0 with a (very) old version of soapui-maven-plugin. So, I just change the version of the soapUI plugin in maven to match the one of my SoapUI interfaces and it's now working fine.
each time i try to add ssis custom component, this error pops up
note:- this component works fine on data tool 2010 and 2013 , this problem happens only on Data Tool 2015
is there any thing missing and how to fix it
my .net framework 4.0
the error as follows:
enter image description here
TITLE: Microsoft Visual Studio
The component could not be added to the Data Flow task.
Could not initialize the component. There is a potential problem in the ProvideComponentProperties method.
------------------------------
ADDITIONAL INFORMATION:
Error at Data Flow Task [DTS [7]]: System.MissingMethodException: Method not found: 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData100 Microsoft.SqlServer.Dts.Pipeline.PipelineComponent.get_ComponentMetaData()'.
at CustomProparties.Class1.ProvideComponentProperties()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProvideComponentProperties(IDTSManagedComponentWrapper100 wrapper)
------------------------------
Method not found: 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData100 Microsoft.SqlServer.Dts.Pipeline.PipelineComponent.get_ComponentMetaData()'. (Microsoft.SqlServer.DTSPipelineWrap)
------------------------------
BUTTONS:
OK
------------------------------
I had the same problem and this worked for me:
"Please open your csproj file, and remove <EmbedInteropTypes>True</EmbedInteropTypes> element or set the value to False in the reference to Microsoft.SQLServer.DTSPipelineWrap.dll , then rebuild your project."
Although this is a solution for the component being targeted for SSIS 2012 instead of SSIS 2015 and this is not my situation, it worked.
Source:
Social MSDN
The following Groovy script works correctly from the command line. (I successfully get a Connection.)
// ---- jdbc_test.groovy
import java.sql.*
Class.forName("com.mysql.jdbc.Driver")
def con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/test",
"root",
"password")
println con
> groovy -cp lib\mysql-connector-java-5.1.25-bin.jar script\jdbc_test.groovy
com.mysql.jdbc.JDBC4Connection#6025e1b6
But if the same script is loaded into GroovyConsole (2.4.3) and run - after adding the mysql-connector-java-5.1.25-bin.jar using 'Script' | 'Add Jar(s) to ClassPath' - it fails:
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test
at java_sql_DriverManager$getConnection.call(Unknown Source)
at jdbc_test.run(jdbc_test.groovy:3)
Every other package or class I have added to the classpath in GroovyConsole and experimented with has worked. Is there some unexpected interaction of Groovy's class loading and the way DriverManager works?
Is there a way around this? I'm trying to use the GroovyConsole to interactively test out some JDBC code (a library of functions, each of which takes a Connection as its first argument).
UPDATE: The Class.forName() part appears to be working fine. If I 'Script' | 'Clear Script Context' and rerun the script in GroovyConsole, I instead get:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
If I add mysql-connector-java-5.1.25-bin.jar back in, I go back to getting:
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test
Solution: The driver has to be on the classpath.
Reason:
If you look into the DriverManager class you find code like this: Class.forName(driver.getClass().getName(), true, classLoader);. This is to check if the driver is accessible from your classloader context. And that context is determined by going back to the class that is calling he DriverManager. This code is written for Java, thus assumes a certain amount of frames on the call stack to go back. Since Groovy does not do direct calls (unless you use #CompileStatic) this number is wrong and leads usually to a Groovy core class to be selected, resulting in Groovy main loader to be selected.... in the past this was often even the JDK system classloader because of reflection. So even though the driver is loaded and registered, it is not accessible to you.
Note: with jdbc4 the driver should register itself, just by being on the classpath
I am getting a UnsatisfiedLinkError exception when I am trying to get the screen Width like this:
int screenWidth = BrowserInfo.get().getScreenWidth();
The exception is thrown at BrowserInfo.getBrowserString():
Feb 25, 2013 2:03:40 PM com.vaadin.server.DefaultErrorHandler doDefault
SEVERE:
java.lang.UnsatisfiedLinkError: com.vaadin.client.BrowserInfo.getBrowserString()Ljava/lang/String;
at com.vaadin.client.BrowserInfo.getBrowserString(Native Method)
at com.vaadin.client.BrowserInfo.<init>(BrowserInfo.java:76)
at com.vaadin.client.BrowserInfo.get(BrowserInfo.java:67)
at com.vaadin.client.BrowserInfo.<clinit>(BrowserInfo.java:56)
at layoutHandler.MainLayoutHanlder.setCssClasses(MainLayoutHanlder.java:34)
Is this a Vaadin 7 bug, or am I just using the BrowserInfo class wrong?
Call Page.getCurrent().getBrowserWindowWidth() instead.
BrowserInfo is a client class, you should not use this in your server side classes. I would avoid putting the client libraries on the class path at all. getBrowserWindowWidth is native because that's the GWT compiler's way to bridge into JavaScript code. If you look at the source, the JavaScript code is in a specially formatted comment.