Getting JSON parser error when using sap-cloud-sdk - sap-cloud-sdk

We are currently using the following bom for sap cloud sdk . This is in line with the bom that is supposed to be used with the CAP NG stack
<dependency>
<groupId>com.sap.cloud.sdk</groupId>
<artifactId>sdk-modules-bom</artifactId>
<version>3.11.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>.
While running our application we get the following stack trace
[APP/PROC/WEB/0] OUT 2020-03-17 05:24:11.523 ERROR 13 --- [nio-8080-exec-3] c.s.c.a.o.v.p.impl.DataProvider : com.google.gson.JsonParser.parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement;
2020-03-17T10:54:11.52+0530 [APP/PROC/WEB/0] OUT java.lang.NoSuchMethodError: com.google.gson.JsonParser.parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement;
2020-03-17T10:54:11.52+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.security.AuthTokenRequest.extractAccessToken(AuthTokenRequest.java:114) ~[security-scp-cf-3.11.0.jar!/:na]
2020-03-17T10:54:11.52+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.security.AuthTokenRequest.lambda$getXsuaaServiceToken$4eef0570$1(AuthTokenRequest.java:100) ~[security-scp-cf-3.11.0.jar!/:na]
2020-03-17T10:54:11.52+0530 [APP/PROC/WEB/0] OUT at io.vavr.control.Try.of(Try.java:75) ~[vavr-0.10.2.jar!/:na]
2020-03-17T10:54:11.52+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.security.AuthTokenRequest.getXsuaaServiceToken(AuthTokenRequest.java:81) ~[security-scp-cf-3.11.0.jar!/:na]
2020-03-17T10:54:11.52+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.security.AuthTokenRequest.getXsuaaServiceToken(AuthTokenRequest.java:75) ~[security-scp-cf-3.11.0.jar!/:na]
2020-03-17T10:54:11.52+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.security.DefaultAuthTokenFacade.lambda$tryGetXsuaaServiceToken$ca2e0d2c$1(DefaultAuthTokenFacade.java:77) ~[security-scp-cf-3.11.0.jar!/:na]
We have also added the gson dependency to our pom, but this did not resolve the issue
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>

The SAP Cloud SDK for Java version 3.11.0 uses GSON version 2.8.6, see sdk-bom:3.11.0.
The following dependency can be declared:
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
Let me know if you need help with configuring a conflict-free POM.

Related

AEM 6.5 Oracle DB NoClassDefFoundError

from my AEM 6.5 instance currently I connect correctly to an oracle db using tcp:
jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=my-oracle-db)(PORT=1531)))(CONNECT_DATA=(SERVICE_NAME=MY_SRV)))
But when I try to establish a secure connection like this:
jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCPS)(HOST=my-oracle-secure-db)(PORT=1541)))(CONNECT_DATA=(SERVICE_NAME=MY_SRV)))
I get a oraclepki.jar must be in the classpath: java.lang.NoClassDefFoundError: oracle/security/pki/OracleWallet. The wallet is configured correctly and I tried to add the following dependency in my project, without any result:
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>oraclepki</artifactId>
<version>19.3.0.0</version>
</dependency>
...
<embedded>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>oraclepki</artifactId>
<target>/apps/myproject/install</target>
</embedded>
...
<filter root="/apps/myproject/install/oraclepki-19.3.0.0.jar"/>
Do you have any idea of the cause?
Regards

Quarkus native and org.kohsuke:github-api - Failed to deserialize exception

I'm playing with Quarkus native and org.kohsuke:github-api:1.111 and I see Failed to deserialize exception in native mode when doing simple new GitHubBuilder().withOAuthToken(ghToken).build();. This works in JVM mode.
The main problem is probably the fact that org.kohsuke:github-api is not ready for native mode.
I still want to ask if there are any options to workaround this, maybe some jackson tricks for https://github.com/github-api/github-api/blob/master/src/main/java/org/kohsuke/github/GHMyself.java (stacktrace contains Cannot construct instance of org.kohsuke.github.GHMyself (no Creators, like default construct, exist)).
Exception details:
2020-05-05 10:47:06,891 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /hello failed, error id: a71018e5-de46-43a0-a194-80bd0b477f3d-1: org.jboss.resteasy.spi.UnhandledException: org.kohsuke.github.HttpException: Server returned HTTP response code: 200, message: '200 OK' for URL: https://api.github.com/user
...
Caused by: java.io.IOException: Failed to deserialize {"login":"rsvoboda","id":925259,"node_id":"MDQ6VXNlcjkyNTI1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/925259?v=4","gravatar_id":"","url":"https://api.github.com/users/rsvoboda","html_url":"https://github.com/rsvoboda","followers_url":"https://api.github.com/users/rsvoboda/followers","following_url":"https://api.github.com/users/rsvoboda/following{/other_user}","gists_url":"https://api.github.com/users/rsvoboda/gists{/gist_id}","starred_url":"https://api.github.com/users/rsvoboda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsvoboda/subscriptions","organizations_url":"https://api.github.com/users/rsvoboda/orgs","repos_url":"https://api.github.com/users/rsvoboda/repos","events_url":"https://api.github.com/users/rsvoboda/events{/privacy}","received_events_url":"https://api.github.com/users/rsvoboda/received_events","type":"User","site_admin":false,"name":"Rostislav Svoboda","company":"JBoss by Red Hat by IBM","blog":"https://twitter.com/r_svoboda","location":"Brno, Czech Republic","email":"rsvoboda#redhat.com","hireable":null,"bio":null,"public_repos":138,"public_gists":3,"followers":18,"following":2,"created_at":"2011-07-19T12:18:08Z","updated_at":"2020-04-29T14:38:31Z"}
at org.kohsuke.github.GitHubResponse.parseBody(GitHubResponse.java:87)
at org.kohsuke.github.GitHubClient.lambda$fetch$0(GitHubClient.java:146)
at org.kohsuke.github.GitHubClient.createResponse(GitHubClient.java:404)
at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
... 37 more
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.kohsuke.github.GHMyself` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (String)"{"login":"rsvoboda","id":925259,"node_id":"MDQ6VXNlcjkyNTI1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/925259?v=4","gravatar_id":"","url":"https://api.github.com/users/rsvoboda","html_url":"https://github.com/rsvoboda","followers_url":"https://api.github.com/users/rsvoboda/followers","following_url":"https://api.github.com/users/rsvoboda/following{/other_user}","gists_url":"https://api.github.com/users/rsvoboda/gists{/gist_id}","starred_url":"https://api.github.com/users/rsvobod"[truncated 734 chars]; line: 1, column: 2]
at com.fasterxml.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1592)
at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1058)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1297)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1719)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1261)
at org.kohsuke.github.GitHubResponse.parseBody(GitHubResponse.java:84)
Reproducer details:
generate the app - https://quarkus.io/guides/getting-started#bootstrapping-the-project
add dependencies and quarkus.native.enable-https-url-handler propery for native
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId>
<version>1.111</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
...
<properties>
<quarkus.package.type>native</quarkus.package.type>
<quarkus.native.enable-https-url-handler>true</quarkus.native.enable-https-url-handler>
</properties>
change GreetingResource
GitHub github = new GitHubBuilder().withOAuthToken(ghToken).build();
GHRepository ghRepo = github.getRepository("quarkusio/quarkus");
return ghRepo.toString();
drop .body(is("hello")) from GreetingResourceTest
run mvn clean verify -Dnative
You can also use #RegisterForReflection(targets = GHObject.class) on any of your classes
My guess is that you will need to register all the GHObject hierarchy for reflection using a ReflectiveHierarchyBuildItem.
So that requires an extension. It would be a useful addition for the Platform IMHO.
If you are running in native mode and getting the error is because of reflection to resolve the annotate your class with #RegisterForReflection also add a no-args constructor in your class then rebuild the application and run your error will be resolved.
for more reference see quarkus guide on the link

JHipster prod build not able to create

Getting below Error when creating prod build with fresh code generated through JHipster
User below options:
1.monolithic app
2.Do you want to use the JHipster Registry to configure -- no
3. JWT authentication
4. H2 database with disk persistence
5.no cache
6 maven
7. websockets using spring
8. angular 4
9. no css processor
10.no international
11. no testing framework
12.no other generators
using below command on windows
mvnw -Pprod
Also this command is installing the node and yarn locally
[INFO] [4/4] Building fresh packages...
[ERROR] error D:\ws\15_sep\node_modules\spawn-sync: Command failed.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[ERROR] Exit code: 1
[ERROR] Command: C:\WINDOWS\system32\cmd.exe
[ERROR] Arguments: /d /s /c node postinstall
[ERROR] Directory: D:\ws\15_sep\node_modules\spawn-sync
[ERROR] Output:
[ERROR] module.js:471
[ERROR] throw err;
[ERROR] ^
[ERROR]
[ERROR] Error: Cannot find module 'D:\ws\15_sep\node_modules\spawn-sync\postinstall'
[ERROR] at Function.Module._resolveFilename (module.js:469:15)
[ERROR] at Function.Module._load (module.js:417:25)
[ERROR] at Module.runMain (module.js:604:10)
[ERROR] at run (bootstrap_node.js:389:7)
[ERROR] at startup (bootstrap_node.js:149:9)
[ERROR] at bootstrap_node.js:504:3
currently i am able to create the build war file by first running the dev build by running below command
npm install
and then remove the below execution from prod profile from pom.xml file
and then running the prod build
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<yarnVersion>${yarn.version}</yarnVersion>
</configuration>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
and then running the prod build
mvnw -Pprod

Not able to see application insight data for my sample java application, Failed to send, unexpected exception: Connection pool shut down

I'm using a "hello world" type java application to send some data to application insight, but not able to see any thing so far.
I have followed the instructions so far. Created app insight resource in azure portal, used that instrumentaion key in my application,
kept the applicationinsight.xml, web.xml and pom.xml configured correctly. But never able to send any data. Following is my pom...
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>test1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-web</artifactId>
<!-- or applicationinsights-core for bare API -->
<version>[1.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-core</artifactId>
<!-- or applicationinsights-core for bare API -->
<version>[1.0,)</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<name>Central</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Using env.test.properties</echo>
<copy file="${basedir}/src/ApplicationInsights.xml" tofile="${basedir}/target/classes/ApplicationInsights.xml"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This is my applicationinsight.xml ...
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" schemaVersion="2014-05-30">
<InstrumentationKey>my_key</InstrumentationKey>
<ContextInitializers>
</ContextInitializers>
<TelemetryInitializers>
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebOperationIdTelemetryInitializer"/>
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebOperationNameTelemetryInitializer"/>
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebSessionTelemetryInitializer"/>
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebUserTelemetryInitializer"/>
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebUserAgentTelemetryInitializer"/>
</TelemetryInitializers>
<TelemetryModules>
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebRequestTrackingTelemetryModule"/>
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebSessionTrackingTelemetryModule"/>
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebUserTrackingTelemetryModule"/>
</TelemetryModules>
<Channel>
<!--
Setting DeveloperMode to true will enable immediate transmission of the telemetry events, which can be helpful during the development process.
Make sure to turn this off on production servers due to performance considerations.
-->
<DeveloperMode>true</DeveloperMode>
</Channel>
<DisableTelemetry>false</DisableTelemetry>
<SDKLogger />
</ApplicationInsights>
this is my sample code
TelemetryClient tc = new TelemetryClient();
tc.getContext().setInstrumentationKey("my_key");
Map<String, String> properties = new HashMap<String, String>();
properties.put("Game", "GameName");
properties.put("Difficulty", "hard");
Map<String, Double> measurements = new HashMap<String, Double>();
measurements.put("GameScore", 20.0);
measurements.put("Opponents", 1.0);
try{
tc.trackEvent("WinGame", properties, measurements);
tc.flush();
} catch (Exception e)
{
e.printStackTrace();
}
Following is the log I get every time I run my application, Am I missing some configuration step?
AI: INFO 29-10-2016 13:18, 1: Configuration file has been successfully found as resource
AI: INFO 29-10-2016 13:18, 1: 'MaxTelemetryBufferCapacity': null value is replaced with '500'
AI: INFO 29-10-2016 13:18, 1: 'FlushIntervalInSeconds': null value is replaced with '5'
AI: TRACE 29-10-2016 13:18, 1: Using Http Client version 4.3+
AI: INFO 29-10-2016 13:18, 1: 'Channel.MaxTransmissionStorageCapacityInMB': null value is replaced with '10'
AI: ERROR 29-10-2016 13:18, 1: Failed to create empty class name
AI: TRACE 29-10-2016 13:18, 1: C:\Users\myuser\AppData\Local\Temp\AISDK\native\1.0.6 folder exists
AI: TRACE 29-10-2016 13:18, 1: Java process name is set to 'java#1'
AI: TRACE 29-10-2016 13:18, 1: Successfully loaded library 'applicationinsights-core-native-win64.dll'
AI: ERROR 29-10-2016 13:18, 1: Failed to create DeadLockDetector, exception: null
AI: ERROR 29-10-2016 13:18, 1: Failed to create JvmHeapMemoryUsedPerformanceCounter, exception: null
AI: TRACE 29-10-2016 13:18, 1: Registering PC 'JSDK_ProcessMemoryPerformanceCounter'
AI: TRACE 29-10-2016 13:18, 1: Registering PC 'JSDK_ProcessCpuPerformanceCounter'
AI: TRACE 29-10-2016 13:18, 1: Registering PC 'JSDK_WindowsPerformanceCounterAsPC'
AI: TRACE 29-10-2016 13:18, 1: InProcessTelemetryChannel sending telemetry
AI: ERROR 29-10-2016 13:18, 20: Failed to send, unexpected exception: Connection pool shut down
****Update1: I added Thread.sleep(7000) before telemetryClient.flush() in the code and the socket exception is gone, but still no data in application-insight resource
****Update2: wrote a sample C# console application to send app insight data, and no luck there as well. I am using Fiddler to monitor traffics. Will update if I see some interesting outbound HTTP requests
****Update3: after playing a little bit with fiddler and java (how to Capture https with fiddler, in java) I was able to capture outbound traffics towards https://dc.services.visualstudio.com/v2/track, but nothing showed up yet in application insight resource in the azure portal
Can you please check if this is also happening with version 1.0.5 of the SDK to see if it is a regression in the latest version of the SDK or an issue specific to your app's scenario?
thanks
It works, there was a confusion, I was sending custom events but from the portal I was looking for request events so I was not seeing anything. It's working absolutely fine for me.

Error while creating ro.isdc.wro.extensions.manager.ExtensionsConfigurableWroManagerFactory

Currently I am working in a web app proyect that involves Java, javascript, css (compass). I am trying to configure a runtime solution that merges all *.js and *.scss into a single file. I am following the guidelines explained in the Wro4j site but still I get the following error:
2014-12-16 12:59:00,154 [http-bio-8080-exec-2] ERROR ro.isdc.wro.extensions.model.factory.SmartWroModelFactory - Using XmlModelFactory for model creation..
[FAIL] Model creation using XmlModelFactory failed. Trying another ...
[FAIL] Exception occured while building the model using: XmlModelFactory Cannot build model from XML Using GroovyModelFactory for model creation..
[FAIL] Model creation using GroovyModelFactory failed. Trying another ...
[FAIL] Exception occured while building the model using: GroovyModelFactory Invalid model found! Using JsonModelFactory for model creation..
[FAIL] Model creation using JsonModelFactory failed. Trying another ...
[FAIL] Exception occured while building the model using: JsonModelFactory Invalid model found!
2014-12-16 12:59:00,155 [http-bio-8080-exec-2] ERROR ro.isdc.wro.model.factory.FallbackAwareWroModelFactory - Error while creating the model
ro.isdc.wro.WroRuntimeException: Cannot create model using any of provided factories
at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:194)
at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:36)
at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
at ro.isdc.wro.model.factory.FallbackAwareWroModelFactory.create(FallbackAwareWroModelFactory.java:48)
at ro.isdc.wro.model.factory.FallbackAwareWroModelFactory.create(FallbackAwareWroModelFactory.java:22)
at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory.access$101(InMemoryCacheableWroModelFactory.java:19)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory$1.initialize(InMemoryCacheableWroModelFactory.java:32)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory$1.initialize(InMemoryCacheableWroModelFactory.java:29)
at ro.isdc.wro.util.LazyInitializer.get(LazyInitializer.java:33)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory.create(InMemoryCacheableWroModelFactory.java:42)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory.create(InMemoryCacheableWroModelFactory.java:19)
at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
at ro.isdc.wro.model.factory.ModelTransformerFactory.create(ModelTransformerFactory.java:55)
at ro.isdc.wro.model.factory.ModelTransformerFactory.create(ModelTransformerFactory.java:27)
at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator.create(DefaultWroModelFactoryDecorator.java:53)
at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator.create(DefaultWroModelFactoryDecorator.java:25)
at ro.isdc.wro.model.group.processor.GroupsProcessor.process(GroupsProcessor.java:65)
at ro.isdc.wro.cache.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:40)
at ro.isdc.wro.cache.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:22)
at ro.isdc.wro.cache.AbstractSynchronizedCacheStrategyDecorator.get(AbstractSynchronizedCacheStrategyDecorator.java:52)
at ro.isdc.wro.manager.WroManager.serveProcessedBundle(WroManager.java:182)
at ro.isdc.wro.manager.WroManager.process(WroManager.java:134)
at ro.isdc.wro.http.WroFilter.processRequest(WroFilter.java:374)
at ro.isdc.wro.http.WroFilter.doFilter(WroFilter.java:324)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at de.tetralog.pqa.auth.valve.PQACBSamlLoginValve.invoke(PQACBSamlLoginValve.java:46)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
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)
2014-12-16 12:59:00,157 [http-bio-8080-exec-2] WARN ro.isdc.wro.model.factory.FallbackAwareWroModelFactory - Couldn't load new model, reusing last Valid Model!
2014-12-16 12:59:00,160 [http-bio-8080-exec-2] INFO com.tetralog.optimize4.servlets.ErrorPageServlet - Error page servlet initialized with the following options: errorPage=/WEB-INF/pages/error/error.jsp, showStackTrace=true
2014-12-16 12:59:00,162 [http-bio-8080-exec-2] ERROR com.tetralog.optimize4.servlets.ErrorPageServlet - Unhandled error in web application: incident id 014a52f73440-6152ec8b, HTTP status code 404 (Not Found), error message: "/bestInvest/wro/all.js", servlet: default, request URI: "/bestInvest/wro/all.js" (referer: "http://localhost:8080/bestInvest/customerSelection.do")
2014-12-16 13:07:27,975 [http-bio-8080-exec-1] ERROR ro.isdc.wro.extensions.model.factory.SmartWroModelFactory - Using XmlModelFactory for model creation..
[FAIL] Model creation using XmlModelFactory failed. Trying another ...
[FAIL] Exception occured while building the model using: XmlModelFactory Cannot build model from XML Using GroovyModelFactory for model creation..
[FAIL] Model creation using GroovyModelFactory failed. Trying another ...
[FAIL] Exception occured while building the model using: GroovyModelFactory Invalid model found! Using JsonModelFactory for model creation..
[FAIL] Model creation using JsonModelFactory failed. Trying another ...
[FAIL] Exception occured while building the model using: JsonModelFactory Invalid model found!
2014-12-16 13:07:27,976 [http-bio-8080-exec-1] ERROR ro.isdc.wro.model.factory.FallbackAwareWroModelFactory - Error while creating the model
ro.isdc.wro.WroRuntimeException: Cannot create model using any of provided factories
at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:194)
at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:36)
at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
at ro.isdc.wro.model.factory.FallbackAwareWroModelFactory.create(FallbackAwareWroModelFactory.java:48)
at ro.isdc.wro.model.factory.FallbackAwareWroModelFactory.create(FallbackAwareWroModelFactory.java:22)
at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory.access$101(InMemoryCacheableWroModelFactory.java:19)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory$1.initialize(InMemoryCacheableWroModelFactory.java:32)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory$1.initialize(InMemoryCacheableWroModelFactory.java:29)
at ro.isdc.wro.util.LazyInitializer.get(LazyInitializer.java:33)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory.create(InMemoryCacheableWroModelFactory.java:42)
at ro.isdc.wro.model.factory.InMemoryCacheableWroModelFactory.create(InMemoryCacheableWroModelFactory.java:19)
at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
at ro.isdc.wro.model.factory.ModelTransformerFactory.create(ModelTransformerFactory.java:55)
at ro.isdc.wro.model.factory.ModelTransformerFactory.create(ModelTransformerFactory.java:27)
at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator.create(DefaultWroModelFactoryDecorator.java:53)
at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator.create(DefaultWroModelFactoryDecorator.java:25)
at ro.isdc.wro.model.group.processor.GroupsProcessor.process(GroupsProcessor.java:65)
at ro.isdc.wro.cache.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:40)
at ro.isdc.wro.cache.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:22)
at ro.isdc.wro.cache.AbstractSynchronizedCacheStrategyDecorator.get(AbstractSynchronizedCacheStrategyDecorator.java:52)
at ro.isdc.wro.manager.WroManager.serveProcessedBundle(WroManager.java:182)
at ro.isdc.wro.manager.WroManager.process(WroManager.java:134)
at ro.isdc.wro.http.WroFilter.processRequest(WroFilter.java:374)
at ro.isdc.wro.http.WroFilter.doFilter(WroFilter.java:324)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at de.tetralog.pqa.auth.valve.PQACBSamlLoginValve.invoke(PQACBSamlLoginValve.java:46)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
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)
2014-12-16 13:07:27,976 [http-bio-8080-exec-1] WARN ro.isdc.wro.model.factory.FallbackAwareWroModelFactory - Couldn't load new model, reusing last Valid Model!
I added the following dependencies to my pom.xml file:
<!-- ====================================================================================== -->
<!-- PROJECT DEPENDENCIES -->
<!-- ====================================================================================== -->
<dependencies>
<!-- WRO4J -->
<dependency>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-core</artifactId>
<version>${wro4j.version}</version>
</dependency>
<dependency>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-extensions</artifactId>
<version>${wro4j.version}</version>
</dependency>
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
<version>1.7R2</version>
</dependency>
...
</dependencies>
I create the wro.properties file inside the WEF-INF directory:
<pre><code>
cacheUpdatePeriod=0
modelUpdatePeriod=0
debug=true
disableCache=false
minimizeEnabled=false
gzipResources=true
ignoreMissingResources=true
jmxEnabled=true
managerFactoryClassName=ro.isdc.wro.extensions.manager.ExtensionsConfigurableWroManagerFactory
preProcessors=semicolonAppender,sassCss,cssImport
postProcessors=cssVariables
uriLocators=servletContext,uri,classpath
</code></pre>
and also the wro.xml in the same directory:
<?xml version="1.0" encoding="UTF-8"?>
<groups xmlns="http://www.isdc.ro/wro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.isdc.ro/wro wro.xsd">
<group name="all">
<js>/js/lib/jquery-1.11.1.min.js</js>
<js>/js/lib/jquery.ie-select-width.js</js>
<js>/js/lib/jquery.blockUI.js</js>
<js>/js/lib/stringPrototypeFix.js</js>
<js>/js/lib/jquery.tooltipster.min.js</js>
<js>/js/constants.js</js>
<js>/js/common.js</js>
<js>/js/lib/underscore-min.js</js>
<js>/js/lib/backbone-min.js</js>
<js>/js/lib/jquery-ui/jquery-ui-1.11.0.custom.min.js</js>
<js>/js/lib/jquery-ui/jquery.ui.datepicker-de.js</js>
<js>/js/lib/timepicker/jquery-ui-timepicker-de.js</js>
<js>/js/lib/datetime.control.js</js>
<js>/js/lib/arrayExtensions.js</js>
<js>/js/lib/moment.js</js>
<js>/js/plugins/numeral.min.js</js>
<js>/js/plugins/numericInput.jquery.plugin.js</js>
<js>/js/plugins/defaultText.jquery.plugin.js</js>
<js>/js/plugins/dialog.jquery.plugin.js</js>
<js>/js/plugins/dataTracker.js</js>
<js>/js/plugins/editableCombobox.jquery.plugin.js</js>
<js>/js/plugins/textField.utils.jQuery.plugin.js</js>
<js>/js/models/common/common.models.js</js>
<js>/js/models/common/permissionKeys.js</js>
<js>/js/models/common/common.errorCodes.js</js>
<js>/js/models/common/categoryModel.model.js</js>
<js>/js/models/common/predicates.js</js>
<js>/js/models/common/filterCondition.model.js</js>
<js>/js/views/common/*.js</js>
<js>/js/models/common/pageResultModel.model.js</js>
<js>/js/models/common/searchResultModel.model.js</js>
<js>/js/models/common/paginatedModel.model.js</js>
<js>/js/models/common/chart.model.js</js>
<js>/js/models/common/message.model.js</js>
<js>/js/models/common/dataTrackerFunction.model.js</js>
<js>/js/views/common/workflow/*.js</js>
<js>/js/models/common/workflow/*.js</js>
<js>/js/models/domain/user.model.js</js>
<js>/js/models/domain/advisor.model.js</js>
<js>/js/models/domain/distribution.model.js</js>
<js>/js/models/domain/charts/chartDistribution.model.js</js>
<js>/js/models/domain/charts/chart.model.js</js>
<js>/js/models/domain/money.model.js</js>
<js>/js/models/domain/customer.model.js</js>
<js>/js/models/domain/allocation.model.js</js>
<js>/js/models/domain/products/product.model.js</js>
<js>/js/models/domain/products/productInstance.model.js</js>
<js>/js/models/domain/products/productLine.model.js</js>
<js>/js/models/recommendation/portfolioPositions.model.js</js>
<js>/js/models/customer-selection/customerSearch.model.js</js>
<js>/js/models/customerReports/reportType.model.js</js>
<js>/js/models/customerReports/report.model.js</js>
<js>/js/models/customerReports/customerReports.model.js</js>
<js>/js/models/customer-selection/newCustomer.model.js</js>
<js>/js/models/customerProfileChanges/profileChanges.model.js</js>
<js>/js/models/customerProfileChanges/customerProfileChanges.model.js</js>
<js>/js/models/customerOverview/currentAllocation.model.js</js>
<js>/js/models/documentation/documentation.model.js</js>
<js>/js/models/documentation/tax.model.js</js>
<js>/js/models/documentation/taxReduction.model.js</js>
<js>/js/models/orderform/orderformOrderPosition.model.js</js>
<js>/js/models/orderform/orderformDeposit.model.js</js>
<js>/js/models/orderform/orderform.model.js</js>
<js>/js/views/customerSelection/customerSelectionPage.view.js</js>
<js>/js/views/customerSelection/customerSearch.view.js</js>
<js>/js/views/customerSelection/newCustomer.view.js</js>
<js>/js/views/customerProfile/customerProfilePage.view.js</js>
<js>/js/views/customerProfile/customerProfileByLaw.view.js</js>
<js>/js/views/customerReports/customerReportRow.view.js</js>
<js>/js/views/customerReports/customerReportsTable.view.js</js>
<js>/js/views/customerReports/customerReportsPage.view.js</js>
<js>/js/views/customerProfileChanges/customerProfileChangesPage.view.js</js>
<js>/js/views/customerProfileChanges/customerProfileChangesRow.view.js</js>
<js>/js/views/customerProfileChanges/customerProfileChangesTable.view.js</js>
<js>/js/models/domain/portfolios/instrumentCategory.model.js</js>
<js>/js/models/domain/portfolios/instrumentInfo.model.js</js>
<js>/js/models/domain/portfolios/position.model.js</js>
<js>/js/models/domain/portfolios/role.model.js</js>
<js>/js/models/domain/portfolios/portfolioNode.model.js</js>
<js>/js/models/domain/portfolios/portfolio.model.js</js>
<js>/js/models/domain/portfolios/modelPortfolio.model.js</js>
<js>/js/models/domain/portfolios/deposit.model.js</js>
<js>/js/models/domain/portfolios/account.model.js</js>
<js>/js/models/domain/portfolios/investmentParameters.model.js</js>
<js>/js/models/domain/portfolios/accountClassification.model.js</js>
<js>/js/models/domain/portfolios/manualCreatedAccount.model.js</js>
<js>/js/models/domain/portfolios/instrumentQuantity.model.js</js>
<js>/js/views/portfolios/depotsPageSummaryTable.view.js</js>
<js>/js/views/portfolios/depotsPageSummaryAccountTable.view.js</js>
<js>/js/views/portfolios/depotsPage.view.js</js>
<js>/js/views/portfolios/combination.view.js</js>
<js>/js/views/portfolios/analysis.view.js</js>
<js>/js/views/portfolios/investmentInfo.view.js</js>
<js>/js/views/portfolios/holistic.view.js</js>
<js>/js/views/portfolios/accountClassificationTable.view.js</js>
<js>/js/views/portfolios/instrumentTable.view.js</js>
<js>/js/views/portfolios/thirdPartyComponents.view.js</js>
<js>/js/views/portfolios/investmentSummaryTable.view.js</js>
<js>/js/views/start/start.view.js</js>
<js>/js/models/customerOverview/assetOverview.model.js</js>
<js>/js/models/customerOverview/nodeOverview.model.js</js>
<js>/js/views/customerOverview/depotDetails.view.js</js>
<js>/js/views/customerOverview/customerOverviewRow.view.js</js>
<js>/js/views/customerOverview/customerOverviewTable.view.js</js>
<js>/js/views/customerOverview/customerOverviewPage.view.js</js>
<js>/js/views/documentation/documentationPage.view.js</js>
<js>/js/views/documentation/documentationTaxes.view.js</js>
<js>/js/views/documentation/documentationVacationReplacement.view.js</js>
<js>/js/views/documentation/documentationFactsheetsAndKid.view.js</js>
<js>/js/views/orderform/orderformPosition.view.js</js>
<js>/js/views/orderform/orderformDepositTable.view.js</js>
<js>/js/views/orderform/orderformDeposit.view.js</js>
<js>/js/views/orderform/orderformPage.view.js</js>
<js>/js/views/model-allocation/modelAllocation.view.js</js>
<js>/js/views/model-allocation/modelPortfolioList.view.js</js>
<js>/js/views/model-allocation/modelAllocationTable.view.js</js>
<js>/js/views/model-allocation/modelAllocationRow.view.js</js>
<js>/js/models/model-allocation/positionAllocation.model.js</js>
<js>/js/models/model-allocation/asset-allocation.model.js</js>
<js>/js/models/model-allocation/current-asset-allocation.model.js</js>
<js>/js/models/product-selection/product-selection.module.js</js>
<js>/js/models/model-allocation/automatic-allocation.js</js>
<js>/js/views/product-selection/productSelectionPositionRow.view.js</js>
<js>/js/views/product-selection/productSelectionTable.view.js</js>
<js>/js/views/product-selection/productSelectionPage.view.js</js>
<js>/js/views/product-selection/savingsPlanSelection.view.js</js>
<js>/js/views/product-selection/MifidCellGenerator.js</js>
<js>/js/views/product-selection/recursiveHeader.view.js</js>
<js>/js/views/needs/focusPage.view.js</js>
<js>/js/models/needs/needs.model.js</js>
<js>/js/models/needs/needs-product-selection.model.js</js>
<js>/js/views/logout/logout.view.js</js>
<js>/js/views/product-search/productSearchTable.view.js</js>
<js>/js/views/product-search/hitList.view.js</js>
<js>/js/views/product-search/expandable.view.js</js>
<js>/js/models/domain/portfolios/link.model.js</js>
<js>/js/views/recommendationPortfolioPositions/recommendationPortfolioPositionsPage.view.js</js>
<js>/js/views/transactions/transactionsPage.view.js</js>
<js>/js/views/transactions/transactionsSummaryTable.view.js</js>
<js>/js/views/transactions/transactionsTableRow.view.js</js>
<js>/js/models/transaction/reallocationItem.model.js</js>
<js>/js/models/transaction/transaction.model.js</js>
<js>/js/views/user-profile/user-profile.view.js</js>
<js>/js/views/user-profile/userProfile.view.js</js>
<js>/js/views/sessions/sessions.js</js>
</group>
<group name="allcss">
<css>/scss/pages/_login.scss</css>
<css>/scss/pages/_customerSearch.scss</css>
<css>/scss/pages/_customerInfo.scss</css>
<css>/scss/pages/_customerProfile.scss</css>
<css>/scss/pages/_customerReports.scss</css>
<css>/scss/pages/_customerProfileChanges.scss</css>
<css>/scss/pages/_customerOverview.scss</css>
<css>/scss/pages/_workflow.scss</css>
<css>/scss/pages/_portfolios.scss</css>
<css>/scss/pages/_modelAllocation.scss</css>
<css>/scss/pages/_productSelection.scss</css>
<css>/scss/pages/_needs.scss</css>
<css>/scss/pages/_transactions.scss</css>
<css>/scss/pages/_startPage.scss</css>
<css>/scss/pages/_documentationPage.scss</css>
<css>/scss/pages/_orderformPage.scss</css>
<css>/scss/pages/_recommendation.scss</css>
<css>/scss/pages/_userProfile.scss</css>
</group>
</groups>
Finally in my web.xml I have:
<!-- ===================================================================================== -->
<!-- FILTERS -->
<!-- ===================================================================================== -->
<!-- Wro4j -->
<filter>
<filter-name>WebResourceOptimizer</filter-name>
<filter-class>ro.isdc.wro.http.WroFilter</filter-class>
</filter>
...
<!-- ===================================================================================== -->
<!-- FILTER MAPPINGS -->
<!-- ===================================================================================== -->
<!-- Wro4j -->
<filter-mapping>
<filter-name>WebResourceOptimizer</filter-name>
<url-pattern>/wro/*</url-pattern>
</filter-mapping>
...
am I doing something wrong? Is there something missing?
I was using version 1.4.7 with ro.isdc.wro.extensions.manager.ExtensionsConfigurableWroManagerFactory . Now I am trying with version 1.7.7 and ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory but still get the same error. The stack trace is a bit different, but that's something expected since I am using a different factory:
2014-12-17 17:09:32,604 [http-bio-8080-exec-4] ERROR ro.isdc.wro.extensions.model.factory.SmartWroModelFactory - Using XmlModelFactory for model creation..
[FAIL] Model creation using XmlModelFactory failed. Trying another ...
[FAIL] Exception occured while building the model using: XmlModelFactory Cannot build model from XML: Invalid resource requested: /WEB-INF/wro.xml Using LazyWroModelFactoryDecorator for model creation..
[FAIL] Model creation using LazyWroModelFactoryDecorator failed. Trying another ...
[FAIL] Exception occured while building the model using: LazyWroModelFactoryDecorator Invalid model found! Using LazyWroModelFactoryDecorator for model creation..
[FAIL] Model creation using LazyWroModelFactoryDecorator failed. Trying another ...
[FAIL] Exception occured while building the model using: LazyWroModelFactoryDecorator Invalid model found!
2014-12-17 17:09:32,605 [http-bio-8080-exec-4] ERROR ro.isdc.wro.model.factory.FallbackAwareWroModelFactory - Error while creating the model
ro.isdc.wro.WroRuntimeException: Cannot create model using any of provided factories
at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:209)
at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:38)
at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
Regarding the location of the wro.xml, I have the following project tree under eclipse:
project_root
+src
+main
+WEB-INF
-web.xml
-wro.properties
-wro.xml

Resources