We run a corporate proxy with authentication and we're running Hudson as our CI platform. Hudson can get to the outside world to tell which plugins need updating, but when we tell Hudson to download the updates to the plugins, we get the following error.
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. )"
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:603)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:812)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. )"
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
at java.net.URLConnection.getContentLength(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(Unknown Source)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:602)
... 7 more
Does anyone know how I can configure Hudson or our JRE or whatever needs configuring, to allow Hudson to update via the GUI? Sure we can download updates manually but that gets annoying after a while.
Currently we have Hudson installed as a service on windows server 2008 and its using the built in server that came with Hudson to host it. Also, I've set the proxy configuration via the "Advanced" tab
Two things to do
1. Pop over into the plugin manager and select advanced, enter the settings in there
2. Set the properties of the JRE http://java.sun.com/javase/6/docs/technotes/guides/net/properties.html
You can set properties using the -Dproperty.name=some.value syntax when starting up hudson.
Related
I have installed a spark 2.4.7 using "spark-2.4.7-bin-hadoop2.6.tgz"
I could see the metastore_db got created automatically under the usr home directory and it contains derby database. Also when I developer runs a query it throws error like below
Caused by: javax.jdo.JDOFatalDataStoreException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1#6cde460, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
we are not planning to use derby database, I have MySQL database ready on a different host, can some one please help me understand how can I change the config to point my spark to MySQL instead of the derby??
Thanks in advance
Suresh
I am using Win 7 and downloaded Junit 4.13 and hamcrest 2.1 from
https://github.com/junit-team/junit4/wiki/Download-and-Install
and put them in a folder named JUnit under C.
I have added the variable: JUNIT_HOME with value C:\JUnit.
I have also added the following to my classpath:
%classpath%;.;C:\Program Files\Java\jre1.8.0_171\bin;%CLASSPATH%;
%JUNIT_HOME%\junit-4.13-beta-1;.; %JUNIT_HOME%\hamcrest-core-2.1.jar;
Following https://github.com/junit-team/junit4/wiki/Getting-started,
I added the java files Calculator.java and CalculatorTest.java to my practice folder.
The command
javac -cp .;junit-4.13-beta-1.jar;hamcrest-core-2.1.jar CalculatorTest.java
is executed successfully. However, the command
java -cp .;junit-4.13-beta-1.jar;hamcrest-core-2.1.jar org.junit.runner.JUnitCore CalculatorTest
Fails, giving an error message like
Exception in thread "main" java.lang.NoClassDefFoundError:
org/hamcrest/SelfDescribing
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.junit.runner.Computer.getSuite(Computer.java:28)
at org.junit.runner.Request.classes(Request.java:77)
at org.junit.runner.JUnitCommandLineParseResult.createRequest(JUnitComma
ndLineParseResult.java:116)
at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
Caused by: java.lang.ClassNotFoundException: org.hamcrest.SelfDescribing
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
Please note I have checked posts like java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing, but they have not been helpful. Could you please help?
The correct hamcrest jar is hamcrest-2.1.jar, not hamcrest-core-2.1.jar. You can download it from here.
According to mentioned guide it is assumed you have downloaded jars in the same package as your project:
Create a new folder junit-example and download the current
junit-4.XX.jar from JUnit's release page and Hamcrest to this folder.
If you decided to put jars separately probably you need to correct the command line correspondingly to take these jars files from %JUNIT_HOME%:
java -cp .;%JUNIT_HOME%\junit-4.13-beta-1.jar;%JUNIT_HOME%\hamcrest-core-2.1.jar org.junit.runner.JUnitCore CalculatorTest
I try to install JRuby - which uses install4j installer - on Windows 10 64 bit OS. Java runtime version: 1.8.0_171-b11.
I get following error message in log file during installation process and install is terminated.
java.lang.RuntimeException: java.lang.NoClassDefFoundError: com.install4j.runtime.beans.screens.SystemFormScreen
at com.install4j.runtime.installer.frontend.GUIHelper.invokeOnEDT(GUIHelper.java:711)
at com.install4j.runtime.installer.config.AbstractBeanConfig.finishBatch(AbstractBeanConfig.java:51)
at com.install4j.runtime.installer.ContextImpl.registerScreens(ContextImpl.java:694)
at com.install4j.runtime.installer.controller.Controller.start(Controller.java:75)
at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:58)
at com.install4j.runtime.installer.Installer.main(Installer.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
Caused by: java.lang.NoClassDefFoundError: com.install4j.runtime.beans.screens.SystemFormScreen
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at com.sun.beans.finder.MethodFinder$1.create(Unknown Source)
at com.sun.beans.finder.MethodFinder$1.create(Unknown Source)
at com.sun.beans.util.Cache.get(Unknown Source)
at com.sun.beans.finder.MethodFinder.findMethod(Unknown Source)
at java.beans.Statement.getMethod(Unknown Source)
at java.beans.Statement.invokeInternal(Unknown Source)
at java.beans.Statement.access$000(Unknown Source)
at java.beans.Statement$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.beans.Statement.invoke(Unknown Source)
at java.beans.Expression.getValue(Unknown Source)
at com.sun.beans.decoder.ObjectElementHandler.getValueObject(Unknown Source)
In your case JVM uses options which cannot be used by Ruby/SoapUI correctly.
JAVA_OPTIONS
IBM_JAVA_OPTIONS
JAVA_TOOL_OPTIONS
To work around the issue, you can do the following:
Use Task Manager to completely close the HP UFT and/or Oracle Single
Sign-On software or service.
Remove the JAVA_TOOL_OPTIONS, IBM_JAVA_OPTIONS and _JAVA_OPTIONS OS environment variables.
Also before removing the "JAVA_TOOL_OPTIONS, IBM_JAVA_OPTIONS and _JAVA_OPTIONS" kindly save the information in Notepad. Once after installing, again add"JAVA_TOOL_OPTIONS, IBM_JAVA_OPTIONS and _JAVA_OPTIONS" to your Environmental variables else HPUFT or Oracle SSO will have issue while launching.
else create a bat file and call your installer in the below content and execute the bat file [Jrubyinstall.bat (any prefered filename)] place the batfile in same folder as your installer is placed.
set IBM_JAVA_OPTIONS=
set _JAVA_OPTIONS=
set JAVA_TOOL_OPTIONS=
jruby_windows_9_2_8_0.exe
[Optional --- only if you required to launch it
The above solution is to Install the application,
But to execute it, create a bat file in place of installation [mostly in bin folder]
inside the Bat file:
set IBM_JAVA_OPTIONS=
set _JAVA_OPTIONS=
set JAVA_TOOL_OPTIONS=
[your executable file] xxx.exe/jar/...
and save it. every time you can launch the application via BAT file. ]
I want to set up Sqoop2. But there is some problem in configuring it. When I start the server by sqoop2-server start it does not give any errors on console but it fails to start and it shows errors in the log.
Console output:
Sqoop home directory: /opt/sqoop-1.99.6
Setting SQOOP_HTTP_PORT: 12000
Setting SQOOP_ADMIN_PORT: 12001
Using CATALINA_OPTS:
Adding to CATALINA_OPTS: -Dsqoop.http.port=12000 -Dsqoop.admin.port=12001
Using CATALINA_BASE: /opt/sqoop-1.99.6/server
Using CATALINA_HOME: /opt/sqoop-1.99.6/server
Using CATALINA_TMPDIR: /opt/sqoop-1.99.6/server/temp
Using JRE_HOME: /opt/jdk1.8.0_51/jre
Using CLASSPATH: /opt/sqoop-1.99.6/server/bin/bootstrap.jar
The main error seems to be:
ERROR XSLAN: Database at /opt/sqoop-1.99.6/repository/db has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.10
Here is the complete log:
2015-08-18 12:00:44,932 INFO authentication.SimpleAuthenticationHandler [org.apache.sqoop.security.authentication.SimpleAuthenticationHandler.secureLogin(SimpleAuthenticationHandler.java:40)] Using simple/pseudo authentication, principal [root]
2015-08-18 12:00:44,932 INFO security.AuthenticationManager [org.apache.sqoop.security.AuthenticationManager.initialize(AuthenticationManager.java:102)] Authentication loaded.
2015-08-18 12:00:44,937 INFO security.AuthorizationManager [org.apache.sqoop.security.AuthorizationManager.initialize(AuthorizationManager.java:117)] Authorization loaded.
2015-08-18 12:00:44,938 INFO audit.AuditLoggerManager [org.apache.sqoop.audit.AuditLoggerManager.initialize(AuditLoggerManager.java:80)] Begin audit logger manager initialization
2015-08-18 12:00:44,939 WARN audit.FileAuditLogger [org.apache.sqoop.audit.FileAuditLogger.initialize(FileAuditLogger.java:68)] appender: log4j.appender.defaultAppender
2015-08-18 12:00:44,940 INFO audit.AuditLoggerManager [org.apache.sqoop.audit.AuditLoggerManager.initializeLoggers(AuditLoggerManager.java:127)] Audit Logger has been initialized: default
2015-08-18 12:00:44,941 INFO audit.AuditLoggerManager [org.apache.sqoop.audit.AuditLoggerManager.initialize(AuditLoggerManager.java:86)] Audit logger manager initialized: OK
2015-08-18 12:00:44,942 INFO repository.RepositoryManager [org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:86)] Setting system properties: {derby.stream.error.file=/var/log/sqoop/derbyrepo.log}
2015-08-18 12:00:44,948 INFO repository.JdbcRepositoryContext [org.apache.sqoop.repository.JdbcRepositoryContext.<init>(JdbcRepositoryContext.java:154)] [repo-ctx] handler=org.apache.sqoop.repository.derby.DerbyRepositoryHandler, conn-url=jdbc:derby:/opt/sqoop-1.99.6/repository/db;create=true, driver=org.apache.derby.jdbc.EmbeddedDriver, user=sa, password=*****, jdbc-props={}, tx-isolation=READ_COMMITTED, max-conn=10
2015-08-18 12:00:45,260 INFO derby.DerbyRepositoryHandler [org.apache.sqoop.repository.derby.DerbyRepositoryHandler.initialize(DerbyRepositoryHandler.java:96)] DerbyRepositoryHandler initialized.
2015-08-18 12:00:45,263 INFO repository.JdbcRepositoryProvider [org.apache.sqoop.repository.JdbcRepositoryProvider.initializeRepositoryHandler(JdbcRepositoryProvider.java:160)] JdbcRepositoryProvider initialized
2015-08-18 12:00:45,263 INFO repository.JdbcRepositoryProvider [org.apache.sqoop.repository.JdbcRepositoryProvider.initialize(JdbcRepositoryProvider.java:67)] JdbcRepository initialized.
2015-08-18 12:00:45,263 INFO repository.RepositoryManager [org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:122)] Creating or updating respository at bootup
2015-08-18 12:00:45,341 DEBUG repository.JdbcRepositoryTransaction [org.apache.sqoop.repository.JdbcRepositoryTransaction.close(JdbcRepositoryTransaction.java:103)] Tx count-close: -1, rollback: false
2015-08-18 12:00:45,343 ERROR core.SqoopServer [org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:62)] Server startup failure
org.apache.sqoop.common.SqoopException: JDBCREPO_0007:Unable to lease link
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:63)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:87)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:63)
at org.apache.sqoop.repository.JdbcRepository.createOrUpgradeRepository(JdbcRepository.java:129)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:123)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:77)
at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:56)
at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:41)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.sql.SQLException: Failed to start database '/opt/sqoop-1.99.6/repository/db' with class loader WebappClassLoader
context: /sqoop
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader#4783da3f
, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:78)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:61)
... 31 more
Caused by: java.sql.SQLException: Failed to start database '/opt/sqoop-1.99.6/repository/db' with class loader WebappClassLoader
context: /sqoop
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader#4783da3f
, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 48 more
Caused by: java.sql.SQLException: Database at /opt/sqoop-1.99.6/repository/db has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.10.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
... 45 more
Caused by: ERROR XSLAN: Database at /opt/sqoop-1.99.6/repository/db has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.10.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.readControlFile(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.bootLogFactory(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.setRawStoreFactory(Unknown Source)
at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
... 45 more
2015-08-18 12:00:45,346 ERROR server.ServerInitializer [org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:46)] Sqoop server failed to start
java.lang.RuntimeException: Failure in server initialization
at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:63)
at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:41)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.apache.sqoop.common.SqoopException: JDBCREPO_0007:Unable to lease link
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:63)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:87)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:63)
at org.apache.sqoop.repository.JdbcRepository.createOrUpgradeRepository(JdbcRepository.java:129)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:123)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:77)
at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:56)
... 25 more
Caused by: java.sql.SQLException: Failed to start database '/opt/sqoop-1.99.6/repository/db' with class loader WebappClassLoader
context: /sqoop
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader#4783da3f
, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:78)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:61)
... 31 more
Caused by: java.sql.SQLException: Failed to start database '/opt/sqoop-1.99.6/repository/db' with class loader WebappClassLoader
context: /sqoop
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader#4783da3f
, see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 48 more
Caused by: java.sql.SQLException: Database at /opt/sqoop-1.99.6/repository/db has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.10.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
... 45 more
Caused by: ERROR XSLAN: Database at /opt/sqoop-1.99.6/repository/db has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.10.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.readControlFile(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogToFile.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.bootLogFactory(Unknown Source)
at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.setRawStoreFactory(Unknown Source)
at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
... 45 more
sqoop.properties:
# Logging Configuration
# Any property that starts with the prefix
# org.apache.sqoop.log4j is parsed out by the configuration
# system and passed to the log4j subsystem. This allows you
# to specify log4j configuration properties from within the
# Sqoop configuration.
#
org.apache.sqoop.log4j.appender.file=org.apache.log4j.RollingFileAppender
org.apache.sqoop.log4j.appender.file.File=/var/log/sqoop/sqoop.log
org.apache.sqoop.log4j.appender.file.MaxFileSize=25MB
org.apache.sqoop.log4j.appender.file.MaxBackupIndex=5
org.apache.sqoop.log4j.appender.file.layout=org.apache.log4j.PatternLayout
org.apache.sqoop.log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%l] %m%n
org.apache.sqoop.log4j.debug=true
org.apache.sqoop.log4j.rootCategory=WARN, file
org.apache.sqoop.log4j.category.org.apache.sqoop=DEBUG
org.apache.sqoop.log4j.category.org.apache.derby=INFO
#
# Audit Loggers Configuration
# Multiple audit loggers could be given here. To specify an
# audit logger, you should at least add org.apache.sqoop.
# auditlogger.[LoggerName].class. You could also provide
# more configuration options by using org.apache.sqoop.
# auditlogger.[LoggerName] prefix, then all these options
# are parsed to the logger class.
#
org.apache.sqoop.auditlogger.default.class=org.apache.sqoop.audit.FileAuditLogger
org.apache.sqoop.auditlogger.default.file=/var/log/sqoop/default.audit
#
# Repository configuration
# The Repository subsystem provides the special prefix which
# is "org.apache.sqoop.repository.sysprop". Any property that
# is specified with this prefix is parsed out and set as a
# system property. For example, if the built in Derby repository
# is being used, the sysprop prefixed properties can be used
# to affect Derby configuration at startup time by setting
# the appropriate system properties.
#
# Repository provider
org.apache.sqoop.repository.provider=org.apache.sqoop.repository.JdbcRepositoryProvider
# Repository upgrade
# If set to true, it will not upgrade the sqoop respository schema, by default it will iniate the upgrade on server start-up
org.apache.sqoop.repository.schema.immutable=false
# JDBC repository provider configuration
org.apache.sqoop.repository.jdbc.handler=org.apache.sqoop.repository.derby.DerbyRepositoryHandler
org.apache.sqoop.repository.jdbc.transaction.isolation=READ_COMMITTED
org.apache.sqoop.repository.jdbc.maximum.connections=10
org.apache.sqoop.repository.jdbc.url=jdbc:derby:/opt/sqoop-1.99.6/repository/db;create=true
org.apache.sqoop.repository.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
org.apache.sqoop.repository.jdbc.user=sa
org.apache.sqoop.repository.jdbc.password=
# System properties for embedded Derby configuration
org.apache.sqoop.repository.sysprop.derby.stream.error.file=/var/log/sqoop/derbyrepo.log
#
# Sqoop Connector configuration
# If set to true will initiate Connectors config upgrade during server startup
#
org.apache.sqoop.connector.autoupgrade=false
#
# Sqoop Driver configuration
# If set to true will initiate the Driver config upgrade during server startup
#
org.apache.sqoop.driver.autoupgrade=false
# Sleeping period for reloading configuration file (once a minute)
org.apache.sqoop.core.configuration.provider.properties.sleep=60000
#
# Submission engine configuration
#
# Submission engine class
org.apache.sqoop.submission.engine=org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine
# Number of milliseconds, submissions created before this limit will be removed, default is one day
#org.apache.sqoop.submission.purge.threshold=
# Number of milliseconds for purge thread to sleep, by default one day
#org.apache.sqoop.submission.purge.sleep=
# Number of milliseconds for update thread to sleep, by default 5 minutes
#org.apache.sqoop.submission.update.sleep=
#
# Configuration for Mapreduce submission engine (applicable if it's configured)
#
# Hadoop configuration directory
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/opt/hadoop-2.7.1/etc/hadoop/
#
# Execution engine configuration
#
org.apache.sqoop.execution.engine=org.apache.sqoop.execution.mapreduce.MapreduceExecutionEngine
#
# Authentication configuration
#
#org.apache.sqoop.security.authentication.type=SIMPLE
#org.apache.sqoop.security.authentication.handler=org.apache.sqoop.security.authentication.SimpleAuthenticationHandler
#org.apache.sqoop.security.authentication.anonymous=true
#org.apache.sqoop.security.authentication.type=KERBEROS
#org.apache.sqoop.security.authentication.handler=org.apache.sqoop.security.authentication.KerberosAuthenticationHandler
#org.apache.sqoop.security.authentication.kerberos.principal=sqoop/_HOST#NOVALOCAL
#org.apache.sqoop.security.authentication.kerberos.keytab=/home/kerberos/sqoop.keytab
#org.apache.sqoop.security.authentication.kerberos.http.principal=HTTP/_HOST#NOVALOCAL
#org.apache.sqoop.security.authentication.kerberos.http.keytab=/home/kerberos/sqoop.keytab
#org.apache.sqoop.security.authentication.enable.doAs=true
#org.apache.sqoop.security.authentication.proxyuser.#USER#.users=*
#org.apache.sqoop.security.authentication.proxyuser.#USER#.groups=*
#org.apache.sqoop.security.authentication.proxyuser.#USER#.hosts=*
#
# Authorization configuration
#
#org.apache.sqoop.security.authorization.handler=org.apache.sqoop.security.authorization.DefaultAuthorizationHandler
#org.apache.sqoop.security.authorization.access_controller=org.apache.sqoop.security.authorization.DefaultAuthorizationAccessController
#org.apache.sqoop.security.authorization.validator=org.apache.sqoop.security.authorization.DefaultAuthorizationValidator
#org.apache.sqoop.security.authorization.authentication_provider=org.apache.sqoop.security.authorization.DefaultAuthenticationProvider
#org.apache.sqoop.security.authorization.server_name=SqoopServer1
# External connectors load path
# "/path/to/external/connectors/": Add all the connector JARs in the specified folder
#
org.apache.sqoop.connector.external.loadpath=
I think the problem has some thing to do with embedded derby. Can someone help me find where the problem is?
I deleted the #BASEDIR#/repository/db which in my case is /opt/sqoop-1.99.6/repository/db and again started the server. I am not sure if this is a good method but this worked for me.
I have created a model in Anylogic 7 which get some values from my localhost mysql database. It runs when I export it at stand alone mode but when I am testing it at browser mode i got the error msg:
CacheEntry[http://XXX.XXX.XXX.XXX/supply/com.xj.anylogic.engine.jar]:
updateAvailable=true,lastModified=Fri Oct 24 08:33:50 EEST 2014,length=1401999
CacheEntry[http://XXX.XXX.XXX.XXX/supply/model.jar]:
updateAvailable=true,lastModified=Fri Oct 24 08:33:50 EEST 2014,length=471484
0
CacheEntry[http://XXX.XXX.XXX.XXX/supply/lib/mysql-connector-java-5.1.33-bin.jar]:
updateAvailable=true,lastModified=Fri Oct 24 08:33:50 EEST 2014,length=959987
Error during model creation:
ExceptionInInitializerError
Caused by: access denied ("java.util.PropertyPermission" "file.encoding" "read")
java.lang.ExceptionInInitializerError
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:307)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.xj.anylogic.engine.connectivity.Database.a(Unknown Source)
at com.xj.anylogic.engine.connectivity.Database.getConnection(Unknown Source)
at supply_chain.Factory.instantiateBaseStructure_xjal(Factory.java:1409)
at supply_chain.Factory.<init>(Factory.java:1394)
at supply_chain.Main.instantiate_factory_xjal(Main.java:589)
at supply_chain.Main.instantiateBaseStructure_xjal(Main.java:2863)
at supply_chain.Main.<init>(Main.java:2850)
at supply_chain.Simulation.createRoot(Simulation.java:3399)
at supply_chain.Simulation.createRoot(Simulation.java:1)
at com.xj.anylogic.engine.Experiment.a(Unknown Source)
at com.xj.anylogic.engine.ExperimentSimulation.b(Unknown Source)
at com.xj.anylogic.engine.ExperimentSimulation.run(Unknown Source)
at supply_chain.Simulation.executeShapeControlAction(Simulation.java:900)
Caused by: java.security.AccessControlException: access denied
("java.util.PropertyPermission" "file.encoding" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at com.mysql.jdbc.StringUtils.<clinit>(StringUtils.java:118)
... 16 more
I don't understand where is the error. Can't connect to MySQL because of JAVA security policies?
You are very restricted when using Anylogic in an web applet.
if you look in the anylogic help file, Anylogic help
it states:
According to the Software License Agreement, you may not access any kind of databases or files from Simulation Applets.
so it seems that you have to hardcode the data into the model