Just uploaded a .war file to the server.. everthing is ok there.. but by no reason the login page is not loading anything..
i earned this flex+java projects on my new job.. its kind strange to me..
i can't even use firebug on it.. it dysplay nothing on eclipse console.
plz someone give me a hand !
The login page mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%" initialize="Spinner.init(this)" >
<mx:Style source="../flexdesign/css/Login.css"/>
<mx:Style source="../flexdesign/css/principal.css"/>
<mx:Style source="../flexdesign/css/conteudo.css"/>
<mx:Script>
<![CDATA[
import automacao.ui.Spinner;
import flash.net.navigateToURL;
import mx.controls.Alert;
public function abreMenu(url:String):void{
try {
navigateToURL(new URLRequest(url),"_parent");
} catch (e:Error) {
trace("Error occurred!");
}
}
]]>
</mx:Script>
<mx:Move id="cimabaixo" duration="1100" yFrom="0" yTo="0" xFrom="300" xTo="0"/>
<mx:Iris id="zoom" duration="300" xFrom="0" xTo="1" yFrom="0" yTo="1"/>
<mx:Zoom id="zoomhide" duration="500" zoomWidthFrom="1" zoomWidthTo="0" zoomHeightFrom="1" zoomHeightTo="0"/>
<mx:Glow id="brilho" duration="300" alphaFrom="0" alphaTo=".4" blurXFrom="0" blurXTo="20" blurYFrom="0" blurYTo="20" color="0xBBBBBB" strength="3"/>
<mx:Glow id="sembrilho" duration="500" alphaFrom=".6" alphaTo="0" blurXFrom="20" blurXTo="0" blurYFrom="20" blurYTo="0" color="0xBBBBBB" strength="3"/>
<mx:Glow id="brilhoradio" duration="200" alphaFrom="0" alphaTo=".4" blurXFrom="0" blurXTo="15" blurYFrom="0" blurYTo="15" color="0xBBBBBB" strength="2"/>
<mx:Glow id="sembrilhoradio" duration="200" alphaFrom=".3" alphaTo="0" blurXFrom="15" blurXTo="0" blurYFrom="15" blurYTo="0" color="0xBBBBBB" strength="2"/>
<mx:Fade id="fadeOut" duration="300" alphaFrom="1.0" alphaTo="0.0"/>
<mx:Fade id="fadeIn" duration="300" alphaFrom="0.0" alphaTo="1.0"/>
<mx:ModuleLoader id="workspace" x="0" y="0" width="100%" height="100%" url="LoginView.swf"/>
</mx:Application>
it was working like a piece of cake.. i just make some java business change and deploy the project..
Haven't worked with Flex either, but just see if any of these ideas help.
1) Restore the backup and confirm it does still work, and it's your changes. (Just get that out of the way)
2) Ensure you can find those imports on the classpath (i.e. automacao.ui.Spinner etc.) Your WAR might not have included them for some reason.
3) Add into that abreMenu function some sort of generic output to a file to see if it's getting there. I'll suspect its not.
4) Turn on trace-level debugging in log4j/slf4j or whatever you're using.
When you find the answer, post back. :)
Is LoginView.swf still on the same directory?
Also download the Flash debug version so that you will see the "silenced" errors.
If you were using Flex Builder, Go to Project --> Properties --> FlexModules.
Make sure you have added your module LoginView to that. This might be a reason for module not loading.
Related
here is the error:
`limax.zdb.XError: dbhome "zdb" not exist
at limax.zdb.Zdb.testMeta(Zdb.java:130)
at limax.zdb.Zdb.start(Zdb.java:144)
at limax.provider.XmlConfig$StartZdb.lambda$0(XmlConfig.java:410)
at limax.xmlconfig.Service$Loader$TaskList.run(Service.java:108)
at limax.xmlconfig.Service$Loader.runTaskBeforeEngineStart(Service.java:257)
at limax.xmlconfig.Service$Loader.startNetEngine(Service.java:298)
at limax.xmlconfig.Service.startNetEngine(Service.java:350)
at limax.xmlconfig.Service.run(Service.java:372)
at forview.server.Main.main(Main.java:8)`
here is what's in my service-server.xml:
`<Zdb autoKeyInitValue="0" autoKeyStep="4096"
checkpointPeriod="60000" corePoolSize="30" dbhome="zdb"
deadlockDetectPeriod="1000"
defaultTableCache="limax.zdb.TTableCacheLRU"
edbCacheSize="65536" edbLoggerPages="16384" jdbcPoolSize="5"
marshalN="1" marshalPeriod="-1" procPoolSize="10"
schedPoolSize="5" snapshotFatalTime="200" zdbVerify="true">
<Procedure maxExecutionTime="0" retryDelay="100" retryTimes="3" trace="WARN"/>
</Zdb>`
Probably I was trying to build a provider using limax in eclipse, but when I run it something goes wrong.Can someone please help me? Thanks very much.
ok,I create a new folder named "zdb" in my project and everything is ok now. orz
There is existing code that has a call
URL resource = ClassLoader.getSystemResource("hp.obo.gz");
From my understanding, this searches the classpath for the requested file. I printed out the classpath using the code from here: https://www.mkyong.com/java/how-to-print-out-the-current-project-classpath/
and got the following:
/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202017.1.3/lib/idea_rt.jar
/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202017.1.3/plugins/junit/lib/junit-rt.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/charsets.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/deploy.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/access-bridge-64.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/cldrdata.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/dnsns.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/jaccess.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/jfxrt.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/localedata.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/nashorn.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/sunec.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/sunjce_provider.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/sunmscapi.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/sunpkcs11.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/ext/zipfs.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/javaws.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/jce.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/jfr.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/jfxswt.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/jsse.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/management-agent.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/plugin.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/resources.jar
/C:/Program%20Files/Java/jdk1.8.0_66/jre/lib/rt.jar
/C:/Users/johnp/Desktop/git_stuff/boqa/target/test-classes/
/C:/Users/johnp/Desktop/git_stuff/boqa/target/classes/
/C:/Users/johnp/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
/C:/Users/johnp/.m2/repository/de/charite/compbio/ontologizer-core/2.1-SNAPSHOT/ontologizer-core-2.1-20160115.222100-6.jar
/C:/Users/johnp/.m2/repository/com/att/research/grappa/1.2.1/grappa-1.2.1.jar
/C:/Users/johnp/.m2/repository/de/charite/compbio/ontologizer-benchmark/2.1-SNAPSHOT/ontologizer-benchmark-2.1-20160115.222106-6.jar
/C:/Users/johnp/.m2/repository/com/beust/jcommander/1.35/jcommander-1.35.jar
/C:/Users/johnp/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar
/C:/Users/johnp/.m2/repository/org/apache/logging/log4j/log4j-1.2-api/2.8.2/log4j-1.2-api-2.8.2.jar
/C:/Users/johnp/.m2/repository/org/apache/logging/log4j/log4j-api/2.8.2/log4j-api-2.8.2.jar
/C:/Users/johnp/.m2/repository/org/apache/logging/log4j/log4j-core/2.8.2/log4j-core-2.8.2.jar
/C:/Users/johnp/.m2/repository/junit/junit/4.12/junit-4.12.jar
/C:/Users/johnp/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202017.1.3/lib/idea_rt.jar
However, where it actually is found is here (deleting hp.obo.gz causes a null pointer exception):
C:\Users\johnp\Desktop\git_stuff\boqa\src\main\resources
I don't see how it got this location given the above output (it seems similar to /C:/Users/johnp/Desktop/git_stuff/boqa/target/test-classes/
and
/C:/Users/johnp/Desktop/git_stuff/boqa/target/classes/). Any help would be appreciated. Thanks!
Right click on a folder and "mark directory as" -> "Resources Root". This will configure everything behind the scenes in IntelliJ to work
I'm trying to get the comments of an entry in an ADT.
I tried this:
<#assign MBMessageLocalServiceUtil = serviceLocator.findService("com.liferay.message.boards.kernel.service.MBMessageLocalServiceUtil")>
<#getCommentCount resourcePrimKey=article.getResourcePrimKey()/>
<#macro getCommentsCount resourcePrimKey>
<#assign Messages = MBMessageLocalServiceUtil.getMessages("com.liferay.portlet.journal.model.JournalArticle", resourcePrimKey, 0) />
<#assign MessagesCount = Messages?size-1 />
<#if MessagesCount != 0>
(Comments: ${MessagesCount} )
</#if>
</#macro>
It throws me this error then:
The following has evaluated to null or missing:
==> serviceLocator.findService("com.liferay.message.boards.kernel.service.MBMessageLocalServiceUtil") [in template "20116#20160#38923" at line 35, column 54]
I really have no Idea what I am doing wrong.
I've already used the serviceLocator on this portal and it works. Freemarker restricted Variables and Classes are removed.
Does anyone has an Idea for a Soloution ?
You can use the /comment.commentmanagerjsonws/get-comments action from the liferay jsonws api to access the entry comments. This api is accessible per Javascript / curl / URL, it should do the trick.
In Liferay 7 the configuration was moved from portal.properties to the new OSGi configuration. See this thread for details.
I tried to make an eclipse plugin and I had some difficulties.
First of all I created two extension points:
<extension point="org.eclipse.ui.propertyPages">
<page
id="com.coffee.projectPage"
name="Coffee Java Properties"
class="com.coffee.cona.properties.CoffeePropertyPage">
<enabledWhen>
<resolve variable="MYCOFFEE" args="">
<equals value="cona"/>
</resolve>
</enabledWhen>
</page>
</extension>
<extension point="org.eclipse.core.variables.dynamicVariables">
<variable
name="MYCOFFEE"
resolver="com.coffee.properties.CoffeeTimeResolver"
description="Coffee time"
supportsArgument="true">
</variable>
</extension>
In my com.coffee.properties.CoffeeTimeResolver I wrote:
...
public class CoffeeTimeResolver implements IDynamicVariableResolver {
public String resolveValue(IDynamicVariable variable, String argument){
return "cona";
...
...
But it doesn't work! En Eclipse console I see this message:
!MESSAGE The variable MYCOFFEE is not defined
Where I was wrong?
All I need to do es show Property Page only in *.java files that have classes that extend Applet, I mean:
class Xxx extends Applet
but I really don't know how to reach it using test element
Many thanks in advance!
Eclipse has a number of things referred to as variables. org.eclipse.core.variables.dynamicVariables defines a dynamic string substitution variable, this is not the type of variable that the resolve element requires.
As far as I can see there is currently no way to define the IVariableResolver that resolve requires (but the Eclipse code is very large so I may have missed something).
You can probably use the test element instead and use the org.eclipse.core.expressions.propertyTesters extension point which definitely works properly.
I upload files to /upload folder, then I want to directly access my files, like:
http://localhost/upload/xxx.jpg
when I add routes as below:
GET /upload/*file controllers.Assets.at(path="/upload", file)
It causes another error:
not enough arguments for method at: (path: String, file: String)play.api.mvc.Call. Unspecified value parameter file.
<link rel="stylesheet" media="screen" href="#routes.Assets.at("stylesheets/main.css")">
Then, after I change #routes.Assets.at("stylesheets/main.css") to #routes.Assets.at("stylesheets/", "main.css"), there is another error:
[MatchError: (stylesheets/,main.css) (of class scala.Tuple2)]
(path: #unchecked, file: #unchecked) match {
Can somebody help me with this route? Thanks.
finnal, I got answer from playframework website, it not very obvious to find..
http://www.playframework.com/documentation/2.0.4/Assets
from this page:
However, if you define two mappings for the Assets.at action, like this:
GET /javascripts/*file controllers.Assets.at(path="/public/javascripts", file)
GET /images/*file controllers.Assets.at(path="/public/images", file)
Then you will need to specify both parameters when using the reverse router:
<script src="#routes.Assets.at("/public/javascripts", "jquery.js")"></script>
<image src="#routes.Assets.at("/public/images", "logo.png")">
but this may not solve my problem yet, it turn out to appear the second error mention in the question.
Be Careful, check the path param, it must be the same as you described in routes file. as:
when I set:
GET /public/*file controllers.Assets.at(path="/public", file)
in the html file, I should write as below:
#routes.Assets.at("/public", "stylesheets/main.css")
besides, if you use another folders, like /upload, adding below code in project/Build.scala in play.Project is essential. thanks TizianoPiccardi
playAssetsDirectories <+= baseDirectory / "foo"
You should add this line in project/Build.scala:
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
playAssetsDirectories <+= baseDirectory / "upload"
)
More info:
https://github.com/playframework/Play20/wiki/Assets